Class CfnSubnetGroup.Builder

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

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

    • create

      @Stability(Stable) public static CfnSubnetGroup.Builder create(Construct scope, String id)
      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      Returns:
      a new instance of CfnSubnetGroup.Builder.
    • description

      @Stability(Stable) public CfnSubnetGroup.Builder description(String description)
      The description for the cache subnet group.

      Parameters:
      description - The description for the cache subnet group. This parameter is required.
      Returns:
      this
    • subnetIds

      @Stability(Stable) public CfnSubnetGroup.Builder subnetIds(List<String> subnetIds)
      The EC2 subnet IDs for the cache subnet group.

      Parameters:
      subnetIds - The EC2 subnet IDs for the cache subnet group. This parameter is required.
      Returns:
      this
    • cacheSubnetGroupName

      @Stability(Stable) public CfnSubnetGroup.Builder cacheSubnetGroupName(String cacheSubnetGroupName)
      The name for the cache subnet group. This value is stored as a lowercase string.

      Constraints: Must contain no more than 255 alphanumeric characters or hyphens.

      Example: mysubnetgroup

      Parameters:
      cacheSubnetGroupName - The name for the cache subnet group. This value is stored as a lowercase string. This parameter is required.
      Returns:
      this
    • tags

      @Stability(Stable) public CfnSubnetGroup.Builder tags(List<? extends CfnTag> tags)
      A tag that can be added to an ElastiCache subnet group.

      Tags are composed of a Key/Value pair. You can use tags to categorize and track all your subnet groups. A tag with a null Value is permitted.

      Parameters:
      tags - A tag that can be added to an ElastiCache subnet group. This parameter is required.
      Returns:
      this
    • build

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