| Did this page help you? Yes No Tell us about it... |
Describes your Amazon EBS volumes. For more information about Amazon EBS, go to Using Amazon Elastic Block Store in the Amazon Elastic Compute Cloud User Guide.
You can filter the results to return information only about volumes that match criteria you specify. For example, you could get information about volumes whose status is available. You can specify multiple values for a filter (e.g., the volume's status is either available or in-use). A volume must match at least one of the specified values for it to be included in the results.
You can specify multiple filters (e.g., the volume's status is available, and it is tagged with a particular value). The result includes information for a particular volume only if it matches all your filters. If there's no match, no special message is returned; the response is simply empty.
You can use wildcards with the filter values: * matches zero or more characters, and ? matches exactly one character. You can escape special characters using a backslash before the character. For example, a value of \*amazon\?\\ searches for the literal string *amazon?\.
The following table shows the available filters.
| Filter Name | Description |
|---|---|
|
|
Time stamp when the attachment initiated. Type: xsd:dateTime |
|
|
Whether the volume will be deleted on instance termination. Type: Boolean |
|
|
How the volume is exposed to the instance (e.g., /dev/sda1). Type: String |
|
|
ID of the instance the volume is attached to. Type: String |
|
|
Attachment state. Type: String Valid Values: |
|
|
Availability Zone in which the volume was created. Type: String |
|
|
Time stamp when the volume was created. Type: xsd:dateTime |
|
|
Size of the volume, in GiB (e.g., Type: String |
|
|
Snapshot from which the volume was created. Type: String |
|
|
Status of the volume. Type: String Valid Values: |
|
|
Key of a tag assigned to the resource. This filter is independent of the For more information about tags, go to Using Tags in the Amazon Elastic Compute Cloud User Guide. Type: String |
|
|
Value of a tag assigned to the resource. This filter is independent of the Type: String |
|
|
Filters the results based on a specific tag/value combination. Example: To list just the resources assigned tag Purpose=X, then specify:
Example: To list just resources assigned tag Purpose=X OR Purpose=Y, then specify:
|
|
|
Volume ID. Type: String |
The short version of this command is ec2dvol.
ec2-describe-volumes [
volume_id ...]
[[--filter name=value] ...]
| Name | Description | Required |
|---|---|---|
|
|
The ID of the volume to list. Type: String Default: Describes all volumes you own, or only those otherwise specified. Example: vol-4282672b |
No |
|
|
A filter for limiting the results. See the preceding table for a list of allowed filter names and values. You need to use quotation marks if the value string has a space (e.g., "name=value example"). If you're using the command line tools on a Windows system, you might need to use quotation marks, even when there is no space in the value string (e.g., "name=value"). Type: String Default: Describes all volumes you own, or those otherwise specified. Example: --filter "tag-key=Production" |
No |
| Option | Description |
|---|---|
|
|
Overrides the Region specified in the Default: The Example: |
|
|
Default: The Example: |
|
|
The private key to use when constructing requests to Amazon EC2. Default: The value of the Example: |
|
|
The X.509 certificate to use when constructing requests to Amazon EC2. Default: The value of the Example: |
|
|
Specifies a connection timeout (in seconds). Example: --connection-timeout 30 |
|
|
Specifies a request timeout (in seconds). Example: --request-timeout 45 |
|
|
Displays verbose output by showing the SOAP request and response on the command line. This is particularly useful if you are building tools to talk directly to our SOAP API. |
|
|
Displays column headers in the output. |
|
|
Shows empty columns as |
|
|
Do not display tags for tagged resources. |
|
|
Prints internal debugging information. This is useful to assist us when troubleshooting problems. |
|
|
Displays Help. |
|
|
If Example: |
The command returns a table that contains the following information:
VOLUME identifier
ID of the volume
Size of the volume, in GiBs
Snapshot from which the volume was created, if applicable
Availability Zone in which the volume launched
Volume state (e.g., creating, available, in-use, deleting, deleted, error)
Time stamp when volume creation initiated
Any tags assigned to the volume
Amazon EC2 command line tools display errors on stderr.
This example describes all volumes associated with your account.
PROMPT>ec2-describe-volumesVOLUME vol-4d826724 800 us-east-1a in-use 2008-02-14T00:00:00+0000ATTACHMENT vol-4d826724 i-6058a509 /dev/sdh attached 2008-02-14T00:00:17+0000VOLUME vol-50957039 13 us-east-1a available 2008-02-091T00:00:00+0000VOLUME vol-6682670f 1 us-east-1a in-use 2008-02-11T12:00:00+0000ATTACHMENT vol-6682670f i-69a54000 /dev/sdh attached 2008-02-11T13:56:00+0000VOLUME vol-932685fa 15 snap-a08912c9 us-east-1a in-use 2010-03-31T12:17:07+0000ATTACHMENT vol-932685fa i-71ca481a /dev/sda1 attached 2010-04-06T14:16:00+0000VOLUME vol-8975dae0 15 snap-a08912c9 us-east-1c deleting 2010-04-07T14:59:27+0000VOLUME vol-35be105c 10 us-east-1a available 2010-04-08T07:57:15+0000
This example describes all volumes that are both attached to instance i-1a2b3c4d and also set to delete when the instance terminates.
PROMPT> ec2-describe-volumes --filter "attachment.instance-id=i-1a2b3c4d" --filter "attachment.delete-on-termination=true"