Class CfnTransitGateway

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-05T03:43:42.160Z") @Stability(Stable) public class CfnTransitGateway extends CfnResource implements IInspectable, ITaggable
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.

Example:

 // 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.*;
 CfnTransitGateway cfnTransitGateway = CfnTransitGateway.Builder.create(this, "MyCfnTransitGateway")
         .amazonSideAsn(123)
         .associationDefaultRouteTableId("associationDefaultRouteTableId")
         .autoAcceptSharedAttachments("autoAcceptSharedAttachments")
         .defaultRouteTableAssociation("defaultRouteTableAssociation")
         .defaultRouteTablePropagation("defaultRouteTablePropagation")
         .description("description")
         .dnsSupport("dnsSupport")
         .multicastSupport("multicastSupport")
         .propagationDefaultRouteTableId("propagationDefaultRouteTableId")
         .securityGroupReferencingSupport("securityGroupReferencingSupport")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .transitGatewayCidrBlocks(List.of("transitGatewayCidrBlocks"))
         .vpnEcmpSupport("vpnEcmpSupport")
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnTransitGateway

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

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

      @Stability(Stable) public CfnTransitGateway(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnTransitGatewayProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties.
    • CfnTransitGateway

      @Stability(Stable) public CfnTransitGateway(@NotNull software.constructs.Construct scope, @NotNull String id)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
      The ID of the transit gateway.
    • getAttrTransitGatewayArn

      @Stability(Stable) @NotNull public String getAttrTransitGatewayArn()
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getAmazonSideAsn

      @Stability(Stable) @Nullable public Number getAmazonSideAsn()
      A private Autonomous System Number (ASN) for the Amazon side of a BGP session.
    • setAmazonSideAsn

      @Stability(Stable) public void setAmazonSideAsn(@Nullable Number value)
      A private Autonomous System Number (ASN) for the Amazon side of a BGP session.
    • getAssociationDefaultRouteTableId

      @Stability(Stable) @Nullable public String getAssociationDefaultRouteTableId()
      The ID of the default association route table.
    • setAssociationDefaultRouteTableId

      @Stability(Stable) public void setAssociationDefaultRouteTableId(@Nullable String value)
      The ID of the default association route table.
    • getAutoAcceptSharedAttachments

      @Stability(Stable) @Nullable public String getAutoAcceptSharedAttachments()
      Enable or disable automatic acceptance of attachment requests.
    • setAutoAcceptSharedAttachments

      @Stability(Stable) public void setAutoAcceptSharedAttachments(@Nullable String value)
      Enable or disable automatic acceptance of attachment requests.
    • getDefaultRouteTableAssociation

      @Stability(Stable) @Nullable public String getDefaultRouteTableAssociation()
      Enable or disable automatic association with the default association route table.
    • setDefaultRouteTableAssociation

      @Stability(Stable) public void setDefaultRouteTableAssociation(@Nullable String value)
      Enable or disable automatic association with the default association route table.
    • getDefaultRouteTablePropagation

      @Stability(Stable) @Nullable public String getDefaultRouteTablePropagation()
      Enable or disable automatic propagation of routes to the default propagation route table.
    • setDefaultRouteTablePropagation

      @Stability(Stable) public void setDefaultRouteTablePropagation(@Nullable String value)
      Enable or disable automatic propagation of routes to the default propagation route table.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      The description of the transit gateway.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      The description of the transit gateway.
    • getDnsSupport

      @Stability(Stable) @Nullable public String getDnsSupport()
      Enable or disable DNS support.
    • setDnsSupport

      @Stability(Stable) public void setDnsSupport(@Nullable String value)
      Enable or disable DNS support.
    • getMulticastSupport

      @Stability(Stable) @Nullable public String getMulticastSupport()
      Indicates whether multicast is enabled on the transit gateway.
    • setMulticastSupport

      @Stability(Stable) public void setMulticastSupport(@Nullable String value)
      Indicates whether multicast is enabled on the transit gateway.
    • getPropagationDefaultRouteTableId

      @Stability(Stable) @Nullable public String getPropagationDefaultRouteTableId()
      The ID of the default propagation route table.
    • setPropagationDefaultRouteTableId

      @Stability(Stable) public void setPropagationDefaultRouteTableId(@Nullable String value)
      The ID of the default propagation route table.
    • getSecurityGroupReferencingSupport

      @Stability(Stable) @Nullable public String getSecurityGroupReferencingSupport()
      Enables you to reference a security group across VPCs attached to a transit gateway (TGW).
    • setSecurityGroupReferencingSupport

      @Stability(Stable) public void setSecurityGroupReferencingSupport(@Nullable String value)
      Enables you to reference a security group across VPCs attached to a transit gateway (TGW).
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      The tags for the transit gateway.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      The tags for the transit gateway.
    • getTransitGatewayCidrBlocks

      @Stability(Stable) @Nullable public List<String> getTransitGatewayCidrBlocks()
      The transit gateway CIDR blocks.
    • setTransitGatewayCidrBlocks

      @Stability(Stable) public void setTransitGatewayCidrBlocks(@Nullable List<String> value)
      The transit gateway CIDR blocks.
    • getVpnEcmpSupport

      @Stability(Stable) @Nullable public String getVpnEcmpSupport()
      Enable or disable Equal Cost Multipath Protocol support.
    • setVpnEcmpSupport

      @Stability(Stable) public void setVpnEcmpSupport(@Nullable String value)
      Enable or disable Equal Cost Multipath Protocol support.