interface TaskDefinitionPlacementConstraintProperty
| Language | Type name | 
|---|---|
|  .NET | Amazon.CDK.AWS.ECS.CfnTaskDefinition.TaskDefinitionPlacementConstraintProperty | 
|  Java | software.amazon.awscdk.services.ecs.CfnTaskDefinition.TaskDefinitionPlacementConstraintProperty | 
|  Python | aws_cdk.aws_ecs.CfnTaskDefinition.TaskDefinitionPlacementConstraintProperty | 
|  TypeScript | @aws-cdk/aws-ecs»CfnTaskDefinition»TaskDefinitionPlacementConstraintProperty | 
The constraint on task placement in the task definition.
For more information, see Task placement constraints in the Amazon Elastic Container Service Developer Guide .
Task placement constraints aren't supported for tasks run on AWS Fargate .
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as ecs from '@aws-cdk/aws-ecs';
const taskDefinitionPlacementConstraintProperty: ecs.CfnTaskDefinition.TaskDefinitionPlacementConstraintProperty = {
  type: 'type',
  // the properties below are optional
  expression: 'expression',
};
Properties
| Name | Type | Description | 
|---|---|---|
| type | string | The type of constraint. | 
| expression? | string | A cluster query language expression to apply to the constraint. | 
type
Type:
string
The type of constraint.
The MemberOf constraint restricts selection to be from a group of valid candidates.
expression?
Type:
string
(optional)
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 .
