public class PlacementConstraint extends Object implements Serializable, Cloneable
An object representing a constraint on task placement. For more information, see Task Placement Constraints in the Amazon EC2 Container Service Developer Guide.
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 |
setExpression(String expression)
A cluster query language expression to apply to the constraint.
|
void |
setType(PlacementConstraintType type)
The type of constraint.
|
void |
setType(String type)
The type of constraint.
|
String |
toString()
Returns a string representation of this object; useful for testing and debugging.
|
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 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 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 selection to a group
of valid candidates.PlacementConstraintType
public 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 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 selection to a group
of valid candidates.PlacementConstraintType
public 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 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 selection to a group
of valid candidates.PlacementConstraintType
public void setType(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 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 selection to a group
of valid candidates.PlacementConstraintType
public 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 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 selection to a group
of valid candidates.PlacementConstraintType
public void setExpression(String expression)
A cluster query language expression to apply to the constraint. Note you cannot specify an expression if the
constraint type is distinctInstance
. For more information, see Cluster Query
Language in the Amazon EC2 Container Service Developer Guide.
expression
- A cluster query language expression to apply to the constraint. Note you cannot specify an expression if
the constraint type is distinctInstance
. For more information, see Cluster
Query Language in the Amazon EC2 Container Service Developer Guide.public String getExpression()
A cluster query language expression to apply to the constraint. Note you cannot specify an expression if the
constraint type is distinctInstance
. For more information, see Cluster Query
Language in the Amazon EC2 Container Service Developer Guide.
distinctInstance
. For more information, see Cluster
Query Language in the Amazon EC2 Container Service Developer Guide.public PlacementConstraint withExpression(String expression)
A cluster query language expression to apply to the constraint. Note you cannot specify an expression if the
constraint type is distinctInstance
. For more information, see Cluster Query
Language in the Amazon EC2 Container Service Developer Guide.
expression
- A cluster query language expression to apply to the constraint. Note you cannot specify an expression if
the constraint type is distinctInstance
. For more information, see Cluster
Query Language in the Amazon EC2 Container Service Developer Guide.public String toString()
toString
in class Object
Object.toString()
public PlacementConstraint clone()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.