Skip to main content

resources

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

Overview​

Nameresources
TypeResource
Idovh.managed_cms.resources

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)Unique identifier of the service
checksumstringComputed hash used to control concurrent modification requests. Here, it represents the current target specification value.
current_stateobjectCurrent state of the service (wire: currentState)
current_tasksarrayOngoing asynchronous tasks related to the service (wire: currentTasks)
iamobjectIAM resource metadata
resource_statusstringService readiness in the system (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_idReturns the plan, dashboard URLs and disk, visits and websites quotas of the service, with its running tasks. (Alpha version)
listselectx_pagination_cursor, x_pagination_size, iam_tagsReturns the Managed CMS services of the account. (Alpha version)
updateupdateservice_idUpdates the service. Set flushCDNDate to a new date to flush the CDN of all its websites. (Alpha version)
dashboard_application_passwordexecserviceId, cmsEach call creates a new application password on the existing administrator user. The previous ones stay valid. They can be revoked from the CMS administration. (Beta version)
flush_cdnexecserviceIdFlushes the CDN cache of all the websites of the service and returns the task. Fails if a task is already running on the service. (Alpha version)
log_urlexecserviceId, kindGenerates a temporary URL to read the logs of one kind. Returns the URL and its expiration date. (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.

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​

Returns the plan, dashboard URLs and disk, visits and websites quotas of the service, with its running tasks. (Alpha version)

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

UPDATE examples​

Updates the service. Set flushCDNDate to a new date to flush the CDN of all its websites. (Alpha version)

UPDATE ovh.managed_cms.resources
SET
target_spec = '{{ target_spec }}'
WHERE
service_id = '{{ service_id }}' --required
RETURNING
id,
checksum,
current_state,
current_tasks,
resource_status;

Lifecycle Methods​

EXEC variables use wire (API) names.

Each call creates a new application password on the existing administrator user. The previous ones stay valid. They can be revoked from the CMS administration. (Beta version)

EXEC ovh.managed_cms.resources.dashboard_application_password
@serviceId='{{ serviceId }}' --required
@@json=
'{
"cms": "{{ cms }}"
}'
;