class CfnTransitGatewayPropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.CfnPropertyMixins.AWS.EC2.CfnTransitGatewayPropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkcfnpropertymixins/v2/awsec2#CfnTransitGatewayPropsMixin |
Java | software.amazon.awscdk.cfnpropertymixins.services.ec2.CfnTransitGatewayPropsMixin |
Python | aws_cdk.cfn_property_mixins.aws_ec2.CfnTransitGatewayPropsMixin |
TypeScript | @aws-cdk/cfn-property-mixins » aws_ec2 » CfnTransitGatewayPropsMixin |
Implements
IMixin
Extends
Mixin
Specifies a transit gateway.
You can use a transit gateway to interconnect your virtual private clouds (VPC) and on-premises networks. After the transit gateway enters the available state, you can attach your VPCs and VPN connections to the transit gateway.
To attach your VPCs, use AWS::EC2::TransitGatewayAttachment .
To attach a VPN connection, use AWS::EC2::CustomerGateway to create a customer gateway and specify the ID of the customer gateway and the ID of the transit gateway in a call to AWS::EC2::VPNConnection .
When you create a transit gateway, we create a default transit gateway route table and use it as the default association route table and the default propagation route table. You can use AWS::EC2::TransitGatewayRouteTable to create additional transit gateway route tables. If you disable automatic route propagation, we do not create a default transit gateway route table. You can use AWS::EC2::TransitGatewayRouteTablePropagation to propagate routes from a resource attachment to a transit gateway route table. If you disable automatic associations, you can use AWS::EC2::TransitGatewayRouteTableAssociation to associate a resource attachment with a transit gateway route table.
To create a transit gateway with EncryptionSupport enabled through CloudFormation, you will need the ec2:ModifyTransitGateway Identity and Access Management (IAM) permission. For more information, see ModifyTransitGateway in Actions, resources, and condition keys for Amazon EC2 of the Identify and Access Management Service Authorization Reference .
See also: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgateway.html
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;
const cfnTransitGatewayPropsMixin = new ec2.CfnTransitGatewayPropsMixin({
amazonSideAsn: 123,
associationDefaultRouteTableId: 'associationDefaultRouteTableId',
autoAcceptSharedAttachments: 'autoAcceptSharedAttachments',
defaultRouteTableAssociation: 'defaultRouteTableAssociation',
defaultRouteTablePropagation: 'defaultRouteTablePropagation',
description: 'description',
dnsSupport: 'dnsSupport',
encryptionSupport: 'encryptionSupport',
multicastSupport: 'multicastSupport',
propagationDefaultRouteTableId: 'propagationDefaultRouteTableId',
securityGroupReferencingSupport: 'securityGroupReferencingSupport',
tags: [{
key: 'key',
value: 'value',
}],
transitGatewayCidrBlocks: ['transitGatewayCidrBlocks'],
vpnEcmpSupport: 'vpnEcmpSupport',
}, /* all optional props */ {
strategy: mergeStrategy,
});
Initializer
new CfnTransitGatewayPropsMixin(props: CfnTransitGatewayMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Transit Gateway Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::EC2::TransitGateway.
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