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 |
| Name | Description | Required |
|---|---|---|
|
|
One or more volume IDs. Type: String Default: Describes all volumes that you own, or only those otherwise specified. |
No |
|
|
Name of a filter. See the preceding table for a list of allowed filter names. Type: String Default: None |
No |
|
|
A value for the filter. See the preceding table for a list of allowed values for each filter. Type: String Default: None |
No |
The elements in the following table are wrapped in a
DescribeVolumesResponse structure.
| Name | Description |
|---|---|
|
|
The ID of the request. Type: xsd:string |
|
|
A list of volumes. Each volume's information is wrapped in
an |
This example describes all volumes associated with your account.
https://ec2.amazonaws.com/?Action=DescribeVolumes &AUTHPARAMS
<DescribeVolumesResponse xmlns="http://ec2.amazonaws.com/doc/2011-01-01/">
<requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId>
<volumeSet>
<item>
<volumeId>vol-4282672b</volumeId>
<size>80</size>
<snapshotId/>
<availabilityZone>us-east-1a</availabilityZone>
<status>in-use</status>
<createTime>2008-05-07T11:51:50.000Z</createTime>
<attachmentSet>
<item>
<volumeId>vol-4282672b</volumeId>
<instanceId>i-6058a509</instanceId>
<device>/dev/sdh</device>
<status>attached</status>
<attachTime>2008-05-07T12:51:50.000Z</attachTime>
<deleteOnTermination>false</deleteOnTermination>
</item>
</attachmentSet>
<tagSet/>
</item>
</volumeSet>
</DescribeVolumesResponse>This example describes all volumes that are both attached to instance i-1a2b3c4d and also set to delete when the instance terminates.
https://ec2.amazonaws.com/?Action=DescribeVolumes &Filter.1.Name=attachment.instance-id &Filter.1.Value.1=i-1a2b3c4d &Filter.2.Name=attachment.delete-on-termination &Filter.2.Value.1=true &AUTHPARAMS