Struct aws_sdk_eventbridge::types::PlacementConstraint
source · #[non_exhaustive]pub struct PlacementConstraint {
pub type: Option<PlacementConstraintType>,
pub expression: Option<String>,
}
Expand description
An object representing a constraint on task placement. To learn more, see Task Placement Constraints in the Amazon Elastic Container Service Developer Guide.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.type: Option<PlacementConstraintType>
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.
expression: Option<String>
A cluster query language expression to apply to the constraint. 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.
Implementations§
source§impl PlacementConstraint
impl PlacementConstraint
sourcepub fn type(&self) -> Option<&PlacementConstraintType>
pub fn type(&self) -> Option<&PlacementConstraintType>
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) -> Option<&str>
pub fn expression(&self) -> Option<&str>
A cluster query language expression to apply to the constraint. 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.
source§impl PlacementConstraint
impl PlacementConstraint
sourcepub fn builder() -> PlacementConstraintBuilder
pub fn builder() -> PlacementConstraintBuilder
Creates a new builder-style object to manufacture PlacementConstraint
.
Trait Implementations§
source§impl Clone for PlacementConstraint
impl Clone for PlacementConstraint
source§fn clone(&self) -> PlacementConstraint
fn clone(&self) -> PlacementConstraint
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PlacementConstraint
impl Debug for PlacementConstraint
source§impl PartialEq for PlacementConstraint
impl PartialEq for PlacementConstraint
source§fn eq(&self, other: &PlacementConstraint) -> bool
fn eq(&self, other: &PlacementConstraint) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for PlacementConstraint
Auto Trait Implementations§
impl Freeze for PlacementConstraint
impl RefUnwindSafe for PlacementConstraint
impl Send for PlacementConstraint
impl Sync for PlacementConstraint
impl Unpin for PlacementConstraint
impl UnwindSafe for PlacementConstraint
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more