Interface IVpcAttributes
Properties that reference an external Vpc.
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IVpcAttributes
Syntax (vb)
Public Interface IVpcAttributes
Remarks
ExampleMetadata: infused
Examples
var vpc = Vpc.FromVpcAttributes(this, "VPC", new VpcAttributes {
VpcId = "vpc-1234",
AvailabilityZones = new [] { "us-east-1a", "us-east-1b" },
// Either pass literals for all IDs
PublicSubnetIds = new [] { "s-12345", "s-67890" },
// OR: import a list of known length
PrivateSubnetIds = Fn.ImportListValue("PrivateSubnetIds", 2),
// OR: split an imported string to a list of known length
IsolatedSubnetIds = Fn.Split(",", StringParameter.ValueForStringParameter(this, "MyParameter"), 2)
});
Synopsis
Properties
AvailabilityZones | List of availability zones for the subnets in this VPC. |
IsolatedSubnetIds | List of isolated subnet IDs. |
IsolatedSubnetIpv4CidrBlocks | List of IPv4 CIDR blocks for the isolated subnets. |
IsolatedSubnetNames | List of names for the isolated subnets. |
IsolatedSubnetRouteTableIds | List of IDs of route tables for the isolated subnets. |
PrivateSubnetIds | List of private subnet IDs. |
PrivateSubnetIpv4CidrBlocks | List of IPv4 CIDR blocks for the private subnets. |
PrivateSubnetNames | List of names for the private subnets. |
PrivateSubnetRouteTableIds | List of IDs of route tables for the private subnets. |
PublicSubnetIds | List of public subnet IDs. |
PublicSubnetIpv4CidrBlocks | List of IPv4 CIDR blocks for the public subnets. |
PublicSubnetNames | List of names for the public subnets. |
PublicSubnetRouteTableIds | List of IDs of route tables for the public subnets. |
Region | The region the VPC is in. |
VpcCidrBlock | VPC's CIDR range. |
VpcId | VPC's identifier. |
VpnGatewayId | VPN gateway's identifier. |
Properties
AvailabilityZones
List of availability zones for the subnets in this VPC.
string[] AvailabilityZones { get; }
Property Value
System.String[]
IsolatedSubnetIds
List of isolated subnet IDs.
virtual string[] IsolatedSubnetIds { get; }
Property Value
System.String[]
Remarks
Must be undefined or match the availability zones in length and order.
Default: - The VPC does not have any isolated subnets
IsolatedSubnetIpv4CidrBlocks
List of IPv4 CIDR blocks for the isolated subnets.
virtual string[] IsolatedSubnetIpv4CidrBlocks { get; }
Property Value
System.String[]
Remarks
Must be undefined or have an entry for every isolated subnet group.
Default: - Retrieving the IPv4 CIDR block of any isolated subnet will fail
IsolatedSubnetNames
List of names for the isolated subnets.
virtual string[] IsolatedSubnetNames { get; }
Property Value
System.String[]
Remarks
Must be undefined or have a name for every isolated subnet group.
Default: - All isolated subnets will have the name Isolated
IsolatedSubnetRouteTableIds
List of IDs of route tables for the isolated subnets.
virtual string[] IsolatedSubnetRouteTableIds { get; }
Property Value
System.String[]
Remarks
Must be undefined or have a name for every isolated subnet group.
Default: - Retrieving the route table ID of any isolated subnet will fail
PrivateSubnetIds
List of private subnet IDs.
virtual string[] PrivateSubnetIds { get; }
Property Value
System.String[]
Remarks
Must be undefined or match the availability zones in length and order.
Default: - The VPC does not have any private subnets
PrivateSubnetIpv4CidrBlocks
List of IPv4 CIDR blocks for the private subnets.
virtual string[] PrivateSubnetIpv4CidrBlocks { get; }
Property Value
System.String[]
Remarks
Must be undefined or have an entry for every private subnet group.
Default: - Retrieving the IPv4 CIDR block of any private subnet will fail
PrivateSubnetNames
List of names for the private subnets.
virtual string[] PrivateSubnetNames { get; }
Property Value
System.String[]
Remarks
Must be undefined or have a name for every private subnet group.
Default: - All private subnets will have the name Private
PrivateSubnetRouteTableIds
List of IDs of route tables for the private subnets.
virtual string[] PrivateSubnetRouteTableIds { get; }
Property Value
System.String[]
Remarks
Must be undefined or have a name for every private subnet group.
Default: - Retrieving the route table ID of any private subnet will fail
PublicSubnetIds
List of public subnet IDs.
virtual string[] PublicSubnetIds { get; }
Property Value
System.String[]
Remarks
Must be undefined or match the availability zones in length and order.
Default: - The VPC does not have any public subnets
PublicSubnetIpv4CidrBlocks
List of IPv4 CIDR blocks for the public subnets.
virtual string[] PublicSubnetIpv4CidrBlocks { get; }
Property Value
System.String[]
Remarks
Must be undefined or have an entry for every public subnet group.
Default: - Retrieving the IPv4 CIDR block of any public subnet will fail
PublicSubnetNames
List of names for the public subnets.
virtual string[] PublicSubnetNames { get; }
Property Value
System.String[]
Remarks
Must be undefined or have a name for every public subnet group.
Default: - All public subnets will have the name Public
PublicSubnetRouteTableIds
List of IDs of route tables for the public subnets.
virtual string[] PublicSubnetRouteTableIds { get; }
Property Value
System.String[]
Remarks
Must be undefined or have a name for every public subnet group.
Default: - Retrieving the route table ID of any public subnet will fail
Region
The region the VPC is in.
virtual string Region { get; }
Property Value
System.String
Remarks
Default: - The region of the stack where the VPC belongs to
VpcCidrBlock
VPC's CIDR range.
virtual string VpcCidrBlock { get; }
Property Value
System.String
Remarks
Default: - Retrieving the CIDR from the VPC will fail
VpcId
VPC's identifier.
string VpcId { get; }
Property Value
System.String
VpnGatewayId
VPN gateway's identifier.
virtual string VpnGatewayId { get; }
Property Value
System.String