Skip to content

Latest commit

 

History

History
105 lines (89 loc) · 4.42 KB

instance_list.md

File metadata and controls

105 lines (89 loc) · 4.42 KB

instance_list

List and filter on Instances.

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 instances for the current Linode Account
  linode.cloud.instance_list: {}
- name: Resolve all instances for the current Linode Account
  linode.cloud.instance_list:
    filters:
      - name: label
        values: myInstanceLabel

Parameters

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

  • instances - The returned Instances.

    • Sample Response:
      [
         {
            "alerts": {
              "cpu": 180,
              "io": 10000,
              "network_in": 10,
              "network_out": 10,
              "transfer_quota": 80
            },
            "backups": {
              "available": true,
              "enabled": true,
              "last_successful": "2018-01-01T00:01:01",
              "schedule": {
                "day": "Saturday",
                "window": "W22"
              }
            },
            "created": "2018-01-01T00:01:01",
            "group": "Linode-Group",
            "host_uuid": "example-uuid",
            "hypervisor": "kvm",
            "id": 123,
            "image": "linode/debian11",
            "ipv4": [
              "203.0.113.1",
              "192.0.2.1"
            ],
            "ipv6": "c001:d00d::1337/128",
            "label": "linode123",
            "region": "us-east",
            "specs": {
              "disk": 81920,
              "memory": 4096,
              "transfer": 4000,
              "vcpus": 2
            },
            "status": "running",
            "tags": [
              "example tag",
              "another example"
            ],
            "type": "g6-standard-1",
            "updated": "2018-01-01T00:01:01",
            "watchdog_enabled": true,
            "disk_encryption": "enabled",
            "lke_cluster_id": null
          }
      ]
    • See the Linode API response documentation for a list of returned fields