Skip to main content

logsinks

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

Overview

Namelogsinks
TypeResource
Iddigitalocean.databases.logsinks

Fields

NameDatatypeDescription
column_anon``

Methods

NameAccessible byRequired ParamsDescription
databases_get_logsinkSELECTdatabase_cluster_uuid, logsink_idTo get a logsink for a database cluster, send a GET request to /v2/databases/$DATABASE_ID/logsink/$LOGSINK_ID.
databases_list_logsinkSELECTdatabase_cluster_uuidTo list logsinks for a database cluster, send a GET request to /v2/databases/$DATABASE_ID/logsink.
databases_create_logsinkINSERTdatabase_cluster_uuidTo create logsink for a database cluster, send a POST request to /v2/databases/$DATABASE_ID/logsink.
databases_delete_logsinkDELETEdatabase_cluster_uuid, logsink_idTo delete a logsink for a database cluster, send a DELETE request to /v2/databases/$DATABASE_ID/logsink/$LOGSINK_ID.
databases_update_logsinkEXECdatabase_cluster_uuid, logsink_id, data__configTo update a logsink for a database cluster, send a PUT request to /v2/databases/$DATABASE_ID/logsink/$LOGSINK_ID.

SELECT examples

To list logsinks for a database cluster, send a GET request to /v2/databases/$DATABASE_ID/logsink.

SELECT
column_anon
FROM digitalocean.databases.logsinks
WHERE database_cluster_uuid = '{{ database_cluster_uuid }}';

INSERT example

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

/*+ create */
INSERT INTO digitalocean.databases.logsinks (
data__sink_name,
data__sink_type,
data__config,
database_cluster_uuid
)
SELECT
'{{ sink_name }}',
'{{ sink_type }}',
'{{ config }}',
'{{ database_cluster_uuid }}'
;

DELETE example

Deletes the specified logsinks resource.

/*+ delete */
DELETE FROM digitalocean.databases.logsinks
WHERE database_cluster_uuid = '{{ database_cluster_uuid }}'
AND logsink_id = '{{ logsink_id }}';