-
Notifications
You must be signed in to change notification settings - Fork 9
adding tgw-attachment resource #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 2 commits
7f79815
88b01e3
72adec1
a4ef93a
df9fc26
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# macOS | ||
.DS_Store | ||
._* | ||
# Maven outputs | ||
.classpath | ||
# IntelliJ | ||
*.iml | ||
.idea | ||
out.java | ||
out/ | ||
.settings | ||
.project | ||
# auto-generated files | ||
target/ | ||
# our logs | ||
rpdk.log | ||
# contains credentials | ||
sam-tests/ | ||
build.gradle | ||
.idea/ | ||
/.integration-tests/ | ||
.integration-tests/ | ||
.sam-test/ | ||
/.sam-test/ | ||
sam-test/ | ||
/sam-test/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"artifact_type": "RESOURCE", | ||
"typeName": "AWS::EC2::TransitGatewayAttachment", | ||
"language": "java", | ||
"runtime": "java8", | ||
"entrypoint": "com.aws.ec2.transitgatewayattachment.HandlerWrapper::handleRequest", | ||
"testEntrypoint": "software.amazon.mwaa.environment.HandlerWrapper::handleRequest", | ||
"settings": { | ||
"version": false, | ||
"subparser_name": null, | ||
"verbose": 0, | ||
"force": false, | ||
"type_name": "Aws::EC2::TransitGatewayAttachment", | ||
"namespace": [ | ||
"com", | ||
"aws", | ||
"ec2", | ||
"transitgatewayattachment" | ||
], | ||
"codegen_template_path": "default", | ||
"protocolVersion": "2.0.0" | ||
}, | ||
"executableEntrypoint": "com.aws.ec2.transitgatewayattachment.HandlerWrapperExecutable" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Aws::EC2::TransitGatewayAttachment | ||
|
||
Congratulations on starting development! Next steps: | ||
|
||
1. Write the JSON schema describing your resource, `aws-ec2-transitgatewayattachment.json` | ||
1. Implement your resource handlers. | ||
|
||
The RPDK will automatically generate the correct resource model from the schema whenever the project is built via Maven. You can also do this manually with the following command: `cfn generate`. | ||
|
||
> Please don't modify files under `target/generated-sources/rpdk`, as they will be automatically overwritten. | ||
|
||
The code uses [Lombok](https://projectlombok.org/), and [you may have to install IDE integrations](https://projectlombok.org/setup/overview) to enable auto-complete for Lombok-annotated classes. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
{ | ||
"typeName": "AWS::EC2::TransitGatewayAttachment", | ||
"description": "Resource Type definition for AWS::EC2::TransitGatewayAttachment", | ||
"sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-transitgateway", | ||
"additionalProperties": false, | ||
"properties": { | ||
"Id": { | ||
"type": "string" | ||
}, | ||
"TransitGatewayId": { | ||
"type": "string" | ||
}, | ||
"VpcId": { | ||
"type": "string" | ||
}, | ||
"SubnetIds": { | ||
"type": "array", | ||
"uniqueItems": false, | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only for VPCAttacment. Current Self-service resource is also for VPCAttachment but exists with the name AWS::EC2::TransitGatewayAttachment whereas the rest of them have their own individual names There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should probably add in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. consider adding all the params for consistency with public API model https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/ec2/model/TransitGatewayAttachment.html There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if only for VPCattachment, should we just name it to be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The missing parameters are for 1:1 mapping with original |
||
"Tags": { | ||
"type": "array", | ||
"uniqueItems": false, | ||
"items": { | ||
"$ref": "#/definitions/Tag" | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"Tag": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"Key": { | ||
"type": "string" | ||
}, | ||
"Value": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"Value", | ||
"Key" | ||
] | ||
} | ||
}, | ||
"required": [ | ||
"VpcId", | ||
"SubnetIds", | ||
"TransitGatewayId" | ||
], | ||
"createOnlyProperties": [ | ||
"/properties/Tags", | ||
"/properties/TransitGatewayId", | ||
"/properties/VpcId", | ||
"/properties/SubnetIds" | ||
], | ||
"readOnlyProperties": [ | ||
"/properties/Id" | ||
], | ||
"primaryIdentifier": [ | ||
"/properties/Id" | ||
], | ||
"handlers": { | ||
"create": { | ||
"permissions": [ | ||
"ec2:CreateTransitGatewayVpcAttachment", | ||
"ec2:CreateTags" | ||
] | ||
}, | ||
"read": { | ||
"permissions": [ | ||
"ec2:DescribeTransitGatewayAttachments", | ||
"ec2:DescribeTransitGatewayVpcAttachments", | ||
"ec2:DescribeTags" | ||
] | ||
}, | ||
"delete": { | ||
"permissions": [ | ||
"ec2:DeleteTransitGatewayVpcAttachment", | ||
"ec2:DeleteTags" | ||
] | ||
}, | ||
"list": { | ||
"permissions": [ | ||
"ec2:DescribeTransitGatewayAttachments", | ||
"ec2:DescribeTransitGatewayVpcAttachments", | ||
"ec2:DescribeTags" | ||
] | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
# AWS::EC2::TransitGatewayAttachment | ||
|
||
Resource Type definition for AWS::EC2::TransitGatewayAttachment | ||
|
||
## Syntax | ||
|
||
To declare this entity in your AWS CloudFormation template, use the following syntax: | ||
|
||
### JSON | ||
|
||
<pre> | ||
{ | ||
"Type" : "AWS::EC2::TransitGatewayAttachment", | ||
"Properties" : { | ||
"<a href="#transitgatewayid" title="TransitGatewayId">TransitGatewayId</a>" : <i>String</i>, | ||
"<a href="#vpcid" title="VpcId">VpcId</a>" : <i>String</i>, | ||
"<a href="#subnetids" title="SubnetIds">SubnetIds</a>" : <i>[ String, ... ]</i>, | ||
"<a href="#tags" title="Tags">Tags</a>" : <i>[ <a href="tag.md">Tag</a>, ... ]</i> | ||
} | ||
} | ||
</pre> | ||
|
||
### YAML | ||
|
||
<pre> | ||
Type: AWS::EC2::TransitGatewayAttachment | ||
Properties: | ||
<a href="#transitgatewayid" title="TransitGatewayId">TransitGatewayId</a>: <i>String</i> | ||
<a href="#vpcid" title="VpcId">VpcId</a>: <i>String</i> | ||
<a href="#subnetids" title="SubnetIds">SubnetIds</a>: <i> | ||
- String</i> | ||
<a href="#tags" title="Tags">Tags</a>: <i> | ||
- <a href="tag.md">Tag</a></i> | ||
</pre> | ||
|
||
## Properties | ||
|
||
#### TransitGatewayId | ||
|
||
_Required_: Yes | ||
|
||
_Type_: String | ||
|
||
_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) | ||
|
||
#### VpcId | ||
|
||
_Required_: Yes | ||
|
||
_Type_: String | ||
|
||
_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) | ||
|
||
#### SubnetIds | ||
|
||
_Required_: Yes | ||
|
||
_Type_: List of String | ||
|
||
_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) | ||
|
||
#### Tags | ||
|
||
_Required_: No | ||
|
||
_Type_: List of <a href="tag.md">Tag</a> | ||
|
||
_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) | ||
|
||
## Return Values | ||
|
||
### Ref | ||
|
||
When you pass the logical ID of this resource to the intrinsic `Ref` function, Ref returns the Id. | ||
|
||
### Fn::GetAtt | ||
|
||
The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values. | ||
|
||
For more information about using the `Fn::GetAtt` intrinsic function, see [Fn::GetAtt](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-getatt.html). | ||
|
||
#### Id | ||
|
||
Returns the <code>Id</code> value. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# AWS::EC2::TransitGatewayAttachment Tag | ||
|
||
## Syntax | ||
|
||
To declare this entity in your AWS CloudFormation template, use the following syntax: | ||
|
||
### JSON | ||
|
||
<pre> | ||
{ | ||
"<a href="#key" title="Key">Key</a>" : <i>String</i>, | ||
"<a href="#value" title="Value">Value</a>" : <i>String</i> | ||
} | ||
</pre> | ||
|
||
### YAML | ||
|
||
<pre> | ||
<a href="#key" title="Key">Key</a>: <i>String</i> | ||
<a href="#value" title="Value">Value</a>: <i>String</i> | ||
</pre> | ||
|
||
## Properties | ||
|
||
#### Key | ||
|
||
_Required_: Yes | ||
|
||
_Type_: String | ||
|
||
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) | ||
|
||
#### Value | ||
|
||
_Required_: Yes | ||
|
||
_Type_: String | ||
|
||
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"TransitGatewayId": "tgw-06d4b2a0e616906f5", | ||
"VpcId": "vpc-0b6fefef4e752f0fd", | ||
"SubnetIds": [ | ||
"subnet-0a00435ae85165f31" | ||
], | ||
"Tags": [ | ||
{ | ||
"Key": "key1", | ||
"Value": "value1" | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"Id": "tgw-attach-09017663fea56c134", | ||
"TransitGatewayId": "tgw-02c783c4653c2bdad", | ||
"VpcId": "vpc-0e32b4e0c1ca43f43", | ||
"SubnetIds": [ | ||
"subnet-0d2d2e34a920cd263", | ||
"subnet-0c1dcbe37e3db157b" | ||
], | ||
"Tags": [ | ||
{ | ||
"Key": "key1", | ||
"Value": "value1" | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lombok.addLombokGeneratedAnnotation = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove
build.gradle
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.