Describes the specified EBS volumes or all of your EBS volumes.
If you are describing a long list of volumes, we recommend that you 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.
example
Use a bare-bones client and the command you need to make an API call.
Describes the specified EBS volumes or all of your EBS volumes.
If you are describing a long list of volumes, we recommend that you 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 yourMaxResults
value, then that number of results is returned along with aNextToken
value that can be passed to a subsequentDescribeVolumes
request to retrieve the remaining results.For more information about EBS volumes, see Amazon EBS volumes in the Amazon Elastic Compute Cloud User Guide.
Use a bare-bones client and the command you need to make an API call.
import { EC2Client, DescribeVolumesCommand } from "@aws-sdk/client-ec2"; // ES Modules import // const { EC2Client, DescribeVolumesCommand } = require("@aws-sdk/client-ec2"); // CommonJS import const client = new EC2Client(config); const command = new DescribeVolumesCommand(input); const response = await client.send(command);
DescribeVolumesCommandInput for command's
input
shape.DescribeVolumesCommandOutput for command's
response
shape.config for EC2Client's
config
shape.