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.

Describes the status of the specified instances or all of your instances. By default, only running instances are described, unless you specifically indicate to return the status of all instances.

Instance status includes the following components:

Note:

For .NET Core this operation is only available in asynchronous form. Please refer to DescribeInstanceStatusAsync.

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

Syntax

C#
public virtual DescribeInstanceStatusResponse DescribeInstanceStatus(
         DescribeInstanceStatusRequest request
)
Parameters
request
Type: Amazon.EC2.Model.DescribeInstanceStatusRequest

Container for the necessary parameters to execute the DescribeInstanceStatus service method.

Return Value
The response from the DescribeInstanceStatus service method, as returned by EC2.

Examples

This example describes the current status of the specified instance.

To describe the status of an instance


var response = client.DescribeInstanceStatus(new DescribeInstanceStatusRequest 
{
    InstanceIds = new List<string> {
        "i-1234567890abcdef0"
    }
});

List<InstanceStatus> instanceStatuses = response.InstanceStatuses;

            

Version Information

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

See Also