Skip to content

Latest commit

 

History

History
76 lines (59 loc) · 3.33 KB

File metadata and controls

76 lines (59 loc) · 3.33 KB

lock_list

List and filter on Locks.

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 locks for the current account
  linode.cloud.lock_list: {}
- name: List all locks with a specific lock type
  linode.cloud.lock_list:
    filters:
      - name: lock_type
        values: cannot_delete
- name: List all locks for a specific entity type
  linode.cloud.lock_list:
    filters:
      - name: entity.type
        values: linode

Parameters

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

  • locks - The returned Locks.

    • Sample Response:
      [
        {
          "id": 1,
          "lock_type": "cannot_delete_with_subresources",
          "entity": {
            "id": 290349,
            "type": "linode",
            "label": "linode290349",
            "url": "/v4/linode/instances/290349"
          }
        }
      ]
    • See the Linode API response documentation for a list of returned fields