List and filter on Linode Instances.
- 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
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 results to return. If undefined, all results will be returned. |
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/linode-instances/#linodes-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. |
-
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/debian10", "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 } ]
- See the Linode API response documentation for a list of returned fields
- Sample Response: