Class CfnRule.PlacementConstraintProperty
An object representing a constraint on task placement.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.Events
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class PlacementConstraintProperty : Object, CfnRule.IPlacementConstraintProperty
Syntax (vb)
Public Class PlacementConstraintProperty
Inherits Object
Implements CfnRule.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
Constructors
PlacementConstraintProperty() |
Properties
Expression | A cluster query language expression to apply to the constraint. |
Type | The type of constraint. |
Constructors
PlacementConstraintProperty()
public PlacementConstraintProperty()
Properties
Expression
A cluster query language expression to apply to the constraint.
public string Expression { get; set; }
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.
public string Type { get; set; }
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.