tokens
Creates, updates, deletes, gets or lists a tokens resource.
Overview​
| Name | tokens |
| Type | Resource |
| Id | ovh.dbaas_logs.tokens |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
name | string | Token name |
cluster_id | string (uuid) | Cluster ID (wire: clusterId) |
token_id | string (uuid) | Token ID (wire: tokenId) |
created_at | string (date-time) | Token creation (wire: createdAt) |
updated_at | string (date-time) | Token last update (wire: updatedAt) |
value | string | Token value |
Token
| Name | Datatype | Description |
|---|---|---|
name | string | Token name |
cluster_id | string (uuid) | Cluster ID (wire: clusterId) |
token_id | string (uuid) | Token ID (wire: tokenId) |
created_at | string (date-time) | Token creation (wire: createdAt) |
updated_at | string (date-time) | Token last update (wire: updatedAt) |
value | string | Token value |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | service_name, token_id | Returns the token. (Deprecated, will be removed) | |
list | select | service_name | name_pattern, x_pagination_mode | Returns the tokens of the Logs Data Platform service. (Deprecated, will be removed) |
create | insert | service_name, name | Creates a token on the Logs Data Platform service. (Deprecated, will be removed) | |
delete | delete | service_name, token_id | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
api_host | string | The 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_name | string | Service name (wire: serviceName) |
token_id | string (uuid) | Token ID (wire: tokenId) |
name_pattern | string | Filter by name (like) (wire: namePattern) |
x_pagination_mode | string | Sent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode) |
SELECT examples​
- get
- list
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
;
Returns the tokens of the Logs Data Platform service. (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 name_pattern = '{{ name_pattern }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: tokens
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the tokens resource.
- name: cluster_id
value: "{{ cluster_id }}"
description: |
Cluster ID
- name: name
value: "{{ name }}"
description: |
Token name
DELETE examples​
- delete
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
;