grafana_log_subscriptions
Creates, updates, deletes, gets or lists a grafana_log_subscriptions resource.
Overview​
| Name | grafana_log_subscriptions |
| Type | Resource |
| Id | ovh.public_cloud_analytics.grafana_log_subscriptions |
Fields​
The following fields are returned by SELECT queries:
- get
- list
successful operation
| Name | Datatype | Description |
|---|---|---|
stream_id | string | Identifier of the destination log stream (wire: streamId) |
subscription_id | string (uuid) | Unique identifier of the subscription, used to change or stop the forwarding (wire: subscriptionId) |
service_name | string | Name of the destination log service (wire: serviceName) |
created_at | string (date-time) | Creation date of the subscription (wire: createdAt) |
kind | string | Log kind name of this subscription |
resource | object | Subscribed resource, where the logs come from |
updated_at | string (date-time) | Last update date of the subscription (wire: updatedAt) |
A live forwarding of one kind of log from a service into a Logs Data Platform stream
| Name | Datatype | Description |
|---|---|---|
stream_id | string | Identifier of the destination log stream (wire: streamId) |
subscription_id | string (uuid) | Unique identifier of the subscription, used to change or stop the forwarding (wire: subscriptionId) |
service_name | string | Name of the destination log service (wire: serviceName) |
created_at | string (date-time) | Creation date of the subscription (wire: createdAt) |
kind | string | Log kind name of this subscription |
resource | object | Subscribed resource, where the logs come from |
updated_at | string (date-time) | Last update date of the subscription (wire: updatedAt) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | service_id, subscription_id, project_id | Returns the log kind and the destination stream of a subscription. (Beta version) | |
list | select | service_id, project_id | x_pagination_cursor, x_pagination_size, kind, x_pagination_mode | Returns the identifiers of the Managed Dashboards log subscriptions. Set kind to restrict the list to one log kind. (Beta version) |
create | insert | service_id, project_id, kind, stream_id | Forwards Managed Dashboards logs of one kind to a Logs Data Platform stream. The subscription is created asynchronously and the response returns the operation identifier. (Beta version) | |
delete | delete | service_id, subscription_id, project_id | Deletes the subscription and stops forwarding Managed Dashboards logs to the stream. (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. |
service_id | string (uuid) | Service ID (wire: serviceId) |
subscription_id | string (uuid) | Subscription ID (wire: subscriptionId) |
kind | string | Filter subscriptions by log kind |
x_pagination_cursor | string | Pagination cursor (wire: X-Pagination-Cursor) |
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) |
x_pagination_size | integer | Pagination size (wire: X-Pagination-Size) |
SELECT examples​
- get
- list
Returns the log kind and the destination stream of a subscription. (Beta version)
SELECT
stream_id,
subscription_id,
service_name,
created_at,
kind,
resource,
updated_at
FROM ovh.public_cloud_analytics.grafana_log_subscriptions
WHERE service_id = '{{ service_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND project_id = '{{ project_id }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
;
Returns the identifiers of the Managed Dashboards log subscriptions. Set kind to restrict the list to one log kind. (Beta version)
SELECT
stream_id,
subscription_id,
service_name,
created_at,
kind,
resource,
updated_at
FROM ovh.public_cloud_analytics.grafana_log_subscriptions
WHERE service_id = '{{ service_id }}' -- required
AND project_id = '{{ project_id }}' -- required unless OVH_CLOUD_PROJECT_SERVICE is set
AND x_pagination_cursor = '{{ x_pagination_cursor }}'
AND x_pagination_size = '{{ x_pagination_size }}'
AND kind = '{{ kind }}'
AND x_pagination_mode = '{{ x_pagination_mode }}'
;
INSERT examples​
- create
- Manifest
Forwards Managed Dashboards logs of one kind to a Logs Data Platform stream. The subscription is created asynchronously and the response returns the operation identifier. (Beta version)
INSERT INTO ovh.public_cloud_analytics.grafana_log_subscriptions (
kind,
stream_id,
service_id,
project_id
)
SELECT
'{{ kind }}' /* required */,
'{{ stream_id }}' /* required */,
'{{ service_id }}',
'{{ project_id }}'
RETURNING
operation_id,
service_name
;
# Description fields are for documentation purposes
- name: grafana_log_subscriptions
props:
- name: service_id
value: "{{ service_id }}"
description: Required parameter for the grafana_log_subscriptions resource.
- name: project_id
value: "{{ project_id }}"
description: Required parameter for the grafana_log_subscriptions resource.
- name: kind
value: "{{ kind }}"
description: |
Log kind name to subscribe to
- name: stream_id
value: "{{ stream_id }}"
description: |
Identifier of the customer log stream
DELETE examples​
- delete
Deletes the subscription and stops forwarding Managed Dashboards logs to the stream. (Beta version)
DELETE FROM ovh.public_cloud_analytics.grafana_log_subscriptions
WHERE service_id = '{{ service_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND project_id = '{{ project_id }}' --required unless OVH_CLOUD_PROJECT_SERVICE is set
;