Class CfnVPCPeeringConnection
Requests a VPC peering connection between two VPCs: a requester VPC that you own and an accepter VPC with which to create the connection.
Inherited Members
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnVPCPeeringConnection : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnVPCPeeringConnection
Inherits CfnResource
Implements IInspectable, ITaggable
Remarks
The accepter VPC can belong to a different AWS account and can be in a different Region than the requester VPC.
The requester VPC and accepter VPC cannot have overlapping CIDR blocks. If you create a VPC peering connection request between VPCs with overlapping CIDR blocks, the VPC peering connection has a status of failed
.
If the VPCs belong to different accounts, the acceptor account must have a role that allows the requester account to accept the VPC peering connection. For an example, see Walkthrough: Peer with a VPC in another AWS account .
If the requester and acceptor VPCs are in the same account, the peering request is accepted without a peering role.
CloudformationResource: AWS::EC2::VPCPeeringConnection
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 cfnVPCPeeringConnection = new CfnVPCPeeringConnection(this, "MyCfnVPCPeeringConnection", new CfnVPCPeeringConnectionProps {
PeerVpcId = "peerVpcId",
VpcId = "vpcId",
// the properties below are optional
PeerOwnerId = "peerOwnerId",
PeerRegion = "peerRegion",
PeerRoleArn = "peerRoleArn",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
});
Synopsis
Constructors
CfnVPCPeeringConnection(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnVPCPeeringConnection(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnVPCPeeringConnection(Construct, String, ICfnVPCPeeringConnectionProps) |
Properties
AttrId | The ID of the peering connection. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
PeerOwnerId | The AWS account ID of the owner of the accepter VPC. |
PeerRegion | The Region code for the accepter VPC, if the accepter VPC is located in a Region other than the Region in which you make the request. |
PeerRoleArn | The Amazon Resource Name (ARN) of the VPC peer role for the peering connection in another AWS account. |
PeerVpcId | The ID of the VPC with which you are creating the VPC peering connection. |
Tags | Tag Manager which manages the tags for this resource. |
TagsRaw | Any tags assigned to the resource. |
VpcId | The ID of the VPC. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnVPCPeeringConnection(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnVPCPeeringConnection(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnVPCPeeringConnection(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnVPCPeeringConnection(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnVPCPeeringConnection(Construct, String, ICfnVPCPeeringConnectionProps)
public CfnVPCPeeringConnection(Construct scope, string id, ICfnVPCPeeringConnectionProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnVPCPeeringConnectionProps
Resource properties.
Properties
AttrId
The ID of the peering connection.
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
PeerOwnerId
The AWS account ID of the owner of the accepter VPC.
public virtual string PeerOwnerId { get; set; }
Property Value
System.String
PeerRegion
The Region code for the accepter VPC, if the accepter VPC is located in a Region other than the Region in which you make the request.
public virtual string PeerRegion { get; set; }
Property Value
System.String
PeerRoleArn
The Amazon Resource Name (ARN) of the VPC peer role for the peering connection in another AWS account.
public virtual string PeerRoleArn { get; set; }
Property Value
System.String
PeerVpcId
The ID of the VPC with which you are creating the VPC peering connection.
public virtual string PeerVpcId { get; set; }
Property Value
System.String
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
TagsRaw
Any tags assigned to the resource.
public virtual ICfnTag[] TagsRaw { get; set; }
Property Value
ICfnTag[]
VpcId
The ID of the VPC.
public virtual string VpcId { get; set; }
Property Value
System.String
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>