Skip to main content

resources

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

Overview​

Nameresources
TypeResource
Idovh.videocenter.resources

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)Unique identifier of the service
current_stateobjectWhat the service currently holds and how much of its offer is used (wire: currentState)
iamobjectIAM resource metadata
resource_statusstringWhether the service is ready to use, still being set up, or in error (CREATING, CREATION_PLANNED, DELETING, ERROR, OUT_OF_SYNC, READY, SUSPENDED, UNKNOWN, UPDATING) (wire: resourceStatus)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectservice_idGet a service (Alpha version)
listselectx_pagination_cursor, x_pagination_size, iam_tagsGet all services (Alpha version)
auth_tokenexecserviceId, languageGenerate an Auth Token (Alpha 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.

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"}})
serviceIdstring (uuid)Service ID
service_idstring (uuid)Service ID (wire: serviceId)
iam_tagsobjectFilter resources on IAM tags (wire: iamTags)
x_pagination_cursorstringPagination cursor (wire: X-Pagination-Cursor)
x_pagination_sizeintegerPagination size (wire: X-Pagination-Size)

SELECT examples​

Get a service (Alpha version)

SELECT
id,
current_state,
iam,
resource_status
FROM ovh.videocenter.resources
WHERE service_id = '{{ service_id }}' -- required
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Generate an Auth Token (Alpha version)

EXEC ovh.videocenter.resources.auth_token
@serviceId='{{ serviceId }}' --required
@@json=
'{
"language": "{{ language }}"
}'
;