Show / Hide Table of Contents

Class SubnetConfiguration

Specify configuration parameters for a single subnet group in a VPC.

Inheritance
object
SubnetConfiguration
Implements
ISubnetConfiguration
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class SubnetConfiguration : ISubnetConfiguration
Syntax (vb)
Public Class SubnetConfiguration Implements ISubnetConfiguration
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 subnetConfiguration = new SubnetConfiguration {
                Name = "name",
                SubnetType = SubnetType.PRIVATE_ISOLATED,

                // the properties below are optional
                CidrMask = 123,
                Ipv6AssignAddressOnCreation = false,
                MapPublicIpOnLaunch = false,
                Reserved = false
            };

Synopsis

Constructors

SubnetConfiguration()

Specify configuration parameters for a single subnet group in a VPC.

Properties

CidrMask

The number of leading 1 bits in the routing mask.

Ipv6AssignAddressOnCreation

This property is specific to dual stack VPCs.

MapPublicIpOnLaunch

Controls if a public IPv4 address is associated to an instance at launch.

Name

Logical name for the subnet group.

Reserved

Controls if subnet IP space needs to be reserved.

SubnetType

The type of Subnet to configure.

Constructors

SubnetConfiguration()

Specify configuration parameters for a single subnet group in a VPC.

public SubnetConfiguration()
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 subnetConfiguration = new SubnetConfiguration {
                Name = "name",
                SubnetType = SubnetType.PRIVATE_ISOLATED,

                // the properties below are optional
                CidrMask = 123,
                Ipv6AssignAddressOnCreation = false,
                MapPublicIpOnLaunch = false,
                Reserved = false
            };

Properties

CidrMask

The number of leading 1 bits in the routing mask.

public double? CidrMask { get; set; }
Property Value

double?

Remarks

The number of available IP addresses in each subnet of this group will be equal to 2^(32 - cidrMask) - 2.

Valid values are 16--28.

Note this is specific to IPv4 addresses.

Default: - Available IP space is evenly divided across subnets.

Ipv6AssignAddressOnCreation

This property is specific to dual stack VPCs.

public bool? Ipv6AssignAddressOnCreation { get; set; }
Property Value

bool?

Remarks

If set to false, then an IPv6 address will not be automatically assigned.

Note this is specific to IPv6 addresses.

Default: true

MapPublicIpOnLaunch

Controls if a public IPv4 address is associated to an instance at launch.

public bool? MapPublicIpOnLaunch { get; set; }
Property Value

bool?

Remarks

Note this is specific to IPv4 addresses.

Default: true in Subnet.Public of IPV4_ONLY VPCs, false otherwise

Name

Logical name for the subnet group.

public string Name { get; set; }
Property Value

string

Remarks

This name can be used when selecting VPC subnets to distinguish between different subnet groups of the same type.

Reserved

Controls if subnet IP space needs to be reserved.

public bool? Reserved { get; set; }
Property Value

bool?

Remarks

When true, the IP space for the subnet is reserved but no actual resources are provisioned. This space is only dependent on the number of availability zones and on cidrMask - all other subnet properties are ignored.

Default: false

SubnetType

The type of Subnet to configure.

public SubnetType SubnetType { get; set; }
Property Value

SubnetType

Remarks

The Subnet type will control the ability to route and connect to the Internet.

Implements

ISubnetConfiguration
Back to top Generated by DocFX