Class CfnTaskDefinition.TaskDefinitionPlacementConstraintProperty
The constraint on task placement in the task definition.
Inheritance
System.Object
CfnTaskDefinition.TaskDefinitionPlacementConstraintProperty
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class TaskDefinitionPlacementConstraintProperty : Object, CfnTaskDefinition.ITaskDefinitionPlacementConstraintProperty
Syntax (vb)
Public Class TaskDefinitionPlacementConstraintProperty
Inherits Object
Implements CfnTaskDefinition.ITaskDefinitionPlacementConstraintProperty
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"
};
Synopsis
Constructors
TaskDefinitionPlacementConstraintProperty() |
Properties
Expression | A cluster query language expression to apply to the constraint. |
Type | The type of constraint. |
Constructors
TaskDefinitionPlacementConstraintProperty()
public TaskDefinitionPlacementConstraintProperty()
Properties
Expression
A cluster query language expression to apply to the constraint.
public string Expression { get; set; }
Property Value
System.String
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
System.String
Remarks
The MemberOf
constraint restricts selection to be from a group of valid candidates.