Skip to main content

grafanas

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

Overview​

Namegrafanas
TypeResource
Idovh.public_cloud_analytics.grafanas

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)Unique identifier of the service
checksumstringHash of the resource used for concurrency control
created_atstring (date-time)Date at which the service was created (wire: createdAt)
current_stateobjectCurrent configuration deployed on the service (wire: currentState)
current_tasksarrayAsynchronous operations currently running on the service (wire: currentTasks)
resource_statusstringReadiness status of the service. A new target specification is accepted only in READY status. (CREATING, CREATION_PLANNED, DELETING, ERROR, OUT_OF_SYNC, READY, SUSPENDED, UNKNOWN, UPDATING) (wire: resourceStatus)
target_specobjectLast requested target specification for the service (wire: targetSpec)
updated_atstring (date-time)Date of the last update to the service (wire: updatedAt)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectservice_id, project_idReturns the target specification of the service, its current state and its running tasks. (Beta version)
listselectproject_idx_pagination_cursor, x_pagination_sizeReturns the Grafana services of the project. (Beta version)
createinsertproject_id, target_specCreates a Grafana service from a plan, a flavor and an engine version. Creation is asynchronous: follow resourceStatus until READY. Set forkSourceServiceId to create it from a backup of another service. (Beta version)
updateupdateservice_id, project_id, target_specPartially updates the target specification of the service, for example its plan, flavor, version or number of nodes. Omitted fields keep their current value. A new target specification is accepted only in READY status. (Beta version)
deletedeleteservice_id, project_idDeletes the service. A service with deletion protection enabled cannot be deleted. (Beta version)
replaceexecserviceId, project_id, targetSpecUpdates the target specification of the service, for example its plan, flavor, version or number of nodes. Every field is required: the request describes the whole configuration. A new target specification is accepted only in READY status. (Beta version)
log_urlexecserviceId, project_id, kindGenerates a temporary URL to read the logs of one kind. The URL expires. (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"}})
project_idstringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
serviceIdstring (uuid)Service ID
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 target specification of the service, its current state and its running tasks. (Beta version)

SELECT
id,
checksum,
created_at,
current_state,
current_tasks,
resource_status,
target_spec,
updated_at
FROM ovh.public_cloud_analytics.grafanas
WHERE service_id = '{{ service_id }}' -- required
AND project_id = '{{ project_id }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;

INSERT examples​

Creates a Grafana service from a plan, a flavor and an engine version. Creation is asynchronous: follow resourceStatus until READY. Set forkSourceServiceId to create it from a backup of another service. (Beta version)

INSERT INTO ovh.public_cloud_analytics.grafanas (
target_spec,
project_id
)
SELECT
'{{ target_spec }}' /* required */,
'{{ project_id }}'
RETURNING
id,
checksum,
created_at,
current_state,
current_tasks,
resource_status,
target_spec,
updated_at
;

UPDATE examples​

Partially updates the target specification of the service, for example its plan, flavor, version or number of nodes. Omitted fields keep their current value. A new target specification is accepted only in READY status. (Beta version)

UPDATE ovh.public_cloud_analytics.grafanas
SET
target_spec = '{{ target_spec }}'
WHERE
service_id = '{{ service_id }}' --required
AND project_id = '{{ project_id }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
AND target_spec = '{{ target_spec }}' --required
RETURNING
id,
checksum,
created_at,
current_state,
current_tasks,
resource_status,
target_spec,
updated_at;

DELETE examples​

Deletes the service. A service with deletion protection enabled cannot be deleted. (Beta version)

DELETE FROM ovh.public_cloud_analytics.grafanas
WHERE service_id = '{{ service_id }}' --required
AND project_id = '{{ project_id }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Updates the target specification of the service, for example its plan, flavor, version or number of nodes. Every field is required: the request describes the whole configuration. A new target specification is accepted only in READY status. (Beta version)

EXEC ovh.public_cloud_analytics.grafanas.replace
@serviceId='{{ serviceId }}' --required,
@project_id='{{ project_id }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
@@json=
'{
"targetSpec": "{{ targetSpec }}"
}'
;