Class CfnPlacementGroup.Builder

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

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

    • create

      @Stability(Stable) public static CfnPlacementGroup.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 CfnPlacementGroup.Builder.
    • partitionCount

      @Stability(Stable) public CfnPlacementGroup.Builder partitionCount(Number partitionCount)
      The number of partitions.

      Valid only when Strategy is set to partition .

      Parameters:
      partitionCount - The number of partitions. This parameter is required.
      Returns:
      this
    • spreadLevel

      @Stability(Stable) public CfnPlacementGroup.Builder spreadLevel(String spreadLevel)
      Determines how placement groups spread instances.

      • Host – You can use host only with Outpost placement groups.
      • Rack – No usage restrictions.

      Parameters:
      spreadLevel - Determines how placement groups spread instances. This parameter is required.
      Returns:
      this
    • strategy

      @Stability(Stable) public CfnPlacementGroup.Builder strategy(String strategy)
      The placement strategy.

      Parameters:
      strategy - The placement strategy. This parameter is required.
      Returns:
      this
    • tags

      @Stability(Stable) public CfnPlacementGroup.Builder tags(List<? extends CfnTag> tags)
      The tags to apply to the new placement group.

      Parameters:
      tags - The tags to apply to the new placement group. This parameter is required.
      Returns:
      this
    • build

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