class CfnTransitGatewayAttachmentPropsMixin (mixin)
| Language | Type name |
|---|---|
.NET | Amazon.CDK.CfnPropertyMixins.AWS.EC2.CfnTransitGatewayAttachmentPropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkcfnpropertymixins/v2/awsec2#CfnTransitGatewayAttachmentPropsMixin |
Java | software.amazon.awscdk.cfnpropertymixins.services.ec2.CfnTransitGatewayAttachmentPropsMixin |
Python | aws_cdk.cfn_property_mixins.aws_ec2.CfnTransitGatewayAttachmentPropsMixin |
TypeScript | @aws-cdk/cfn-property-mixins » aws_ec2 » CfnTransitGatewayAttachmentPropsMixin |
Implements
IMixin
Extends
Mixin
Attaches a VPC to a transit gateway.
If you attach a VPC with a CIDR range that overlaps the CIDR range of a VPC that is already attached, the new VPC CIDR range is not propagated to the default propagation route table.
To send VPC traffic to an attached transit gateway, add a route to the VPC route table using AWS::EC2::Route .
To update tags for a VPC attachment after creation without replacing the attachment, use AWS::EC2::TransitGatewayVpcAttachment instead.
Example
// 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/cfn-property-mixins';
import * as cdk from 'aws-cdk-lib';
declare const mergeStrategy: cdk.IMergeStrategy;
declare const options: any;
const cfnTransitGatewayAttachmentPropsMixin = new ec2.CfnTransitGatewayAttachmentPropsMixin({
options: options,
subnetIds: ['subnetIds'],
tags: [{
key: 'key',
value: 'value',
}],
transitGatewayId: 'transitGatewayId',
vpcId: 'vpcId',
}, /* all optional props */ {
strategy: mergeStrategy,
});
Initializer
new CfnTransitGatewayAttachmentPropsMixin(props: CfnTransitGatewayAttachmentMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Transit Gateway Attachment Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::EC2::TransitGatewayAttachment.
Properties
| Name | Type | Description |
|---|---|---|
| props | Cfn | |
| strategy | IMerge | |
| static CFN_PROPERTY_KEYS | string[] |
props
Type:
Cfn
strategy
Type:
IMerge
static CFN_PROPERTY_KEYS
Type:
string[]
Methods
| Name | Description |
|---|---|
| apply | Apply the mixin properties to the construct. |
| supports(construct) | Check if this mixin supports the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): void
Parameters
- construct
IConstruct
Apply the mixin properties to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct.

.NET
Go
Java
Python
TypeScript