Get a list of all EBS volumes, optionally filtered by provided 'filters' param

    .. versionadded:: 2016.11.0

    volume_ids
        (list) - Optional list of volume_ids.  If provided, only the volumes
        associated with those in the list will be returned.
    filters
        (dict) - Additional constraints on which volumes to return.  Valid filters are:

    - 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, /dev/sda1).
    - attachment.instance-id - The ID of the instance the volume is attached to.
    - attachment.status - The attachment state (attaching | attached | detaching | detached).
    - 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 (creating | available | in-use | deleting | deleted | error).
    - tag:key=value - The key/value combination of a tag assigned to the resource.
    - volume-id - The volume ID.
    - volume-type - The Amazon EBS volume type. This can be ``gp2`` for General
      Purpose SSD, ``io1`` for Provisioned IOPS SSD, ``st1`` for Throughput
      Optimized HDD, ``sc1`` for Cold HDD, or ``standard`` for Magnetic volumes.

    return_objs
        (bool) - Changes the return type from list of volume IDs to list of
        boto.ec2.volume.Volume objects

    returns
        (list) - A list of the requested values: Either the volume IDs or, if
        return_objs is ``True``, boto.ec2.volume.Volume objects.

    CLI Example:

    .. code-block:: bash

        salt-call boto_ec2.get_all_volumes filters='{"tag:Name": "myVolume01"}'

def get_all_volumes(volume_ids=None, filters=None, return_objs=False,
                    region=None, key=None, keyid=None, profile=None):
    '''
    Get a list of all EBS volumes, optionally filtered by provided 'filters' param

    .. versionadded:: 2016.11.0

    volume_ids
        (list) - Optional list of volume_ids.  If provided, only the volumes
        associated with those in the list will be returned.
    filters
        (dict) - Additional constraints on which volumes to return.  Valid filters are:

    - 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, /dev/sda1).
    - attachment.instance-id - The ID of the instance the volume is attached to.
    - attachment.status - The attachment state (attaching | attached | detaching | detached).
    - 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 (creating | available | in-use | deleting | deleted | error).
    - tag:key=value - The key/value combination of a tag assigned to the resource.
    - volume-id - The volume ID.
    - volume-type - The Amazon EBS volume type. This can be ``gp2`` for General
      Purpose SSD, ``io1`` for Provisioned IOPS SSD, ``st1`` for Throughput
      Optimized HDD, ``sc1`` for Cold HDD, or ``standard`` for Magnetic volumes.

    return_objs
        (bool) - Changes the return type from list of volume IDs to list of
        boto.ec2.volume.Volume objects

    returns
        (list) - A list of the requested values: Either the volume IDs or, if
        return_objs is ``True``, boto.ec2.volume.Volume objects.

    CLI Example:

    .. code-block:: bash

        salt-call boto_ec2.get_all_volumes filters='{"tag:Name": "myVolume01"}'

    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)

    try:
        ret = conn.get_all_volumes(volume_ids=volume_ids, filters=filters)
        return ret if return_objs else [r.id for r in ret]
    except boto.exception.BotoServerError as e:
        log.error(e)
        return []