Class CfnTransitGatewayAttachment
A CloudFormation AWS::EC2::TransitGatewayAttachment
.
Inheritance
Inherited Members
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public class CfnTransitGatewayAttachment : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnTransitGatewayAttachment
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
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.
CloudformationResource: AWS::EC2::TransitGatewayAttachment
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;
var options;
var cfnTransitGatewayAttachment = new CfnTransitGatewayAttachment(this, "MyCfnTransitGatewayAttachment", new CfnTransitGatewayAttachmentProps {
SubnetIds = new [] { "subnetIds" },
TransitGatewayId = "transitGatewayId",
VpcId = "vpcId",
// the properties below are optional
Options = options,
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
});
Synopsis
Constructors
CfnTransitGatewayAttachment(Construct, String, ICfnTransitGatewayAttachmentProps) | Create a new |
CfnTransitGatewayAttachment(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnTransitGatewayAttachment(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AttrId | The ID of the attachment. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Options | The VPC attachment options, in JSON or YAML. |
SubnetIds | The IDs of one or more subnets. |
Tags | The tags for the attachment. |
TransitGatewayId | The ID of the transit gateway. |
VpcId | The ID of the VPC. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnTransitGatewayAttachment(Construct, String, ICfnTransitGatewayAttachmentProps)
Create a new AWS::EC2::TransitGatewayAttachment
.
public CfnTransitGatewayAttachment(Construct scope, string id, ICfnTransitGatewayAttachmentProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnTransitGatewayAttachmentProps
- resource properties.
CfnTransitGatewayAttachment(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnTransitGatewayAttachment(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnTransitGatewayAttachment(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnTransitGatewayAttachment(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AttrId
The ID of the attachment.
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Options
The VPC attachment options, in JSON or YAML.
public virtual object Options { get; set; }
Property Value
System.Object
Remarks
SubnetIds
The IDs of one or more subnets.
public virtual string[] SubnetIds { get; set; }
Property Value
System.String[]
Remarks
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.
Tags
The tags for the attachment.
public virtual TagManager Tags { get; }
Property Value
Remarks
TransitGatewayId
The ID of the transit gateway.
public virtual string TransitGatewayId { get; set; }
Property Value
System.String
Remarks
VpcId
The ID of the VPC.
public virtual string VpcId { get; set; }
Property Value
System.String
Remarks
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>