postgresql_prometheuses
Creates, updates, deletes, gets or lists a postgresql_prometheuses resource.
Overview​
| Name | postgresql_prometheuses |
| Type | Resource |
| Id | ovh.public_cloud_database.postgresql_prometheuses |
Fields​
The following fields are returned by SELECT queries:
- get
successful operation
| Name | Datatype | Description |
|---|---|---|
targets | array | Scraping targets |
username | string | Username for Prometheus authentication |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | service_id, project_id | Returns the scraping targets and the username for Prometheus authentication. The password is returned only by a credentials reset. (Beta version) | |
credentials_reset | exec | serviceId, project_id | Resets the Prometheus password. The previous password stops working immediately and the new credentials are returned in the response. (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.
| 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"}}) |
project_id | string | The Public Cloud project ID. Resolved from OVH_CLOUD_PROJECT_SERVICE when set. |
serviceId | string (uuid) | Service ID |
service_id | string (uuid) | Service ID (wire: serviceId) |
SELECT examples​
- get
Returns the scraping targets and the username for Prometheus authentication. The password is returned only by a credentials reset. (Beta version)
SELECT
targets,
username
FROM ovh.public_cloud_database.postgresql_prometheuses
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.
- credentials_reset
Resets the Prometheus password. The previous password stops working immediately and the new credentials are returned in the response. (Beta version)
EXEC ovh.public_cloud_database.postgresql_prometheuses.credentials_reset
@serviceId='{{ serviceId }}' --required,
@project_id='{{ project_id }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;