AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

TaskDefinitionPlacementConstraint

import "github.com/aws/aws-sdk-go/service/ecs"

type TaskDefinitionPlacementConstraint struct { Expression *string `locationName:"expression" type:"string"` Type *string `locationName:"type" type:"string" enum:"TaskDefinitionPlacementConstraintType"` }

An object representing a constraint on task placement in the task definition.

If you are using the Fargate launch type, task placement constraints are not supported.

For more information, see Task Placement Constraints (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html) in the Amazon Elastic Container Service Developer Guide.

Expression

Type: *string

A cluster query language expression to apply to the constraint. For more information, see Cluster Query Language (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html) in the Amazon Elastic Container Service Developer Guide.

Type

Type: *string

The type of constraint. The DistinctInstance constraint ensures that each task in a particular group is running on a different container instance. The MemberOf constraint restricts selection to be from a group of valid candidates.

Method

GoString

func (s TaskDefinitionPlacementConstraint) GoString() string

GoString returns the string representation

SetExpression

func (s *TaskDefinitionPlacementConstraint) SetExpression(v string) *TaskDefinitionPlacementConstraint

SetExpression sets the Expression field's value.

SetType

func (s *TaskDefinitionPlacementConstraint) SetType(v string) *TaskDefinitionPlacementConstraint

SetType sets the Type field's value.

String

func (s TaskDefinitionPlacementConstraint) String() string

String returns the string representation

On this page: