@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:42.821Z") public class CfnTransitGatewayAttachment extends CfnResource implements IInspectable
Attaches a VPC to a transit gateway.
If you attach a VPC with a CIDR range that overlaps the CIDR range of a VPC that is already attached, the new VPC CIDR range is not propagated to the default propagation route table.
To send VPC traffic to an attached transit gateway, add a route to the VPC route table using AWS::EC2::Route .
To update tags for a VPC attachment after creation without replacing the attachment, use AWS::EC2::TransitGatewayVpcAttachment instead.
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.*; Object options; CfnTransitGatewayAttachment cfnTransitGatewayAttachment = CfnTransitGatewayAttachment.Builder.create(this, "MyCfnTransitGatewayAttachment") .subnetIds(List.of("subnetIds")) .transitGatewayId("transitGatewayId") .vpcId("vpcId") // the properties below are optional .options(options) .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .build();
Modifier and Type | Class and Description |
---|---|
static class |
CfnTransitGatewayAttachment.Builder
A fluent builder for
CfnTransitGatewayAttachment . |
static interface |
CfnTransitGatewayAttachment.OptionsProperty
Describes the VPC attachment options.
|
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 |
---|---|
|
CfnTransitGatewayAttachment(Construct scope,
java.lang.String id,
CfnTransitGatewayAttachmentProps props)
Create a new `AWS::EC2::TransitGatewayAttachment`.
|
protected |
CfnTransitGatewayAttachment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnTransitGatewayAttachment(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrId()
The ID of the attachment.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.Object |
getOptions()
The VPC attachment options, in JSON or YAML.
|
java.util.List<java.lang.String> |
getSubnetIds()
The IDs of one or more subnets.
|
TagManager |
getTags()
The tags for the attachment.
|
java.lang.String |
getTransitGatewayId()
The ID of the transit gateway.
|
java.lang.String |
getVpcId()
The ID of the VPC.
|
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 |
setOptions(java.lang.Object value)
The VPC attachment options, in JSON or YAML.
|
void |
setSubnetIds(java.util.List<java.lang.String> value)
The IDs of one or more subnets.
|
void |
setTransitGatewayId(java.lang.String value)
The ID of the transit gateway.
|
void |
setVpcId(java.lang.String value)
The ID of the VPC.
|
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 CfnTransitGatewayAttachment(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnTransitGatewayAttachment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnTransitGatewayAttachment(Construct scope, java.lang.String id, CfnTransitGatewayAttachmentProps 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. 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.Object getOptions()
ApplianceModeSupport
- Set to enable
or disable
. The default is disable
.DnsSupport
- Set to enable
or disable
. The default is enable
.Ipv6Support
- Set to enable
or disable
. The default is disable
.public void setOptions(java.lang.Object value)
ApplianceModeSupport
- Set to enable
or disable
. The default is disable
.DnsSupport
- Set to enable
or disable
. The default is enable
.Ipv6Support
- Set to enable
or disable
. The default is disable
.public java.util.List<java.lang.String> getSubnetIds()
You can specify only one subnet per Availability Zone. You must specify at least one subnet, but we recommend that you specify two subnets for better availability. The transit gateway uses one IP address from each specified subnet.
public void setSubnetIds(java.util.List<java.lang.String> value)
You can specify only one subnet per Availability Zone. You must specify at least one subnet, but we recommend that you specify two subnets for better availability. The transit gateway uses one IP address from each specified subnet.
public java.lang.String getTransitGatewayId()
public void setTransitGatewayId(java.lang.String value)
public java.lang.String getVpcId()
public void setVpcId(java.lang.String value)