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.

PlacementConstraint

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

type PlacementConstraint struct { Expression *string `locationName:"expression" type:"string"` Type *string `locationName:"type" type:"string" enum:"PlacementConstraintType"` }

An object representing a constraint on task placement. 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. You cannot specify an expression if the constraint type is distinctInstance. 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. 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. The value distinctInstance is not supported in task definitions.

Method

GoString

func (s PlacementConstraint) GoString() string

GoString returns the string representation

SetExpression

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

SetExpression sets the Expression field's value.

SetType

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

SetType sets the Type field's value.

String

func (s PlacementConstraint) String() string

String returns the string representation

On this page: