AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Information about the state of an EC2 instance.

Inheritance Hierarchy


Namespace: Amazon.ElasticLoadBalancing.Model
Assembly: AWSSDK.ElasticLoadBalancing.dll
Version: 3.x.y.z


public class InstanceState

The InstanceState type exposes the following members


Public Method InstanceState()

Empty constructor used to set properties independently even when a simple constructor is available


Public Property Description System.String

Gets and sets the property 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

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

  • 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.

Public Property InstanceId System.String

Gets and sets the property InstanceId.

The ID of the instance.

Public Property ReasonCode System.String

Gets and sets the property 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

Public Property State System.String

Gets and sets the property State.

The current state of the instance.

Valid values: InService | OutOfService | Unknown

Version Information

.NET Standard:
Supported in: 1.3

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms