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. (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. (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 | Get a specific custom destination in your organization. | |
list_logs_custom_destinations | select | Get the list of configured custom destinations in your organization with their definitions. | ||
create_logs_custom_destination | insert | Create a custom destination in your organization. | ||
update_logs_custom_destination | update | custom_destination_id | Update the given fields of a specific custom destination in your organization. | |
delete_logs_custom_destination | delete | custom_destination_id | 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. |
site | string | The Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both. |
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
;
Get the list of configured custom destinations in your organization with their definitions.
SELECT
id,
attributes,
type
FROM datadog.logs.custom_destinations
;
INSERT examples
- create_logs_custom_destination
- Manifest
Create a custom destination in your organization.
INSERT INTO datadog.logs.custom_destinations (
data
)
SELECT
'{{ data }}'
RETURNING
data
;
# Description fields are for documentation purposes
- name: custom_destinations
props:
- name: data
description: |
The definition of a custom destination.
value:
attributes:
enabled: {{ enabled }}
forward_tags: {{ forward_tags }}
forward_tags_restriction_list:
- "{{ forward_tags_restriction_list }}"
forward_tags_restriction_list_type: "{{ forward_tags_restriction_list_type }}"
forwarder_destination:
auth:
password: "{{ password }}"
type: "{{ type }}"
username: "{{ username }}"
header_name: "{{ header_name }}"
header_value: "{{ header_value }}"
endpoint: "{{ endpoint }}"
type: "{{ type }}"
access_token: "{{ access_token }}"
sourcetype: "{{ sourcetype }}"
index_name: "{{ index_name }}"
index_rotation: "{{ index_rotation }}"
client_id: "{{ client_id }}"
data_collection_endpoint: "{{ data_collection_endpoint }}"
data_collection_rule_id: "{{ data_collection_rule_id }}"
stream_name: "{{ stream_name }}"
tenant_id: "{{ tenant_id }}"
name: "{{ name }}"
query: "{{ query }}"
type: "{{ type }}"
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 }}'
WHERE
custom_destination_id = '{{ custom_destination_id }}' --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
;