Class VpcAttributes
Properties that reference an external Vpc.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public class VpcAttributes : Object, IVpcAttributes
Syntax (vb)
Public Class VpcAttributes
Inherits Object
Implements IVpcAttributes
Remarks
ExampleMetadata: infused
Examples
var sg = SecurityGroup.FromSecurityGroupId(this, "FsxSecurityGroup", "{SECURITY-GROUP-ID}");
var fs = LustreFileSystem.FromLustreFileSystemAttributes(this, "FsxLustreFileSystem", new FileSystemAttributes {
DnsName = "{FILE-SYSTEM-DNS-NAME}",
FileSystemId = "{FILE-SYSTEM-ID}",
SecurityGroup = sg
});
var vpc = Vpc.FromVpcAttributes(this, "Vpc", new VpcAttributes {
AvailabilityZones = new [] { "us-west-2a", "us-west-2b" },
PublicSubnetIds = new [] { "{US-WEST-2A-SUBNET-ID}", "{US-WEST-2B-SUBNET-ID}" },
VpcId = "{VPC-ID}"
});
var inst = new Instance(this, "inst", new InstanceProps {
InstanceType = InstanceType.Of(InstanceClass.T2, InstanceSize.LARGE),
MachineImage = new AmazonLinuxImage(new AmazonLinuxImageProps {
Generation = AmazonLinuxGeneration.AMAZON_LINUX_2
}),
Vpc = vpc,
VpcSubnets = new SubnetSelection {
SubnetType = SubnetType.PUBLIC
}
});
fs.Connections.AllowDefaultPortFrom(inst);
Synopsis
Constructors
VpcAttributes() |
Properties
AvailabilityZones | List of availability zones for the subnets in this VPC. |
IsolatedSubnetIds | List of isolated subnet IDs. |
IsolatedSubnetNames | List of names for the isolated subnets. |
IsolatedSubnetRouteTableIds | List of IDs of routing tables for the isolated subnets. |
PrivateSubnetIds | List of private subnet IDs. |
PrivateSubnetNames | List of names for the private subnets. |
PrivateSubnetRouteTableIds | List of IDs of routing tables for the private subnets. |
PublicSubnetIds | List of public subnet IDs. |
PublicSubnetNames | List of names for the public subnets. |
PublicSubnetRouteTableIds | List of IDs of routing tables for the public subnets. |
VpcCidrBlock | VPC's CIDR range. |
VpcId | VPC's identifier. |
VpnGatewayId | VPN gateway's identifier. |
Constructors
VpcAttributes()
public VpcAttributes()
Properties
AvailabilityZones
List of availability zones for the subnets in this VPC.
public string[] AvailabilityZones { get; set; }
Property Value
System.String[]
IsolatedSubnetIds
List of isolated subnet IDs.
public string[] IsolatedSubnetIds { get; set; }
Property Value
System.String[]
Remarks
Must be undefined or match the availability zones in length and order.
IsolatedSubnetNames
List of names for the isolated subnets.
public string[] IsolatedSubnetNames { get; set; }
Property Value
System.String[]
Remarks
Must be undefined or have a name for every isolated subnet group.
IsolatedSubnetRouteTableIds
List of IDs of routing tables for the isolated subnets.
public string[] IsolatedSubnetRouteTableIds { get; set; }
Property Value
System.String[]
Remarks
Must be undefined or have a name for every isolated subnet group.
PrivateSubnetIds
List of private subnet IDs.
public string[] PrivateSubnetIds { get; set; }
Property Value
System.String[]
Remarks
Must be undefined or match the availability zones in length and order.
PrivateSubnetNames
List of names for the private subnets.
public string[] PrivateSubnetNames { get; set; }
Property Value
System.String[]
Remarks
Must be undefined or have a name for every private subnet group.
PrivateSubnetRouteTableIds
List of IDs of routing tables for the private subnets.
public string[] PrivateSubnetRouteTableIds { get; set; }
Property Value
System.String[]
Remarks
Must be undefined or have a name for every private subnet group.
PublicSubnetIds
List of public subnet IDs.
public string[] PublicSubnetIds { get; set; }
Property Value
System.String[]
Remarks
Must be undefined or match the availability zones in length and order.
PublicSubnetNames
List of names for the public subnets.
public string[] PublicSubnetNames { get; set; }
Property Value
System.String[]
Remarks
Must be undefined or have a name for every public subnet group.
PublicSubnetRouteTableIds
List of IDs of routing tables for the public subnets.
public string[] PublicSubnetRouteTableIds { get; set; }
Property Value
System.String[]
Remarks
Must be undefined or have a name for every public subnet group.
VpcCidrBlock
VPC's CIDR range.
public string VpcCidrBlock { get; set; }
Property Value
System.String
Remarks
Default: - Retrieving the CIDR from the VPC will fail
VpcId
VPC's identifier.
public string VpcId { get; set; }
Property Value
System.String
VpnGatewayId
VPN gateway's identifier.
public string VpnGatewayId { get; set; }
Property Value
System.String