tags
Creates, updates, deletes, gets or lists a tags resource.
Overview​
| Name | tags |
| Type | Resource |
| Id | ovh.me.tags |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
creation_date | string (date-time) | Creation date (wire: creationDate) |
customer_code | string | Customer code (wire: customerCode) |
expiration_date | string (date-time) | Expiration date (wire: expirationDate) |
extra | object | Extra data |
last_update | string (date-time) | Last update (wire: lastUpdate) |
status | string | Tag Status (CREATED, CREATING, DELETED, DELETING, ERROR, MODERATING, REFUSED, REFUSING, REVOCATING, WAIT_MODERATION, WAIT_REVOCATION) |
tag | string | Tag name |
Tag
| Name | Datatype | Description |
|---|---|---|
creation_date | string (date-time) | Creation date (wire: creationDate) |
customer_code | string | Customer code (wire: customerCode) |
expiration_date | string (date-time) | Expiration date (wire: expirationDate) |
extra | object | Extra data |
last_update | string (date-time) | Last update (wire: lastUpdate) |
status | string | Tag Status (CREATED, CREATING, DELETED, DELETING, ERROR, MODERATING, REFUSED, REFUSING, REVOCATING, WAIT_MODERATION, WAIT_REVOCATION) |
tag | string | Tag name |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | tag | Retrieve a customer tag (Beta version) | |
list | select | x_pagination_mode | Retrieve customer tags list (Beta version) | |
create | insert | tag_name | Activate customer tag (Beta version) | |
delete | delete | tag | Delete a customer tag (Beta version) |
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"}}) |
tag | string | Tag |
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
Retrieve a customer tag (Beta version)
SELECT
creation_date,
customer_code,
expiration_date,
extra,
last_update,
status,
tag
FROM ovh.me.tags
WHERE tag = '{{ tag }}' -- required
;
Retrieve customer tags list (Beta version)
SELECT
creation_date,
customer_code,
expiration_date,
extra,
last_update,
status,
tag
FROM ovh.me.tags
WHERE x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Activate customer tag (Beta version)
INSERT INTO ovh.me.tags (
reason,
tag_name
)
SELECT
'{{ reason }}',
'{{ tag_name }}' /* required */
RETURNING
creation_date,
customer_code,
expiration_date,
extra,
last_update,
status,
tag
;
# Description fields are for documentation purposes
- name: tags
props:
- name: reason
value: "{{ reason }}"
description: |
Reason
- name: tag_name
value: "{{ tag_name }}"
description: |
Tag name
DELETE examples​
- delete
Delete a customer tag (Beta version)
DELETE FROM ovh.me.tags
WHERE tag = '{{ tag }}' --required
;