Skip to main content

sinks

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

Overview

Namesinks
TypeResource
Iddigitalocean.monitoring.sinks

Fields

NameDatatypeDescription
column_anon``

Methods

NameAccessible byRequired ParamsDescription
monitoring_get_sinkSELECTsink_uuidTo get the details of a sink (resources and destination), send a GET request to /v2/monitoring/sinks/${sink_uuid}.
monitoring_list_sinksSELECTTo list all sinks, send a GET request to /v2/monitoring/sinks.
monitoring_create_sinkINSERTTo 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_sinkDELETEsink_uuidTo delete a sink, send a DELETE request to /v2/monitoring/sinks/${sink_uuid}.

SELECT examples

To list all sinks, send a GET request to /v2/monitoring/sinks.

SELECT
column_anon
FROM digitalocean.monitoring.sinks
;

INSERT example

Use the following StackQL query and manifest file to create a new sinks resource.

/*+ create */
INSERT INTO digitalocean.monitoring.sinks (
data__destination_uuid,
data__resources
)
SELECT
'{{ destination_uuid }}',
'{{ resources }}'
;

DELETE example

Deletes the specified sinks resource.

/*+ delete */
DELETE FROM digitalocean.monitoring.sinks
WHERE sink_uuid = '{{ sink_uuid }}';