Skip to main content

grafana_integrations

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

Overview​

Namegrafana_integrations
TypeResource
Idovh.cloud_database.grafana_integrations

Fields​

The following fields are returned by SELECT queries:

successful operation

NameDatatypeDescription
idstring (uuid)Service ID
destination_service_idstring (uuid)ID of the destination service (wire: destinationServiceId)
source_service_idstring (uuid)ID of the source service (wire: sourceServiceId)
parametersobjectParameters for the integration
statusstringCurrent status of the integration (READY)
typestringType of the integration (grafanaDashboard, grafanaDatasource, kafkaConnect, kafkaLogs, kafkaMirrorMaker, opensearchLogs, postgresqlMetrics)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectcluster_id, integration_id, service_nameGet an integration
listselectcluster_id, service_namex_pagination_modeList integrations
createinsertcluster_id, service_name, destination_service_id, source_service_idCreate a new integration
deletedeletecluster_id, integration_id, service_nameDelete an integration

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"}})
cluster_idstring (uuid)Cluster ID (wire: clusterId)
integration_idstring (uuid)Integration ID (wire: integrationId)
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 an integration

SELECT
id,
destination_service_id,
source_service_id,
parameters,
status,
type
FROM ovh.cloud_database.grafana_integrations
WHERE cluster_id = '{{ cluster_id }}' -- required
AND integration_id = '{{ integration_id }}' -- required
AND service_name = '{{ service_name }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;

INSERT examples​

Create a new integration

INSERT INTO ovh.cloud_database.grafana_integrations (
destination_service_id,
parameters,
source_service_id,
type,
cluster_id,
service_name
)
SELECT
'{{ destination_service_id }}' /* required */,
'{{ parameters }}',
'{{ source_service_id }}' /* required */,
'{{ type }}',
'{{ cluster_id }}',
'{{ service_name }}'
RETURNING
id,
destination_service_id,
source_service_id,
parameters,
status,
type
;

DELETE examples​

Delete an integration

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