Skip to content

ec2 list-volumes

List ec2 volumes

Description

List ec2 volumes

Synopsis

ec2 list-volumes
    [--site <site>]
    [--region <region>]
    [--tags <tags>]
    [--availability_zone <availability_zone>]
    [--volume_type <volume_type>]
    [--status <status>]

Arguments

site - (string)

     Site where this command will be executed
     Example: --site "site-1"
     Default: input.site      Attributes: optional

region - (string)

     AWS region for the service
     Example: --region "region-1"
     Default: _None_      Attributes: optional

tags - (string)

     Tags assigned to the instance. Just specify the key to filter all resources with that tag key. Specity key=[value1,value2,...] to filter by acceptable values
     Example: --tags "creator_id=[user1,user2]" , --tags "prod_env"
     Default: _None_      Attributes: optional, multiple allowed

availability_zone - (string)

     Availability Zone of the instance
     Example: --availability_zone "us-west-1c"
     Default: _None_      Attributes: optional, multiple allowed

volume_type - (string)

     Volume type of the instance
     Example: --volume_type "gp2"
     Default: _None_      Attributes: optional, multiple allowed

     Validation:
         allowed values: standard, io1, io2, gp2, sc1, st1, gp3

status - (string)

     Status of the instance
     Example: --status "in-use"
     Default: _None_      Attributes: optional, multiple allowed

     Validation:
         allowed values: creating, available, in-use, deleting, deleted, error

Examples

ec2 list-volumes --region "region-1" --tags "creator_id=[user1,user2]" --availability_zone "us-west-1c" --volume_type "gp2" --status "in-use"

Access Control

To use this command, you need access to the following:

Field Value
Action "read"
Service Type "ec2"
Service Instance
Namespace
Object Type "instance"
Object ID

Please see Access Control for details.