Describes the specified EBS volumes.
If you are describing a long list of volumes, you can paginate the output to make the list
more manageable. The
MaxResults parameter sets the maximum number of results
returned in a single page. If the list of results exceeds your
then that number of results is returned along with a
NextToken value that can be
passed to a subsequent
DescribeVolumes request to retrieve the remaining
For more information about EBS volumes, see Amazon EBS Volumes in the Amazon Elastic Compute Cloud User Guide.
The following parameters are for this specific action. For more information about required and optional parameters that are common to all actions, see Common Query Parameters.
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation. Otherwise, it is
One or more filters.
attachment.attach-time- The time stamp when the attachment initiated.
attachment.delete-on-termination- Whether the volume is deleted on instance termination.
attachment.device- The device name that is exposed to the instance (for example,
attachment.instance-id- The ID of the instance the volume is attached to.
attachment.status- The attachment state (
availability-zone- The Availability Zone in which the volume was created.
create-time- The time stamp when the volume was created.
encrypted- The encryption status of the volume.
size- The size of the volume, in GiB.
snapshot-id- The snapshot from which the volume was created.
status- The status of the volume (
tag:key=value - The key/value combination of a tag assigned to the resource. Specify the key of the tag in the filter name and the value of the tag in the filter value. For example, for the tag Purpose=X, specify
tag:Purposefor the filter name and
Xfor the filter value.
tag-key- The key of a tag assigned to the resource. This filter is independent of the
tag-valuefilter. For example, if you use both the filter "tag-key=Purpose" and the filter "tag-value=X", you get any resources assigned both the tag key Purpose (regardless of what the tag's value is), and the tag value X (regardless of what the tag's key is). If you want to list only resources where Purpose is X, see the
tag-value- The value of a tag assigned to the resource. This filter is independent of the
volume-id- The volume ID.
volume-type- The Amazon EBS volume type. This can be
gp2for General Purpose SSD,
io1for Provisioned IOPS SSD,
st1for Throughput Optimized HDD,
sc1for Cold HDD, or
standardfor Magnetic volumes.
Type: array of Filter objects
The maximum number of volume results returned by
DescribeVolumesin paginated output. When this parameter is used,
MaxResultsresults in a single page along with a
NextTokenresponse element. The remaining results of the initial request can be seen by sending another
DescribeVolumesrequest with the returned
NextTokenvalue. This value can be between 5 and 500; if
MaxResultsis given a value larger than 500, only 500 results are returned. If this parameter is not used, then
DescribeVolumesreturns all results. You cannot specify this parameter and the volume IDs parameter in the same request.
NextTokenvalue returned from a previous paginated
MaxResultswas used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the
NextTokenvalue. This value is
nullwhen there are no more results to return.
One or more volume IDs.
Type: array of Strings
The following elements are returned by the service.
NextTokenvalue to include in a future
DescribeVolumesrequest. When the results of a
MaxResults, this value can be used to retrieve the next page of results. This value is
nullwhen there are no more results to return.
The ID of the request.
Information about the volumes.
Type: array of Volume objects
For information about the errors that are common to all actions, see Common Errors.
This example describes all volumes associated with your account.
<DescribeVolumesResponse xmlns="http://ec2.amazonaws.com/doc/2016-11-15/"> <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> <volumeSet> <item> <volumeId>vol-1234567890abcdef0</volumeId> <size>80</size> <snapshotId/> <availabilityZone>us-east-1a</availabilityZone> <status>in-use</status> <createTime>YYYY-MM-DDTHH:MM:SS.SSSZ</createTime> <attachmentSet> <item> <volumeId>vol-1234567890abcdef0</volumeId> <instanceId>i-1234567890abcdef0</instanceId> <device>/dev/sdh</device> <status>attached</status> <attachTime>YYYY-MM-DDTHH:MM:SS.SSSZ</attachTime> <deleteOnTermination>false</deleteOnTermination> </item> </attachmentSet> <volumeType>standard</volumeType> <encrypted>true</encrypted> </item> </volumeSet> </DescribeVolumesResponse>
For more information about using this API in one of the language-specific AWS SDKs, see the following: