@Generated(value="software.amazon.awssdk:codegen") public final class PlacementConstraint extends Object implements StructuredPojo, ToCopyableBuilder<PlacementConstraint.Builder,PlacementConstraint>
An object representing a constraint on task placement. For more information, see Task Placement Constraints in the Amazon EC2 Container Service Developer Guide.
Modifier and Type | Class and Description |
---|---|
static interface |
PlacementConstraint.Builder |
Modifier and Type | Method and Description |
---|---|
static PlacementConstraint.Builder |
builder() |
boolean |
equals(Object obj) |
String |
expression()
A cluster query language expression to apply to the constraint.
|
<T> Optional<T> |
getValueForField(String fieldName,
Class<T> clazz) |
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
static Class<? extends PlacementConstraint.Builder> |
serializableBuilderClass() |
PlacementConstraint.Builder |
toBuilder()
Take this object and create a builder that contains all of the current property values of this object.
|
String |
toString() |
PlacementConstraintType |
type()
The type of constraint.
|
String |
typeAsString()
The type of constraint.
|
copy
public 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. Note that distinctInstance
is not supported in task definitions.
If the service returns an enum value that is not available in the current SDK version, type
will return
PlacementConstraintType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
typeAsString()
.
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. Note that distinctInstance
is not supported in task definitions.PlacementConstraintType
public String typeAsString()
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. Note that distinctInstance
is not supported in task definitions.
If the service returns an enum value that is not available in the current SDK version, type
will return
PlacementConstraintType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available from
typeAsString()
.
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. Note that distinctInstance
is not supported in task definitions.PlacementConstraintType
public 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.
distinctInstance
. For more information, see Cluster
Query Language in the Amazon EC2 Container Service Developer Guide.public PlacementConstraint.Builder toBuilder()
ToCopyableBuilder
toBuilder
in interface ToCopyableBuilder<PlacementConstraint.Builder,PlacementConstraint>
public static PlacementConstraint.Builder builder()
public static Class<? extends PlacementConstraint.Builder> serializableBuilderClass()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.