AWS SDK for C++  1.8.185
AWS SDK for C++
Public Member Functions | List of all members
Aws::ECS::Model::CapacityProviderStrategyItem Class Reference

#include <CapacityProviderStrategyItem.h>

Public Member Functions

 CapacityProviderStrategyItem ()
 
 CapacityProviderStrategyItem (Aws::Utils::Json::JsonView jsonValue)
 
CapacityProviderStrategyItemoperator= (Aws::Utils::Json::JsonView jsonValue)
 
Aws::Utils::Json::JsonValue Jsonize () const
 
const Aws::StringGetCapacityProvider () const
 
bool CapacityProviderHasBeenSet () const
 
void SetCapacityProvider (const Aws::String &value)
 
void SetCapacityProvider (Aws::String &&value)
 
void SetCapacityProvider (const char *value)
 
CapacityProviderStrategyItemWithCapacityProvider (const Aws::String &value)
 
CapacityProviderStrategyItemWithCapacityProvider (Aws::String &&value)
 
CapacityProviderStrategyItemWithCapacityProvider (const char *value)
 
int GetWeight () const
 
bool WeightHasBeenSet () const
 
void SetWeight (int value)
 
CapacityProviderStrategyItemWithWeight (int value)
 
int GetBase () const
 
bool BaseHasBeenSet () const
 
void SetBase (int value)
 
CapacityProviderStrategyItemWithBase (int value)
 

Detailed Description

The details of a capacity provider strategy. A capacity provider strategy can be set when using the RunTask or CreateCluster APIs or as the default capacity provider strategy for a cluster with the CreateCluster API.

Only capacity providers that are already associated with a cluster and have an ACTIVE or UPDATING status can be used in a capacity provider strategy. The PutClusterCapacityProviders API is used to associate a capacity provider with a cluster.

If specifying a capacity provider that uses an Auto Scaling group, the capacity provider must already be created. New Auto Scaling group capacity providers can be created with the CreateCapacityProvider API operation.

To use a AWS Fargate capacity provider, specify either the FARGATE or FARGATE_SPOT capacity providers. The AWS Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used in a capacity provider strategy.

See Also:

AWS API Reference

Definition at line 44 of file CapacityProviderStrategyItem.h.

Constructor & Destructor Documentation

◆ CapacityProviderStrategyItem() [1/2]

Aws::ECS::Model::CapacityProviderStrategyItem::CapacityProviderStrategyItem ( )

◆ CapacityProviderStrategyItem() [2/2]

Aws::ECS::Model::CapacityProviderStrategyItem::CapacityProviderStrategyItem ( Aws::Utils::Json::JsonView  jsonValue)

Member Function Documentation

◆ BaseHasBeenSet()

bool Aws::ECS::Model::CapacityProviderStrategyItem::BaseHasBeenSet ( ) const
inline

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.

Definition at line 197 of file CapacityProviderStrategyItem.h.

◆ CapacityProviderHasBeenSet()

bool Aws::ECS::Model::CapacityProviderStrategyItem::CapacityProviderHasBeenSet ( ) const
inline

The short name of the capacity provider.

Definition at line 61 of file CapacityProviderStrategyItem.h.

◆ GetBase()

int Aws::ECS::Model::CapacityProviderStrategyItem::GetBase ( ) const
inline

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.

Definition at line 189 of file CapacityProviderStrategyItem.h.

◆ GetCapacityProvider()

const Aws::String& Aws::ECS::Model::CapacityProviderStrategyItem::GetCapacityProvider ( ) const
inline

The short name of the capacity provider.

Definition at line 56 of file CapacityProviderStrategyItem.h.

◆ GetWeight()

int Aws::ECS::Model::CapacityProviderStrategyItem::GetWeight ( ) const
inline

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 will not 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 is run using capacityProviderA, four tasks would use capacityProviderB.

Definition at line 114 of file CapacityProviderStrategyItem.h.

◆ Jsonize()

Aws::Utils::Json::JsonValue Aws::ECS::Model::CapacityProviderStrategyItem::Jsonize ( ) const

◆ operator=()

CapacityProviderStrategyItem& Aws::ECS::Model::CapacityProviderStrategyItem::operator= ( Aws::Utils::Json::JsonView  jsonValue)

◆ SetBase()

void Aws::ECS::Model::CapacityProviderStrategyItem::SetBase ( int  value)
inline

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.

Definition at line 205 of file CapacityProviderStrategyItem.h.

◆ SetCapacityProvider() [1/3]

void Aws::ECS::Model::CapacityProviderStrategyItem::SetCapacityProvider ( Aws::String &&  value)
inline

The short name of the capacity provider.

Definition at line 71 of file CapacityProviderStrategyItem.h.

◆ SetCapacityProvider() [2/3]

void Aws::ECS::Model::CapacityProviderStrategyItem::SetCapacityProvider ( const Aws::String value)
inline

The short name of the capacity provider.

Definition at line 66 of file CapacityProviderStrategyItem.h.

◆ SetCapacityProvider() [3/3]

void Aws::ECS::Model::CapacityProviderStrategyItem::SetCapacityProvider ( const char *  value)
inline

The short name of the capacity provider.

Definition at line 76 of file CapacityProviderStrategyItem.h.

◆ SetWeight()

void Aws::ECS::Model::CapacityProviderStrategyItem::SetWeight ( int  value)
inline

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 will not 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 is run using capacityProviderA, four tasks would use capacityProviderB.

Definition at line 158 of file CapacityProviderStrategyItem.h.

◆ WeightHasBeenSet()

bool Aws::ECS::Model::CapacityProviderStrategyItem::WeightHasBeenSet ( ) const
inline

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 will not 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 is run using capacityProviderA, four tasks would use capacityProviderB.

Definition at line 136 of file CapacityProviderStrategyItem.h.

◆ WithBase()

CapacityProviderStrategyItem& Aws::ECS::Model::CapacityProviderStrategyItem::WithBase ( int  value)
inline

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.

Definition at line 213 of file CapacityProviderStrategyItem.h.

◆ WithCapacityProvider() [1/3]

CapacityProviderStrategyItem& Aws::ECS::Model::CapacityProviderStrategyItem::WithCapacityProvider ( Aws::String &&  value)
inline

The short name of the capacity provider.

Definition at line 86 of file CapacityProviderStrategyItem.h.

◆ WithCapacityProvider() [2/3]

CapacityProviderStrategyItem& Aws::ECS::Model::CapacityProviderStrategyItem::WithCapacityProvider ( const Aws::String value)
inline

The short name of the capacity provider.

Definition at line 81 of file CapacityProviderStrategyItem.h.

◆ WithCapacityProvider() [3/3]

CapacityProviderStrategyItem& Aws::ECS::Model::CapacityProviderStrategyItem::WithCapacityProvider ( const char *  value)
inline

The short name of the capacity provider.

Definition at line 91 of file CapacityProviderStrategyItem.h.

◆ WithWeight()

CapacityProviderStrategyItem& Aws::ECS::Model::CapacityProviderStrategyItem::WithWeight ( int  value)
inline

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 will not 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 is run using capacityProviderA, four tasks would use capacityProviderB.

Definition at line 180 of file CapacityProviderStrategyItem.h.


The documentation for this class was generated from the following file: