AWS SDK for C++  1.9.126
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 Fargate capacity provider, specify either the FARGATE or FARGATE_SPOT capacity providers. The 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.

A capacity provider strategy may contain a maximum of 6 capacity providers.

See Also:

AWS API Reference

Definition at line 45 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 198 of file CapacityProviderStrategyItem.h.

◆ CapacityProviderHasBeenSet()

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

The short name of the capacity provider.

Definition at line 62 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 190 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 57 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 115 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 206 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 72 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 67 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 77 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 159 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 137 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 214 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 87 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 82 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 92 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 181 of file CapacityProviderStrategyItem.h.


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