CfnTransitGatewayPropsMixin

class aws_cdk.cfn_property_mixins.aws_ec2.CfnTransitGatewayPropsMixin(props, *, strategy=None)

Bases: 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:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-transitgateway.html

CloudformationResource:

AWS::EC2::TransitGateway

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.cfn_property_mixins import aws_ec2 as ec2
import aws_cdk as cdk

# merge_strategy: cdk.IMergeStrategy

cfn_transit_gateway_props_mixin = ec2.CfnTransitGatewayPropsMixin(ec2.CfnTransitGatewayMixinProps(
    amazon_side_asn=123,
    association_default_route_table_id="associationDefaultRouteTableId",
    auto_accept_shared_attachments="autoAcceptSharedAttachments",
    default_route_table_association="defaultRouteTableAssociation",
    default_route_table_propagation="defaultRouteTablePropagation",
    description="description",
    dns_support="dnsSupport",
    encryption_support="encryptionSupport",
    multicast_support="multicastSupport",
    propagation_default_route_table_id="propagationDefaultRouteTableId",
    security_group_referencing_support="securityGroupReferencingSupport",
    tags=[cdk.CfnTag(
        key="key",
        value="value"
    )],
    transit_gateway_cidr_blocks=["transitGatewayCidrBlocks"],
    vpn_ecmp_support="vpnEcmpSupport"
),
    strategy=merge_strategy
)

Create a mixin to apply properties to AWS::EC2::TransitGateway.

Parameters:
  • props (Union[CfnTransitGatewayMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[IMergeStrategy]) – Strategy for merging nested properties. Default: - PropertyMergeStrategy.combine()

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

None

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['amazonSideAsn', 'associationDefaultRouteTableId', 'autoAcceptSharedAttachments', 'defaultRouteTableAssociation', 'defaultRouteTablePropagation', 'description', 'dnsSupport', 'encryptionSupport', 'multicastSupport', 'propagationDefaultRouteTableId', 'securityGroupReferencingSupport', 'tags', 'transitGatewayCidrBlocks', 'vpnEcmpSupport']

Static Methods

classmethod is_mixin(x)

Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.