Discover Volumes

Discover EBS volumes based on specified criteria.

Source codePermissions

Usage

Input

Parameter Description Type Required Default Value
instance_ids Get volumes attached to specified instances list(string) No All instances
volume_ids Volume IDs to focus on list(string) No All volumes
unencrypted Get only unencrypted volumes bool No False
detached Get only detached volumes bool No False
types Get only specific type volumes
gp2, gp3, io1, io2, st1, sc1, standard
list(string) No None
root Get only root volumes bool No False
region Region for operation. Leave blank for session default string No Session Default
debug Increase log verbosity bool No False
silent Decrease log verbosity bool No False
output Output format
table
string No None
session Established session object No None

Output

Returns a list of discovered volume IDs:

['vol-1234567890abcdef0', 'vol-abcdef1234567890']

Examples

Fetch all volumes for specified instances:

aaws ec2 discover_volumes --instance_ids i-1234567890abcdef0 i-0987654321fedcba0

Fetch all detached and unencrypted volumes of type gp2 or gp3:

aaws ec2 discover_volumes --unencrypted --detached --types gp2 gp3