This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html). # AWS::EC2::TransitGatewayVpcAttachment Specifies a VPC attachment. ## Syntax To declare this entity in your CloudFormation template, use the following syntax: ### JSON ``` { "Type" : "AWS::EC2::TransitGatewayVpcAttachment", "Properties" : { "[AddSubnetIds](#cfn-ec2-transitgatewayvpcattachment-addsubnetids)" : {{[ String, ... ]}}, "[Options](#cfn-ec2-transitgatewayvpcattachment-options)" : {{Options}}, "[RemoveSubnetIds](#cfn-ec2-transitgatewayvpcattachment-removesubnetids)" : {{[ String, ... ]}}, "[SubnetIds](#cfn-ec2-transitgatewayvpcattachment-subnetids)" : {{[ String, ... ]}}, "[Tags](#cfn-ec2-transitgatewayvpcattachment-tags)" : {{[ Tag, ... ]}}, "[TransitGatewayId](#cfn-ec2-transitgatewayvpcattachment-transitgatewayid)" : {{String}}, "[VpcId](#cfn-ec2-transitgatewayvpcattachment-vpcid)" : {{String}} } } ``` ### YAML ``` Type: AWS::EC2::TransitGatewayVpcAttachment Properties: [AddSubnetIds](#cfn-ec2-transitgatewayvpcattachment-addsubnetids): {{ - String}} [Options](#cfn-ec2-transitgatewayvpcattachment-options): {{ Options}} [RemoveSubnetIds](#cfn-ec2-transitgatewayvpcattachment-removesubnetids): {{ - String}} [SubnetIds](#cfn-ec2-transitgatewayvpcattachment-subnetids): {{ - String}} [Tags](#cfn-ec2-transitgatewayvpcattachment-tags): {{ - Tag}} [TransitGatewayId](#cfn-ec2-transitgatewayvpcattachment-transitgatewayid): {{String}} [VpcId](#cfn-ec2-transitgatewayvpcattachment-vpcid): {{String}} ``` ## Properties `AddSubnetIds` The IDs of one or more subnets to add. You can specify at most one subnet per Availability Zone. *Required*: No *Type*: Array of String *Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) `Options` The VPC attachment options. *Required*: No *Type*: [Options](aws-properties-ec2-transitgatewayvpcattachment-options.md) *Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) `RemoveSubnetIds` The IDs of one or more subnets to remove. *Required*: No *Type*: Array of String *Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) `SubnetIds` The IDs of the subnets. *Required*: Yes *Type*: Array of String *Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) `Tags` The tags for the VPC attachment. *Required*: No *Type*: Array of [Tag](aws-properties-ec2-transitgatewayvpcattachment-tag.md) *Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) `TransitGatewayId` The ID of the transit gateway. *Required*: Yes *Type*: String *Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) `VpcId` The ID of the VPC. *Required*: Yes *Type*: String *Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement) ## Return values ### Ref When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the ID of the attachment. For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html). ### Fn::GetAtt The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values. For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html). #### `Id` The ID of the attachment.

AltStyle によって変換されたページ (->オリジナル) /