sinks
Creates, updates, deletes, gets or lists a sinks
resource.
Overview
Name | sinks |
Type | Resource |
Id | digitalocean.monitoring.sinks |
Fields
The following fields are returned by SELECT
queries:
- monitoring_get_sink
- monitoring_list_sinks
The response is a JSON object with a sink
key.
Name | Datatype | Description |
---|---|---|
destination | object | |
resources | array | List of resources identified by their URNs. |
The response is a JSON object with a sinks
key.
Name | Datatype | Description |
---|---|---|
destination | object | |
resources | array | List of resources identified by their URNs. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
monitoring_get_sink | select | sink_uuid | To get the details of a sink (resources and destination), send a GET request to /v2/monitoring/sinks/${sink_uuid} . | |
monitoring_list_sinks | select | resource_id | To list all sinks, send a GET request to /v2/monitoring/sinks . | |
monitoring_create_sink | insert | To create a new sink, send a POST request to /v2/monitoring/sinks . Forwards logs from the resources identified in resources to the specified pre-existing destination. | ||
monitoring_delete_sink | delete | sink_uuid | To delete a sink, send a DELETE request to /v2/monitoring/sinks/${sink_uuid} . |
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 |
---|---|---|
sink_uuid | string | A unique identifier for a sink. (example: 78b172b6-52c3-4a4b-96d5-78d3f1a0b18c) |
resource_id | string | A unique URN for a resource. |
SELECT
examples
- monitoring_get_sink
- monitoring_list_sinks
To get the details of a sink (resources and destination), send a GET request to /v2/monitoring/sinks/${sink_uuid}
.
SELECT
destination,
resources
FROM digitalocean.monitoring.sinks
WHERE sink_uuid = '{{ sink_uuid }}' -- required;
To list all sinks, send a GET request to /v2/monitoring/sinks
.
SELECT
destination,
resources
FROM digitalocean.monitoring.sinks
WHERE resource_id = '{{ resource_id }}';
INSERT
examples
- monitoring_create_sink
- Manifest
To create a new sink, send a POST request to /v2/monitoring/sinks
. Forwards logs from the
resources identified in resources
to the specified pre-existing destination.
INSERT INTO digitalocean.monitoring.sinks (
data__destination_uuid,
data__resources
)
SELECT
'{{ destination_uuid }}',
'{{ resources }}'
;
# Description fields are for documentation purposes
- name: sinks
props:
- name: destination_uuid
value: string
description: >
A unique identifier for an already-existing destination.
- name: resources
value: array
description: >
List of resources identified by their URNs.
DELETE
examples
- monitoring_delete_sink
To delete a sink, send a DELETE request to /v2/monitoring/sinks/${sink_uuid}
.
DELETE FROM digitalocean.monitoring.sinks
WHERE sink_uuid = '{{ sink_uuid }}' --required;