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 classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionCfnTransitGateway
(Construct scope, String id) Create a newAWS::EC2::TransitGateway
.CfnTransitGateway
(Construct scope, String id, CfnTransitGatewayProps props) Create a newAWS::EC2::TransitGateway
.protected
CfnTransitGateway
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnTransitGateway
(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.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setAmazonSideAsn
(Number value) A private Autonomous System Number (ASN) for the Amazon side of a BGP session.void
The ID of the default association route table.void
Enable or disable automatic acceptance of attachment requests.void
Enable or disable automatic association with the default association route table.void
Enable or disable automatic propagation of routes to the default propagation route table.void
setDescription
(String value) The description of the transit gateway.void
setDnsSupport
(String value) Enable or disable DNS support.void
setMulticastSupport
(String value) Indicates whether multicast is enabled on the transit gateway.void
The ID of the default propagation route table.void
setTransitGatewayCidrBlocks
(List<String> value) The transit gateway CIDR blocks.void
setVpnEcmpSupport
(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, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
inspect
in 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:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrId
The ID of the transit gateway. -
getCfnProperties
- Overrides:
getCfnProperties
in 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.
-