/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace ElasticBeanstalk { namespace Model { /** *

Request to terminate an environment.

See Also:

AWS * API Reference

*/ class TerminateEnvironmentRequest : public ElasticBeanstalkRequest { public: AWS_ELASTICBEANSTALK_API TerminateEnvironmentRequest(); // 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 "TerminateEnvironment"; } AWS_ELASTICBEANSTALK_API Aws::String SerializePayload() const override; protected: AWS_ELASTICBEANSTALK_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The ID of the environment to terminate.

Condition: You must specify * either this or an EnvironmentName, or both. If you do not specify either, AWS * Elastic Beanstalk returns MissingRequiredParameter error.

*/ inline const Aws::String& GetEnvironmentId() const{ return m_environmentId; } /** *

The ID of the environment to terminate.

Condition: You must specify * either this or an EnvironmentName, or both. If you do not specify either, AWS * Elastic Beanstalk returns MissingRequiredParameter error.

*/ inline bool EnvironmentIdHasBeenSet() const { return m_environmentIdHasBeenSet; } /** *

The ID of the environment to terminate.

Condition: You must specify * either this or an EnvironmentName, or both. If you do not specify either, AWS * Elastic Beanstalk returns MissingRequiredParameter error.

*/ inline void SetEnvironmentId(const Aws::String& value) { m_environmentIdHasBeenSet = true; m_environmentId = value; } /** *

The ID of the environment to terminate.

Condition: You must specify * either this or an EnvironmentName, or both. If you do not specify either, AWS * Elastic Beanstalk returns MissingRequiredParameter error.

*/ inline void SetEnvironmentId(Aws::String&& value) { m_environmentIdHasBeenSet = true; m_environmentId = std::move(value); } /** *

The ID of the environment to terminate.

Condition: You must specify * either this or an EnvironmentName, or both. If you do not specify either, AWS * Elastic Beanstalk returns MissingRequiredParameter error.

*/ inline void SetEnvironmentId(const char* value) { m_environmentIdHasBeenSet = true; m_environmentId.assign(value); } /** *

The ID of the environment to terminate.

Condition: You must specify * either this or an EnvironmentName, or both. If you do not specify either, AWS * Elastic Beanstalk returns MissingRequiredParameter error.

*/ inline TerminateEnvironmentRequest& WithEnvironmentId(const Aws::String& value) { SetEnvironmentId(value); return *this;} /** *

The ID of the environment to terminate.

Condition: You must specify * either this or an EnvironmentName, or both. If you do not specify either, AWS * Elastic Beanstalk returns MissingRequiredParameter error.

*/ inline TerminateEnvironmentRequest& WithEnvironmentId(Aws::String&& value) { SetEnvironmentId(std::move(value)); return *this;} /** *

The ID of the environment to terminate.

Condition: You must specify * either this or an EnvironmentName, or both. If you do not specify either, AWS * Elastic Beanstalk returns MissingRequiredParameter error.

*/ inline TerminateEnvironmentRequest& WithEnvironmentId(const char* value) { SetEnvironmentId(value); return *this;} /** *

The name of the environment to terminate.

Condition: You must specify * either this or an EnvironmentId, or both. If you do not specify either, AWS * Elastic Beanstalk returns MissingRequiredParameter error.

*/ inline const Aws::String& GetEnvironmentName() const{ return m_environmentName; } /** *

The name of the environment to terminate.

Condition: You must specify * either this or an EnvironmentId, or both. If you do not specify either, AWS * Elastic Beanstalk returns MissingRequiredParameter error.

*/ inline bool EnvironmentNameHasBeenSet() const { return m_environmentNameHasBeenSet; } /** *

The name of the environment to terminate.

Condition: You must specify * either this or an EnvironmentId, or both. If you do not specify either, AWS * Elastic Beanstalk returns MissingRequiredParameter error.

*/ inline void SetEnvironmentName(const Aws::String& value) { m_environmentNameHasBeenSet = true; m_environmentName = value; } /** *

The name of the environment to terminate.

Condition: You must specify * either this or an EnvironmentId, or both. If you do not specify either, AWS * Elastic Beanstalk returns MissingRequiredParameter error.

*/ inline void SetEnvironmentName(Aws::String&& value) { m_environmentNameHasBeenSet = true; m_environmentName = std::move(value); } /** *

The name of the environment to terminate.

Condition: You must specify * either this or an EnvironmentId, or both. If you do not specify either, AWS * Elastic Beanstalk returns MissingRequiredParameter error.

*/ inline void SetEnvironmentName(const char* value) { m_environmentNameHasBeenSet = true; m_environmentName.assign(value); } /** *

The name of the environment to terminate.

Condition: You must specify * either this or an EnvironmentId, or both. If you do not specify either, AWS * Elastic Beanstalk returns MissingRequiredParameter error.

*/ inline TerminateEnvironmentRequest& WithEnvironmentName(const Aws::String& value) { SetEnvironmentName(value); return *this;} /** *

The name of the environment to terminate.

Condition: You must specify * either this or an EnvironmentId, or both. If you do not specify either, AWS * Elastic Beanstalk returns MissingRequiredParameter error.

*/ inline TerminateEnvironmentRequest& WithEnvironmentName(Aws::String&& value) { SetEnvironmentName(std::move(value)); return *this;} /** *

The name of the environment to terminate.

Condition: You must specify * either this or an EnvironmentId, or both. If you do not specify either, AWS * Elastic Beanstalk returns MissingRequiredParameter error.

*/ inline TerminateEnvironmentRequest& WithEnvironmentName(const char* value) { SetEnvironmentName(value); return *this;} /** *

Indicates whether the associated AWS resources should shut down when the * environment is terminated:

  • true: The specified * environment as well as the associated AWS resources, such as Auto Scaling group * and LoadBalancer, are terminated.

  • false: AWS * Elastic Beanstalk resource management is removed from the environment, but the * AWS resources continue to operate.

For more information, see * the AWS * Elastic Beanstalk User Guide.

Default: true

* Valid Values: true | false

*/ inline bool GetTerminateResources() const{ return m_terminateResources; } /** *

Indicates whether the associated AWS resources should shut down when the * environment is terminated:

  • true: The specified * environment as well as the associated AWS resources, such as Auto Scaling group * and LoadBalancer, are terminated.

  • false: AWS * Elastic Beanstalk resource management is removed from the environment, but the * AWS resources continue to operate.

For more information, see * the AWS * Elastic Beanstalk User Guide.

Default: true

* Valid Values: true | false

*/ inline bool TerminateResourcesHasBeenSet() const { return m_terminateResourcesHasBeenSet; } /** *

Indicates whether the associated AWS resources should shut down when the * environment is terminated:

  • true: The specified * environment as well as the associated AWS resources, such as Auto Scaling group * and LoadBalancer, are terminated.

  • false: AWS * Elastic Beanstalk resource management is removed from the environment, but the * AWS resources continue to operate.

For more information, see * the AWS * Elastic Beanstalk User Guide.

Default: true

* Valid Values: true | false

*/ inline void SetTerminateResources(bool value) { m_terminateResourcesHasBeenSet = true; m_terminateResources = value; } /** *

Indicates whether the associated AWS resources should shut down when the * environment is terminated:

  • true: The specified * environment as well as the associated AWS resources, such as Auto Scaling group * and LoadBalancer, are terminated.

  • false: AWS * Elastic Beanstalk resource management is removed from the environment, but the * AWS resources continue to operate.

For more information, see * the AWS * Elastic Beanstalk User Guide.

Default: true

* Valid Values: true | false

*/ inline TerminateEnvironmentRequest& WithTerminateResources(bool value) { SetTerminateResources(value); return *this;} /** *

Terminates the target environment even if another environment in the same * group is dependent on it.

*/ inline bool GetForceTerminate() const{ return m_forceTerminate; } /** *

Terminates the target environment even if another environment in the same * group is dependent on it.

*/ inline bool ForceTerminateHasBeenSet() const { return m_forceTerminateHasBeenSet; } /** *

Terminates the target environment even if another environment in the same * group is dependent on it.

*/ inline void SetForceTerminate(bool value) { m_forceTerminateHasBeenSet = true; m_forceTerminate = value; } /** *

Terminates the target environment even if another environment in the same * group is dependent on it.

*/ inline TerminateEnvironmentRequest& WithForceTerminate(bool value) { SetForceTerminate(value); return *this;} private: Aws::String m_environmentId; bool m_environmentIdHasBeenSet = false; Aws::String m_environmentName; bool m_environmentNameHasBeenSet = false; bool m_terminateResources; bool m_terminateResourcesHasBeenSet = false; bool m_forceTerminate; bool m_forceTerminateHasBeenSet = false; }; } // namespace Model } // namespace ElasticBeanstalk } // namespace Aws