Delete Destination
client.Workers.Observability.Destinations.Delete(ctx, slug, body) (*ObservabilityDestinationDeleteResponse, error)
DELETE/accounts/{account_id}/workers/observability/destinations/{slug}
Delete a Workers Observability Telemetry Destination.
Security
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
User Service Key
Used when interacting with the Origin CA certificates API. View/change your key.
Example:
Accepted Permissions (at least one required)
Delete Destination
package main
import (
"context"
"fmt"
"github.com/stainless-sdks/cloudflare-go"
"github.com/stainless-sdks/cloudflare-go/option"
"github.com/stainless-sdks/cloudflare-go/workers"
)
func main() {
client := cloudflare.NewClient(
option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
option.WithAPIEmail("user@example.com"),
)
destination, err := client.Workers.Observability.Destinations.Delete(
context.TODO(),
"slug",
workers.ObservabilityDestinationDeleteParams{
AccountID: cloudflare.F("account_id"),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", destination.Configuration)
}
{
"errors": [
{
"message": "message"
}
],
"messages": [
{
"message": "Successful request"
}
],
"success": true,
"result": {
"configuration": {
"destination_conf": "destination_conf",
"logpushDataset": "opentelemetry-traces",
"logpushJob": 0,
"type": "logpush",
"url": "url"
},
"enabled": true,
"name": "name",
"scripts": [
"string"
],
"slug": "slug"
}
}Returns Examples
{
"errors": [
{
"message": "message"
}
],
"messages": [
{
"message": "Successful request"
}
],
"success": true,
"result": {
"configuration": {
"destination_conf": "destination_conf",
"logpushDataset": "opentelemetry-traces",
"logpushJob": 0,
"type": "logpush",
"url": "url"
},
"enabled": true,
"name": "name",
"scripts": [
"string"
],
"slug": "slug"
}
}