grafanas
Creates, updates, deletes, gets or lists a grafanas resource.
Overview​
| Name | grafanas |
| Type | Resource |
| Id | ovh.cloud_database.grafanas |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Service ID |
network_id | string (uuid) | Private network ID in which the cluster is (wire: networkId) |
subnet_id | string (uuid) | Private subnet ID in which the cluster is (wire: subnetId) |
backup_time | string (time) | Time on which backups start every day. DEPRECATED: use backups.time (example: 15:04:05) (wire: backupTime) |
backups | object | Information related to the backups, null if the engine does not support backups |
capabilities | object | Capabilities of the services |
category | string | Category of the engine (analysis, operational, streaming) |
created_at | string (date-time) | Date of the creation of the cluster (wire: createdAt) |
description | string | Description of the cluster |
disk | object | Disk attributes of the cluster. DEPRECATED: use storage |
endpoints | array | List of all endpoints of the service |
engine | string | Name of the engine of the service (clickhouse, grafana, kafka, kafkaConnect, kafkaMirrorMaker, mongodb, mysql, opensearch, postgresql, valkey) |
flavor | string | The VM flavor used for this cluster |
ip_restrictions | array | IP Blocks authorized to access to the cluster (wire: ipRestrictions) |
maintenance_time | string (time) | Time on which maintenances can start every day (example: 15:04:05) (wire: maintenanceTime) |
network_type | string | Type of network of the cluster (private, public) (wire: networkType) |
node_number | integer | Number of nodes in the cluster. DEPRECATED: use nodes (wire: nodeNumber) |
nodes | array | Nodes of the cluster |
openstack_region | string | OpenStack region of the cluster (wire: openstackRegion) |
plan | string | Plan of the cluster |
region | string | Region of the cluster |
status | string | Current status of the cluster (CREATING, DELETING, DRAINED, ERROR, LOCKED, LOCKED_PENDING, LOCKED_UPDATING, PENDING, READY, SHELVED, TO_DRAIN, UPDATING) |
storage | object | Storage attributes of the cluster |
version | string | Version of the engine deployed on the cluster |
Cloud database service definition without prometheus enabler
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | Service ID |
network_id | string (uuid) | Private network ID in which the cluster is (wire: networkId) |
subnet_id | string (uuid) | Private subnet ID in which the cluster is (wire: subnetId) |
backup_time | string (time) | Time on which backups start every day. DEPRECATED: use backups.time (example: 15:04:05) (wire: backupTime) |
backups | object | Information related to the backups, null if the engine does not support backups |
capabilities | object | Capabilities of the services |
category | string | Category of the engine (analysis, operational, streaming) |
created_at | string (date-time) | Date of the creation of the cluster (wire: createdAt) |
description | string | Description of the cluster |
disk | object | Disk attributes of the cluster. DEPRECATED: use storage |
endpoints | array | List of all endpoints of the service |
engine | string | Name of the engine of the service (clickhouse, grafana, kafka, kafkaConnect, kafkaMirrorMaker, mongodb, mysql, opensearch, postgresql, valkey) |
flavor | string | The VM flavor used for this cluster |
ip_restrictions | array | IP Blocks authorized to access to the cluster (wire: ipRestrictions) |
maintenance_time | string (time) | Time on which maintenances can start every day (example: 15:04:05) (wire: maintenanceTime) |
network_type | string | Type of network of the cluster (private, public) (wire: networkType) |
node_number | integer | Number of nodes in the cluster. DEPRECATED: use nodes (wire: nodeNumber) |
nodes | array | Nodes of the cluster |
openstack_region | string | OpenStack region of the cluster (wire: openstackRegion) |
plan | string | Plan of the cluster |
region | string | Region of the cluster |
status | string | Current status of the cluster (CREATING, DELETING, DRAINED, ERROR, LOCKED, LOCKED_PENDING, LOCKED_UPDATING, PENDING, READY, SHELVED, TO_DRAIN, UPDATING) |
storage | object | Storage attributes of the cluster |
version | string | Version of the engine deployed on the cluster |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | cluster_id, service_name | Get grafana cluster properties | |
list | select | service_name | x_pagination_mode | List all the grafana of the project |
create | insert | service_name | Create a new grafana cluster | |
update | update | cluster_id, service_name | Update an existing grafana cluster | |
delete | delete | cluster_id, service_name | Delete a grafana cluster | |
log_url | exec | clusterId, service_name, kind | Generates 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.
| 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) |
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 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
;
List all the grafana of the project
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 service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: grafanas
props:
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the grafanas resource.
- name: backup
description: |
Backup from which the new service is created. DEPRECATED: use forkFrom
value:
id: "{{ id }}"
pointInTime: "{{ pointInTime }}"
serviceId: "{{ serviceId }}"
- name: backup_time
value: "{{ backup_time }}"
description: |
Time on which backups start every day. DEPRECATED: use backups.time
- name: backups
description: |
Information related to the backups, null if the engine does not support backups
value:
pitr: "{{ pitr }}"
regions:
- "{{ regions }}"
retentionDays: {{ retentionDays }}
time: "{{ time }}"
- name: description
value: "{{ description }}"
description: |
Description of the cluster
- name: disk
description: |
Disk attributes of the cluster
value:
size: {{ size }}
type: "{{ type }}"
- name: fork_from
description: |
Backup from which the new service is created
value:
backupId: "{{ backupId }}"
pointInTime: "{{ pointInTime }}"
serviceId: "{{ serviceId }}"
- name: ip_restrictions
description: |
IP Blocks authorized to access to the cluster
value:
- description: "{{ description }}"
ip: "{{ ip }}"
status: "{{ status }}"
- name: maintenance_time
value: "{{ maintenance_time }}"
description: |
Time on which maintenances can start every day
- name: network_id
value: "{{ network_id }}"
description: |
Private network ID in which the cluster is
- name: nodes_list
description: |
List of nodes in the cluster, not compatible with nodesPattern
value:
- createdAt: "{{ createdAt }}"
flavor: "{{ flavor }}"
id: "{{ id }}"
name: "{{ name }}"
port: {{ port }}
region: "{{ region }}"
role: "{{ role }}"
status: "{{ status }}"
- name: nodes_pattern
description: |
Pattern definition of the nodes in the cluster, not compatible with nodesList
value:
flavor: "{{ flavor }}"
number: {{ number }}
region: "{{ region }}"
- name: plan
value: "{{ plan }}"
description: |
Plan of the cluster
- name: subnet_id
value: "{{ subnet_id }}"
description: |
Private subnet ID in which the cluster is
- name: version
value: "{{ version }}"
description: |
Version of the engine deployed on the cluster
UPDATE examples​
- update
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
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.
- log_url
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 }}"
}'
;