Interface SubnetProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Subinterfaces:
PrivateSubnetProps,PublicSubnetProps
- All Known Implementing Classes:
PrivateSubnetProps.Jsii$Proxy,PublicSubnetProps.Jsii$Proxy,SubnetProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-13T16:10:03.555Z")
@Stability(Stable)
public interface SubnetProps
extends software.amazon.jsii.JsiiSerializable
Specify configuration parameters for a VPC subnet.
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.*;
SubnetProps subnetProps = SubnetProps.builder()
.availabilityZone("availabilityZone")
.cidrBlock("cidrBlock")
.vpcId("vpcId")
// the properties below are optional
.assignIpv6AddressOnCreation(false)
.ipv6CidrBlock("ipv6CidrBlock")
.mapPublicIpOnLaunch(false)
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forSubnetPropsstatic final classAn implementation forSubnetProps -
Method Summary
Modifier and TypeMethodDescriptionstatic SubnetProps.Builderbuilder()default BooleanIndicates whether a network interface created in this subnet receives an IPv6 address.The availability zone for the subnet.The CIDR notation for this subnet.default StringThe IPv6 CIDR block.default BooleanControls if a public IP is associated to an instance at launch.getVpcId()The VPC which this subnet is part of.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAvailabilityZone
The availability zone for the subnet. -
getCidrBlock
The CIDR notation for this subnet. -
getVpcId
The VPC which this subnet is part of. -
getAssignIpv6AddressOnCreation
Indicates whether a network interface created in this subnet receives an IPv6 address.If you specify AssignIpv6AddressOnCreation, you must also specify Ipv6CidrBlock.
Default: false
-
getIpv6CidrBlock
The IPv6 CIDR block.If you specify AssignIpv6AddressOnCreation, you must also specify Ipv6CidrBlock.
Default: - no IPv6 CIDR block.
-
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.
-
builder
- Returns:
- a
SubnetProps.BuilderofSubnetProps
-