Struct aws_sdk_scheduler::model::placement_constraint::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for PlacementConstraint
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn type(self, input: PlacementConstraintType) -> Self
pub fn type(self, input: PlacementConstraintType) -> Self
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.
sourcepub fn set_type(self, input: Option<PlacementConstraintType>) -> Self
pub fn set_type(self, input: Option<PlacementConstraintType>) -> Self
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.
sourcepub fn expression(self, input: impl Into<String>) -> Self
pub fn expression(self, input: impl Into<String>) -> Self
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 in the Amazon ECS Developer Guide.
sourcepub fn set_expression(self, input: Option<String>) -> Self
pub fn set_expression(self, input: Option<String>) -> Self
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 in the Amazon ECS Developer Guide.
sourcepub fn build(self) -> PlacementConstraint
pub fn build(self) -> PlacementConstraint
Consumes the builder and constructs a PlacementConstraint
.