custom_destinations
Creates, updates, deletes, gets or lists a custom_destinations resource.
Overview
| Name | custom_destinations | 
| Type | Resource | 
| Id | datadog.logs.custom_destinations | 
Fields
The following fields are returned by SELECT queries:
- get_logs_custom_destination
- list_logs_custom_destinations
| Name | Datatype | Description | 
|---|---|---|
| id | string | The custom destination ID. (example: be5d7a69-d0c8-4d4d-8ee8-bba292d98139) | 
| attributes | object | The attributes associated with the custom destination. | 
| type | string | The type of the resource. The value should always be custom_destination. (default: custom_destination, example: custom_destination) | 
| Name | Datatype | Description | 
|---|---|---|
| id | string | The custom destination ID. (example: be5d7a69-d0c8-4d4d-8ee8-bba292d98139) | 
| attributes | object | The attributes associated with the custom destination. | 
| type | string | The 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:
| Name | Accessible by | Required Params | Optional Params | Description | 
|---|---|---|---|---|
| get_logs_custom_destination | select | custom_destination_id,region | Get a specific custom destination in your organization. | |
| list_logs_custom_destinations | select | region | Get the list of configured custom destinations in your organization with their definitions. | |
| create_logs_custom_destination | insert | region | Create a custom destination in your organization. | |
| update_logs_custom_destination | update | custom_destination_id,region | Update the given fields of a specific custom destination in your organization. | |
| delete_logs_custom_destination | delete | custom_destination_id,region | Delete 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.
| Name | Datatype | Description | 
|---|---|---|
| custom_destination_id | string | The ID of the custom destination. | 
| region | string | (default: datadoghq.com) | 
SELECT examples
- get_logs_custom_destination
- list_logs_custom_destinations
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
;
Get the list of configured custom destinations in your organization with their definitions.
SELECT
id,
attributes,
type
FROM datadog.logs.custom_destinations
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_logs_custom_destination
- Manifest
Create a custom destination in your organization.
INSERT INTO datadog.logs.custom_destinations (
data__data,
region
)
SELECT 
'{{ data }}',
'{{ region }}'
RETURNING
data
;
# Description fields are for documentation purposes
- name: custom_destinations
  props:
    - name: region
      value: string
      description: Required parameter for the custom_destinations resource.
    - name: data
      value: object
      description: |
        The definition of a custom destination.
UPDATE examples
- update_logs_custom_destination
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_logs_custom_destination
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
;