Interface ISubnetConfiguration
Specify configuration parameters for a single subnet group in a VPC.
Namespace: Amazon.CDK.AWS.EC2
Assembly: Amazon.CDK.AWS.EC2.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.ISOLATED,
// the properties below are optional
CidrMask = 123,
MapPublicIpOnLaunch = false,
Reserved = false
};
Synopsis
Properties
CidrMask | The number of leading 1 bits in the routing mask. |
MapPublicIpOnLaunch | Controls if a public IP 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.
virtual Nullable<double> CidrMask { get; }
Property Value
System.Nullable<System.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
.
Default: - Available IP space is evenly divided across subnets.
MapPublicIpOnLaunch
Controls if a public IP is associated to an instance at launch.
virtual Nullable<bool> MapPublicIpOnLaunch { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: true in Subnet.Public, false in Subnet.Private or Subnet.Isolated.
Name
Logical name for the subnet group.
string Name { get; }
Property Value
System.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.
virtual Nullable<bool> Reserved { get; }
Property Value
System.Nullable<System.Boolean>
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
Remarks
The Subnet type will control the ability to route and connect to the Internet.