Class CfnSubnetProps
Properties for defining a CfnSubnet
.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnSubnetProps : Object, ICfnSubnetProps
Syntax (vb)
Public Class CfnSubnetProps
Inherits Object
Implements 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",
Ipv6CidrBlocks = new [] { "ipv6CidrBlocks" },
Ipv6IpamPoolId = "ipv6IpamPoolId",
Ipv6Native = false,
Ipv6NetmaskLength = 123,
MapPublicIpOnLaunch = false,
OutpostArn = "outpostArn",
PrivateDnsNameOptionsOnLaunch = privateDnsNameOptionsOnLaunch,
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
};
Synopsis
Constructors
CfnSubnetProps() |
Properties
AssignIpv6AddressOnCreation | Indicates whether a network interface created in this subnet receives an IPv6 address. The default value is |
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. |
Ipv6CidrBlocks | The IPv6 network ranges for the subnet, in CIDR notation. |
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 |
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. |
Constructors
CfnSubnetProps()
public CfnSubnetProps()
Properties
AssignIpv6AddressOnCreation
Indicates whether a network interface created in this subnet receives an IPv6 address. The default value is false
.
public object AssignIpv6AddressOnCreation { get; set; }
Property Value
System.Object
Remarks
If you specify AssignIpv6AddressOnCreation
, you must also specify an IPv6 CIDR block.
AvailabilityZone
The Availability Zone of the subnet.
public string AvailabilityZone { get; set; }
Property Value
System.String
Remarks
If you update this property, you must also update the CidrBlock
property.
AvailabilityZoneId
The AZ ID of the subnet.
public string AvailabilityZoneId { get; set; }
Property Value
System.String
Remarks
CidrBlock
The IPv4 CIDR block assigned to the subnet.
public string CidrBlock { get; set; }
Property Value
System.String
Remarks
If you update this property, we create a new subnet, and then delete the existing one.
EnableDns64
Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only destinations.
public object EnableDns64 { get; set; }
Property Value
System.Object
Remarks
For more information, see DNS64 and NAT64 in the Amazon Virtual Private Cloud User Guide .
EnableLniAtDeviceIndex
Indicates the device position for local network interfaces in this subnet.
public Nullable<double> EnableLniAtDeviceIndex { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
For example, 1
indicates local network interfaces in this subnet are the secondary network interface (eth1).
Ipv4IpamPoolId
An IPv4 IPAM pool ID for the subnet.
public string Ipv4IpamPoolId { get; set; }
Property Value
System.String
Remarks
Ipv4NetmaskLength
An IPv4 netmask length for the subnet.
public Nullable<double> Ipv4NetmaskLength { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Ipv6CidrBlock
The IPv6 CIDR block.
public string Ipv6CidrBlock { get; set; }
Property Value
System.String
Remarks
If you specify AssignIpv6AddressOnCreation
, you must also specify an IPv6 CIDR block.
Ipv6CidrBlocks
The IPv6 network ranges for the subnet, in CIDR notation.
public string[] Ipv6CidrBlocks { get; set; }
Property Value
System.String[]
Remarks
Ipv6IpamPoolId
An IPv6 IPAM pool ID for the subnet.
public string Ipv6IpamPoolId { get; set; }
Property Value
System.String
Remarks
Ipv6Native
Indicates whether this is an IPv6 only subnet.
public object Ipv6Native { get; set; }
Property Value
System.Object
Remarks
For more information, see Subnet basics in the Amazon Virtual Private Cloud User Guide .
Ipv6NetmaskLength
An IPv6 netmask length for the subnet.
public Nullable<double> Ipv6NetmaskLength { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
MapPublicIpOnLaunch
Indicates whether instances launched in this subnet receive a public IPv4 address. The default value is false
.
public object MapPublicIpOnLaunch { get; set; }
Property Value
System.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 .
OutpostArn
The Amazon Resource Name (ARN) of the Outpost.
public string OutpostArn { get; set; }
Property Value
System.String
Remarks
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.
public object PrivateDnsNameOptionsOnLaunch { get; set; }
Property Value
System.Object
Remarks
For more information, see Amazon EC2 instance hostname types in the Amazon Elastic Compute Cloud User Guide .
Available options:
Tags
Any tags assigned to the subnet.
public ICfnTag[] Tags { get; set; }
Property Value
ICfnTag[]
Remarks
VpcId
The ID of the VPC the subnet is in.
public string VpcId { get; set; }
Property Value
System.String
Remarks
If you update this property, you must also update the CidrBlock
property.