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:
Status checks - Amazon EC2 performs status checks on running EC2 instances to identify hardware and software issues. For more information, see Status checks for your instances and Troubleshoot instances with failed status checks in the Amazon EC2 User Guide.
Scheduled events - Amazon EC2 can schedule events (such as reboot, stop, or terminate) for your instances related to hardware issues, software updates, or system maintenance. For more information, see Scheduled events for your instances in the Amazon EC2 User Guide.
Instance state - You can manage your instances from the moment you launch them through their termination. For more information, see Instance lifecycle in the Amazon EC2 User Guide.
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
public virtual DescribeInstanceStatusResponse DescribeInstanceStatus( DescribeInstanceStatusRequest request )
Container for the necessary parameters to execute the DescribeInstanceStatus service method.
This example describes the current status of the specified instance.
var client = new AmazonEC2Client(); var response = client.DescribeInstanceStatus(new DescribeInstanceStatusRequest { InstanceIds = new List<string> { "i-1234567890abcdef0" } }); List<InstanceStatus> instanceStatuses = response.InstanceStatuses;
.NET Framework:
Supported in: 4.5, 4.0, 3.5