Skip to content

ECS  >  Structures  >  TaskDefinitionPlacementConstraint

TaskDefinitionPlacementConstraint

Structure Class

TaskDefinitionPlacementConstraint dataclass

Bases: _SerdeShape

The constraint on task placement in the task definition. For more information, see Task placement constraints in the Amazon Elastic Container Service Developer Guide.

Note

Task placement constraints aren't supported for tasks run on Fargate.

Attributes

expression class-attribute instance-attribute
expression: str | None = ...

A cluster query language expression to apply to the constraint. For more information, see Cluster query language in the Amazon Elastic Container Service Developer Guide.

type class-attribute instance-attribute
type: str | None = ...

The type of constraint. The MemberOf constraint restricts selection to be from a group of valid candidates.