Interface ICfnSubnetProps
Properties for defining a CfnSubnet
.
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.dll
Syntax (csharp)
public interface ICfnSubnetProps
Syntax (vb)
Public Interface ICfnSubnetProps
Remarks
Link: 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,
Ipv6CidrBlock = "ipv6CidrBlock",
Ipv6Native = false,
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 |
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. |
Ipv6CidrBlock | The IPv6 CIDR block. |
Ipv6Native | Indicates whether this is an IPv6 only subnet. |
MapPublicIpOnLaunch | Indicates whether instances launched in this subnet receive a public IPv4 address. |
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
.
virtual object AssignIpv6AddressOnCreation { get; }
Property Value
System.Object
Remarks
If you specify AssignIpv6AddressOnCreation
, you must also specify Ipv6CidrBlock
.
AvailabilityZone
The Availability Zone of the subnet.
virtual string AvailabilityZone { get; }
Property Value
System.String
Remarks
If you update this property, you must also update the CidrBlock
property.
AvailabilityZoneId
The AZ ID of the subnet.
virtual string AvailabilityZoneId { get; }
Property Value
System.String
Remarks
CidrBlock
The IPv4 CIDR block assigned to the subnet.
virtual string CidrBlock { get; }
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.
virtual object EnableDns64 { get; }
Property Value
System.Object
Remarks
For more information, see DNS64 and NAT64 in the Amazon Virtual Private Cloud User Guide .
Ipv6CidrBlock
The IPv6 CIDR block.
virtual string Ipv6CidrBlock { get; }
Property Value
System.String
Remarks
If you specify AssignIpv6AddressOnCreation
, you must also specify Ipv6CidrBlock
.
Ipv6Native
Indicates whether this is an IPv6 only subnet.
virtual object Ipv6Native { get; }
Property Value
System.Object
Remarks
For more information, see Subnet basics in the Amazon Virtual Private Cloud User Guide .
MapPublicIpOnLaunch
Indicates whether instances launched in this subnet receive a public IPv4 address.
virtual object MapPublicIpOnLaunch { get; }
Property Value
System.Object
Remarks
The default value is false
.
OutpostArn
The Amazon Resource Name (ARN) of the Outpost.
virtual string OutpostArn { get; }
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.
virtual object PrivateDnsNameOptionsOnLaunch { get; }
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
VpcId
The ID of the VPC the subnet is in.
string VpcId { get; }
Property Value
System.String
Remarks
If you update this property, you must also update the CidrBlock
property.