Class CfnSchedulePropsMixin.PlacementConstraintProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.scheduler.CfnSchedulePropsMixin.PlacementConstraintProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnSchedulePropsMixin.PlacementConstraintProperty>
- Enclosing interface:
CfnSchedulePropsMixin.PlacementConstraintProperty
@Stability(Stable)
public static final class CfnSchedulePropsMixin.PlacementConstraintProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnSchedulePropsMixin.PlacementConstraintProperty>
A builder for
CfnSchedulePropsMixin.PlacementConstraintProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.expression(String expression) Sets the value ofCfnSchedulePropsMixin.PlacementConstraintProperty.getExpression()Sets the value ofCfnSchedulePropsMixin.PlacementConstraintProperty.getType()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
expression
@Stability(Stable) public CfnSchedulePropsMixin.PlacementConstraintProperty.Builder expression(String expression) Sets the value ofCfnSchedulePropsMixin.PlacementConstraintProperty.getExpression()- Parameters:
expression- A cluster query language expression to apply to the constraint. You cannot specify an expression if the constraint type isdistinctInstance. For more information, see Cluster query language in the Amazon ECS Developer Guide .- Returns:
this
-
type
@Stability(Stable) public CfnSchedulePropsMixin.PlacementConstraintProperty.Builder type(String type) Sets the value ofCfnSchedulePropsMixin.PlacementConstraintProperty.getType()- Parameters:
type- The type of constraint. UsedistinctInstanceto ensure that each task in a particular group is running on a different container instance. UsememberOfto restrict the selection to a group of valid candidates.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnSchedulePropsMixin.PlacementConstraintProperty>- Returns:
- a new instance of
CfnSchedulePropsMixin.PlacementConstraintProperty - Throws:
NullPointerException- if any required attribute was not provided
-