Show / Hide Table of Contents

Class VPCPeeringConnection

(experimental) Creates a peering connection between two VPCs.

Inheritance
object
Resource
VPCPeeringConnection
Implements
IResource
IConstruct
IEnvironmentAware
IRouteTarget
IDependable
Inherited Members
Resource.IsOwnedResource(IConstruct)
Resource.IsResource(IConstruct)
Resource.ApplyRemovalPolicy(RemovalPolicy)
Resource.GeneratePhysicalName()
Resource.GetResourceArnAttribute(string, IArnComponents)
Resource.GetResourceNameAttribute(string)
Resource.Env
Resource.PhysicalName
Resource.Stack
Namespace: Amazon.CDK.AWS.ec2.Alpha
Assembly: Amazon.CDK.AWS.ec2.Alpha.dll
Syntax (csharp)
public class VPCPeeringConnection : Resource, IResource, IConstruct, IEnvironmentAware, IRouteTarget, IDependable
Syntax (vb)
Public Class VPCPeeringConnection Inherits Resource Implements IResource, IConstruct, IEnvironmentAware, IRouteTarget, IDependable
Remarks

Stability: Experimental

Resource: AWS::EC2::VPCPeeringConnection

ExampleMetadata: infused

Examples
var stack = new Stack();

             var acceptorVpc = new VpcV2(this, "VpcA", new VpcV2Props {
                 PrimaryAddressBlock = IpAddresses.Ipv4("10.0.0.0/16")
             });

             var requestorVpc = new VpcV2(this, "VpcB", new VpcV2Props {
                 PrimaryAddressBlock = IpAddresses.Ipv4("10.1.0.0/16")
             });

             var peeringConnection = requestorVpc.CreatePeeringConnection("peeringConnection", new VPCPeeringConnectionOptions {
                 AcceptorVpc = acceptorVpc
             });

             var routeTable = new RouteTable(this, "RouteTable", new RouteTableProps {
                 Vpc = requestorVpc
             });

             routeTable.AddRoute("vpcPeeringRoute", "10.0.0.0/16", new Dictionary<string, IRouteTarget?> { { "gateway", peeringConnection } });

Synopsis

Constructors

VPCPeeringConnection(Construct, string, IVPCPeeringConnectionProps)

(experimental) Creates a peering connection between two VPCs.

Properties

PROPERTY_INJECTION_ID

(experimental) Uniquely identifies this class.

Resource

(experimental) The VPC peering connection CFN resource.

RouterTargetId

(experimental) The ID of the route target.

RouterType

(experimental) The type of router used in the route.

Constructors

VPCPeeringConnection(Construct, string, IVPCPeeringConnectionProps)

(experimental) Creates a peering connection between two VPCs.

public VPCPeeringConnection(Construct scope, string id, IVPCPeeringConnectionProps props)
Parameters
scope Construct
id string
props IVPCPeeringConnectionProps
Remarks

Stability: Experimental

Properties

PROPERTY_INJECTION_ID

(experimental) Uniquely identifies this class.

public static string PROPERTY_INJECTION_ID { get; }
Property Value

string

Remarks

Stability: Experimental

Resource

(experimental) The VPC peering connection CFN resource.

public virtual CfnVPCPeeringConnection Resource { get; }
Property Value

CfnVPCPeeringConnection

Remarks

Stability: Experimental

RouterTargetId

(experimental) The ID of the route target.

public virtual string RouterTargetId { get; }
Property Value

string

Remarks

Stability: Experimental

RouterType

(experimental) The type of router used in the route.

public virtual RouterType RouterType { get; }
Property Value

RouterType

Remarks

Stability: Experimental

Implements

IResource
Constructs.IConstruct
IEnvironmentAware
IRouteTarget
Constructs.IDependable
Back to top Generated by DocFX