Skip to main content

clickhouse_maintenances

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

Overview​

Nameclickhouse_maintenances
TypeResource
Idovh.public_cloud_analytics.clickhouse_maintenances

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)Unique identifier of the maintenance window
applied_atstring (date-time)Date and time at which the maintenance was applied. Null when not yet applied. (wire: appliedAt)
checksumstringHash of the resource used for concurrency control
descriptionstringHuman-readable description of the maintenance operations to be performed
scheduled_atstring (date-time)Date and time at which the maintenance window is scheduled to start (wire: scheduledAt)
statusstringCurrent status of the maintenance window (APPLIED, APPLYING, ERROR, SCHEDULED)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectmaintenance_id, service_id, project_idReturns the operations planned by a maintenance, its schedule and its status. (Beta version)
listselectservice_id, project_idx_pagination_cursor, x_pagination_sizeReturns the maintenances of the service, with their schedule and status. (Beta version)
createinsertservice_id, project_idApplies a scheduled maintenance immediately, instead of waiting for its scheduled time. (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"}})
maintenance_idstring (uuid)Maintenance ID (wire: maintenanceId)
project_idstringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
service_idstring (uuid)Service ID (wire: serviceId)
x_pagination_cursorstringPagination cursor (wire: X-Pagination-Cursor)
x_pagination_sizeintegerPagination size (wire: X-Pagination-Size)

SELECT examples​

Returns the operations planned by a maintenance, its schedule and its status. (Beta version)

SELECT
id,
applied_at,
checksum,
description,
scheduled_at,
status
FROM ovh.public_cloud_analytics.clickhouse_maintenances
WHERE maintenance_id = '{{ maintenance_id }}' -- required
AND service_id = '{{ service_id }}' -- required
AND project_id = '{{ project_id }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;

INSERT examples​

Applies a scheduled maintenance immediately, instead of waiting for its scheduled time. (Beta version)

INSERT INTO ovh.public_cloud_analytics.clickhouse_maintenances (
service_id,
project_id
)
SELECT
'{{ service_id }}',
'{{ project_id }}'
RETURNING
id,
applied_at,
checksum,
description,
scheduled_at,
status
;