Use DescribeVolumeStatus with a CLI - Amazon Elastic Compute Cloud
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Use DescribeVolumeStatus with a CLI

The following code examples show how to use DescribeVolumeStatus.

CLI
Amazon CLI

To describe the status of a single volume

This example command describes the status for the volume vol-1234567890abcdef0.

Command:

aws ec2 describe-volume-status --volume-ids vol-1234567890abcdef0

Output:

{ "VolumeStatuses": [ { "VolumeStatus": { "Status": "ok", "Details": [ { "Status": "passed", "Name": "io-enabled" }, { "Status": "not-applicable", "Name": "io-performance" } ] }, "AvailabilityZone": "us-east-1a", "VolumeId": "vol-1234567890abcdef0", "Actions": [], "Events": [] } ] }

To describe the status of impaired volumes

This example command describes the status for all volumes that are impaired. In this example output, there are no impaired volumes.

Command:

aws ec2 describe-volume-status --filters Name=volume-status.status,Values=impaired

Output:

{ "VolumeStatuses": [] }

If you have a volume with a failed status check (status is impaired), see Working with an Impaired Volume in the Amazon EC2 User Guide.

PowerShell
Tools for PowerShell

Example 1: This example describes the status of the specified volume.

Get-EC2VolumeStatus -VolumeId vol-12345678

Output:

Actions : {} AvailabilityZone : us-west-2a Events : {} VolumeId : vol-12345678 VolumeStatus : Amazon.EC2.Model.VolumeStatusInfo
(Get-EC2VolumeStatus -VolumeId vol-12345678).VolumeStatus

Output:

Details Status ------- ------ {io-enabled, io-performance} ok
(Get-EC2VolumeStatus -VolumeId vol-12345678).VolumeStatus.Details

Output:

Name Status ---- ------ io-enabled passed io-performance not-applicable

For a complete list of Amazon SDK developer guides and code examples, see Create Amazon EC2 resources using an Amazon SDK. This topic also includes information about getting started and details about previous SDK versions.