/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace SecurityHub { namespace Model { /** *

Optional deployment parameters for the service.

See Also:

AWS * API Reference

*/ class AwsEcsServiceDeploymentConfigurationDetails { public: AWS_SECURITYHUB_API AwsEcsServiceDeploymentConfigurationDetails(); AWS_SECURITYHUB_API AwsEcsServiceDeploymentConfigurationDetails(Aws::Utils::Json::JsonView jsonValue); AWS_SECURITYHUB_API AwsEcsServiceDeploymentConfigurationDetails& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_SECURITYHUB_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

Determines whether a service deployment fails if a service cannot reach a * steady state.

*/ inline const AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails& GetDeploymentCircuitBreaker() const{ return m_deploymentCircuitBreaker; } /** *

Determines whether a service deployment fails if a service cannot reach a * steady state.

*/ inline bool DeploymentCircuitBreakerHasBeenSet() const { return m_deploymentCircuitBreakerHasBeenSet; } /** *

Determines whether a service deployment fails if a service cannot reach a * steady state.

*/ inline void SetDeploymentCircuitBreaker(const AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails& value) { m_deploymentCircuitBreakerHasBeenSet = true; m_deploymentCircuitBreaker = value; } /** *

Determines whether a service deployment fails if a service cannot reach a * steady state.

*/ inline void SetDeploymentCircuitBreaker(AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails&& value) { m_deploymentCircuitBreakerHasBeenSet = true; m_deploymentCircuitBreaker = std::move(value); } /** *

Determines whether a service deployment fails if a service cannot reach a * steady state.

*/ inline AwsEcsServiceDeploymentConfigurationDetails& WithDeploymentCircuitBreaker(const AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails& value) { SetDeploymentCircuitBreaker(value); return *this;} /** *

Determines whether a service deployment fails if a service cannot reach a * steady state.

*/ inline AwsEcsServiceDeploymentConfigurationDetails& WithDeploymentCircuitBreaker(AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails&& value) { SetDeploymentCircuitBreaker(std::move(value)); return *this;} /** *

For a service that uses the rolling update (ECS) deployment * type, the maximum number of tasks in a service that are allowed in the * RUNNING or PENDING state during a deployment, and for * tasks that use the EC2 launch type, when any container instances are in the * DRAINING state. Provided as a percentage of the desired number of * tasks. The default value is 200%.

For a service that uses the blue/green * (CODE_DEPLOY) or EXTERNAL deployment types, and tasks * that use the EC2 launch type, the maximum number of tasks in the service that * remain in the RUNNING state while the container instances are in * the DRAINING state.

For the Fargate launch type, the maximum * percent value is not used.

*/ inline int GetMaximumPercent() const{ return m_maximumPercent; } /** *

For a service that uses the rolling update (ECS) deployment * type, the maximum number of tasks in a service that are allowed in the * RUNNING or PENDING state during a deployment, and for * tasks that use the EC2 launch type, when any container instances are in the * DRAINING state. Provided as a percentage of the desired number of * tasks. The default value is 200%.

For a service that uses the blue/green * (CODE_DEPLOY) or EXTERNAL deployment types, and tasks * that use the EC2 launch type, the maximum number of tasks in the service that * remain in the RUNNING state while the container instances are in * the DRAINING state.

For the Fargate launch type, the maximum * percent value is not used.

*/ inline bool MaximumPercentHasBeenSet() const { return m_maximumPercentHasBeenSet; } /** *

For a service that uses the rolling update (ECS) deployment * type, the maximum number of tasks in a service that are allowed in the * RUNNING or PENDING state during a deployment, and for * tasks that use the EC2 launch type, when any container instances are in the * DRAINING state. Provided as a percentage of the desired number of * tasks. The default value is 200%.

For a service that uses the blue/green * (CODE_DEPLOY) or EXTERNAL deployment types, and tasks * that use the EC2 launch type, the maximum number of tasks in the service that * remain in the RUNNING state while the container instances are in * the DRAINING state.

For the Fargate launch type, the maximum * percent value is not used.

*/ inline void SetMaximumPercent(int value) { m_maximumPercentHasBeenSet = true; m_maximumPercent = value; } /** *

For a service that uses the rolling update (ECS) deployment * type, the maximum number of tasks in a service that are allowed in the * RUNNING or PENDING state during a deployment, and for * tasks that use the EC2 launch type, when any container instances are in the * DRAINING state. Provided as a percentage of the desired number of * tasks. The default value is 200%.

For a service that uses the blue/green * (CODE_DEPLOY) or EXTERNAL deployment types, and tasks * that use the EC2 launch type, the maximum number of tasks in the service that * remain in the RUNNING state while the container instances are in * the DRAINING state.

For the Fargate launch type, the maximum * percent value is not used.

*/ inline AwsEcsServiceDeploymentConfigurationDetails& WithMaximumPercent(int value) { SetMaximumPercent(value); return *this;} /** *

For a service that uses the rolling update (ECS) deployment * type, the minimum number of tasks in a service that must remain in the * RUNNING state during a deployment, and while any container * instances are in the DRAINING state if the service contains tasks * using the EC2 launch type. Expressed as a percentage of the desired number of * tasks. The default value is 100%.

For a service that uses the blue/green * (CODE_DEPLOY) or EXTERNAL deployment types and tasks * that use the EC2 launch type, the minimum number of the tasks in the service * that remain in the RUNNING state while the container instances are * in the DRAINING state.

For the Fargate launch type, the * minimum healthy percent value is not used.

*/ inline int GetMinimumHealthyPercent() const{ return m_minimumHealthyPercent; } /** *

For a service that uses the rolling update (ECS) deployment * type, the minimum number of tasks in a service that must remain in the * RUNNING state during a deployment, and while any container * instances are in the DRAINING state if the service contains tasks * using the EC2 launch type. Expressed as a percentage of the desired number of * tasks. The default value is 100%.

For a service that uses the blue/green * (CODE_DEPLOY) or EXTERNAL deployment types and tasks * that use the EC2 launch type, the minimum number of the tasks in the service * that remain in the RUNNING state while the container instances are * in the DRAINING state.

For the Fargate launch type, the * minimum healthy percent value is not used.

*/ inline bool MinimumHealthyPercentHasBeenSet() const { return m_minimumHealthyPercentHasBeenSet; } /** *

For a service that uses the rolling update (ECS) deployment * type, the minimum number of tasks in a service that must remain in the * RUNNING state during a deployment, and while any container * instances are in the DRAINING state if the service contains tasks * using the EC2 launch type. Expressed as a percentage of the desired number of * tasks. The default value is 100%.

For a service that uses the blue/green * (CODE_DEPLOY) or EXTERNAL deployment types and tasks * that use the EC2 launch type, the minimum number of the tasks in the service * that remain in the RUNNING state while the container instances are * in the DRAINING state.

For the Fargate launch type, the * minimum healthy percent value is not used.

*/ inline void SetMinimumHealthyPercent(int value) { m_minimumHealthyPercentHasBeenSet = true; m_minimumHealthyPercent = value; } /** *

For a service that uses the rolling update (ECS) deployment * type, the minimum number of tasks in a service that must remain in the * RUNNING state during a deployment, and while any container * instances are in the DRAINING state if the service contains tasks * using the EC2 launch type. Expressed as a percentage of the desired number of * tasks. The default value is 100%.

For a service that uses the blue/green * (CODE_DEPLOY) or EXTERNAL deployment types and tasks * that use the EC2 launch type, the minimum number of the tasks in the service * that remain in the RUNNING state while the container instances are * in the DRAINING state.

For the Fargate launch type, the * minimum healthy percent value is not used.

*/ inline AwsEcsServiceDeploymentConfigurationDetails& WithMinimumHealthyPercent(int value) { SetMinimumHealthyPercent(value); return *this;} private: AwsEcsServiceDeploymentConfigurationDeploymentCircuitBreakerDetails m_deploymentCircuitBreaker; bool m_deploymentCircuitBreakerHasBeenSet = false; int m_maximumPercent; bool m_maximumPercentHasBeenSet = false; int m_minimumHealthyPercent; bool m_minimumHealthyPercentHasBeenSet = false; }; } // namespace Model } // namespace SecurityHub } // namespace Aws