For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/jen.gilbert/astro-base/ko/api/latest/logs-custom-destinations/update-a-custom-destination.md. A documentation index is available at /llms.txt.
Language
Datadog site

커스텀 목적지 업데이트

PATCHhttps://api.datadoghq.com/api/v2/logs/config/custom-destinations/{custom_destination_id}https://api.us3.datadoghq.com/api/v2/logs/config/custom-destinations/{custom_destination_id}https://api.us5.datadoghq.com/api/v2/logs/config/custom-destinations/{custom_destination_id}https://api.datadoghq.eu/api/v2/logs/config/custom-destinations/{custom_destination_id}https://api.ap1.datadoghq.com/api/v2/logs/config/custom-destinations/{custom_destination_id}https://api.ap2.datadoghq.com/api/v2/logs/config/custom-destinations/{custom_destination_id}https://api.uk1.datadoghq.com/api/v2/logs/config/custom-destinations/{custom_destination_id}https://api.ddog-gov.com/api/v2/logs/config/custom-destinations/{custom_destination_id}https://api.us2.ddog-gov.com/api/v2/logs/config/custom-destinations/{custom_destination_id}

개요

조직에서 특정 커스텀 목적지의 지정된 필드를 업데이트합니다.

This endpoint requires the logs_write_forwarding_rules permission.

인수

경로 파라미터

이름
유형
설명
custom_destination_id [required]
string

The ID of the custom destination.

요청

Body Data (required)

커스텀 목적지 필드의 새 정의입니다.

항목
유형
설명
data
object

커스텀 목적지입니다.

응답

OK

The custom destination.

항목
유형
설명
data
object

The definition of a custom destination.

코드 예시

Update a Splunk custom destination with a null sourcetype returns "OK" response
# Path parameters
export custom_destination_id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations/${custom_destination_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "forwarder_destination": {
        "type": "splunk_hec",
        "endpoint": "https://example.com",
        "access_token": "my-access-token",
        "sourcetype": null
      }
    },
    "type": "custom_destination",
    "id": "be5d7a69-d0c8-4d4d-8ee8-bba292d98139"
  }
}
EOF
# Path parameters
export custom_destination_id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations/${custom_destination_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "forwarder_destination": {
        "type": "splunk_hec",
        "endpoint": "https://example.com",
        "access_token": "my-access-token",
        "sourcetype": null
      }
    },
    "type": "custom_destination",
    "id": "be5d7a69-d0c8-4d4d-8ee8-bba292d98139"
  }
}
EOF
# Path parameters
export custom_destination_id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations/${custom_destination_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "forwarder_destination": {
        "type": "splunk_hec",
        "endpoint": "https://example.com",
        "access_token": "my-access-token",
        "sourcetype": null
      }
    },
    "type": "custom_destination",
    "id": "be5d7a69-d0c8-4d4d-8ee8-bba292d98139"
  }
}
EOF
# Path parameters
export custom_destination_id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations/${custom_destination_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "forwarder_destination": {
        "type": "splunk_hec",
        "endpoint": "https://example.com",
        "access_token": "my-access-token",
        "sourcetype": null
      }
    },
    "type": "custom_destination",
    "id": "be5d7a69-d0c8-4d4d-8ee8-bba292d98139"
  }
}
EOF
# Path parameters
export custom_destination_id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations/${custom_destination_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "forwarder_destination": {
        "type": "splunk_hec",
        "endpoint": "https://example.com",
        "access_token": "my-access-token",
        "sourcetype": null
      }
    },
    "type": "custom_destination",
    "id": "be5d7a69-d0c8-4d4d-8ee8-bba292d98139"
  }
}
EOF
# Path parameters
export custom_destination_id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations/${custom_destination_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "forwarder_destination": {
        "type": "splunk_hec",
        "endpoint": "https://example.com",
        "access_token": "my-access-token",
        "sourcetype": null
      }
    },
    "type": "custom_destination",
    "id": "be5d7a69-d0c8-4d4d-8ee8-bba292d98139"
  }
}
EOF
# Path parameters
export custom_destination_id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations/${custom_destination_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "forwarder_destination": {
        "type": "splunk_hec",
        "endpoint": "https://example.com",
        "access_token": "my-access-token",
        "sourcetype": null
      }
    },
    "type": "custom_destination",
    "id": "be5d7a69-d0c8-4d4d-8ee8-bba292d98139"
  }
}
EOF
# Path parameters
export custom_destination_id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations/${custom_destination_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "forwarder_destination": {
        "type": "splunk_hec",
        "endpoint": "https://example.com",
        "access_token": "my-access-token",
        "sourcetype": null
      }
    },
    "type": "custom_destination",
    "id": "be5d7a69-d0c8-4d4d-8ee8-bba292d98139"
  }
}
EOF
# Path parameters
export custom_destination_id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations/${custom_destination_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "forwarder_destination": {
        "type": "splunk_hec",
        "endpoint": "https://example.com",
        "access_token": "my-access-token",
        "sourcetype": null
      }
    },
    "type": "custom_destination",
    "id": "be5d7a69-d0c8-4d4d-8ee8-bba292d98139"
  }
}
EOF
Update a Splunk custom destination with a sourcetype returns "OK" response
# Path parameters
export custom_destination_id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations/${custom_destination_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "forwarder_destination": {
        "type": "splunk_hec",
        "endpoint": "https://example.com",
        "access_token": "my-access-token",
        "sourcetype": "new-sourcetype"
      }
    },
    "type": "custom_destination",
    "id": "be5d7a69-d0c8-4d4d-8ee8-bba292d98139"
  }
}
EOF
# Path parameters
export custom_destination_id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations/${custom_destination_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "forwarder_destination": {
        "type": "splunk_hec",
        "endpoint": "https://example.com",
        "access_token": "my-access-token",
        "sourcetype": "new-sourcetype"
      }
    },
    "type": "custom_destination",
    "id": "be5d7a69-d0c8-4d4d-8ee8-bba292d98139"
  }
}
EOF
# Path parameters
export custom_destination_id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations/${custom_destination_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "forwarder_destination": {
        "type": "splunk_hec",
        "endpoint": "https://example.com",
        "access_token": "my-access-token",
        "sourcetype": "new-sourcetype"
      }
    },
    "type": "custom_destination",
    "id": "be5d7a69-d0c8-4d4d-8ee8-bba292d98139"
  }
}
EOF
# Path parameters
export custom_destination_id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations/${custom_destination_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "forwarder_destination": {
        "type": "splunk_hec",
        "endpoint": "https://example.com",
        "access_token": "my-access-token",
        "sourcetype": "new-sourcetype"
      }
    },
    "type": "custom_destination",
    "id": "be5d7a69-d0c8-4d4d-8ee8-bba292d98139"
  }
}
EOF
# Path parameters
export custom_destination_id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations/${custom_destination_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "forwarder_destination": {
        "type": "splunk_hec",
        "endpoint": "https://example.com",
        "access_token": "my-access-token",
        "sourcetype": "new-sourcetype"
      }
    },
    "type": "custom_destination",
    "id": "be5d7a69-d0c8-4d4d-8ee8-bba292d98139"
  }
}
EOF
# Path parameters
export custom_destination_id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations/${custom_destination_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "forwarder_destination": {
        "type": "splunk_hec",
        "endpoint": "https://example.com",
        "access_token": "my-access-token",
        "sourcetype": "new-sourcetype"
      }
    },
    "type": "custom_destination",
    "id": "be5d7a69-d0c8-4d4d-8ee8-bba292d98139"
  }
}
EOF
# Path parameters
export custom_destination_id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations/${custom_destination_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "forwarder_destination": {
        "type": "splunk_hec",
        "endpoint": "https://example.com",
        "access_token": "my-access-token",
        "sourcetype": "new-sourcetype"
      }
    },
    "type": "custom_destination",
    "id": "be5d7a69-d0c8-4d4d-8ee8-bba292d98139"
  }
}
EOF
# Path parameters
export custom_destination_id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations/${custom_destination_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "forwarder_destination": {
        "type": "splunk_hec",
        "endpoint": "https://example.com",
        "access_token": "my-access-token",
        "sourcetype": "new-sourcetype"
      }
    },
    "type": "custom_destination",
    "id": "be5d7a69-d0c8-4d4d-8ee8-bba292d98139"
  }
}
EOF
# Path parameters
export custom_destination_id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations/${custom_destination_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "forwarder_destination": {
        "type": "splunk_hec",
        "endpoint": "https://example.com",
        "access_token": "my-access-token",
        "sourcetype": "new-sourcetype"
      }
    },
    "type": "custom_destination",
    "id": "be5d7a69-d0c8-4d4d-8ee8-bba292d98139"
  }
}
EOF
Update a Splunk custom destination's attributes preserves the absent sourcetype returns "OK" response
# Path parameters
export custom_destination_id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations/${custom_destination_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Nginx logs (Updated)"
    },
    "type": "custom_destination",
    "id": "be5d7a69-d0c8-4d4d-8ee8-bba292d98139"
  }
}
EOF
# Path parameters
export custom_destination_id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations/${custom_destination_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Nginx logs (Updated)"
    },
    "type": "custom_destination",
    "id": "be5d7a69-d0c8-4d4d-8ee8-bba292d98139"
  }
}
EOF
# Path parameters
export custom_destination_id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations/${custom_destination_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Nginx logs (Updated)"
    },
    "type": "custom_destination",
    "id": "be5d7a69-d0c8-4d4d-8ee8-bba292d98139"
  }
}
EOF
# Path parameters
export custom_destination_id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations/${custom_destination_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Nginx logs (Updated)"
    },
    "type": "custom_destination",
    "id": "be5d7a69-d0c8-4d4d-8ee8-bba292d98139"
  }
}
EOF
# Path parameters
export custom_destination_id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations/${custom_destination_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Nginx logs (Updated)"
    },
    "type": "custom_destination",
    "id": "be5d7a69-d0c8-4d4d-8ee8-bba292d98139"
  }
}
EOF
# Path parameters
export custom_destination_id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations/${custom_destination_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Nginx logs (Updated)"
    },
    "type": "custom_destination",
    "id": "be5d7a69-d0c8-4d4d-8ee8-bba292d98139"
  }
}
EOF
# Path parameters
export custom_destination_id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations/${custom_destination_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Nginx logs (Updated)"
    },
    "type": "custom_destination",
    "id": "be5d7a69-d0c8-4d4d-8ee8-bba292d98139"
  }
}
EOF
# Path parameters
export custom_destination_id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations/${custom_destination_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Nginx logs (Updated)"
    },
    "type": "custom_destination",
    "id": "be5d7a69-d0c8-4d4d-8ee8-bba292d98139"
  }
}
EOF
# Path parameters
export custom_destination_id="CHANGE_ME"

# 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 PATCH "https://api.${DD_SITE}/api/v2/logs/config/custom-destinations/${custom_destination_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "name": "Nginx logs (Updated)"
    },
    "type": "custom_destination",
    "id": "be5d7a69-d0c8-4d4d-8ee8-bba292d98139"
  }
}
EOF