Skip to main content

account_tokens

Creates, updates, deletes, gets or lists an account_tokens resource.

Overview

Nameaccount_tokens
TypeResource
Idcloudflare.accounts.account_tokens

Fields

The following fields are returned by SELECT queries:

List Tokens response

NameDatatypeDescription
idstringToken identifier tag. (example: ed17574386854bf78a67040be0a770b0)
namestringToken name. (example: readonly token)
conditionobject
expires_onstring (date-time)The expiration time on or after which the JWT MUST NOT be accepted for processing. (example: 2020-01-01T00:00:00Z)
issued_onstring (date-time)The time on which the token was created. (example: 2018-07-01T05:20:00Z)
last_used_onstring (date-time)Last time the token was used. (example: 2020-01-02T12:34:00Z)
modified_onstring (date-time)Last time the token was modified. (example: 2018-07-02T05:20:00Z)
not_beforestring (date-time)The time before which the token MUST NOT be accepted for processing. (example: 2018-07-01T05:20:00Z)
policiesarrayList of access policies assigned to the token.
statusstringStatus of the token. (active, disabled, expired) (example: active, x-stainless-terraform-configurability: computed_optional)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectaccount_idpage, per_page, directionList all Account Owned API tokens created for this account.

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.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
directionstring
pagenumber
per_pagenumber

SELECT examples

List all Account Owned API tokens created for this account.

SELECT
id,
name,
condition,
expires_on,
issued_on,
last_used_on,
modified_on,
not_before,
policies,
status
FROM cloudflare.accounts.account_tokens
WHERE account_id = '{{ account_id }}' -- required
AND page = '{{ page }}'
AND per_page = '{{ per_page }}'
AND direction = '{{ direction }}'
;