Class CfnTransitGateway
- All Implemented Interfaces:
IEnvironmentAware,IInspectable,ITaggable,ITransitGatewayRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
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:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.services.ec2.ITransitGatewayRef
ITransitGatewayRef.Jsii$Default, ITransitGatewayRef.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnTransitGateway(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnTransitGateway(software.amazon.jsii.JsiiObjectRef objRef) CfnTransitGateway(software.constructs.Construct scope, String id) CfnTransitGateway(software.constructs.Construct scope, String id, CfnTransitGatewayProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic ITransitGatewayReffromTransitGatewayArn(software.constructs.Construct scope, String id, String arn) Creates a new ITransitGatewayRef from an ARN.static ITransitGatewayReffromTransitGatewayId(software.constructs.Construct scope, String id, String transitGatewayId) Creates a new ITransitGatewayRef from a transitGatewayId.A private Autonomous System Number (ASN) for the Amazon side of a BGP session.The ID of the default association route table.The ID of the transit gateway.Enable or disable automatic acceptance of attachment requests.Enable or disable automatic association with the default association route table.Enable or disable automatic propagation of routes to the default propagation route table.The description of the transit gateway.Enable or disable DNS support.Indicates whether multicast is enabled on the transit gateway.The ID of the default propagation route table.Enables you to reference a security group across VPCs attached to a transit gateway (TGW).getTags()Tag Manager which manages the tags for this resource.The tags for the transit gateway.The transit gateway CIDR blocks.A reference to a TransitGateway resource.Enable or disable Equal Cost Multipath Protocol support.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetAmazonSideAsn(Number value) A private Autonomous System Number (ASN) for the Amazon side of a BGP session.voidThe ID of the default association route table.voidEnable or disable automatic acceptance of attachment requests.voidEnable or disable automatic association with the default association route table.voidEnable or disable automatic propagation of routes to the default propagation route table.voidsetDescription(String value) The description of the transit gateway.voidsetDnsSupport(String value) Enable or disable DNS support.voidsetMulticastSupport(String value) Indicates whether multicast is enabled on the transit gateway.voidThe ID of the default propagation route table.voidEnables you to reference a security group across VPCs attached to a transit gateway (TGW).voidsetTagsRaw(List<CfnTag> value) The tags for the transit gateway.voidsetTransitGatewayCidrBlocks(List<String> value) The transit gateway CIDR blocks.voidsetVpnEcmpSupport(String value) Enable or disable Equal Cost Multipath Protocol support.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
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
-
fromTransitGatewayArn
@Stability(Stable) @NotNull public static ITransitGatewayRef fromTransitGatewayArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String arn) Creates a new ITransitGatewayRef from an ARN.- Parameters:
scope- This parameter is required.id- This parameter is required.arn- This parameter is required.
-
fromTransitGatewayId
@Stability(Stable) @NotNull public static ITransitGatewayRef fromTransitGatewayId(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String transitGatewayId) Creates a new ITransitGatewayRef from a transitGatewayId.- Parameters:
scope- This parameter is required.id- This parameter is required.transitGatewayId- This parameter is required.
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- 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:
renderPropertiesin classCfnResource- Parameters:
props- This parameter is required.
-
getAttrId
The ID of the transit gateway. -
getAttrTransitGatewayArn
-
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
getTransitGatewayRef
A reference to a TransitGateway resource.- Specified by:
getTransitGatewayRefin interfaceITransitGatewayRef
-
getAmazonSideAsn
A private Autonomous System Number (ASN) for the Amazon side of a BGP session. -
setAmazonSideAsn
A private Autonomous System Number (ASN) for the Amazon side of a BGP session. -
getAssociationDefaultRouteTableId
The ID of the default association route table. -
setAssociationDefaultRouteTableId
The ID of the default association route table. -
getDefaultRouteTableAssociation
Enable or disable automatic association with the default association route table. -
setDefaultRouteTableAssociation
Enable or disable automatic association with the default association route table. -
getDefaultRouteTablePropagation
Enable or disable automatic propagation of routes to the default propagation route table. -
setDefaultRouteTablePropagation
Enable or disable automatic propagation of routes to the default propagation route table. -
getDescription
The description of the transit gateway. -
setDescription
The description of the transit gateway. -
getDnsSupport
Enable or disable DNS support. -
setDnsSupport
Enable or disable DNS support. -
getMulticastSupport
Indicates whether multicast is enabled on the transit gateway. -
setMulticastSupport
Indicates whether multicast is enabled on the transit gateway. -
getPropagationDefaultRouteTableId
The ID of the default propagation route table. -
setPropagationDefaultRouteTableId
The ID of the default propagation route table. -
getSecurityGroupReferencingSupport
Enables you to reference a security group across VPCs attached to a transit gateway (TGW). -
setSecurityGroupReferencingSupport
Enables you to reference a security group across VPCs attached to a transit gateway (TGW). -
getTagsRaw
The tags for the transit gateway. -
setTagsRaw
The tags for the transit gateway. -
getTransitGatewayCidrBlocks
The transit gateway CIDR blocks. -
setTransitGatewayCidrBlocks
The transit gateway CIDR blocks. -
getVpnEcmpSupport
Enable or disable Equal Cost Multipath Protocol support. -
setVpnEcmpSupport
Enable or disable Equal Cost Multipath Protocol support.
-