Class CfnTransitGatewayAttachment

java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:39.068Z") @Stability(Stable) public class CfnTransitGatewayAttachment extends CfnResource implements IInspectable
A CloudFormation AWS::EC2::TransitGatewayAttachment.

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();
 
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnTransitGatewayAttachment

      protected CfnTransitGatewayAttachment(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnTransitGatewayAttachment

      protected CfnTransitGatewayAttachment(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnTransitGatewayAttachment

      @Stability(Stable) public CfnTransitGatewayAttachment(@NotNull Construct scope, @NotNull String id, @NotNull CfnTransitGatewayAttachmentProps props)
      Create a new AWS::EC2::TransitGatewayAttachment.

      Parameters:
      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.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      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 class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
      The ID of the attachment.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      The tags for the attachment.
    • getOptions

      @Stability(Stable) @NotNull public Object getOptions()
      The VPC attachment options, in JSON or YAML.

      • 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 .
    • setOptions

      @Stability(Stable) public void setOptions(@NotNull Object value)
      The VPC attachment options, in JSON or YAML.

      • 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 .
    • getSubnetIds

      @Stability(Stable) @NotNull public List<String> getSubnetIds()
      The IDs of one or more subnets.

      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.

    • setSubnetIds

      @Stability(Stable) public void setSubnetIds(@NotNull List<String> value)
      The IDs of one or more subnets.

      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.

    • getTransitGatewayId

      @Stability(Stable) @NotNull public String getTransitGatewayId()
      The ID of the transit gateway.
    • setTransitGatewayId

      @Stability(Stable) public void setTransitGatewayId(@NotNull String value)
      The ID of the transit gateway.
    • getVpcId

      @Stability(Stable) @NotNull public String getVpcId()
      The ID of the VPC.
    • setVpcId

      @Stability(Stable) public void setVpcId(@NotNull String value)
      The ID of the VPC.