PlacementConstraintProperty Struct
An object representing a constraint on task placement.
To learn more, see Task Placement Constraints in the Amazon Elastic Container Service Developer Guide.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_pipes as pipes } from 'aws-cdk-lib';
const placementConstraintProperty: pipes.CfnPipe.PlacementConstraintProperty = {
expression: 'expression',
type: 'type',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_pipes as pipes
placement_constraint_property = pipes.CfnPipe.PlacementConstraintProperty(
expression="expression",
type="type"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.pipes.*;
PlacementConstraintProperty placementConstraintProperty = PlacementConstraintProperty.builder()
.expression("expression")
.type("type")
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Pipes;
var placementConstraintProperty = new PlacementConstraintProperty {
Expression = "expression",
Type = "type"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
placementConstraintProperty := &PlacementConstraintProperty{
Expression: jsii.String("expression"),
Type: jsii.String("type"),
}
Properties
expressionoptionalstringexpressionoptionalstrexpressionoptionalStringExpressionoptionalstringExpressionoptional*string #A cluster query language expression to apply to the constraint.
notes
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.
The type of constraint.
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.