/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace ECS { namespace Model { /** */ class PutClusterCapacityProvidersRequest : public ECSRequest { public: AWS_ECS_API PutClusterCapacityProvidersRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "PutClusterCapacityProviders"; } AWS_ECS_API Aws::String SerializePayload() const override; AWS_ECS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The short name or full Amazon Resource Name (ARN) of the cluster to modify * the capacity provider settings for. If you don't specify a cluster, the default * cluster is assumed.

*/ inline const Aws::String& GetCluster() const{ return m_cluster; } /** *

The short name or full Amazon Resource Name (ARN) of the cluster to modify * the capacity provider settings for. If you don't specify a cluster, the default * cluster is assumed.

*/ inline bool ClusterHasBeenSet() const { return m_clusterHasBeenSet; } /** *

The short name or full Amazon Resource Name (ARN) of the cluster to modify * the capacity provider settings for. If you don't specify a cluster, the default * cluster is assumed.

*/ inline void SetCluster(const Aws::String& value) { m_clusterHasBeenSet = true; m_cluster = value; } /** *

The short name or full Amazon Resource Name (ARN) of the cluster to modify * the capacity provider settings for. If you don't specify a cluster, the default * cluster is assumed.

*/ inline void SetCluster(Aws::String&& value) { m_clusterHasBeenSet = true; m_cluster = std::move(value); } /** *

The short name or full Amazon Resource Name (ARN) of the cluster to modify * the capacity provider settings for. If you don't specify a cluster, the default * cluster is assumed.

*/ inline void SetCluster(const char* value) { m_clusterHasBeenSet = true; m_cluster.assign(value); } /** *

The short name or full Amazon Resource Name (ARN) of the cluster to modify * the capacity provider settings for. If you don't specify a cluster, the default * cluster is assumed.

*/ inline PutClusterCapacityProvidersRequest& WithCluster(const Aws::String& value) { SetCluster(value); return *this;} /** *

The short name or full Amazon Resource Name (ARN) of the cluster to modify * the capacity provider settings for. If you don't specify a cluster, the default * cluster is assumed.

*/ inline PutClusterCapacityProvidersRequest& WithCluster(Aws::String&& value) { SetCluster(std::move(value)); return *this;} /** *

The short name or full Amazon Resource Name (ARN) of the cluster to modify * the capacity provider settings for. If you don't specify a cluster, the default * cluster is assumed.

*/ inline PutClusterCapacityProvidersRequest& WithCluster(const char* value) { SetCluster(value); return *this;} /** *

The name of one or more capacity providers to associate with the cluster.

*

If specifying a capacity provider that uses an Auto Scaling group, the * capacity provider must already be created. New 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.

*/ inline const Aws::Vector& GetCapacityProviders() const{ return m_capacityProviders; } /** *

The name of one or more capacity providers to associate with the cluster.

*

If specifying a capacity provider that uses an Auto Scaling group, the * capacity provider must already be created. New 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.

*/ inline bool CapacityProvidersHasBeenSet() const { return m_capacityProvidersHasBeenSet; } /** *

The name of one or more capacity providers to associate with the cluster.

*

If specifying a capacity provider that uses an Auto Scaling group, the * capacity provider must already be created. New 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.

*/ inline void SetCapacityProviders(const Aws::Vector& value) { m_capacityProvidersHasBeenSet = true; m_capacityProviders = value; } /** *

The name of one or more capacity providers to associate with the cluster.

*

If specifying a capacity provider that uses an Auto Scaling group, the * capacity provider must already be created. New 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.

*/ inline void SetCapacityProviders(Aws::Vector&& value) { m_capacityProvidersHasBeenSet = true; m_capacityProviders = std::move(value); } /** *

The name of one or more capacity providers to associate with the cluster.

*

If specifying a capacity provider that uses an Auto Scaling group, the * capacity provider must already be created. New 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.

*/ inline PutClusterCapacityProvidersRequest& WithCapacityProviders(const Aws::Vector& value) { SetCapacityProviders(value); return *this;} /** *

The name of one or more capacity providers to associate with the cluster.

*

If specifying a capacity provider that uses an Auto Scaling group, the * capacity provider must already be created. New 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.

*/ inline PutClusterCapacityProvidersRequest& WithCapacityProviders(Aws::Vector&& value) { SetCapacityProviders(std::move(value)); return *this;} /** *

The name of one or more capacity providers to associate with the cluster.

*

If specifying a capacity provider that uses an Auto Scaling group, the * capacity provider must already be created. New 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.

*/ inline PutClusterCapacityProvidersRequest& AddCapacityProviders(const Aws::String& value) { m_capacityProvidersHasBeenSet = true; m_capacityProviders.push_back(value); return *this; } /** *

The name of one or more capacity providers to associate with the cluster.

*

If specifying a capacity provider that uses an Auto Scaling group, the * capacity provider must already be created. New 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.

*/ inline PutClusterCapacityProvidersRequest& AddCapacityProviders(Aws::String&& value) { m_capacityProvidersHasBeenSet = true; m_capacityProviders.push_back(std::move(value)); return *this; } /** *

The name of one or more capacity providers to associate with the cluster.

*

If specifying a capacity provider that uses an Auto Scaling group, the * capacity provider must already be created. New 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.

*/ inline PutClusterCapacityProvidersRequest& AddCapacityProviders(const char* value) { m_capacityProvidersHasBeenSet = true; m_capacityProviders.push_back(value); return *this; } /** *

The capacity provider strategy to use by default for the cluster.

When * creating a service or running a task on a cluster, if no capacity provider or * launch type is specified then the default capacity provider strategy for the * cluster is used.

A capacity provider strategy consists of one or more * capacity providers along with the base and weight to * assign to them. A capacity provider must be associated with the cluster to be * used in a capacity provider strategy. The PutClusterCapacityProviders API * is used to associate a capacity provider with a cluster. Only capacity providers * with an ACTIVE or UPDATING status can be used.

*

If specifying a capacity provider that uses an Auto Scaling group, the * capacity provider must already be created. New 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.

*/ inline const Aws::Vector& GetDefaultCapacityProviderStrategy() const{ return m_defaultCapacityProviderStrategy; } /** *

The capacity provider strategy to use by default for the cluster.

When * creating a service or running a task on a cluster, if no capacity provider or * launch type is specified then the default capacity provider strategy for the * cluster is used.

A capacity provider strategy consists of one or more * capacity providers along with the base and weight to * assign to them. A capacity provider must be associated with the cluster to be * used in a capacity provider strategy. The PutClusterCapacityProviders API * is used to associate a capacity provider with a cluster. Only capacity providers * with an ACTIVE or UPDATING status can be used.

*

If specifying a capacity provider that uses an Auto Scaling group, the * capacity provider must already be created. New 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.

*/ inline bool DefaultCapacityProviderStrategyHasBeenSet() const { return m_defaultCapacityProviderStrategyHasBeenSet; } /** *

The capacity provider strategy to use by default for the cluster.

When * creating a service or running a task on a cluster, if no capacity provider or * launch type is specified then the default capacity provider strategy for the * cluster is used.

A capacity provider strategy consists of one or more * capacity providers along with the base and weight to * assign to them. A capacity provider must be associated with the cluster to be * used in a capacity provider strategy. The PutClusterCapacityProviders API * is used to associate a capacity provider with a cluster. Only capacity providers * with an ACTIVE or UPDATING status can be used.

*

If specifying a capacity provider that uses an Auto Scaling group, the * capacity provider must already be created. New 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.

*/ inline void SetDefaultCapacityProviderStrategy(const Aws::Vector& value) { m_defaultCapacityProviderStrategyHasBeenSet = true; m_defaultCapacityProviderStrategy = value; } /** *

The capacity provider strategy to use by default for the cluster.

When * creating a service or running a task on a cluster, if no capacity provider or * launch type is specified then the default capacity provider strategy for the * cluster is used.

A capacity provider strategy consists of one or more * capacity providers along with the base and weight to * assign to them. A capacity provider must be associated with the cluster to be * used in a capacity provider strategy. The PutClusterCapacityProviders API * is used to associate a capacity provider with a cluster. Only capacity providers * with an ACTIVE or UPDATING status can be used.

*

If specifying a capacity provider that uses an Auto Scaling group, the * capacity provider must already be created. New 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.

*/ inline void SetDefaultCapacityProviderStrategy(Aws::Vector&& value) { m_defaultCapacityProviderStrategyHasBeenSet = true; m_defaultCapacityProviderStrategy = std::move(value); } /** *

The capacity provider strategy to use by default for the cluster.

When * creating a service or running a task on a cluster, if no capacity provider or * launch type is specified then the default capacity provider strategy for the * cluster is used.

A capacity provider strategy consists of one or more * capacity providers along with the base and weight to * assign to them. A capacity provider must be associated with the cluster to be * used in a capacity provider strategy. The PutClusterCapacityProviders API * is used to associate a capacity provider with a cluster. Only capacity providers * with an ACTIVE or UPDATING status can be used.

*

If specifying a capacity provider that uses an Auto Scaling group, the * capacity provider must already be created. New 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.

*/ inline PutClusterCapacityProvidersRequest& WithDefaultCapacityProviderStrategy(const Aws::Vector& value) { SetDefaultCapacityProviderStrategy(value); return *this;} /** *

The capacity provider strategy to use by default for the cluster.

When * creating a service or running a task on a cluster, if no capacity provider or * launch type is specified then the default capacity provider strategy for the * cluster is used.

A capacity provider strategy consists of one or more * capacity providers along with the base and weight to * assign to them. A capacity provider must be associated with the cluster to be * used in a capacity provider strategy. The PutClusterCapacityProviders API * is used to associate a capacity provider with a cluster. Only capacity providers * with an ACTIVE or UPDATING status can be used.

*

If specifying a capacity provider that uses an Auto Scaling group, the * capacity provider must already be created. New 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.

*/ inline PutClusterCapacityProvidersRequest& WithDefaultCapacityProviderStrategy(Aws::Vector&& value) { SetDefaultCapacityProviderStrategy(std::move(value)); return *this;} /** *

The capacity provider strategy to use by default for the cluster.

When * creating a service or running a task on a cluster, if no capacity provider or * launch type is specified then the default capacity provider strategy for the * cluster is used.

A capacity provider strategy consists of one or more * capacity providers along with the base and weight to * assign to them. A capacity provider must be associated with the cluster to be * used in a capacity provider strategy. The PutClusterCapacityProviders API * is used to associate a capacity provider with a cluster. Only capacity providers * with an ACTIVE or UPDATING status can be used.

*

If specifying a capacity provider that uses an Auto Scaling group, the * capacity provider must already be created. New 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.

*/ inline PutClusterCapacityProvidersRequest& AddDefaultCapacityProviderStrategy(const CapacityProviderStrategyItem& value) { m_defaultCapacityProviderStrategyHasBeenSet = true; m_defaultCapacityProviderStrategy.push_back(value); return *this; } /** *

The capacity provider strategy to use by default for the cluster.

When * creating a service or running a task on a cluster, if no capacity provider or * launch type is specified then the default capacity provider strategy for the * cluster is used.

A capacity provider strategy consists of one or more * capacity providers along with the base and weight to * assign to them. A capacity provider must be associated with the cluster to be * used in a capacity provider strategy. The PutClusterCapacityProviders API * is used to associate a capacity provider with a cluster. Only capacity providers * with an ACTIVE or UPDATING status can be used.

*

If specifying a capacity provider that uses an Auto Scaling group, the * capacity provider must already be created. New 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.

*/ inline PutClusterCapacityProvidersRequest& AddDefaultCapacityProviderStrategy(CapacityProviderStrategyItem&& value) { m_defaultCapacityProviderStrategyHasBeenSet = true; m_defaultCapacityProviderStrategy.push_back(std::move(value)); return *this; } private: Aws::String m_cluster; bool m_clusterHasBeenSet = false; Aws::Vector m_capacityProviders; bool m_capacityProvidersHasBeenSet = false; Aws::Vector m_defaultCapacityProviderStrategy; bool m_defaultCapacityProviderStrategyHasBeenSet = false; }; } // namespace Model } // namespace ECS } // namespace Aws