clickhouse_maintenances
Creates, updates, deletes, gets or lists a clickhouse_maintenances resource.
Overview​
| Name | clickhouse_maintenances |
| Type | Resource |
| Id | ovh.cloud_database.clickhouse_maintenances |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | ID of the maintenance |
applied_at | string (date-time) | Date of the application of the maintenance (wire: appliedAt) |
description | string | Description of the maintenance |
scheduled_at | string (date-time) | Date of the planification of the maintenance (wire: scheduledAt) |
status | string | Status of the maintenance (APPLIED, APPLYING, ERROR, PENDING, SCHEDULED) |
Cloud database service maintenance definition
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | ID of the maintenance |
applied_at | string (date-time) | Date of the application of the maintenance (wire: appliedAt) |
description | string | Description of the maintenance |
scheduled_at | string (date-time) | Date of the planification of the maintenance (wire: scheduledAt) |
status | string | Status of the maintenance (APPLIED, APPLYING, ERROR, PENDING, SCHEDULED) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | cluster_id, maintenance_id, service_name | Get the maintenance for the clickhouse cluster | |
list | select | cluster_id, service_name | x_pagination_mode | List maintenances for the clickhouse cluster |
apply | exec | clusterId, maintenanceId, service_name | Apply the maintenance |
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"}}) |
clusterId | string (uuid) | Cluster ID |
cluster_id | string (uuid) | Cluster ID (wire: clusterId) |
maintenanceId | string (uuid) | Maintenance ID |
maintenance_id | string (uuid) | Maintenance ID (wire: maintenanceId) |
service_name | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
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
Get the maintenance for the clickhouse cluster
SELECT
id,
applied_at,
description,
scheduled_at,
status
FROM ovh.cloud_database.clickhouse_maintenances
WHERE cluster_id = '{{ cluster_id }}' -- required
AND maintenance_id = '{{ maintenance_id }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;
List maintenances for the clickhouse cluster
SELECT
id,
applied_at,
description,
scheduled_at,
status
FROM ovh.cloud_database.clickhouse_maintenances
WHERE cluster_id = '{{ cluster_id }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
Lifecycle Methods​
EXEC variables use wire (API) names.
- apply
Apply the maintenance
EXEC ovh.cloud_database.clickhouse_maintenances.apply
@clusterId='{{ clusterId }}' --required,
@maintenanceId='{{ maintenanceId }}' --required,
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;