Class SubnetGroup.Builder

java.lang.Object
software.amazon.awscdk.services.rds.SubnetGroup.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<SubnetGroup>
Enclosing class:
SubnetGroup

@Stability(Stable) public static final class SubnetGroup.Builder extends Object implements software.amazon.jsii.Builder<SubnetGroup>
A fluent builder for SubnetGroup.
  • Method Details

    • create

      @Stability(Stable) public static SubnetGroup.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of SubnetGroup.Builder.
    • description

      @Stability(Stable) public SubnetGroup.Builder description(String description)
      Description of the subnet group.

      Parameters:
      description - Description of the subnet group. This parameter is required.
      Returns:
      this
    • vpc

      @Stability(Stable) public SubnetGroup.Builder vpc(IVpc vpc)
      The VPC to place the subnet group in.

      Parameters:
      vpc - The VPC to place the subnet group in. This parameter is required.
      Returns:
      this
    • removalPolicy

      @Stability(Stable) public SubnetGroup.Builder removalPolicy(RemovalPolicy removalPolicy)
      The removal policy to apply when the subnet group are removed from the stack or replaced during an update.

      Default: RemovalPolicy.DESTROY

      Parameters:
      removalPolicy - The removal policy to apply when the subnet group are removed from the stack or replaced during an update. This parameter is required.
      Returns:
      this
    • subnetGroupName

      @Stability(Stable) public SubnetGroup.Builder subnetGroupName(String subnetGroupName)
      The name of the subnet group.

      Default: - a name is generated

      Parameters:
      subnetGroupName - The name of the subnet group. This parameter is required.
      Returns:
      this
    • vpcSubnets

      @Stability(Stable) public SubnetGroup.Builder vpcSubnets(SubnetSelection vpcSubnets)
      Which subnets within the VPC to associate with this group.

      Default: - private subnets

      Parameters:
      vpcSubnets - Which subnets within the VPC to associate with this group. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public SubnetGroup build()
      Specified by:
      build in interface software.amazon.jsii.Builder<SubnetGroup>
      Returns:
      a newly built instance of SubnetGroup.