@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.346Z") @Stability(value=Stable) 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 .
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. |
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 |
|---|---|
|
CfnTransitGatewayAttachment(software.constructs.Construct scope,
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 |
|---|---|
String |
getAttrId() |
protected Map<String,Object> |
getCfnProperties() |
Object |
getOptions()
`AWS::EC2::TransitGatewayAttachment.Options`.
|
List<String> |
getSubnetIds()
The IDs of one or more subnets.
|
TagManager |
getTags()
The tags for the attachment.
|
String |
getTransitGatewayId()
The ID of the transit gateway.
|
String |
getVpcId()
The ID of the VPC.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setOptions(Object value)
`AWS::EC2::TransitGatewayAttachment.Options`.
|
void |
setSubnetIds(List<String> value)
The IDs of one or more subnets.
|
void |
setTransitGatewayId(String value)
The ID of the transit gateway.
|
void |
setVpcId(String value)
The ID of the VPC.
|
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 CfnTransitGatewayAttachment(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnTransitGatewayAttachment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnTransitGatewayAttachment(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
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.@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) @NotNull public Object getOptions()
@Stability(value=Stable)
public void setOptions(@NotNull
Object value)
@Stability(value=Stable) @NotNull public List<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.
@Stability(value=Stable)
public void setSubnetIds(@NotNull
List<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.
@Stability(value=Stable) @NotNull public String getTransitGatewayId()
@Stability(value=Stable)
public void setTransitGatewayId(@NotNull
String value)
@Stability(value=Stable) @NotNull public String getVpcId()
@Stability(value=Stable)
public void setVpcId(@NotNull
String value)
Copyright © 2022. All rights reserved.