Skip to main content

tokens

Creates, updates, deletes, gets or lists a tokens resource.

Overview​

Nametokens
TypeResource
Idovh.dbaas_logs.tokens

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
namestringToken name
cluster_idstring (uuid)Cluster ID (wire: clusterId)
token_idstring (uuid)Token ID (wire: tokenId)
created_atstring (date-time)Token creation (wire: createdAt)
updated_atstring (date-time)Token last update (wire: updatedAt)
valuestringToken value

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectservice_name, token_idReturns the token. (Deprecated, will be removed)
listselectservice_namename_pattern, x_pagination_modeReturns the tokens of the Logs Data Platform service. (Deprecated, will be removed)
createinsertservice_name, nameCreates a token on the Logs Data Platform service. (Deprecated, will be removed)
deletedeleteservice_name, token_idDeletes the token. (Deprecated, will be removed)

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
api_hoststringThe OVHcloud API host. Selected by OVH_ENDPOINT (ovh-eu, ovh-ca or ovh-us; default ovh-eu). (default: api.eu.ovhcloud.com, x-stackQL-envVarSelector: {"envVar":"OVH_ENDPOINT","default":"ovh-eu","values":{"ovh-eu":"api.eu.ovhcloud.com","ovh-ca":"api.ca.ovhcloud.com","ovh-us":"api.us.ovhcloud.com"}})
service_namestringService name (wire: serviceName)
token_idstring (uuid)Token ID (wire: tokenId)
name_patternstringFilter by name (like) (wire: namePattern)
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Returns the token. (Deprecated, will be removed)

SELECT
name,
cluster_id,
token_id,
created_at,
updated_at,
value
FROM ovh.dbaas_logs.tokens
WHERE service_name = '{{ service_name }}' -- required
AND token_id = '{{ token_id }}' -- required
;

INSERT examples​

Creates a token on the Logs Data Platform service. (Deprecated, will be removed)

INSERT INTO ovh.dbaas_logs.tokens (
cluster_id,
name,
service_name
)
SELECT
'{{ cluster_id }}',
'{{ name }}' /* required */,
'{{ service_name }}'
RETURNING
alias_id,
dashboard_id,
encryption_key_id,
index_id,
input_id,
operation_id,
osd_id,
role_id,
stream_id,
subscription_id,
tenant_id,
token_id,
service_name,
created_at,
state,
updated_at
;

DELETE examples​

Deletes the token. (Deprecated, will be removed)

DELETE FROM ovh.dbaas_logs.tokens
WHERE service_name = '{{ service_name }}' --required
AND token_id = '{{ token_id }}' --required
;