@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class PlacementConstraint extends Object implements Serializable, Cloneable, StructuredPojo
An object representing a constraint on task placement.
| Constructor and Description |
|---|
PlacementConstraint() |
| Modifier and Type | Method and Description |
|---|---|
PlacementConstraint |
clone() |
boolean |
equals(Object obj) |
String |
getExpression()
A cluster query language expression to apply to the constraint.
|
String |
getType()
The type of constraint.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller. |
void |
setExpression(String expression)
A cluster query language expression to apply to the constraint.
|
void |
setType(String type)
The type of constraint.
|
String |
toString()
Returns a string representation of this object.
|
PlacementConstraint |
withExpression(String expression)
A cluster query language expression to apply to the constraint.
|
PlacementConstraint |
withType(PlacementConstraintType type)
The type of constraint.
|
PlacementConstraint |
withType(String type)
The type of constraint.
|
public void setExpression(String expression)
A cluster query language expression to apply to the constraint. You cannot specify an expression if the
constraint type is distinctInstance. For more information, see Cluster query language
in the Amazon ECS Developer Guide.
expression - A cluster query language expression to apply to the constraint. You cannot specify an expression if the
constraint type is distinctInstance. For more information, see Cluster query
language in the Amazon ECS Developer Guide.public String getExpression()
A cluster query language expression to apply to the constraint. You cannot specify an expression if the
constraint type is distinctInstance. For more information, see Cluster query language
in the Amazon ECS Developer Guide.
distinctInstance. For more information, see Cluster query
language in the Amazon ECS Developer Guide.public PlacementConstraint withExpression(String expression)
A cluster query language expression to apply to the constraint. You cannot specify an expression if the
constraint type is distinctInstance. For more information, see Cluster query language
in the Amazon ECS Developer Guide.
expression - A cluster query language expression to apply to the constraint. You cannot specify an expression if the
constraint type is distinctInstance. For more information, see Cluster query
language in the Amazon ECS Developer Guide.public void setType(String type)
The type of constraint. Use distinctInstance to ensure that each task in a particular group is
running on a different container instance. Use memberOf to restrict the selection to a group of
valid candidates.
type - The type of constraint. Use distinctInstance to ensure that each task in a particular group
is running on a different container instance. Use memberOf to restrict the selection to a
group of valid candidates.PlacementConstraintTypepublic String getType()
The type of constraint. Use distinctInstance to ensure that each task in a particular group is
running on a different container instance. Use memberOf to restrict the selection to a group of
valid candidates.
distinctInstance to ensure that each task in a particular group
is running on a different container instance. Use memberOf to restrict the selection to a
group of valid candidates.PlacementConstraintTypepublic PlacementConstraint withType(String type)
The type of constraint. Use distinctInstance to ensure that each task in a particular group is
running on a different container instance. Use memberOf to restrict the selection to a group of
valid candidates.
type - The type of constraint. Use distinctInstance to ensure that each task in a particular group
is running on a different container instance. Use memberOf to restrict the selection to a
group of valid candidates.PlacementConstraintTypepublic PlacementConstraint withType(PlacementConstraintType type)
The type of constraint. Use distinctInstance to ensure that each task in a particular group is
running on a different container instance. Use memberOf to restrict the selection to a group of
valid candidates.
type - The type of constraint. Use distinctInstance to ensure that each task in a particular group
is running on a different container instance. Use memberOf to restrict the selection to a
group of valid candidates.PlacementConstraintTypepublic String toString()
toString in class ObjectObject.toString()public PlacementConstraint clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojoProtocolMarshaller.marshall in interface StructuredPojoprotocolMarshaller - Implementation of ProtocolMarshaller used to marshall this object's data.