Class PrivateSubnetProps
Inheritance
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class PrivateSubnetProps : Object, IPrivateSubnetProps, ISubnetProps
Syntax (vb)
Public Class PrivateSubnetProps
Inherits Object
Implements IPrivateSubnetProps, ISubnetProps
Remarks
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 privateSubnetProps = new PrivateSubnetProps {
AvailabilityZone = "availabilityZone",
CidrBlock = "cidrBlock",
VpcId = "vpcId",
// the properties below are optional
AssignIpv6AddressOnCreation = false,
Ipv6CidrBlock = "ipv6CidrBlock",
MapPublicIpOnLaunch = false
};
Synopsis
Constructors
PrivateSubnetProps() |
Properties
AssignIpv6AddressOnCreation | Indicates whether a network interface created in this subnet receives an IPv6 address. |
AvailabilityZone | The availability zone for the subnet. |
CidrBlock | The CIDR notation for this subnet. |
Ipv6CidrBlock | The IPv6 CIDR block. |
MapPublicIpOnLaunch | Controls if a public IP is associated to an instance at launch. |
VpcId | The VPC which this subnet is part of. |
Constructors
PrivateSubnetProps()
public PrivateSubnetProps()
Properties
AssignIpv6AddressOnCreation
Indicates whether a network interface created in this subnet receives an IPv6 address.
public Nullable<bool> AssignIpv6AddressOnCreation { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
If you specify AssignIpv6AddressOnCreation, you must also specify Ipv6CidrBlock.
Default: false
AvailabilityZone
The availability zone for the subnet.
public string AvailabilityZone { get; set; }
Property Value
System.String
CidrBlock
The CIDR notation for this subnet.
public string CidrBlock { get; set; }
Property Value
System.String
Ipv6CidrBlock
The IPv6 CIDR block.
public string Ipv6CidrBlock { get; set; }
Property Value
System.String
Remarks
If you specify AssignIpv6AddressOnCreation, you must also specify Ipv6CidrBlock.
Default: - no IPv6 CIDR block.
MapPublicIpOnLaunch
Controls if a public IP is associated to an instance at launch.
public Nullable<bool> MapPublicIpOnLaunch { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: true in Subnet.Public, false in Subnet.Private or Subnet.Isolated.
VpcId
The VPC which this subnet is part of.
public string VpcId { get; set; }
Property Value
System.String