Interface SubnetGroupProps

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
SubnetGroupProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-24T21:00:35.391Z") @Stability(Stable) public interface SubnetGroupProps extends software.amazon.jsii.JsiiSerializable
Properties for creating a SubnetGroup.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.*;
 import software.amazon.awscdk.services.ec2.*;
 import software.amazon.awscdk.services.rds.*;
 Subnet subnet;
 SubnetFilter subnetFilter;
 Vpc vpc;
 SubnetGroupProps subnetGroupProps = SubnetGroupProps.builder()
         .description("description")
         .vpc(vpc)
         // the properties below are optional
         .removalPolicy(RemovalPolicy.DESTROY)
         .subnetGroupName("subnetGroupName")
         .vpcSubnets(SubnetSelection.builder()
                 .availabilityZones(List.of("availabilityZones"))
                 .onePerAz(false)
                 .subnetFilters(List.of(subnetFilter))
                 .subnetGroupName("subnetGroupName")
                 .subnets(List.of(subnet))
                 .subnetType(SubnetType.PRIVATE_ISOLATED)
                 .build())
         .build();
 
  • Method Details

    • getDescription

      @Stability(Stable) @NotNull String getDescription()
      Description of the subnet group.
    • getVpc

      @Stability(Stable) @NotNull IVpc getVpc()
      The VPC to place the subnet group in.
    • getRemovalPolicy

      @Stability(Stable) @Nullable default RemovalPolicy getRemovalPolicy()
      The removal policy to apply when the subnet group are removed from the stack or replaced during an update.

      Default: RemovalPolicy.DESTROY

    • getSubnetGroupName

      @Stability(Stable) @Nullable default String getSubnetGroupName()
      The name of the subnet group.

      Default: - a name is generated

    • getVpcSubnets

      @Stability(Stable) @Nullable default SubnetSelection getVpcSubnets()
      Which subnets within the VPC to associate with this group.

      Default: - private subnets

    • builder

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