Class CfnTransitGateway
- All Implemented Interfaces:
IConstruct,IDependable,IInspectable,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
AWS::EC2::TransitGateway.
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")
.tags(List.of(CfnTag.builder()
.key("key")
.value("value")
.build()))
.transitGatewayCidrBlocks(List.of("transitGatewayCidrBlocks"))
.vpnEcmpSupport("vpnEcmpSupport")
.build();
-
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.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionCfnTransitGateway(Construct scope, String id) Create a newAWS::EC2::TransitGateway.CfnTransitGateway(Construct scope, String id, CfnTransitGatewayProps props) Create a newAWS::EC2::TransitGateway.protectedCfnTransitGateway(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnTransitGateway(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionA 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.getTags()The tags for the transit gateway.The transit gateway CIDR blocks.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.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.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validatePropertiesMethods inherited from class software.amazon.awscdk.core.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods 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.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 Construct scope, @NotNull String id, @Nullable CfnTransitGatewayProps props) Create a newAWS::EC2::TransitGateway.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
props-- resource properties.
-
CfnTransitGateway
Create a newAWS::EC2::TransitGateway.- Parameters:
scope-- scope in which this resource is defined.
id-- scoped id of the resource.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspectin interfaceIInspectable- Parameters:
inspector-- tree inspector to collect and process attributes.
-
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. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getTags
The tags for the transit gateway. -
getAmazonSideAsn
A private Autonomous System Number (ASN) for the Amazon side of a BGP session.The range is 64512 to 65534 for 16-bit ASNs. The default is 64512.
-
setAmazonSideAsn
A private Autonomous System Number (ASN) for the Amazon side of a BGP session.The range is 64512 to 65534 for 16-bit ASNs. The default is 64512.
-
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.Enabled by default.
-
setDefaultRouteTableAssociation
Enable or disable automatic association with the default association route table.Enabled by default.
-
getDefaultRouteTablePropagation
Enable or disable automatic propagation of routes to the default propagation route table.Enabled by default.
-
setDefaultRouteTablePropagation
Enable or disable automatic propagation of routes to the default propagation route table.Enabled by default.
-
getDescription
The description of the transit gateway. -
setDescription
The description of the transit gateway. -
getDnsSupport
Enable or disable DNS support.Enabled by default.
-
setDnsSupport
Enable or disable DNS support.Enabled by default.
-
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. -
getTransitGatewayCidrBlocks
The transit gateway CIDR blocks. -
setTransitGatewayCidrBlocks
The transit gateway CIDR blocks. -
getVpnEcmpSupport
Enable or disable Equal Cost Multipath Protocol support.Enabled by default.
-
setVpnEcmpSupport
Enable or disable Equal Cost Multipath Protocol support.Enabled by default.
-