destinations
Creates, updates, deletes, gets or lists a destinations
resource.
Overview
Name | destinations |
Type | Resource |
Id | digitalocean.monitoring.destinations |
Fields
The following fields are returned by SELECT
queries:
- monitoring_get_destination
- monitoring_list_destinations
The response is a JSON object with a destination
key.
Name | Datatype | Description |
---|---|---|
id | string | A unique identifier for a destination. (example: 01f30bfa-319a-4769-ba95-9d43971fb514) |
name | string | destination name (example: managed_opensearch_cluster) |
config | object | OpenSearch destination configuration with credentials omitted. |
type | string | The destination type. opensearch_dbaas for a DigitalOcean managed OpenSearch cluster or opensearch_ext for an externally managed one. (example: opensearch_dbaas) |
The response is a JSON object with a destinations
key.
Name | Datatype | Description |
---|---|---|
id | string | A unique identifier for a destination. (example: 01f30bfa-319a-4769-ba95-9d43971fb514) |
name | string | destination name (example: managed_opensearch_cluster) |
config | object | OpenSearch destination configuration with credentials omitted. |
type | string | The destination type. opensearch_dbaas for a DigitalOcean managed OpenSearch cluster or opensearch_ext for an externally managed one. (example: opensearch_dbaas) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
monitoring_get_destination | select | destination_uuid | To get the details of a destination, send a GET request to /v2/monitoring/sinks/destinations/${destination_uuid} . | |
monitoring_list_destinations | select | To list all logging destinations, send a GET request to /v2/monitoring/sinks/destinations . | ||
monitoring_update_destination | insert | destination_uuid , data__config , data__type | To update the details of a destination, send a PATCH request to /v2/monitoring/sinks/destinations/${destination_uuid} . | |
monitoring_create_destination | insert | data__config , data__type | To create a new destination, send a POST request to /v2/monitoring/sinks/destinations . | |
monitoring_delete_destination | delete | destination_uuid | To delete a destination and all associated sinks, send a DELETE request to /v2/monitoring/sinks/destinations/${destination_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 |
---|---|---|
destination_uuid | string | A unique identifier for a destination. (example: 1a64809f-1708-48ee-a742-dec8d481b8d1) |
SELECT
examples
- monitoring_get_destination
- monitoring_list_destinations
To get the details of a destination, send a GET request to /v2/monitoring/sinks/destinations/${destination_uuid}
.
SELECT
id,
name,
config,
type
FROM digitalocean.monitoring.destinations
WHERE destination_uuid = '{{ destination_uuid }}' -- required;
To list all logging destinations, send a GET request to /v2/monitoring/sinks/destinations
.
SELECT
id,
name,
config,
type
FROM digitalocean.monitoring.destinations;
INSERT
examples
- monitoring_update_destination
- monitoring_create_destination
- Manifest
To update the details of a destination, send a PATCH request to /v2/monitoring/sinks/destinations/${destination_uuid}
.
INSERT INTO digitalocean.monitoring.destinations (
data__name,
data__type,
data__config,
destination_uuid
)
SELECT
'{{ name }}',
'{{ type }}' --required,
'{{ config }}' --required,
'{{ destination_uuid }}'
;
To create a new destination, send a POST request to /v2/monitoring/sinks/destinations
.
INSERT INTO digitalocean.monitoring.destinations (
data__name,
data__type,
data__config
)
SELECT
'{{ name }}',
'{{ type }}' --required,
'{{ config }}' --required
RETURNING
destination
;
# Description fields are for documentation purposes
- name: destinations
props:
- name: destination_uuid
value: string
description: Required parameter for the destinations resource.
- name: name
value: string
description: >
destination name
- name: type
value: string
description: >
The destination type. `opensearch_dbaas` for a DigitalOcean managed OpenSearch
cluster or `opensearch_ext` for an externally managed one.
valid_values: ['opensearch_dbaas', 'opensearch_ext']
- name: config
value: object
DELETE
examples
- monitoring_delete_destination
To delete a destination and all associated sinks, send a DELETE request to /v2/monitoring/sinks/destinations/${destination_uuid}
.
DELETE FROM digitalocean.monitoring.destinations
WHERE destination_uuid = '{{ destination_uuid }}' --required;