Skip to content

Latest commit

 

History

History
69 lines (53 loc) · 2.62 KB

token.md

File metadata and controls

69 lines (53 loc) · 2.62 KB

token

Manage a Linode Token.

NOTE: The full Personal Access Token is only returned when a new token has been created.

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: Create a simple token 
  linode.cloud.token:
    label: my-token
    state: present
- name: Create a token with expiry date and scopes 
  linode.cloud.token:
    label: my-token
    expiry: 2022-07-09T16:59:26
    scope: '*'
    state: present
- name: Delete a token
  linode.cloud.token:
    label: my-token
    state: absent

Parameters

Field Type Required Description
label str Required This token's unique label.
state str Required The state of this token. (Choices: present, absent)
expiry str Optional When this token should be valid until.
scopes str Optional The OAuth scopes to create the token with.

Return Values

  • token - The token in JSON serialized form.

    • Sample Response:
      {
        "created": "2018-01-01T00:01:01",
        "expiry": "2018-01-01T13:46:32",
        "id": 123,
        "label": "linode-cli",
        "scopes": "*",
        "token": "abcdefghijklmnop"
      }
    • See the Linode API response documentation for a list of returned fields