user_tokens
Creates, updates, deletes, gets or lists a user_tokens resource.
Overview
| Name | user_tokens |
| Type | Resource |
| Id | cloudflare.user.user_tokens |
Fields
The following fields are returned by SELECT queries:
- list
List Tokens response
| Name | Datatype | Description |
|---|---|---|
id | string | Token identifier tag. (example: ed17574386854bf78a67040be0a770b0) |
name | string | Token name. (example: readonly token) |
condition | object | |
expires_on | string (date-time) | The expiration time on or after which the JWT MUST NOT be accepted for processing. (example: 2020-01-01T00:00:00Z) |
issued_on | string (date-time) | The time on which the token was created. (example: 2018-07-01T05:20:00Z) |
last_used_on | string (date-time) | Last time the token was used. (example: 2020-01-02T12:34:00Z) |
modified_on | string (date-time) | Last time the token was modified. (example: 2018-07-02T05:20:00Z) |
not_before | string (date-time) | The time before which the token MUST NOT be accepted for processing. (example: 2018-07-01T05:20:00Z) |
policies | array | List of access policies assigned to the token. |
status | string | Status of the token. (active, disabled, expired) (example: active, x-stainless-terraform-configurability: computed_optional) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | page, per_page, direction | List all access tokens you created. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
direction | string | |
page | number | |
per_page | number |
SELECT examples
- list
List all access tokens you created.
SELECT
id,
name,
condition,
expires_on,
issued_on,
last_used_on,
modified_on,
not_before,
policies,
status
FROM cloudflare.user.user_tokens
WHERE page = '{{ page }}'
AND per_page = '{{ per_page }}'
AND direction = '{{ direction }}'
;