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
string[]
Remarks
ExampleMetadata: infused
IsolatedSubnetIds
List of isolated subnet IDs.
string[]? IsolatedSubnetIds { get; }
Property Value
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.
string[]? IsolatedSubnetIpv4CidrBlocks { get; }
Property Value
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.
string[]? IsolatedSubnetNames { get; }
Property Value
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.
string[]? IsolatedSubnetRouteTableIds { get; }
Property Value
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.
string[]? PrivateSubnetIds { get; }
Property Value
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.
string[]? PrivateSubnetIpv4CidrBlocks { get; }
Property Value
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.
string[]? PrivateSubnetNames { get; }
Property Value
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.
string[]? PrivateSubnetRouteTableIds { get; }
Property Value
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.
string[]? PublicSubnetIds { get; }
Property Value
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.
string[]? PublicSubnetIpv4CidrBlocks { get; }
Property Value
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.
string[]? PublicSubnetNames { get; }
Property Value
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.
string[]? PublicSubnetRouteTableIds { get; }
Property Value
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.
string? Region { get; }
Property Value
Remarks
Default: - The region of the stack where the VPC belongs to
VpcCidrBlock
VPC's CIDR range.
string? VpcCidrBlock { get; }
Property Value
Remarks
Default: - Retrieving the CIDR from the VPC will fail
VpcId
VpnGatewayId
VPN gateway's identifier.
string? VpnGatewayId { get; }
Property Value
Remarks
ExampleMetadata: infused