/** * 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 Utils { namespace Xml { class XmlNode; } // namespace Xml } // namespace Utils namespace ElasticLoadBalancing { namespace Model { /** *

Information about the state of an EC2 instance.

See Also:

AWS * API Reference

*/ class InstanceState { public: AWS_ELASTICLOADBALANCING_API InstanceState(); AWS_ELASTICLOADBALANCING_API InstanceState(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_ELASTICLOADBALANCING_API InstanceState& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); AWS_ELASTICLOADBALANCING_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const; AWS_ELASTICLOADBALANCING_API void OutputToStream(Aws::OStream& oStream, const char* location) const; /** *

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 InstanceState& WithInstanceId(const Aws::String& value) { SetInstanceId(value); return *this;} /** *

The ID of the instance.

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

The ID of the instance.

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

The current state of the instance.

Valid values: * InService | OutOfService | Unknown

*/ inline const Aws::String& GetState() const{ return m_state; } /** *

The current state of the instance.

Valid values: * InService | OutOfService | Unknown

*/ inline bool StateHasBeenSet() const { return m_stateHasBeenSet; } /** *

The current state of the instance.

Valid values: * InService | OutOfService | Unknown

*/ inline void SetState(const Aws::String& value) { m_stateHasBeenSet = true; m_state = value; } /** *

The current state of the instance.

Valid values: * InService | OutOfService | Unknown

*/ inline void SetState(Aws::String&& value) { m_stateHasBeenSet = true; m_state = std::move(value); } /** *

The current state of the instance.

Valid values: * InService | OutOfService | Unknown

*/ inline void SetState(const char* value) { m_stateHasBeenSet = true; m_state.assign(value); } /** *

The current state of the instance.

Valid values: * InService | OutOfService | Unknown

*/ inline InstanceState& WithState(const Aws::String& value) { SetState(value); return *this;} /** *

The current state of the instance.

Valid values: * InService | OutOfService | Unknown

*/ inline InstanceState& WithState(Aws::String&& value) { SetState(std::move(value)); return *this;} /** *

The current state of the instance.

Valid values: * InService | OutOfService | Unknown

*/ inline InstanceState& WithState(const char* value) { SetState(value); return *this;} /** *

Information about the cause of OutOfService instances. * Specifically, whether the cause is Elastic Load Balancing or the instance.

*

Valid values: ELB | Instance | N/A *

*/ inline const Aws::String& GetReasonCode() const{ return m_reasonCode; } /** *

Information about the cause of OutOfService instances. * Specifically, whether the cause is Elastic Load Balancing or the instance.

*

Valid values: ELB | Instance | N/A *

*/ inline bool ReasonCodeHasBeenSet() const { return m_reasonCodeHasBeenSet; } /** *

Information about the cause of OutOfService instances. * Specifically, whether the cause is Elastic Load Balancing or the instance.

*

Valid values: ELB | Instance | N/A *

*/ inline void SetReasonCode(const Aws::String& value) { m_reasonCodeHasBeenSet = true; m_reasonCode = value; } /** *

Information about the cause of OutOfService instances. * Specifically, whether the cause is Elastic Load Balancing or the instance.

*

Valid values: ELB | Instance | N/A *

*/ inline void SetReasonCode(Aws::String&& value) { m_reasonCodeHasBeenSet = true; m_reasonCode = std::move(value); } /** *

Information about the cause of OutOfService instances. * Specifically, whether the cause is Elastic Load Balancing or the instance.

*

Valid values: ELB | Instance | N/A *

*/ inline void SetReasonCode(const char* value) { m_reasonCodeHasBeenSet = true; m_reasonCode.assign(value); } /** *

Information about the cause of OutOfService instances. * Specifically, whether the cause is Elastic Load Balancing or the instance.

*

Valid values: ELB | Instance | N/A *

*/ inline InstanceState& WithReasonCode(const Aws::String& value) { SetReasonCode(value); return *this;} /** *

Information about the cause of OutOfService instances. * Specifically, whether the cause is Elastic Load Balancing or the instance.

*

Valid values: ELB | Instance | N/A *

*/ inline InstanceState& WithReasonCode(Aws::String&& value) { SetReasonCode(std::move(value)); return *this;} /** *

Information about the cause of OutOfService instances. * Specifically, whether the cause is Elastic Load Balancing or the instance.

*

Valid values: ELB | Instance | N/A *

*/ inline InstanceState& WithReasonCode(const char* value) { SetReasonCode(value); return *this;} /** *

A description of the instance state. This string can contain one or more of * the following messages.

  • N/A

  • * A transient error occurred. Please try again later.

  • *

    Instance has failed at least the UnhealthyThreshold number of health * checks consecutively.

  • Instance has not passed * the configured HealthyThreshold number of health checks consecutively. *

  • Instance registration is still in progress. *

  • Instance is in the EC2 Availability Zone for which * LoadBalancer is not configured to route traffic to.

  • * Instance is not currently registered with the LoadBalancer.

    *
  • Instance deregistration currently in progress.

    *
  • Disable Availability Zone is currently in progress. *

  • Instance is in pending state.

  • *

    Instance is in stopped state.

  • * Instance is in terminated state.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

A description of the instance state. This string can contain one or more of * the following messages.

  • N/A

  • * A transient error occurred. Please try again later.

  • *

    Instance has failed at least the UnhealthyThreshold number of health * checks consecutively.

  • Instance has not passed * the configured HealthyThreshold number of health checks consecutively. *

  • Instance registration is still in progress. *

  • Instance is in the EC2 Availability Zone for which * LoadBalancer is not configured to route traffic to.

  • * Instance is not currently registered with the LoadBalancer.

    *
  • Instance deregistration currently in progress.

    *
  • Disable Availability Zone is currently in progress. *

  • Instance is in pending state.

  • *

    Instance is in stopped state.

  • * Instance is in terminated state.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

A description of the instance state. This string can contain one or more of * the following messages.

  • N/A

  • * A transient error occurred. Please try again later.

  • *

    Instance has failed at least the UnhealthyThreshold number of health * checks consecutively.

  • Instance has not passed * the configured HealthyThreshold number of health checks consecutively. *

  • Instance registration is still in progress. *

  • Instance is in the EC2 Availability Zone for which * LoadBalancer is not configured to route traffic to.

  • * Instance is not currently registered with the LoadBalancer.

    *
  • Instance deregistration currently in progress.

    *
  • Disable Availability Zone is currently in progress. *

  • Instance is in pending state.

  • *

    Instance is in stopped state.

  • * Instance is in terminated state.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

A description of the instance state. This string can contain one or more of * the following messages.

  • N/A

  • * A transient error occurred. Please try again later.

  • *

    Instance has failed at least the UnhealthyThreshold number of health * checks consecutively.

  • Instance has not passed * the configured HealthyThreshold number of health checks consecutively. *

  • Instance registration is still in progress. *

  • Instance is in the EC2 Availability Zone for which * LoadBalancer is not configured to route traffic to.

  • * Instance is not currently registered with the LoadBalancer.

    *
  • Instance deregistration currently in progress.

    *
  • Disable Availability Zone is currently in progress. *

  • Instance is in pending state.

  • *

    Instance is in stopped state.

  • * Instance is in terminated state.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

A description of the instance state. This string can contain one or more of * the following messages.

  • N/A

  • * A transient error occurred. Please try again later.

  • *

    Instance has failed at least the UnhealthyThreshold number of health * checks consecutively.

  • Instance has not passed * the configured HealthyThreshold number of health checks consecutively. *

  • Instance registration is still in progress. *

  • Instance is in the EC2 Availability Zone for which * LoadBalancer is not configured to route traffic to.

  • * Instance is not currently registered with the LoadBalancer.

    *
  • Instance deregistration currently in progress.

    *
  • Disable Availability Zone is currently in progress. *

  • Instance is in pending state.

  • *

    Instance is in stopped state.

  • * Instance is in terminated state.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

A description of the instance state. This string can contain one or more of * the following messages.

  • N/A

  • * A transient error occurred. Please try again later.

  • *

    Instance has failed at least the UnhealthyThreshold number of health * checks consecutively.

  • Instance has not passed * the configured HealthyThreshold number of health checks consecutively. *

  • Instance registration is still in progress. *

  • Instance is in the EC2 Availability Zone for which * LoadBalancer is not configured to route traffic to.

  • * Instance is not currently registered with the LoadBalancer.

    *
  • Instance deregistration currently in progress.

    *
  • Disable Availability Zone is currently in progress. *

  • Instance is in pending state.

  • *

    Instance is in stopped state.

  • * Instance is in terminated state.

*/ inline InstanceState& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

A description of the instance state. This string can contain one or more of * the following messages.

  • N/A

  • * A transient error occurred. Please try again later.

  • *

    Instance has failed at least the UnhealthyThreshold number of health * checks consecutively.

  • Instance has not passed * the configured HealthyThreshold number of health checks consecutively. *

  • Instance registration is still in progress. *

  • Instance is in the EC2 Availability Zone for which * LoadBalancer is not configured to route traffic to.

  • * Instance is not currently registered with the LoadBalancer.

    *
  • Instance deregistration currently in progress.

    *
  • Disable Availability Zone is currently in progress. *

  • Instance is in pending state.

  • *

    Instance is in stopped state.

  • * Instance is in terminated state.

*/ inline InstanceState& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

A description of the instance state. This string can contain one or more of * the following messages.

  • N/A

  • * A transient error occurred. Please try again later.

  • *

    Instance has failed at least the UnhealthyThreshold number of health * checks consecutively.

  • Instance has not passed * the configured HealthyThreshold number of health checks consecutively. *

  • Instance registration is still in progress. *

  • Instance is in the EC2 Availability Zone for which * LoadBalancer is not configured to route traffic to.

  • * Instance is not currently registered with the LoadBalancer.

    *
  • Instance deregistration currently in progress.

    *
  • Disable Availability Zone is currently in progress. *

  • Instance is in pending state.

  • *

    Instance is in stopped state.

  • * Instance is in terminated state.

*/ inline InstanceState& WithDescription(const char* value) { SetDescription(value); return *this;} private: Aws::String m_instanceId; bool m_instanceIdHasBeenSet = false; Aws::String m_state; bool m_stateHasBeenSet = false; Aws::String m_reasonCode; bool m_reasonCodeHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; }; } // namespace Model } // namespace ElasticLoadBalancing } // namespace Aws