CfnTransitGatewayVpcAttachmentProps Struct
Properties for defining a CfnTransitGatewayVpcAttachment.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ec2 as ec2 } from 'aws-cdk-lib';
declare const options: any;
const cfnTransitGatewayVpcAttachmentProps: ec2.CfnTransitGatewayVpcAttachmentProps = {
subnetIds: ['subnetIds'],
transitGatewayId: 'transitGatewayId',
vpcId: 'vpcId',
// the properties below are optional
addSubnetIds: ['addSubnetIds'],
options: options,
removeSubnetIds: ['removeSubnetIds'],
tags: [{
key: 'key',
value: 'value',
}],
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_ec2 as ec2
# options: Any
cfn_transit_gateway_vpc_attachment_props = ec2.CfnTransitGatewayVpcAttachmentProps(
subnet_ids=["subnetIds"],
transit_gateway_id="transitGatewayId",
vpc_id="vpcId",
# the properties below are optional
add_subnet_ids=["addSubnetIds"],
options=options,
remove_subnet_ids=["removeSubnetIds"],
tags=[CfnTag(
key="key",
value="value"
)]
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ec2.*;
Object options;
CfnTransitGatewayVpcAttachmentProps cfnTransitGatewayVpcAttachmentProps = CfnTransitGatewayVpcAttachmentProps.builder()
.subnetIds(List.of("subnetIds"))
.transitGatewayId("transitGatewayId")
.vpcId("vpcId")
// the properties below are optional
.addSubnetIds(List.of("addSubnetIds"))
.options(options)
.removeSubnetIds(List.of("removeSubnetIds"))
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;
var options;
var cfnTransitGatewayVpcAttachmentProps = new CfnTransitGatewayVpcAttachmentProps {
SubnetIds = new [] { "subnetIds" },
TransitGatewayId = "transitGatewayId",
VpcId = "vpcId",
// the properties below are optional
AddSubnetIds = new [] { "addSubnetIds" },
Options = options,
RemoveSubnetIds = new [] { "removeSubnetIds" },
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
var options interface{}
cfnTransitGatewayVpcAttachmentProps := &CfnTransitGatewayVpcAttachmentProps{
SubnetIds: []*string{
jsii.String("subnetIds"),
},
TransitGatewayId: jsii.String("transitGatewayId"),
VpcId: jsii.String("vpcId"),
// the properties below are optional
AddSubnetIds: []*string{
jsii.String("addSubnetIds"),
},
Options: options,
RemoveSubnetIds: []*string{
jsii.String("removeSubnetIds"),
},
Tags: []CfnTag{
&CfnTag{
Key: jsii.String("key"),
Value: jsii.String("value"),
},
},
}
Properties
addSubnetIdsoptionalstring[]add_subnet_idsoptionaltyping.List[str]addSubnetIdsoptionalList<String>AddSubnetIdsoptionalstring[]AddSubnetIdsoptional*[]*string #The IDs of one or more subnets to add.
You can specify at most one subnet per Availability Zone.
optionsoptionalanyoptionsoptionalAnyoptionsoptionalObjectOptionsoptionalobjectOptionsoptionalinterface{} #The VPC attachment options.
removeSubnetIdsoptionalstring[]remove_subnet_idsoptionaltyping.List[str]removeSubnetIdsoptionalList<String>RemoveSubnetIdsoptionalstring[]RemoveSubnetIdsoptional*[]*string #The IDs of one or more subnets to remove.
subnetIdsstring[]subnet_idstyping.List[str]subnetIdsList<String>SubnetIdsstring[]SubnetIds*[]*string required #The IDs of the subnets.
tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #The tags for the VPC attachment.
transitGatewayIdstring | ITransitGatewayReftransit_gateway_idtyping.Union[str, ITransitGatewayRef]transitGatewayIdStringTransitGatewayIdstringTransitGatewayIdinterface{} required #The ID of the transit gateway.
The ID of the VPC.