Interface CfnRule.IPlacementConstraintProperty
An object representing a constraint on task placement.
Namespace: Amazon.CDK.AWS.Events
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IPlacementConstraintProperty
Syntax (vb)
Public Interface IPlacementConstraintProperty
Remarks
To learn more, see Task Placement Constraints in the Amazon Elastic Container Service Developer Guide.
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.Events;
var placementConstraintProperty = new PlacementConstraintProperty {
Expression = "expression",
Type = "type"
};
Synopsis
Properties
Expression | A cluster query language expression to apply to the constraint. |
Type | The type of constraint. |
Properties
Expression
A cluster query language expression to apply to the constraint.
virtual string Expression { get; }
Property Value
System.String
Remarks
You cannot specify an expression if the constraint type is distinctInstance
. To learn more, see Cluster Query Language in the Amazon Elastic Container Service Developer Guide.
Type
The type of constraint.
virtual string Type { get; }
Property Value
System.String
Remarks
Use distinctInstance to ensure that each task in a particular group is running on a different container instance. Use memberOf to restrict the selection to a group of valid candidates.