For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/es/api/latest/logs-custom-destinations/create-a-custom-destination.md. A documentation index is available at /llms.txt.
Language
Datadog site

Crear un destino personalizado

POSThttps://api.datadoghq.com/api/v2/logs/config/custom-destinationshttps://api.us3.datadoghq.com/api/v2/logs/config/custom-destinationshttps://api.us5.datadoghq.com/api/v2/logs/config/custom-destinationshttps://api.datadoghq.eu/api/v2/logs/config/custom-destinationshttps://api.ap1.datadoghq.com/api/v2/logs/config/custom-destinationshttps://api.ap2.datadoghq.com/api/v2/logs/config/custom-destinationshttps://api.uk1.datadoghq.com/api/v2/logs/config/custom-destinationshttps://api.ddog-gov.com/api/v2/logs/config/custom-destinationshttps://api.us2.ddog-gov.com/api/v2/logs/config/custom-destinations

Descripción general

Crea un destino personalizado en tu organización.

This endpoint requires the logs_write_forwarding_rules permission.

Solicitud

Body Data (required)

La definición del nuevo destino personalizado.

Campo
Type
Descripción
data
object

El destino personalizado.

Respuesta

OK

The custom destination.

Campo
Type
Descripción
data
object

The definition of a custom destination.

Ejemplo de código

Create a Basic HTTP custom destination returns "OK" response
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "enabled": false,
      "forward_tags": false,
      "forward_tags_restriction_list": [
        "datacenter",
        "host"
      ],
      "forward_tags_restriction_list_type": "ALLOW_LIST",
      "forwarder_destination": {
        "auth": {
          "password": "datadog-custom-destination-password",
          "type": "basic",
          "username": "datadog-custom-destination-username"
        },
        "endpoint": "https://example.com",
        "type": "http"
      },
      "name": "Nginx logs",
      "query": "source:nginx"
    },
    "type": "custom_destination"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "enabled": false,
      "forward_tags": false,
      "forward_tags_restriction_list": [
        "datacenter",
        "host"
      ],
      "forward_tags_restriction_list_type": "ALLOW_LIST",
      "forwarder_destination": {
        "auth": {
          "password": "datadog-custom-destination-password",
          "type": "basic",
          "username": "datadog-custom-destination-username"
        },
        "endpoint": "https://example.com",
        "type": "http"
      },
      "name": "Nginx logs",
      "query": "source:nginx"
    },
    "type": "custom_destination"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "enabled": false,
      "forward_tags": false,
      "forward_tags_restriction_list": [
        "datacenter",
        "host"
      ],
      "forward_tags_restriction_list_type": "ALLOW_LIST",
      "forwarder_destination": {
        "auth": {
          "password": "datadog-custom-destination-password",
          "type": "basic",
          "username": "datadog-custom-destination-username"
        },
        "endpoint": "https://example.com",
        "type": "http"
      },
      "name": "Nginx logs",
      "query": "source:nginx"
    },
    "type": "custom_destination"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "enabled": false,
      "forward_tags": false,
      "forward_tags_restriction_list": [
        "datacenter",
        "host"
      ],
      "forward_tags_restriction_list_type": "ALLOW_LIST",
      "forwarder_destination": {
        "auth": {
          "password": "datadog-custom-destination-password",
          "type": "basic",
          "username": "datadog-custom-destination-username"
        },
        "endpoint": "https://example.com",
        "type": "http"
      },
      "name": "Nginx logs",
      "query": "source:nginx"
    },
    "type": "custom_destination"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "enabled": false,
      "forward_tags": false,
      "forward_tags_restriction_list": [
        "datacenter",
        "host"
      ],
      "forward_tags_restriction_list_type": "ALLOW_LIST",
      "forwarder_destination": {
        "auth": {
          "password": "datadog-custom-destination-password",
          "type": "basic",
          "username": "datadog-custom-destination-username"
        },
        "endpoint": "https://example.com",
        "type": "http"
      },
      "name": "Nginx logs",
      "query": "source:nginx"
    },
    "type": "custom_destination"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "enabled": false,
      "forward_tags": false,
      "forward_tags_restriction_list": [
        "datacenter",
        "host"
      ],
      "forward_tags_restriction_list_type": "ALLOW_LIST",
      "forwarder_destination": {
        "auth": {
          "password": "datadog-custom-destination-password",
          "type": "basic",
          "username": "datadog-custom-destination-username"
        },
        "endpoint": "https://example.com",
        "type": "http"
      },
      "name": "Nginx logs",
      "query": "source:nginx"
    },
    "type": "custom_destination"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "enabled": false,
      "forward_tags": false,
      "forward_tags_restriction_list": [
        "datacenter",
        "host"
      ],
      "forward_tags_restriction_list_type": "ALLOW_LIST",
      "forwarder_destination": {
        "auth": {
          "password": "datadog-custom-destination-password",
          "type": "basic",
          "username": "datadog-custom-destination-username"
        },
        "endpoint": "https://example.com",
        "type": "http"
      },
      "name": "Nginx logs",
      "query": "source:nginx"
    },
    "type": "custom_destination"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "enabled": false,
      "forward_tags": false,
      "forward_tags_restriction_list": [
        "datacenter",
        "host"
      ],
      "forward_tags_restriction_list_type": "ALLOW_LIST",
      "forwarder_destination": {
        "auth": {
          "password": "datadog-custom-destination-password",
          "type": "basic",
          "username": "datadog-custom-destination-username"
        },
        "endpoint": "https://example.com",
        "type": "http"
      },
      "name": "Nginx logs",
      "query": "source:nginx"
    },
    "type": "custom_destination"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "enabled": false,
      "forward_tags": false,
      "forward_tags_restriction_list": [
        "datacenter",
        "host"
      ],
      "forward_tags_restriction_list_type": "ALLOW_LIST",
      "forwarder_destination": {
        "auth": {
          "password": "datadog-custom-destination-password",
          "type": "basic",
          "username": "datadog-custom-destination-username"
        },
        "endpoint": "https://example.com",
        "type": "http"
      },
      "name": "Nginx logs",
      "query": "source:nginx"
    },
    "type": "custom_destination"
  }
}
EOF
Create a Custom Header HTTP custom destination returns "OK" response
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "enabled": false,
      "forward_tags": false,
      "forward_tags_restriction_list": [
        "datacenter",
        "host"
      ],
      "forward_tags_restriction_list_type": "ALLOW_LIST",
      "forwarder_destination": {
        "auth": {
          "header_value": "my-secret",
          "type": "custom_header",
          "header_name": "MY-AUTHENTICATION-HEADER"
        },
        "endpoint": "https://example.com",
        "type": "http"
      },
      "name": "Nginx logs",
      "query": "source:nginx"
    },
    "type": "custom_destination"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "enabled": false,
      "forward_tags": false,
      "forward_tags_restriction_list": [
        "datacenter",
        "host"
      ],
      "forward_tags_restriction_list_type": "ALLOW_LIST",
      "forwarder_destination": {
        "auth": {
          "header_value": "my-secret",
          "type": "custom_header",
          "header_name": "MY-AUTHENTICATION-HEADER"
        },
        "endpoint": "https://example.com",
        "type": "http"
      },
      "name": "Nginx logs",
      "query": "source:nginx"
    },
    "type": "custom_destination"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "enabled": false,
      "forward_tags": false,
      "forward_tags_restriction_list": [
        "datacenter",
        "host"
      ],
      "forward_tags_restriction_list_type": "ALLOW_LIST",
      "forwarder_destination": {
        "auth": {
          "header_value": "my-secret",
          "type": "custom_header",
          "header_name": "MY-AUTHENTICATION-HEADER"
        },
        "endpoint": "https://example.com",
        "type": "http"
      },
      "name": "Nginx logs",
      "query": "source:nginx"
    },
    "type": "custom_destination"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "enabled": false,
      "forward_tags": false,
      "forward_tags_restriction_list": [
        "datacenter",
        "host"
      ],
      "forward_tags_restriction_list_type": "ALLOW_LIST",
      "forwarder_destination": {
        "auth": {
          "header_value": "my-secret",
          "type": "custom_header",
          "header_name": "MY-AUTHENTICATION-HEADER"
        },
        "endpoint": "https://example.com",
        "type": "http"
      },
      "name": "Nginx logs",
      "query": "source:nginx"
    },
    "type": "custom_destination"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "enabled": false,
      "forward_tags": false,
      "forward_tags_restriction_list": [
        "datacenter",
        "host"
      ],
      "forward_tags_restriction_list_type": "ALLOW_LIST",
      "forwarder_destination": {
        "auth": {
          "header_value": "my-secret",
          "type": "custom_header",
          "header_name": "MY-AUTHENTICATION-HEADER"
        },
        "endpoint": "https://example.com",
        "type": "http"
      },
      "name": "Nginx logs",
      "query": "source:nginx"
    },
    "type": "custom_destination"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "enabled": false,
      "forward_tags": false,
      "forward_tags_restriction_list": [
        "datacenter",
        "host"
      ],
      "forward_tags_restriction_list_type": "ALLOW_LIST",
      "forwarder_destination": {
        "auth": {
          "header_value": "my-secret",
          "type": "custom_header",
          "header_name": "MY-AUTHENTICATION-HEADER"
        },
        "endpoint": "https://example.com",
        "type": "http"
      },
      "name": "Nginx logs",
      "query": "source:nginx"
    },
    "type": "custom_destination"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "enabled": false,
      "forward_tags": false,
      "forward_tags_restriction_list": [
        "datacenter",
        "host"
      ],
      "forward_tags_restriction_list_type": "ALLOW_LIST",
      "forwarder_destination": {
        "auth": {
          "header_value": "my-secret",
          "type": "custom_header",
          "header_name": "MY-AUTHENTICATION-HEADER"
        },
        "endpoint": "https://example.com",
        "type": "http"
      },
      "name": "Nginx logs",
      "query": "source:nginx"
    },
    "type": "custom_destination"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "enabled": false,
      "forward_tags": false,
      "forward_tags_restriction_list": [
        "datacenter",
        "host"
      ],
      "forward_tags_restriction_list_type": "ALLOW_LIST",
      "forwarder_destination": {
        "auth": {
          "header_value": "my-secret",
          "type": "custom_header",
          "header_name": "MY-AUTHENTICATION-HEADER"
        },
        "endpoint": "https://example.com",
        "type": "http"
      },
      "name": "Nginx logs",
      "query": "source:nginx"
    },
    "type": "custom_destination"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "enabled": false,
      "forward_tags": false,
      "forward_tags_restriction_list": [
        "datacenter",
        "host"
      ],
      "forward_tags_restriction_list_type": "ALLOW_LIST",
      "forwarder_destination": {
        "auth": {
          "header_value": "my-secret",
          "type": "custom_header",
          "header_name": "MY-AUTHENTICATION-HEADER"
        },
        "endpoint": "https://example.com",
        "type": "http"
      },
      "name": "Nginx logs",
      "query": "source:nginx"
    },
    "type": "custom_destination"
  }
}
EOF
Create a Microsoft Sentinel custom destination returns "OK" response
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "enabled": false,
      "forward_tags": false,
      "forward_tags_restriction_list": [
        "datacenter",
        "host"
      ],
      "forward_tags_restriction_list_type": "ALLOW_LIST",
      "forwarder_destination": {
        "type": "microsoft_sentinel",
        "tenant_id": "f3c9a8a1-4c2e-4d2e-b911-9f3c28c3c8b2",
        "client_id": "9a2f4d83-2b5e-429e-a35a-2b3c4182db71",
        "data_collection_endpoint": "https://my-dce-5kyl.eastus-1.ingest.monitor.azure.com",
        "data_collection_rule_id": "dcr-000a00a000a00000a000000aa000a0aa",
        "stream_name": "Custom-MyTable"
      },
      "name": "Nginx logs",
      "query": "source:nginx"
    },
    "type": "custom_destination"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "enabled": false,
      "forward_tags": false,
      "forward_tags_restriction_list": [
        "datacenter",
        "host"
      ],
      "forward_tags_restriction_list_type": "ALLOW_LIST",
      "forwarder_destination": {
        "type": "microsoft_sentinel",
        "tenant_id": "f3c9a8a1-4c2e-4d2e-b911-9f3c28c3c8b2",
        "client_id": "9a2f4d83-2b5e-429e-a35a-2b3c4182db71",
        "data_collection_endpoint": "https://my-dce-5kyl.eastus-1.ingest.monitor.azure.com",
        "data_collection_rule_id": "dcr-000a00a000a00000a000000aa000a0aa",
        "stream_name": "Custom-MyTable"
      },
      "name": "Nginx logs",
      "query": "source:nginx"
    },
    "type": "custom_destination"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "enabled": false,
      "forward_tags": false,
      "forward_tags_restriction_list": [
        "datacenter",
        "host"
      ],
      "forward_tags_restriction_list_type": "ALLOW_LIST",
      "forwarder_destination": {
        "type": "microsoft_sentinel",
        "tenant_id": "f3c9a8a1-4c2e-4d2e-b911-9f3c28c3c8b2",
        "client_id": "9a2f4d83-2b5e-429e-a35a-2b3c4182db71",
        "data_collection_endpoint": "https://my-dce-5kyl.eastus-1.ingest.monitor.azure.com",
        "data_collection_rule_id": "dcr-000a00a000a00000a000000aa000a0aa",
        "stream_name": "Custom-MyTable"
      },
      "name": "Nginx logs",
      "query": "source:nginx"
    },
    "type": "custom_destination"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "enabled": false,
      "forward_tags": false,
      "forward_tags_restriction_list": [
        "datacenter",
        "host"
      ],
      "forward_tags_restriction_list_type": "ALLOW_LIST",
      "forwarder_destination": {
        "type": "microsoft_sentinel",
        "tenant_id": "f3c9a8a1-4c2e-4d2e-b911-9f3c28c3c8b2",
        "client_id": "9a2f4d83-2b5e-429e-a35a-2b3c4182db71",
        "data_collection_endpoint": "https://my-dce-5kyl.eastus-1.ingest.monitor.azure.com",
        "data_collection_rule_id": "dcr-000a00a000a00000a000000aa000a0aa",
        "stream_name": "Custom-MyTable"
      },
      "name": "Nginx logs",
      "query": "source:nginx"
    },
    "type": "custom_destination"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "enabled": false,
      "forward_tags": false,
      "forward_tags_restriction_list": [
        "datacenter",
        "host"
      ],
      "forward_tags_restriction_list_type": "ALLOW_LIST",
      "forwarder_destination": {
        "type": "microsoft_sentinel",
        "tenant_id": "f3c9a8a1-4c2e-4d2e-b911-9f3c28c3c8b2",
        "client_id": "9a2f4d83-2b5e-429e-a35a-2b3c4182db71",
        "data_collection_endpoint": "https://my-dce-5kyl.eastus-1.ingest.monitor.azure.com",
        "data_collection_rule_id": "dcr-000a00a000a00000a000000aa000a0aa",
        "stream_name": "Custom-MyTable"
      },
      "name": "Nginx logs",
      "query": "source:nginx"
    },
    "type": "custom_destination"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "enabled": false,
      "forward_tags": false,
      "forward_tags_restriction_list": [
        "datacenter",
        "host"
      ],
      "forward_tags_restriction_list_type": "ALLOW_LIST",
      "forwarder_destination": {
        "type": "microsoft_sentinel",
        "tenant_id": "f3c9a8a1-4c2e-4d2e-b911-9f3c28c3c8b2",
        "client_id": "9a2f4d83-2b5e-429e-a35a-2b3c4182db71",
        "data_collection_endpoint": "https://my-dce-5kyl.eastus-1.ingest.monitor.azure.com",
        "data_collection_rule_id": "dcr-000a00a000a00000a000000aa000a0aa",
        "stream_name": "Custom-MyTable"
      },
      "name": "Nginx logs",
      "query": "source:nginx"
    },
    "type": "custom_destination"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "enabled": false,
      "forward_tags": false,
      "forward_tags_restriction_list": [
        "datacenter",
        "host"
      ],
      "forward_tags_restriction_list_type": "ALLOW_LIST",
      "forwarder_destination": {
        "type": "microsoft_sentinel",
        "tenant_id": "f3c9a8a1-4c2e-4d2e-b911-9f3c28c3c8b2",
        "client_id": "9a2f4d83-2b5e-429e-a35a-2b3c4182db71",
        "data_collection_endpoint": "https://my-dce-5kyl.eastus-1.ingest.monitor.azure.com",
        "data_collection_rule_id": "dcr-000a00a000a00000a000000aa000a0aa",
        "stream_name": "Custom-MyTable"
      },
      "name": "Nginx logs",
      "query": "source:nginx"
    },
    "type": "custom_destination"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "enabled": false,
      "forward_tags": false,
      "forward_tags_restriction_list": [
        "datacenter",
        "host"
      ],
      "forward_tags_restriction_list_type": "ALLOW_LIST",
      "forwarder_destination": {
        "type": "microsoft_sentinel",
        "tenant_id": "f3c9a8a1-4c2e-4d2e-b911-9f3c28c3c8b2",
        "client_id": "9a2f4d83-2b5e-429e-a35a-2b3c4182db71",
        "data_collection_endpoint": "https://my-dce-5kyl.eastus-1.ingest.monitor.azure.com",
        "data_collection_rule_id": "dcr-000a00a000a00000a000000aa000a0aa",
        "stream_name": "Custom-MyTable"
      },
      "name": "Nginx logs",
      "query": "source:nginx"
    },
    "type": "custom_destination"
  }
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "enabled": false,
      "forward_tags": false,
      "forward_tags_restriction_list": [
        "datacenter",
        "host"
      ],
      "forward_tags_restriction_list_type": "ALLOW_LIST",
      "forwarder_destination": {
        "type": "microsoft_sentinel",
        "tenant_id": "f3c9a8a1-4c2e-4d2e-b911-9f3c28c3c8b2",
        "client_id": "9a2f4d83-2b5e-429e-a35a-2b3c4182db71",
        "data_collection_endpoint": "https://my-dce-5kyl.eastus-1.ingest.monitor.azure.com",
        "data_collection_rule_id": "dcr-000a00a000a00000a000000aa000a0aa",
        "stream_name": "Custom-MyTable"
      },
      "name": "Nginx logs",
      "query": "source:nginx"
    },
    "type": "custom_destination"
  }
}
EOF