AWS SDK Version 3 for .NET
API Reference

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 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 MaxResults value, 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 results.

For more information about EBS volumes, see Amazon EBS Volumes in the Amazon Elastic Compute Cloud User Guide.


For .NET Core and PCL this operation is only available in asynchronous form. Please refer to DescribeVolumesAsync.

Namespace: Amazon.EC2
Assembly: AWSSDK.EC2.dll
Version: 3.x.y.z


public abstract DescribeVolumesResponse DescribeVolumes(
         DescribeVolumesRequest request
Type: Amazon.EC2.Model.DescribeVolumesRequest

Container for the necessary parameters to execute the DescribeVolumes service method.

Return Value
The response from the DescribeVolumes service method, as returned by EC2.


This example describes all of your volumes in the default region.

To describe all volumes

var response = client.DescribeVolumes(new DescribeVolumesRequest 

string nextToken = response.NextToken;
List volumes = response.Volumes;


This example describes all volumes that are both attached to the instance with the ID i-1234567890abcdef0 and set to delete when the instance terminates.

To describe volumes that are attached to a specific instance

var response = client.DescribeVolumes(new DescribeVolumesRequest 
    Filters = new List {
        new Filter {
            Name = "attachment.instance-id",
            Values = new List {
        new Filter {
            Name = "attachment.delete-on-termination",
            Values = new List {

List volumes = response.Volumes;


Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms

See Also