logsinks
Creates, updates, deletes, gets or lists a logsinks
resource.
Overview
Name | logsinks |
Type | Resource |
Id | digitalocean.databases.logsinks |
Fields
Name | Datatype | Description |
---|---|---|
column_anon | `` |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
databases_get_logsink | SELECT | database_cluster_uuid, logsink_id | To get a logsink for a database cluster, send a GET request to /v2/databases/$DATABASE_ID/logsink/$LOGSINK_ID . |
databases_list_logsink | SELECT | database_cluster_uuid | To list logsinks for a database cluster, send a GET request to /v2/databases/$DATABASE_ID/logsink . |
databases_create_logsink | INSERT | database_cluster_uuid | To create logsink for a database cluster, send a POST request to /v2/databases/$DATABASE_ID/logsink . |
databases_delete_logsink | DELETE | database_cluster_uuid, logsink_id | To delete a logsink for a database cluster, send a DELETE request to /v2/databases/$DATABASE_ID/logsink/$LOGSINK_ID . |
databases_update_logsink | EXEC | database_cluster_uuid, logsink_id, data__config | To 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.
- Required Properties
- All Properties
- Manifest
/*+ 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 }}'
;
/*+ create */
INSERT INTO digitalocean.databases.logsinks (
database_cluster_uuid
)
SELECT
'{{ database_cluster_uuid }}'
;
- name: logsinks
props:
- name: database_cluster_uuid
value: string
- name: sink_name
value: string
- name: sink_type
value: string
- name: config
props:
- name: server
value: string
- name: port
value: integer
- name: tls
value: boolean
- name: format
value: string
- name: logline
value: string
- name: sd
value: string
- name: ca
value: string
- name: key
value: string
- name: cert
value: string
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 }}';