Class CfnTransitGatewayPropsMixin

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Mixin
software.amazon.awscdk.cfnpropertymixins.services.ec2.CfnTransitGatewayPropsMixin
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IMixin

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-03-11T13:19:58.727Z") @Stability(Stable) public class CfnTransitGatewayPropsMixin extends Mixin implements software.constructs.IMixin
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 .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.cfnpropertymixins.services.ec2.*;
 import software.amazon.awscdk.*;
 IMergeStrategy mergeStrategy;
 CfnTransitGatewayPropsMixin cfnTransitGatewayPropsMixin = CfnTransitGatewayPropsMixin.Builder.create(CfnTransitGatewayMixinProps.builder()
         .amazonSideAsn(123)
         .associationDefaultRouteTableId("associationDefaultRouteTableId")
         .autoAcceptSharedAttachments("autoAcceptSharedAttachments")
         .defaultRouteTableAssociation("defaultRouteTableAssociation")
         .defaultRouteTablePropagation("defaultRouteTablePropagation")
         .description("description")
         .dnsSupport("dnsSupport")
         .encryptionSupport("encryptionSupport")
         .multicastSupport("multicastSupport")
         .propagationDefaultRouteTableId("propagationDefaultRouteTableId")
         .securityGroupReferencingSupport("securityGroupReferencingSupport")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .transitGatewayCidrBlocks(List.of("transitGatewayCidrBlocks"))
         .vpnEcmpSupport("vpnEcmpSupport")
         .build())
 .strategy(mergeStrategy)
 .build();
 

See Also:
  • Field Details

    • CFN_PROPERTY_KEYS

      @Stability(Stable) protected static final List<String> CFN_PROPERTY_KEYS
  • Constructor Details

    • CfnTransitGatewayPropsMixin

      protected CfnTransitGatewayPropsMixin(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnTransitGatewayPropsMixin

      protected CfnTransitGatewayPropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnTransitGatewayPropsMixin

      @Stability(Stable) public CfnTransitGatewayPropsMixin(@NotNull CfnTransitGatewayMixinProps props, @Nullable CfnPropertyMixinOptions options)
      Create a mixin to apply properties to AWS::EC2::TransitGateway.

      Parameters:
      props - L1 properties to apply. This parameter is required.
      options - Mixin options.
    • CfnTransitGatewayPropsMixin

      @Stability(Stable) public CfnTransitGatewayPropsMixin(@NotNull CfnTransitGatewayMixinProps props)
      Create a mixin to apply properties to AWS::EC2::TransitGateway.

      Parameters:
      props - L1 properties to apply. This parameter is required.
  • Method Details

    • applyTo

      @Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct construct)
      Apply the mixin properties to the construct.

      Specified by:
      applyTo in interface software.constructs.IMixin
      Specified by:
      applyTo in class Mixin
      Parameters:
      construct - This parameter is required.
    • supports

      @Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct)
      Check if this mixin supports the given construct.

      Specified by:
      supports in interface software.constructs.IMixin
      Overrides:
      supports in class Mixin
      Parameters:
      construct - This parameter is required.
    • getProps

      @Stability(Stable) @NotNull protected CfnTransitGatewayMixinProps getProps()
    • getStrategy

      @Stability(Stable) @NotNull protected IMergeStrategy getStrategy()