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

Describes information about the health of the instance.

See * Also:

AWS * API Reference

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

The name of the Lightsail instance for which you are requesting health check * data.

*/ inline const Aws::String& GetInstanceName() const{ return m_instanceName; } /** *

The name of the Lightsail instance for which you are requesting health check * data.

*/ inline bool InstanceNameHasBeenSet() const { return m_instanceNameHasBeenSet; } /** *

The name of the Lightsail instance for which you are requesting health check * data.

*/ inline void SetInstanceName(const Aws::String& value) { m_instanceNameHasBeenSet = true; m_instanceName = value; } /** *

The name of the Lightsail instance for which you are requesting health check * data.

*/ inline void SetInstanceName(Aws::String&& value) { m_instanceNameHasBeenSet = true; m_instanceName = std::move(value); } /** *

The name of the Lightsail instance for which you are requesting health check * data.

*/ inline void SetInstanceName(const char* value) { m_instanceNameHasBeenSet = true; m_instanceName.assign(value); } /** *

The name of the Lightsail instance for which you are requesting health check * data.

*/ inline InstanceHealthSummary& WithInstanceName(const Aws::String& value) { SetInstanceName(value); return *this;} /** *

The name of the Lightsail instance for which you are requesting health check * data.

*/ inline InstanceHealthSummary& WithInstanceName(Aws::String&& value) { SetInstanceName(std::move(value)); return *this;} /** *

The name of the Lightsail instance for which you are requesting health check * data.

*/ inline InstanceHealthSummary& WithInstanceName(const char* value) { SetInstanceName(value); return *this;} /** *

Describes the overall instance health. Valid values are below.

*/ inline const InstanceHealthState& GetInstanceHealth() const{ return m_instanceHealth; } /** *

Describes the overall instance health. Valid values are below.

*/ inline bool InstanceHealthHasBeenSet() const { return m_instanceHealthHasBeenSet; } /** *

Describes the overall instance health. Valid values are below.

*/ inline void SetInstanceHealth(const InstanceHealthState& value) { m_instanceHealthHasBeenSet = true; m_instanceHealth = value; } /** *

Describes the overall instance health. Valid values are below.

*/ inline void SetInstanceHealth(InstanceHealthState&& value) { m_instanceHealthHasBeenSet = true; m_instanceHealth = std::move(value); } /** *

Describes the overall instance health. Valid values are below.

*/ inline InstanceHealthSummary& WithInstanceHealth(const InstanceHealthState& value) { SetInstanceHealth(value); return *this;} /** *

Describes the overall instance health. Valid values are below.

*/ inline InstanceHealthSummary& WithInstanceHealth(InstanceHealthState&& value) { SetInstanceHealth(std::move(value)); return *this;} /** *

More information about the instance health. If the * instanceHealth is healthy, then an * instanceHealthReason value is not provided.

If * instanceHealth is initial, the * instanceHealthReason value can be one of the following:

*
  • Lb.RegistrationInProgress - The target * instance is in the process of being registered with the load balancer.

  • *
  • Lb.InitialHealthChecking - The Lightsail load * balancer is still sending the target instance the minimum number of health * checks required to determine its health status.

If * instanceHealth is unhealthy, the * instanceHealthReason value can be one of the following:

*
  • Instance.ResponseCodeMismatch - The health * checks did not return an expected HTTP code.

  • * Instance.Timeout - The health check requests timed out.

    *
  • Instance.FailedHealthChecks - The health * checks failed because the connection to the target instance timed out, the * target instance response was malformed, or the target instance failed the health * check for an unknown reason.

  • * Lb.InternalError - The health checks failed due to an internal * error.

If instanceHealth is * unused, the instanceHealthReason value can be * one of the following:

  • Instance.NotRegistered * - The target instance is not registered with the target group.

  • *
  • Instance.NotInUse - The target group is not used * by any load balancer, or the target instance is in an Availability Zone that is * not enabled for its load balancer.

  • * Instance.IpUnusable - The target IP address is reserved for * use by a Lightsail load balancer.

  • * Instance.InvalidState - The target is in the stopped or * terminated state.

If instanceHealth is * draining, the instanceHealthReason value can * be one of the following:

  • * Instance.DeregistrationInProgress - The target instance is in * the process of being deregistered and the deregistration delay period has not * expired.

*/ inline const InstanceHealthReason& GetInstanceHealthReason() const{ return m_instanceHealthReason; } /** *

More information about the instance health. If the * instanceHealth is healthy, then an * instanceHealthReason value is not provided.

If * instanceHealth is initial, the * instanceHealthReason value can be one of the following:

*
  • Lb.RegistrationInProgress - The target * instance is in the process of being registered with the load balancer.

  • *
  • Lb.InitialHealthChecking - The Lightsail load * balancer is still sending the target instance the minimum number of health * checks required to determine its health status.

If * instanceHealth is unhealthy, the * instanceHealthReason value can be one of the following:

*
  • Instance.ResponseCodeMismatch - The health * checks did not return an expected HTTP code.

  • * Instance.Timeout - The health check requests timed out.

    *
  • Instance.FailedHealthChecks - The health * checks failed because the connection to the target instance timed out, the * target instance response was malformed, or the target instance failed the health * check for an unknown reason.

  • * Lb.InternalError - The health checks failed due to an internal * error.

If instanceHealth is * unused, the instanceHealthReason value can be * one of the following:

  • Instance.NotRegistered * - The target instance is not registered with the target group.

  • *
  • Instance.NotInUse - The target group is not used * by any load balancer, or the target instance is in an Availability Zone that is * not enabled for its load balancer.

  • * Instance.IpUnusable - The target IP address is reserved for * use by a Lightsail load balancer.

  • * Instance.InvalidState - The target is in the stopped or * terminated state.

If instanceHealth is * draining, the instanceHealthReason value can * be one of the following:

  • * Instance.DeregistrationInProgress - The target instance is in * the process of being deregistered and the deregistration delay period has not * expired.

*/ inline bool InstanceHealthReasonHasBeenSet() const { return m_instanceHealthReasonHasBeenSet; } /** *

More information about the instance health. If the * instanceHealth is healthy, then an * instanceHealthReason value is not provided.

If * instanceHealth is initial, the * instanceHealthReason value can be one of the following:

*
  • Lb.RegistrationInProgress - The target * instance is in the process of being registered with the load balancer.

  • *
  • Lb.InitialHealthChecking - The Lightsail load * balancer is still sending the target instance the minimum number of health * checks required to determine its health status.

If * instanceHealth is unhealthy, the * instanceHealthReason value can be one of the following:

*
  • Instance.ResponseCodeMismatch - The health * checks did not return an expected HTTP code.

  • * Instance.Timeout - The health check requests timed out.

    *
  • Instance.FailedHealthChecks - The health * checks failed because the connection to the target instance timed out, the * target instance response was malformed, or the target instance failed the health * check for an unknown reason.

  • * Lb.InternalError - The health checks failed due to an internal * error.

If instanceHealth is * unused, the instanceHealthReason value can be * one of the following:

  • Instance.NotRegistered * - The target instance is not registered with the target group.

  • *
  • Instance.NotInUse - The target group is not used * by any load balancer, or the target instance is in an Availability Zone that is * not enabled for its load balancer.

  • * Instance.IpUnusable - The target IP address is reserved for * use by a Lightsail load balancer.

  • * Instance.InvalidState - The target is in the stopped or * terminated state.

If instanceHealth is * draining, the instanceHealthReason value can * be one of the following:

  • * Instance.DeregistrationInProgress - The target instance is in * the process of being deregistered and the deregistration delay period has not * expired.

*/ inline void SetInstanceHealthReason(const InstanceHealthReason& value) { m_instanceHealthReasonHasBeenSet = true; m_instanceHealthReason = value; } /** *

More information about the instance health. If the * instanceHealth is healthy, then an * instanceHealthReason value is not provided.

If * instanceHealth is initial, the * instanceHealthReason value can be one of the following:

*
  • Lb.RegistrationInProgress - The target * instance is in the process of being registered with the load balancer.

  • *
  • Lb.InitialHealthChecking - The Lightsail load * balancer is still sending the target instance the minimum number of health * checks required to determine its health status.

If * instanceHealth is unhealthy, the * instanceHealthReason value can be one of the following:

*
  • Instance.ResponseCodeMismatch - The health * checks did not return an expected HTTP code.

  • * Instance.Timeout - The health check requests timed out.

    *
  • Instance.FailedHealthChecks - The health * checks failed because the connection to the target instance timed out, the * target instance response was malformed, or the target instance failed the health * check for an unknown reason.

  • * Lb.InternalError - The health checks failed due to an internal * error.

If instanceHealth is * unused, the instanceHealthReason value can be * one of the following:

  • Instance.NotRegistered * - The target instance is not registered with the target group.

  • *
  • Instance.NotInUse - The target group is not used * by any load balancer, or the target instance is in an Availability Zone that is * not enabled for its load balancer.

  • * Instance.IpUnusable - The target IP address is reserved for * use by a Lightsail load balancer.

  • * Instance.InvalidState - The target is in the stopped or * terminated state.

If instanceHealth is * draining, the instanceHealthReason value can * be one of the following:

  • * Instance.DeregistrationInProgress - The target instance is in * the process of being deregistered and the deregistration delay period has not * expired.

*/ inline void SetInstanceHealthReason(InstanceHealthReason&& value) { m_instanceHealthReasonHasBeenSet = true; m_instanceHealthReason = std::move(value); } /** *

More information about the instance health. If the * instanceHealth is healthy, then an * instanceHealthReason value is not provided.

If * instanceHealth is initial, the * instanceHealthReason value can be one of the following:

*
  • Lb.RegistrationInProgress - The target * instance is in the process of being registered with the load balancer.

  • *
  • Lb.InitialHealthChecking - The Lightsail load * balancer is still sending the target instance the minimum number of health * checks required to determine its health status.

If * instanceHealth is unhealthy, the * instanceHealthReason value can be one of the following:

*
  • Instance.ResponseCodeMismatch - The health * checks did not return an expected HTTP code.

  • * Instance.Timeout - The health check requests timed out.

    *
  • Instance.FailedHealthChecks - The health * checks failed because the connection to the target instance timed out, the * target instance response was malformed, or the target instance failed the health * check for an unknown reason.

  • * Lb.InternalError - The health checks failed due to an internal * error.

If instanceHealth is * unused, the instanceHealthReason value can be * one of the following:

  • Instance.NotRegistered * - The target instance is not registered with the target group.

  • *
  • Instance.NotInUse - The target group is not used * by any load balancer, or the target instance is in an Availability Zone that is * not enabled for its load balancer.

  • * Instance.IpUnusable - The target IP address is reserved for * use by a Lightsail load balancer.

  • * Instance.InvalidState - The target is in the stopped or * terminated state.

If instanceHealth is * draining, the instanceHealthReason value can * be one of the following:

  • * Instance.DeregistrationInProgress - The target instance is in * the process of being deregistered and the deregistration delay period has not * expired.

*/ inline InstanceHealthSummary& WithInstanceHealthReason(const InstanceHealthReason& value) { SetInstanceHealthReason(value); return *this;} /** *

More information about the instance health. If the * instanceHealth is healthy, then an * instanceHealthReason value is not provided.

If * instanceHealth is initial, the * instanceHealthReason value can be one of the following:

*
  • Lb.RegistrationInProgress - The target * instance is in the process of being registered with the load balancer.

  • *
  • Lb.InitialHealthChecking - The Lightsail load * balancer is still sending the target instance the minimum number of health * checks required to determine its health status.

If * instanceHealth is unhealthy, the * instanceHealthReason value can be one of the following:

*
  • Instance.ResponseCodeMismatch - The health * checks did not return an expected HTTP code.

  • * Instance.Timeout - The health check requests timed out.

    *
  • Instance.FailedHealthChecks - The health * checks failed because the connection to the target instance timed out, the * target instance response was malformed, or the target instance failed the health * check for an unknown reason.

  • * Lb.InternalError - The health checks failed due to an internal * error.

If instanceHealth is * unused, the instanceHealthReason value can be * one of the following:

  • Instance.NotRegistered * - The target instance is not registered with the target group.

  • *
  • Instance.NotInUse - The target group is not used * by any load balancer, or the target instance is in an Availability Zone that is * not enabled for its load balancer.

  • * Instance.IpUnusable - The target IP address is reserved for * use by a Lightsail load balancer.

  • * Instance.InvalidState - The target is in the stopped or * terminated state.

If instanceHealth is * draining, the instanceHealthReason value can * be one of the following:

  • * Instance.DeregistrationInProgress - The target instance is in * the process of being deregistered and the deregistration delay period has not * expired.

*/ inline InstanceHealthSummary& WithInstanceHealthReason(InstanceHealthReason&& value) { SetInstanceHealthReason(std::move(value)); return *this;} private: Aws::String m_instanceName; bool m_instanceNameHasBeenSet = false; InstanceHealthState m_instanceHealth; bool m_instanceHealthHasBeenSet = false; InstanceHealthReason m_instanceHealthReason; bool m_instanceHealthReasonHasBeenSet = false; }; } // namespace Model } // namespace Lightsail } // namespace Aws