Class CfnTransitGateway
- All Implemented Interfaces:
IInspectable
,ITaggable
,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 classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.ITaggable
ITaggable.Jsii$Default, ITaggable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionprotected
CfnTransitGateway
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnTransitGateway
(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 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.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.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
Enables you to reference a security group across VPCs attached to a transit gateway (TGW).void
setTagsRaw
(List<CfnTag> value) The tags for the transit gateway.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.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
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 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
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in 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:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrId
The ID of the transit gateway. -
getAttrTransitGatewayArn
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
Tag Manager which manages the tags for this resource. -
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.
-