Interface SubnetConfiguration
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
SubnetConfiguration.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:39.536Z")
@Stability(Stable)
public interface SubnetConfiguration
extends software.amazon.jsii.JsiiSerializable
Specify configuration parameters for a single subnet group in a VPC.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.ec2.*; SubnetConfiguration subnetConfiguration = SubnetConfiguration.builder() .name("name") .subnetType(SubnetType.ISOLATED) // the properties below are optional .cidrMask(123) .mapPublicIpOnLaunch(false) .reserved(false) .build();
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forSubnetConfiguration
static final class
An implementation forSubnetConfiguration
-
Method Summary
Modifier and TypeMethodDescriptionstatic SubnetConfiguration.Builder
builder()
default Number
The number of leading 1 bits in the routing mask.default Boolean
Controls if a public IP is associated to an instance at launch.getName()
Logical name for the subnet group.default Boolean
Controls if subnet IP space needs to be reserved.The type of Subnet to configure.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getName
Logical name for the subnet group.This name can be used when selecting VPC subnets to distinguish between different subnet groups of the same type.
-
getSubnetType
The type of Subnet to configure.The Subnet type will control the ability to route and connect to the Internet.
-
getCidrMask
The number of leading 1 bits in the routing mask.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.
-
getMapPublicIpOnLaunch
Controls if a public IP is associated to an instance at launch.Default: true in Subnet.Public, false in Subnet.Private or Subnet.Isolated.
-
getReserved
Controls if subnet IP space needs to be reserved.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
-
builder
- Returns:
- a
SubnetConfiguration.Builder
ofSubnetConfiguration
-