Skip to main content

custom_destinations

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

Overview

Namecustom_destinations
TypeResource
Iddatadog.logs.custom_destinations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe custom destination ID. (example: be5d7a69-d0c8-4d4d-8ee8-bba292d98139)
attributesobjectThe attributes associated with the custom destination.
typestringThe type of the resource. The value should always be custom_destination. (default: custom_destination, example: custom_destination)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_logs_custom_destinationselectcustom_destination_id, regionGet a specific custom destination in your organization.
list_logs_custom_destinationsselectregionGet the list of configured custom destinations in your organization with their definitions.
create_logs_custom_destinationinsertregionCreate a custom destination in your organization.
update_logs_custom_destinationupdatecustom_destination_id, regionUpdate the given fields of a specific custom destination in your organization.
delete_logs_custom_destinationdeletecustom_destination_id, regionDelete a specific custom destination in your organization.

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.

NameDatatypeDescription
custom_destination_idstringThe ID of the custom destination.
regionstring(default: datadoghq.com)

SELECT examples

Get a specific custom destination in your organization.

SELECT
id,
attributes,
type
FROM datadog.logs.custom_destinations
WHERE custom_destination_id = '{{ custom_destination_id }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Create a custom destination in your organization.

INSERT INTO datadog.logs.custom_destinations (
data__data,
region
)
SELECT
'{{ data }}',
'{{ region }}'
RETURNING
data
;

UPDATE examples

Update the given fields of a specific custom destination in your organization.

UPDATE datadog.logs.custom_destinations
SET
data__data = '{{ data }}'
WHERE
custom_destination_id = '{{ custom_destination_id }}' --required
AND region = '{{ region }}' --required
RETURNING
data;

DELETE examples

Delete a specific custom destination in your organization.

DELETE FROM datadog.logs.custom_destinations
WHERE custom_destination_id = '{{ custom_destination_id }}' --required
AND region = '{{ region }}' --required
;