@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:42.819Z") 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 . |
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnTransitGateway(Construct scope,
java.lang.String id)
Create a new `AWS::EC2::TransitGateway`.
|
|
CfnTransitGateway(Construct scope,
java.lang.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 |
---|---|
java.lang.Number |
getAmazonSideAsn()
A private Autonomous System Number (ASN) for the Amazon side of a BGP session.
|
java.lang.String |
getAssociationDefaultRouteTableId()
The ID of the default association route table.
|
java.lang.String |
getAttrId()
The ID of the transit gateway.
|
java.lang.String |
getAutoAcceptSharedAttachments()
Enable or disable automatic acceptance of attachment requests.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getDefaultRouteTableAssociation()
Enable or disable automatic association with the default association route table.
|
java.lang.String |
getDefaultRouteTablePropagation()
Enable or disable automatic propagation of routes to the default propagation route table.
|
java.lang.String |
getDescription()
The description of the transit gateway.
|
java.lang.String |
getDnsSupport()
Enable or disable DNS support.
|
java.lang.String |
getMulticastSupport()
Indicates whether multicast is enabled on the transit gateway.
|
java.lang.String |
getPropagationDefaultRouteTableId()
The ID of the default propagation route table.
|
TagManager |
getTags()
The tags for the transit gateway.
|
java.util.List<java.lang.String> |
getTransitGatewayCidrBlocks()
The transit gateway CIDR blocks.
|
java.lang.String |
getVpnEcmpSupport()
Enable or disable Equal Cost Multipath Protocol support.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setAmazonSideAsn(java.lang.Number value)
A private Autonomous System Number (ASN) for the Amazon side of a BGP session.
|
void |
setAssociationDefaultRouteTableId(java.lang.String value)
The ID of the default association route table.
|
void |
setAutoAcceptSharedAttachments(java.lang.String value)
Enable or disable automatic acceptance of attachment requests.
|
void |
setDefaultRouteTableAssociation(java.lang.String value)
Enable or disable automatic association with the default association route table.
|
void |
setDefaultRouteTablePropagation(java.lang.String value)
Enable or disable automatic propagation of routes to the default propagation route table.
|
void |
setDescription(java.lang.String value)
The description of the transit gateway.
|
void |
setDnsSupport(java.lang.String value)
Enable or disable DNS support.
|
void |
setMulticastSupport(java.lang.String value)
Indicates whether multicast is enabled on the transit gateway.
|
void |
setPropagationDefaultRouteTableId(java.lang.String value)
The ID of the default propagation route table.
|
void |
setTransitGatewayCidrBlocks(java.util.List<java.lang.String> value)
The transit gateway CIDR blocks.
|
void |
setVpnEcmpSupport(java.lang.String value)
Enable or disable Equal Cost Multipath Protocol support.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnTransitGateway(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnTransitGateway(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnTransitGateway(Construct scope, java.lang.String id, 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.public CfnTransitGateway(Construct scope, java.lang.String id)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrId()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public TagManager getTags()
public java.lang.Number getAmazonSideAsn()
The range is 64512 to 65534 for 16-bit ASNs. The default is 64512.
public void setAmazonSideAsn(java.lang.Number value)
The range is 64512 to 65534 for 16-bit ASNs. The default is 64512.
public java.lang.String getAssociationDefaultRouteTableId()
public void setAssociationDefaultRouteTableId(java.lang.String value)
public java.lang.String getAutoAcceptSharedAttachments()
Disabled by default.
public void setAutoAcceptSharedAttachments(java.lang.String value)
Disabled by default.
public java.lang.String getDefaultRouteTableAssociation()
Enabled by default.
public void setDefaultRouteTableAssociation(java.lang.String value)
Enabled by default.
public java.lang.String getDefaultRouteTablePropagation()
Enabled by default.
public void setDefaultRouteTablePropagation(java.lang.String value)
Enabled by default.
public java.lang.String getDescription()
public void setDescription(java.lang.String value)
public java.lang.String getDnsSupport()
Enabled by default.
public void setDnsSupport(java.lang.String value)
Enabled by default.
public java.lang.String getMulticastSupport()
public void setMulticastSupport(java.lang.String value)
public java.lang.String getPropagationDefaultRouteTableId()
public void setPropagationDefaultRouteTableId(java.lang.String value)
public java.util.List<java.lang.String> getTransitGatewayCidrBlocks()
public void setTransitGatewayCidrBlocks(java.util.List<java.lang.String> value)
public java.lang.String getVpnEcmpSupport()
Enabled by default.
public void setVpnEcmpSupport(java.lang.String value)
Enabled by default.