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.84.0 (build 5404dcf)", date="2023-06-19T16:30:39.542Z") @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
         .mapPublicIpOnLaunch(false)
         .build();
 
  • Method Details

    • getAvailabilityZone

      @Stability(Stable) @NotNull String getAvailabilityZone()
      The availability zone for the subnet.
    • getCidrBlock

      @Stability(Stable) @NotNull String getCidrBlock()
      The CIDR notation for this subnet.
    • getVpcId

      @Stability(Stable) @NotNull String getVpcId()
      The VPC which this subnet is part of.
    • getMapPublicIpOnLaunch

      @Stability(Stable) @Nullable default Boolean 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

      @Stability(Stable) static SubnetProps.Builder builder()
      Returns:
      a SubnetProps.Builder of SubnetProps