@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.345Z") @Stability(value=Stable) public class CfnTransitGateway extends CfnResource implements IInspectable
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();
| Modifier and Type | Class and Description |
|---|---|
static class |
CfnTransitGateway.Builder
A fluent builder for
CfnTransitGateway. |
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnTransitGateway(software.constructs.Construct scope,
String id)
Create a new `AWS::EC2::TransitGateway`.
|
|
CfnTransitGateway(software.constructs.Construct scope,
String id,
CfnTransitGatewayProps props)
Create a new `AWS::EC2::TransitGateway`.
|
protected |
CfnTransitGateway(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnTransitGateway(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
Number |
getAmazonSideAsn()
A private Autonomous System Number (ASN) for the Amazon side of a BGP session.
|
String |
getAssociationDefaultRouteTableId()
The ID of the default association route table.
|
String |
getAttrId()
The ID of the transit gateway.
|
String |
getAutoAcceptSharedAttachments()
Enable or disable automatic acceptance of attachment requests.
|
protected Map<String,Object> |
getCfnProperties() |
String |
getDefaultRouteTableAssociation()
Enable or disable automatic association with the default association route table.
|
String |
getDefaultRouteTablePropagation()
Enable or disable automatic propagation of routes to the default propagation route table.
|
String |
getDescription()
The description of the transit gateway.
|
String |
getDnsSupport()
Enable or disable DNS support.
|
String |
getMulticastSupport()
Indicates whether multicast is enabled on the transit gateway.
|
String |
getPropagationDefaultRouteTableId()
The ID of the default propagation route table.
|
TagManager |
getTags()
The tags for the transit gateway.
|
List<String> |
getTransitGatewayCidrBlocks()
The transit gateway CIDR blocks.
|
String |
getVpnEcmpSupport()
Enable or disable Equal Cost Multipath Protocol support.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setAmazonSideAsn(Number value)
A private Autonomous System Number (ASN) for the Amazon side of a BGP session.
|
void |
setAssociationDefaultRouteTableId(String value)
The ID of the default association route table.
|
void |
setAutoAcceptSharedAttachments(String value)
Enable or disable automatic acceptance of attachment requests.
|
void |
setDefaultRouteTableAssociation(String value)
Enable or disable automatic association with the default association route table.
|
void |
setDefaultRouteTablePropagation(String value)
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 |
setPropagationDefaultRouteTableId(String value)
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.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnTransitGateway(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnTransitGateway(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnTransitGateway(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@Nullable
CfnTransitGatewayProps props)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.props - - resource properties.@Stability(value=Stable)
public CfnTransitGateway(@NotNull
software.constructs.Construct scope,
@NotNull
String id)
scope - - scope in which this resource is defined. This parameter is required.id - - scoped id of the resource. This parameter is required.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrId()
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public TagManager getTags()
@Stability(value=Stable) @Nullable public Number getAmazonSideAsn()
The range is 64512 to 65534 for 16-bit ASNs. The default is 64512.
@Stability(value=Stable)
public void setAmazonSideAsn(@Nullable
Number value)
The range is 64512 to 65534 for 16-bit ASNs. The default is 64512.
@Stability(value=Stable) @Nullable public String getAssociationDefaultRouteTableId()
@Stability(value=Stable)
public void setAssociationDefaultRouteTableId(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getAutoAcceptSharedAttachments()
Disabled by default.
@Stability(value=Stable)
public void setAutoAcceptSharedAttachments(@Nullable
String value)
Disabled by default.
@Stability(value=Stable) @Nullable public String getDefaultRouteTableAssociation()
Enabled by default.
@Stability(value=Stable)
public void setDefaultRouteTableAssociation(@Nullable
String value)
Enabled by default.
@Stability(value=Stable) @Nullable public String getDefaultRouteTablePropagation()
Enabled by default.
@Stability(value=Stable)
public void setDefaultRouteTablePropagation(@Nullable
String value)
Enabled by default.
@Stability(value=Stable) @Nullable public String getDescription()
@Stability(value=Stable)
public void setDescription(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getDnsSupport()
Enabled by default.
@Stability(value=Stable)
public void setDnsSupport(@Nullable
String value)
Enabled by default.
@Stability(value=Stable) @Nullable public String getMulticastSupport()
@Stability(value=Stable)
public void setMulticastSupport(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getPropagationDefaultRouteTableId()
@Stability(value=Stable)
public void setPropagationDefaultRouteTableId(@Nullable
String value)
@Stability(value=Stable) @Nullable public List<String> getTransitGatewayCidrBlocks()
@Stability(value=Stable)
public void setTransitGatewayCidrBlocks(@Nullable
List<String> value)
@Stability(value=Stable) @Nullable public String getVpnEcmpSupport()
Enabled by default.
@Stability(value=Stable)
public void setVpnEcmpSupport(@Nullable
String value)
Enabled by default.
Copyright © 2022. All rights reserved.