Show / Hide Table of Contents

Interface ICfnSubnetProps

Properties for defining a CfnSubnet.

Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICfnSubnetProps
Syntax (vb)
Public Interface ICfnSubnetProps
Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet.html

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 privateDnsNameOptionsOnLaunch;

             var cfnSubnetProps = new CfnSubnetProps {
                 VpcId = "vpcId",

                 // the properties below are optional
                 AssignIpv6AddressOnCreation = false,
                 AvailabilityZone = "availabilityZone",
                 AvailabilityZoneId = "availabilityZoneId",
                 CidrBlock = "cidrBlock",
                 EnableDns64 = false,
                 EnableLniAtDeviceIndex = 123,
                 Ipv4IpamPoolId = "ipv4IpamPoolId",
                 Ipv4NetmaskLength = 123,
                 Ipv6CidrBlock = "ipv6CidrBlock",
                 Ipv6IpamPoolId = "ipv6IpamPoolId",
                 Ipv6Native = false,
                 Ipv6NetmaskLength = 123,
                 MapPublicIpOnLaunch = false,
                 OutpostArn = "outpostArn",
                 PrivateDnsNameOptionsOnLaunch = privateDnsNameOptionsOnLaunch,
                 Tags = new [] { new CfnTag {
                     Key = "key",
                     Value = "value"
                 } }
             };

Synopsis

Properties

AssignIpv6AddressOnCreation

Indicates whether a network interface created in this subnet receives an IPv6 address. The default value is false .

AvailabilityZone

The Availability Zone of the subnet.

AvailabilityZoneId

The AZ ID of the subnet.

CidrBlock

The IPv4 CIDR block assigned to the subnet.

EnableDns64

Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.

EnableLniAtDeviceIndex

Indicates the device position for local network interfaces in this subnet.

Ipv4IpamPoolId

An IPv4 IPAM pool ID for the subnet.

Ipv4NetmaskLength

An IPv4 netmask length for the subnet.

Ipv6CidrBlock

The IPv6 CIDR block.

Ipv6IpamPoolId

An IPv6 IPAM pool ID for the subnet.

Ipv6Native

Indicates whether this is an IPv6 only subnet.

Ipv6NetmaskLength

An IPv6 netmask length for the subnet.

MapPublicIpOnLaunch

Indicates whether instances launched in this subnet receive a public IPv4 address. The default value is false .

OutpostArn

The Amazon Resource Name (ARN) of the Outpost.

PrivateDnsNameOptionsOnLaunch

The hostname type for EC2 instances launched into this subnet and how DNS A and AAAA record queries to the instances should be handled.

Tags

Any tags assigned to the subnet.

VpcId

The ID of the VPC the subnet is in.

Properties

AssignIpv6AddressOnCreation

Indicates whether a network interface created in this subnet receives an IPv6 address. The default value is false .

object? AssignIpv6AddressOnCreation { get; }
Property Value

object

Remarks

If you specify AssignIpv6AddressOnCreation , you must also specify an IPv6 CIDR block.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet.html#cfn-ec2-subnet-assignipv6addressoncreation

Type union: either bool or IResolvable

AvailabilityZone

The Availability Zone of the subnet.

string? AvailabilityZone { get; }
Property Value

string

Remarks

If you update this property, you must also update the CidrBlock property.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet.html#cfn-ec2-subnet-availabilityzone

AvailabilityZoneId

The AZ ID of the subnet.

string? AvailabilityZoneId { get; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet.html#cfn-ec2-subnet-availabilityzoneid

CidrBlock

The IPv4 CIDR block assigned to the subnet.

string? CidrBlock { get; }
Property Value

string

Remarks

If you update this property, we create a new subnet, and then delete the existing one.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet.html#cfn-ec2-subnet-cidrblock

EnableDns64

Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.

object? EnableDns64 { get; }
Property Value

object

Remarks
You must first configure a NAT gateway in a public subnet (separate from the subnet containing the IPv6-only workloads). For example, the subnet containing the NAT gateway should have a <code>0.0.0.0/0</code> route pointing to the internet gateway. For more information, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/nat-gateway-nat64-dns64.html#nat-gateway-nat64-dns64-walkthrough">Configure DNS64 and NAT64</a> in the <em>Amazon Virtual Private Cloud User Guide</em> .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet.html#cfn-ec2-subnet-enabledns64

Type union: either bool or IResolvable

EnableLniAtDeviceIndex

Indicates the device position for local network interfaces in this subnet.

double? EnableLniAtDeviceIndex { get; }
Property Value

double?

Remarks

For example, 1 indicates local network interfaces in this subnet are the secondary network interface (eth1).

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet.html#cfn-ec2-subnet-enablelniatdeviceindex

Ipv4IpamPoolId

An IPv4 IPAM pool ID for the subnet.

string? Ipv4IpamPoolId { get; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet.html#cfn-ec2-subnet-ipv4ipampoolid

Ipv4NetmaskLength

An IPv4 netmask length for the subnet.

double? Ipv4NetmaskLength { get; }
Property Value

double?

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet.html#cfn-ec2-subnet-ipv4netmasklength

Ipv6CidrBlock

The IPv6 CIDR block.

string? Ipv6CidrBlock { get; }
Property Value

string

Remarks

If you specify AssignIpv6AddressOnCreation , you must also specify an IPv6 CIDR block.

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet.html#cfn-ec2-subnet-ipv6cidrblock

Ipv6IpamPoolId

An IPv6 IPAM pool ID for the subnet.

string? Ipv6IpamPoolId { get; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet.html#cfn-ec2-subnet-ipv6ipampoolid

Ipv6Native

Indicates whether this is an IPv6 only subnet.

object? Ipv6Native { get; }
Property Value

object

Remarks

For more information, see Subnet basics in the Amazon Virtual Private Cloud User Guide .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet.html#cfn-ec2-subnet-ipv6native

Type union: either bool or IResolvable

Ipv6NetmaskLength

An IPv6 netmask length for the subnet.

double? Ipv6NetmaskLength { get; }
Property Value

double?

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet.html#cfn-ec2-subnet-ipv6netmasklength

MapPublicIpOnLaunch

Indicates whether instances launched in this subnet receive a public IPv4 address. The default value is false .

object? MapPublicIpOnLaunch { get; }
Property Value

object

Remarks

AWS charges for all public IPv4 addresses, including public IPv4 addresses associated with running instances and Elastic IP addresses. For more information, see the Public IPv4 Address tab on the VPC pricing page .

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet.html#cfn-ec2-subnet-mappubliciponlaunch

Type union: either bool or IResolvable

OutpostArn

The Amazon Resource Name (ARN) of the Outpost.

string? OutpostArn { get; }
Property Value

string

Remarks

See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet.html#cfn-ec2-subnet-outpostarn

PrivateDnsNameOptionsOnLaunch

The hostname type for EC2 instances launched into this subnet and how DNS A and AAAA record queries to the instances should be handled.

object? PrivateDnsNameOptionsOnLaunch { get; }
Property Value

object

Remarks

For more information, see Amazon EC2 instance hostname types in the Amazon Elastic Compute Cloud User Guide .

Available options:

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet.html#cfn-ec2-subnet-privatednsnameoptionsonlaunch

    Tags

    Any tags assigned to the subnet.

    ICfnTag[]? Tags { get; }
    Property Value

    ICfnTag[]

    Remarks

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet.html#cfn-ec2-subnet-tags

    VpcId

    The ID of the VPC the subnet is in.

    object VpcId { get; }
    Property Value

    object

    Remarks

    If you update this property, you must also update the CidrBlock property.

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet.html#cfn-ec2-subnet-vpcid

    Type union: either string or IVPCRef

    Back to top Generated by DocFX