Class CfnTaskDefinition.TaskDefinitionPlacementConstraintProperty
The constraint on task placement in the task definition.
Inherited Members
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnTaskDefinition.TaskDefinitionPlacementConstraintProperty : CfnTaskDefinition.ITaskDefinitionPlacementConstraintPropertySyntax (vb)
Public Class CfnTaskDefinition.TaskDefinitionPlacementConstraintProperty Implements CfnTaskDefinition.ITaskDefinitionPlacementConstraintPropertyRemarks
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 .
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK.AWS.ECS;
             var taskDefinitionPlacementConstraintProperty = new TaskDefinitionPlacementConstraintProperty {
                 Type = "type",
                 // the properties below are optional
                 Expression = "expression"
             };Synopsis
Constructors
| TaskDefinitionPlacementConstraintProperty() | The constraint on task placement in the task definition. | 
Properties
| Expression | A cluster query language expression to apply to the constraint. | 
| Type | The type of constraint. | 
Constructors
TaskDefinitionPlacementConstraintProperty()
The constraint on task placement in the task definition.
public TaskDefinitionPlacementConstraintProperty()Remarks
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 .
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
             // The values are placeholders you should change.
             using Amazon.CDK.AWS.ECS;
             var taskDefinitionPlacementConstraintProperty = new TaskDefinitionPlacementConstraintProperty {
                 Type = "type",
                 // the properties below are optional
                 Expression = "expression"
             };Properties
Expression
A cluster query language expression to apply to the constraint.
public string? Expression { get; set; }Property Value
Remarks
For more information, see Cluster query language in the Amazon Elastic Container Service Developer Guide .
Type
The type of constraint.
public string Type { get; set; }Property Value
Remarks
The MemberOf constraint restricts selection to be from a group of valid candidates.