Skip to main content

grafanas

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

Overview​

Namegrafanas
TypeResource
Idovh.cloud_database.grafanas

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)Service ID
network_idstring (uuid)Private network ID in which the cluster is (wire: networkId)
subnet_idstring (uuid)Private subnet ID in which the cluster is (wire: subnetId)
backup_timestring (time)Time on which backups start every day. DEPRECATED: use backups.time (example: 15:04:05) (wire: backupTime)
backupsobjectInformation related to the backups, null if the engine does not support backups
capabilitiesobjectCapabilities of the services
categorystringCategory of the engine (analysis, operational, streaming)
created_atstring (date-time)Date of the creation of the cluster (wire: createdAt)
descriptionstringDescription of the cluster
diskobjectDisk attributes of the cluster. DEPRECATED: use storage
endpointsarrayList of all endpoints of the service
enginestringName of the engine of the service (clickhouse, grafana, kafka, kafkaConnect, kafkaMirrorMaker, mongodb, mysql, opensearch, postgresql, valkey)
flavorstringThe VM flavor used for this cluster
ip_restrictionsarrayIP Blocks authorized to access to the cluster (wire: ipRestrictions)
maintenance_timestring (time)Time on which maintenances can start every day (example: 15:04:05) (wire: maintenanceTime)
network_typestringType of network of the cluster (private, public) (wire: networkType)
node_numberintegerNumber of nodes in the cluster. DEPRECATED: use nodes (wire: nodeNumber)
nodesarrayNodes of the cluster
openstack_regionstringOpenStack region of the cluster (wire: openstackRegion)
planstringPlan of the cluster
regionstringRegion of the cluster
statusstringCurrent status of the cluster (CREATING, DELETING, DRAINED, ERROR, LOCKED, LOCKED_PENDING, LOCKED_UPDATING, PENDING, READY, SHELVED, TO_DRAIN, UPDATING)
storageobjectStorage attributes of the cluster
versionstringVersion of the engine deployed on the cluster

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectcluster_id, service_nameGet grafana cluster properties
listselectservice_namex_pagination_modeList all the grafana of the project
createinsertservice_nameCreate a new grafana cluster
updateupdatecluster_id, service_nameUpdate an existing grafana cluster
deletedeletecluster_id, service_nameDelete a grafana cluster
log_urlexecclusterId, service_name, kindGenerates a temporary URL to read the logs of one kind. The URL expires.

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"}})
clusterIdstring (uuid)Cluster ID
cluster_idstring (uuid)Cluster ID (wire: clusterId)
service_namestringThe Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set.
x_pagination_modestringSent as CachedObjectList-Pages by default so the list returns the full objects rather than their identifiers. (wire: X-Pagination-Mode)

SELECT examples​

Get grafana cluster properties

SELECT
id,
network_id,
subnet_id,
backup_time,
backups,
capabilities,
category,
created_at,
description,
disk,
endpoints,
engine,
flavor,
ip_restrictions,
maintenance_time,
network_type,
node_number,
nodes,
openstack_region,
plan,
region,
status,
storage,
version
FROM ovh.cloud_database.grafanas
WHERE cluster_id = '{{ cluster_id }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;

INSERT examples​

Create a new grafana cluster

INSERT INTO ovh.cloud_database.grafanas (
backup,
backup_time,
backups,
description,
disk,
fork_from,
ip_restrictions,
maintenance_time,
network_id,
nodes_list,
nodes_pattern,
plan,
subnet_id,
version,
service_name
)
SELECT
'{{ backup }}',
'{{ backup_time }}',
'{{ backups }}',
'{{ description }}',
'{{ disk }}',
'{{ fork_from }}',
'{{ ip_restrictions }}',
'{{ maintenance_time }}',
'{{ network_id }}',
'{{ nodes_list }}',
'{{ nodes_pattern }}',
'{{ plan }}',
'{{ subnet_id }}',
'{{ version }}',
'{{ service_name }}'
RETURNING
id,
network_id,
subnet_id,
backup_time,
backups,
capabilities,
category,
created_at,
description,
disk,
endpoints,
engine,
flavor,
ip_restrictions,
maintenance_time,
network_type,
node_number,
nodes,
openstack_region,
plan,
region,
status,
storage,
version
;

UPDATE examples​

Update an existing grafana cluster

UPDATE ovh.cloud_database.grafanas
SET
backup_time = '{{ backup_time }}',
backups = '{{ backups }}',
description = '{{ description }}',
disk = '{{ disk }}',
flavor = '{{ flavor }}',
ip_restrictions = '{{ ip_restrictions }}',
maintenance_time = '{{ maintenance_time }}',
network_id = '{{ network_id }}',
node_number = {{ node_number }},
plan = '{{ plan }}',
region = '{{ region }}',
storage = '{{ storage }}',
subnet_id = '{{ subnet_id }}',
version = '{{ version }}'
WHERE
cluster_id = '{{ cluster_id }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
RETURNING
id,
network_id,
subnet_id,
backup_time,
backups,
capabilities,
category,
created_at,
description,
disk,
endpoints,
engine,
flavor,
ip_restrictions,
maintenance_time,
network_type,
node_number,
nodes,
openstack_region,
plan,
region,
status,
storage,
version;

DELETE examples​

Delete a grafana cluster

DELETE FROM ovh.cloud_database.grafanas
WHERE cluster_id = '{{ cluster_id }}' --required
AND service_name = '{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;

Lifecycle Methods​

EXEC variables use wire (API) names.

Generates a temporary URL to read the logs of one kind. The URL expires.

EXEC ovh.cloud_database.grafanas.log_url
@clusterId='{{ clusterId }}' --required,
@service_name='{{ service_name }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
@@json=
'{
"kind": "{{ kind }}"
}'
;