Skip to content
Start here

Delete tags from an account-level resource

client.ResourceTagging.AccountTags.Delete(ctx, params) error
DELETE/accounts/{account_id}/tags

Removes all tags from a specific account-level resource.

Security

API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
ParametersExpand Collapse
params AccountTagDeleteParams
AccountID param.Field[string]

Path param: Identifier.

maxLength32
minLength32
IfMatch param.Field[string]optional

Header param: ETag value for optimistic concurrency control. When provided, the server will verify the current resource ETag matches before applying the write. Returns 412 Precondition Failed if the resource has been modified since the ETag was obtained. Omit this header for unconditional writes.

Delete tags from an account-level resource

package main

import (
  "context"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/resource_tagging"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
    option.WithAPIEmail("user@example.com"),
  )
  err := client.ResourceTagging.AccountTags.Delete(context.TODO(), resource_tagging.AccountTagDeleteParams{
    AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
  })
  if err != nil {
    panic(err.Error())
  }
}
Returns Examples