Class CfnPlacementGroupProps.Builder
java.lang.Object
software.amazon.awscdk.services.ec2.CfnPlacementGroupProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnPlacementGroupProps>
- Enclosing interface:
- CfnPlacementGroupProps
@Stability(Stable)
public static final class CfnPlacementGroupProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnPlacementGroupProps>
A builder for
CfnPlacementGroupProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.partitionCount(Number partitionCount) Sets the value ofCfnPlacementGroupProps.getPartitionCount()spreadLevel(String spreadLevel) Sets the value ofCfnPlacementGroupProps.getSpreadLevel()Sets the value ofCfnPlacementGroupProps.getStrategy()Sets the value ofCfnPlacementGroupProps.getTags()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
partitionCount
Sets the value ofCfnPlacementGroupProps.getPartitionCount()- Parameters:
partitionCount- The number of partitions. Valid only when Strategy is set topartition.- Returns:
this
-
spreadLevel
Sets the value ofCfnPlacementGroupProps.getSpreadLevel()- Parameters:
spreadLevel- Determines how placement groups spread instances.- Host – You can use
hostonly with Outpost placement groups. - Rack – No usage restrictions.
- Host – You can use
- Returns:
this
-
strategy
Sets the value ofCfnPlacementGroupProps.getStrategy()- Parameters:
strategy- The placement strategy.- Returns:
this
-
tags
Sets the value ofCfnPlacementGroupProps.getTags()- Parameters:
tags- The tags to apply to the new placement group.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnPlacementGroupProps>- Returns:
- a new instance of
CfnPlacementGroupProps - Throws:
NullPointerException- if any required attribute was not provided
-