/** * 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 AutoScaling { namespace Model { /** */ class SetInstanceHealthRequest : public AutoScalingRequest { public: AWS_AUTOSCALING_API SetInstanceHealthRequest(); // 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 "SetInstanceHealth"; } AWS_AUTOSCALING_API Aws::String SerializePayload() const override; protected: AWS_AUTOSCALING_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The ID of the instance.

*/ inline const Aws::String& GetInstanceId() const{ return m_instanceId; } /** *

The ID of the instance.

*/ inline bool InstanceIdHasBeenSet() const { return m_instanceIdHasBeenSet; } /** *

The ID of the instance.

*/ inline void SetInstanceId(const Aws::String& value) { m_instanceIdHasBeenSet = true; m_instanceId = value; } /** *

The ID of the instance.

*/ inline void SetInstanceId(Aws::String&& value) { m_instanceIdHasBeenSet = true; m_instanceId = std::move(value); } /** *

The ID of the instance.

*/ inline void SetInstanceId(const char* value) { m_instanceIdHasBeenSet = true; m_instanceId.assign(value); } /** *

The ID of the instance.

*/ inline SetInstanceHealthRequest& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;} /** *

The ID of the instance.

*/ inline SetInstanceHealthRequest& WithInstanceId(Aws::String&& value) { SetInstanceId(std::move(value)); return *this;} /** *

The ID of the instance.

*/ inline SetInstanceHealthRequest& WithInstanceId(const char* value) { SetInstanceId(value); return *this;} /** *

The health status of the instance. Set to Healthy to have the * instance remain in service. Set to Unhealthy to have the instance * be out of service. Amazon EC2 Auto Scaling terminates and replaces the unhealthy * instance.

*/ inline const Aws::String& GetHealthStatus() const{ return m_healthStatus; } /** *

The health status of the instance. Set to Healthy to have the * instance remain in service. Set to Unhealthy to have the instance * be out of service. Amazon EC2 Auto Scaling terminates and replaces the unhealthy * instance.

*/ inline bool HealthStatusHasBeenSet() const { return m_healthStatusHasBeenSet; } /** *

The health status of the instance. Set to Healthy to have the * instance remain in service. Set to Unhealthy to have the instance * be out of service. Amazon EC2 Auto Scaling terminates and replaces the unhealthy * instance.

*/ inline void SetHealthStatus(const Aws::String& value) { m_healthStatusHasBeenSet = true; m_healthStatus = value; } /** *

The health status of the instance. Set to Healthy to have the * instance remain in service. Set to Unhealthy to have the instance * be out of service. Amazon EC2 Auto Scaling terminates and replaces the unhealthy * instance.

*/ inline void SetHealthStatus(Aws::String&& value) { m_healthStatusHasBeenSet = true; m_healthStatus = std::move(value); } /** *

The health status of the instance. Set to Healthy to have the * instance remain in service. Set to Unhealthy to have the instance * be out of service. Amazon EC2 Auto Scaling terminates and replaces the unhealthy * instance.

*/ inline void SetHealthStatus(const char* value) { m_healthStatusHasBeenSet = true; m_healthStatus.assign(value); } /** *

The health status of the instance. Set to Healthy to have the * instance remain in service. Set to Unhealthy to have the instance * be out of service. Amazon EC2 Auto Scaling terminates and replaces the unhealthy * instance.

*/ inline SetInstanceHealthRequest& WithHealthStatus(const Aws::String& value) { SetHealthStatus(value); return *this;} /** *

The health status of the instance. Set to Healthy to have the * instance remain in service. Set to Unhealthy to have the instance * be out of service. Amazon EC2 Auto Scaling terminates and replaces the unhealthy * instance.

*/ inline SetInstanceHealthRequest& WithHealthStatus(Aws::String&& value) { SetHealthStatus(std::move(value)); return *this;} /** *

The health status of the instance. Set to Healthy to have the * instance remain in service. Set to Unhealthy to have the instance * be out of service. Amazon EC2 Auto Scaling terminates and replaces the unhealthy * instance.

*/ inline SetInstanceHealthRequest& WithHealthStatus(const char* value) { SetHealthStatus(value); return *this;} /** *

If the Auto Scaling group of the specified instance has a * HealthCheckGracePeriod specified for the group, by default, this * call respects the grace period. Set this to False, to have the call * not respect the grace period associated with the group.

For more * information about the health check grace period, see CreateAutoScalingGroup * in the Amazon EC2 Auto Scaling API Reference.

*/ inline bool GetShouldRespectGracePeriod() const{ return m_shouldRespectGracePeriod; } /** *

If the Auto Scaling group of the specified instance has a * HealthCheckGracePeriod specified for the group, by default, this * call respects the grace period. Set this to False, to have the call * not respect the grace period associated with the group.

For more * information about the health check grace period, see CreateAutoScalingGroup * in the Amazon EC2 Auto Scaling API Reference.

*/ inline bool ShouldRespectGracePeriodHasBeenSet() const { return m_shouldRespectGracePeriodHasBeenSet; } /** *

If the Auto Scaling group of the specified instance has a * HealthCheckGracePeriod specified for the group, by default, this * call respects the grace period. Set this to False, to have the call * not respect the grace period associated with the group.

For more * information about the health check grace period, see CreateAutoScalingGroup * in the Amazon EC2 Auto Scaling API Reference.

*/ inline void SetShouldRespectGracePeriod(bool value) { m_shouldRespectGracePeriodHasBeenSet = true; m_shouldRespectGracePeriod = value; } /** *

If the Auto Scaling group of the specified instance has a * HealthCheckGracePeriod specified for the group, by default, this * call respects the grace period. Set this to False, to have the call * not respect the grace period associated with the group.

For more * information about the health check grace period, see CreateAutoScalingGroup * in the Amazon EC2 Auto Scaling API Reference.

*/ inline SetInstanceHealthRequest& WithShouldRespectGracePeriod(bool value) { SetShouldRespectGracePeriod(value); return *this;} private: Aws::String m_instanceId; bool m_instanceIdHasBeenSet = false; Aws::String m_healthStatus; bool m_healthStatusHasBeenSet = false; bool m_shouldRespectGracePeriod; bool m_shouldRespectGracePeriodHasBeenSet = false; }; } // namespace Model } // namespace AutoScaling } // namespace Aws