java.lang.Object
com.amazonaws.services.elasticloadbalancing.model.InstanceState
All Implemented Interfaces:
Serializable, Cloneable

public class InstanceState extends Object implements Serializable, Cloneable

Information about the state of a back-end instance.

See Also:
  • Constructor Details

    • InstanceState

      public InstanceState()
  • Method Details

    • setInstanceId

      public void setInstanceId(String instanceId)

      The ID of the instance.

      Parameters:
      instanceId - The ID of the instance.
    • getInstanceId

      public String getInstanceId()

      The ID of the instance.

      Returns:
      The ID of the instance.
    • withInstanceId

      public InstanceState withInstanceId(String instanceId)

      The ID of the instance.

      Parameters:
      instanceId - The ID of the instance.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setState

      public void setState(String state)

      The current state of the instance.

      Valid values: InService | OutOfService | Unknown

      Parameters:
      state - The current state of the instance.

      Valid values: InService | OutOfService | Unknown

    • getState

      public String getState()

      The current state of the instance.

      Valid values: InService | OutOfService | Unknown

      Returns:
      The current state of the instance.

      Valid values: InService | OutOfService | Unknown

    • withState

      public InstanceState withState(String state)

      The current state of the instance.

      Valid values: InService | OutOfService | Unknown

      Parameters:
      state - The current state of the instance.

      Valid values: InService | OutOfService | Unknown

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setReasonCode

      public void setReasonCode(String 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

      Parameters:
      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

    • getReasonCode

      public String getReasonCode()

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

      Valid values: ELB | Instance | N/A

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

      Valid values: ELB | Instance | N/A

    • withReasonCode

      public InstanceState withReasonCode(String 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

      Parameters:
      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

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setDescription

      public void setDescription(String 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.

      Parameters:
      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.

    • getDescription

      public String getDescription()

      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.

      Returns:
      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.

    • withDescription

      public InstanceState withDescription(String 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.

      Parameters:
      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.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • toString

      public String toString()
      Returns a string representation of this object; useful for testing and debugging.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public InstanceState clone()
      Overrides:
      clone in class Object