Skip to content

Latest commit

 

History

History
93 lines (76 loc) · 3.9 KB

image_list.md

File metadata and controls

93 lines (76 loc) · 3.9 KB

image_list

List and filter on Images.

Minimum Required Fields

Field Type Required Description
api_token str Required The Linode account personal access token. It is necessary to run the module.
It can be exposed by the environment variable LINODE_API_TOKEN instead.
See details in Usage.

Examples

- name: List all of the images for the current Linode Account
  linode.cloud.image_list: {}
- name: List the latest 5 images for the current Linode Account
  linode.cloud.image_list:
    count: 5
    order_by: created
    order: desc
- name: Resolve all Alpine Linux images
  linode.cloud.image_list:
    filters:
      - name: vendor
        values: Alpine

Parameters

Field Type Required Description
order str Optional The order to list Images in. (Choices: desc, asc; Default: asc)
order_by str Optional The attribute to order Images by.
filters (sub-options) list Optional A list of filters to apply to the resulting Images.
count int Optional The number of Images 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 fields can be found here.
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

  • images - The returned Images.

    • Sample Response:
      [
         {
            "created":"2021-08-14T22:44:02",
            "created_by":"my-account",
            "deprecated":false,
            "description":"Example Image description.",
            "eol":"2026-07-01T04:00:00",
            "expiry":null,
            "id":"private/123",
            "is_public":false,
            "label":"test",
            "size":2500,
            "status":null,
            "type":"manual",
            "updated":"2021-08-14T22:44:02",
            "vendor":"Debian",
            "tags": ["test"],
            "total_size": 5000,
            "regions": [
              {
                  "region": "us-east",
                  "status": "available"
              },
              {
                  "region": "us-central",
                  "status": "pending"
              }]
             }
      ]
    • See the Linode API response documentation for a list of returned fields