Show / Hide Table of Contents

Interface ISubnetConfiguration

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

Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ISubnetConfiguration
Syntax (vb)
Public Interface 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

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.

Properties

CidrMask

The number of leading 1 bits in the routing mask.

double? CidrMask { get; }
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.

bool? Ipv6AssignAddressOnCreation { get; }
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.

bool? MapPublicIpOnLaunch { get; }
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.

string Name { get; }
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.

bool? Reserved { get; }
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.

SubnetType SubnetType { get; }
Property Value

SubnetType

Remarks

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

Back to top Generated by DocFX