/** * 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 CodeDeploy { namespace Model { /** *

Information about whether instances in the original environment are * terminated when a blue/green deployment is successful. * BlueInstanceTerminationOption does not apply to Lambda deployments. *

See Also:

AWS * API Reference

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

The action to take on instances in the original environment after a * successful blue/green deployment.

  • TERMINATE: * Instances are terminated after a specified wait time.

  • * KEEP_ALIVE: Instances are left running after they are deregistered * from the load balancer and removed from the deployment group.

*/ inline const InstanceAction& GetAction() const{ return m_action; } /** *

The action to take on instances in the original environment after a * successful blue/green deployment.

  • TERMINATE: * Instances are terminated after a specified wait time.

  • * KEEP_ALIVE: Instances are left running after they are deregistered * from the load balancer and removed from the deployment group.

*/ inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; } /** *

The action to take on instances in the original environment after a * successful blue/green deployment.

  • TERMINATE: * Instances are terminated after a specified wait time.

  • * KEEP_ALIVE: Instances are left running after they are deregistered * from the load balancer and removed from the deployment group.

*/ inline void SetAction(const InstanceAction& value) { m_actionHasBeenSet = true; m_action = value; } /** *

The action to take on instances in the original environment after a * successful blue/green deployment.

  • TERMINATE: * Instances are terminated after a specified wait time.

  • * KEEP_ALIVE: Instances are left running after they are deregistered * from the load balancer and removed from the deployment group.

*/ inline void SetAction(InstanceAction&& value) { m_actionHasBeenSet = true; m_action = std::move(value); } /** *

The action to take on instances in the original environment after a * successful blue/green deployment.

  • TERMINATE: * Instances are terminated after a specified wait time.

  • * KEEP_ALIVE: Instances are left running after they are deregistered * from the load balancer and removed from the deployment group.

*/ inline BlueInstanceTerminationOption& WithAction(const InstanceAction& value) { SetAction(value); return *this;} /** *

The action to take on instances in the original environment after a * successful blue/green deployment.

  • TERMINATE: * Instances are terminated after a specified wait time.

  • * KEEP_ALIVE: Instances are left running after they are deregistered * from the load balancer and removed from the deployment group.

*/ inline BlueInstanceTerminationOption& WithAction(InstanceAction&& value) { SetAction(std::move(value)); return *this;} /** *

For an Amazon EC2 deployment, the number of minutes to wait after a * successful blue/green deployment before terminating instances from the original * environment.

For an Amazon ECS deployment, the number of minutes before * deleting the original (blue) task set. During an Amazon ECS deployment, * CodeDeploy shifts traffic from the original (blue) task set to a replacement * (green) task set.

The maximum setting is 2880 minutes (2 days).

*/ inline int GetTerminationWaitTimeInMinutes() const{ return m_terminationWaitTimeInMinutes; } /** *

For an Amazon EC2 deployment, the number of minutes to wait after a * successful blue/green deployment before terminating instances from the original * environment.

For an Amazon ECS deployment, the number of minutes before * deleting the original (blue) task set. During an Amazon ECS deployment, * CodeDeploy shifts traffic from the original (blue) task set to a replacement * (green) task set.

The maximum setting is 2880 minutes (2 days).

*/ inline bool TerminationWaitTimeInMinutesHasBeenSet() const { return m_terminationWaitTimeInMinutesHasBeenSet; } /** *

For an Amazon EC2 deployment, the number of minutes to wait after a * successful blue/green deployment before terminating instances from the original * environment.

For an Amazon ECS deployment, the number of minutes before * deleting the original (blue) task set. During an Amazon ECS deployment, * CodeDeploy shifts traffic from the original (blue) task set to a replacement * (green) task set.

The maximum setting is 2880 minutes (2 days).

*/ inline void SetTerminationWaitTimeInMinutes(int value) { m_terminationWaitTimeInMinutesHasBeenSet = true; m_terminationWaitTimeInMinutes = value; } /** *

For an Amazon EC2 deployment, the number of minutes to wait after a * successful blue/green deployment before terminating instances from the original * environment.

For an Amazon ECS deployment, the number of minutes before * deleting the original (blue) task set. During an Amazon ECS deployment, * CodeDeploy shifts traffic from the original (blue) task set to a replacement * (green) task set.

The maximum setting is 2880 minutes (2 days).

*/ inline BlueInstanceTerminationOption& WithTerminationWaitTimeInMinutes(int value) { SetTerminationWaitTimeInMinutes(value); return *this;} private: InstanceAction m_action; bool m_actionHasBeenSet = false; int m_terminationWaitTimeInMinutes; bool m_terminationWaitTimeInMinutesHasBeenSet = false; }; } // namespace Model } // namespace CodeDeploy } // namespace Aws