#[non_exhaustive]pub struct CapacityProviderStrategyItemBuilder { /* private fields */ }
Expand description
A builder for CapacityProviderStrategyItem
.
Implementations§
source§impl CapacityProviderStrategyItemBuilder
impl CapacityProviderStrategyItemBuilder
sourcepub fn capacity_provider(self, input: impl Into<String>) -> Self
pub fn capacity_provider(self, input: impl Into<String>) -> Self
The short name of the capacity provider.
sourcepub fn set_capacity_provider(self, input: Option<String>) -> Self
pub fn set_capacity_provider(self, input: Option<String>) -> Self
The short name of the capacity provider.
sourcepub fn get_capacity_provider(&self) -> &Option<String>
pub fn get_capacity_provider(&self) -> &Option<String>
The short name of the capacity provider.
sourcepub fn weight(self, input: i32) -> Self
pub fn weight(self, input: i32) -> Self
The weight value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider. The weight
value is taken into consideration after the base
value, if defined, is satisfied.
If no weight
value is specified, the default value of 0
is used. When multiple capacity providers are specified within a capacity provider strategy, at least one of the capacity providers must have a weight value greater than zero and any capacity providers with a weight of 0
can't be used to place tasks. If you specify multiple capacity providers in a strategy that all have a weight of 0
, any RunTask
or CreateService
actions using the capacity provider strategy will fail.
An example scenario for using weights is defining a strategy that contains two capacity providers and both have a weight of 1
, then when the base
is satisfied, the tasks will be split evenly across the two capacity providers. Using that same logic, if you specify a weight of 1
for capacityProviderA and a weight of 4
for capacityProviderB, then for every one task that's run using capacityProviderA, four tasks would use capacityProviderB.
sourcepub fn set_weight(self, input: Option<i32>) -> Self
pub fn set_weight(self, input: Option<i32>) -> Self
The weight value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider. The weight
value is taken into consideration after the base
value, if defined, is satisfied.
If no weight
value is specified, the default value of 0
is used. When multiple capacity providers are specified within a capacity provider strategy, at least one of the capacity providers must have a weight value greater than zero and any capacity providers with a weight of 0
can't be used to place tasks. If you specify multiple capacity providers in a strategy that all have a weight of 0
, any RunTask
or CreateService
actions using the capacity provider strategy will fail.
An example scenario for using weights is defining a strategy that contains two capacity providers and both have a weight of 1
, then when the base
is satisfied, the tasks will be split evenly across the two capacity providers. Using that same logic, if you specify a weight of 1
for capacityProviderA and a weight of 4
for capacityProviderB, then for every one task that's run using capacityProviderA, four tasks would use capacityProviderB.
sourcepub fn get_weight(&self) -> &Option<i32>
pub fn get_weight(&self) -> &Option<i32>
The weight value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider. The weight
value is taken into consideration after the base
value, if defined, is satisfied.
If no weight
value is specified, the default value of 0
is used. When multiple capacity providers are specified within a capacity provider strategy, at least one of the capacity providers must have a weight value greater than zero and any capacity providers with a weight of 0
can't be used to place tasks. If you specify multiple capacity providers in a strategy that all have a weight of 0
, any RunTask
or CreateService
actions using the capacity provider strategy will fail.
An example scenario for using weights is defining a strategy that contains two capacity providers and both have a weight of 1
, then when the base
is satisfied, the tasks will be split evenly across the two capacity providers. Using that same logic, if you specify a weight of 1
for capacityProviderA and a weight of 4
for capacityProviderB, then for every one task that's run using capacityProviderA, four tasks would use capacityProviderB.
sourcepub fn base(self, input: i32) -> Self
pub fn base(self, input: i32) -> Self
The base value designates how many tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined. If no value is specified, the default value of 0
is used.
sourcepub fn set_base(self, input: Option<i32>) -> Self
pub fn set_base(self, input: Option<i32>) -> Self
The base value designates how many tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined. If no value is specified, the default value of 0
is used.
sourcepub fn get_base(&self) -> &Option<i32>
pub fn get_base(&self) -> &Option<i32>
The base value designates how many tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined. If no value is specified, the default value of 0
is used.
sourcepub fn build(self) -> CapacityProviderStrategyItem
pub fn build(self) -> CapacityProviderStrategyItem
Consumes the builder and constructs a CapacityProviderStrategyItem
.
Trait Implementations§
source§impl Clone for CapacityProviderStrategyItemBuilder
impl Clone for CapacityProviderStrategyItemBuilder
source§fn clone(&self) -> CapacityProviderStrategyItemBuilder
fn clone(&self) -> CapacityProviderStrategyItemBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Default for CapacityProviderStrategyItemBuilder
impl Default for CapacityProviderStrategyItemBuilder
source§fn default() -> CapacityProviderStrategyItemBuilder
fn default() -> CapacityProviderStrategyItemBuilder
source§impl PartialEq<CapacityProviderStrategyItemBuilder> for CapacityProviderStrategyItemBuilder
impl PartialEq<CapacityProviderStrategyItemBuilder> for CapacityProviderStrategyItemBuilder
source§fn eq(&self, other: &CapacityProviderStrategyItemBuilder) -> bool
fn eq(&self, other: &CapacityProviderStrategyItemBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.