Skip to content

Latest commit

 

History

History
69 lines (54 loc) · 2.66 KB

volume_list.md

File metadata and controls

69 lines (54 loc) · 2.66 KB

volume_list

List and filter on Linode Volumes.

Examples

- name: List all of the volumes that the user is allowed to view
  linode.cloud.volume_list: {}
- name: Resolve all volumes that the user is allowed to view
  linode.cloud.volume_list:
    filters:
      - name: label
        values: myVolumeLabel

Parameters

Field Type Required Description
order str Optional The order to list volumes in. (Choices: desc, asc; Default: asc)
order_by str Optional The attribute to order volumes by.
filters (sub-options) list Optional A list of filters to apply to the resulting volumes.
count int Optional The number of results to return. If undefined, all results will be returned.

filters

Field Type Required Description
name str Required The name of the field to filter on. Valid filterable attributes can be found here: https://www.linode.com/docs/api/volumes/#volumes-list__responses
values list Required A list of values to allow for this field. Fields will pass this filter if at least one of these values matches.

Return Values

  • volumes - The returned volumes.

    • Sample Response:
      [
          {
            "created": "2018-01-01T00:01:01",
            "filesystem_path": "/dev/disk/by-id/scsi-0Linode_Volume_my-volume",
            "hardware_type": "nvme",
            "id": 12345,
            "label": "my-volume",
            "linode_id": 12346,
            "linode_label": "linode123",
            "region": "us-east",
            "size": 30,
            "status": "active",
            "tags": [
              "example tag",
              "another example"
            ],
            "updated": "2018-01-01T00:01:01"
          }
      ]
    • See the Linode API response documentation for a list of returned fields