Skip to content
Start here

Set tags for an account-level resource

client.ResourceTagging.AccountTags.Update(ctx, params) (*AccountTagUpdateResponse, error)
PUT/accounts/{account_id}/tags

Creates or updates tags for 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 AccountTagUpdateParams
AccountID param.Field[string]

Path param: Identifier.

maxLength32
minLength32
ResourceID param.Field[string]

Body param: Identifies the unique resource.

Body param: Enum for base account-level resource types (those with no extra required fields).

const AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceTypeAccessApplication AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceType = "access_application"
const AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceTypeAccessGroup AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceType = "access_group"
const AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceTypeAccount AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceType = "account"
const AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceTypeAIGateway AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceType = "ai_gateway"
const AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceTypeAlertingPolicy AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceType = "alerting_policy"
const AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceTypeAlertingWebhook AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceType = "alerting_webhook"
const AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceTypeCloudflaredTunnel AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceType = "cloudflared_tunnel"
const AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceTypeD1Database AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceType = "d1_database"
const AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceTypeDurableObjectNamespace AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceType = "durable_object_namespace"
const AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceTypeGatewayList AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceType = "gateway_list"
const AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceTypeGatewayRule AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceType = "gateway_rule"
const AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceTypeImage AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceType = "image"
const AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceTypeKVNamespace AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceType = "kv_namespace"
const AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceTypeQueue AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceType = "queue"
const AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceTypeR2Bucket AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceType = "r2_bucket"
const AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceTypeResourceShare AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceType = "resource_share"
const AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceTypeStreamLiveInput AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceType = "stream_live_input"
const AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceTypeStreamVideo AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceType = "stream_video"
const AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceTypeWorker AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceType = "worker"
const AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceTypeWorkerVersion AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceType = "worker_version"
WorkerID param.Field[string]

Body param: Worker ID is required only for worker_version resources

Tags param.Field[map[string, string]]Optional

Body param: Contains key-value pairs of tags.

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.

ReturnsExpand Collapse
type AccountTagUpdateResponse interface{…}

Response for access_application resources

One of the following:
type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAccessApplication struct{…}

Response for access_application resources

ID string

Identifies the unique resource.

Etag string

ETag identifier for optimistic concurrency control. Formatted as “v1:” where the hash is the base64url-encoded SHA-256 (truncated to 128 bits) of the tags map canonicalized using RFC 8785 (JSON Canonicalization Scheme). Clients should treat ETags as opaque strings and pass them back via the If-Match header on write operations.

Name string

Human-readable name of the resource.

Tags map[string, string]

Contains key-value pairs of tags.

Type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAccessApplicationType
type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAccessApplicationPolicy struct{…}

Response for access_application_policy resources

ID string

Identifies the unique resource.

AccessApplicationID string

Access application ID is required only for access_application_policy resources

formatuuid
Etag string

ETag identifier for optimistic concurrency control. Formatted as “v1:” where the hash is the base64url-encoded SHA-256 (truncated to 128 bits) of the tags map canonicalized using RFC 8785 (JSON Canonicalization Scheme). Clients should treat ETags as opaque strings and pass them back via the If-Match header on write operations.

Name string

Human-readable name of the resource.

Tags map[string, string]

Contains key-value pairs of tags.

Type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAccessApplicationPolicyType
ZoneID string

Zone ID is required only for zone-level resources

maxLength32
minLength32
type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAccessGroup struct{…}

Response for access_group resources

ID string

Identifies the unique resource.

Etag string

ETag identifier for optimistic concurrency control. Formatted as “v1:” where the hash is the base64url-encoded SHA-256 (truncated to 128 bits) of the tags map canonicalized using RFC 8785 (JSON Canonicalization Scheme). Clients should treat ETags as opaque strings and pass them back via the If-Match header on write operations.

Name string

Human-readable name of the resource.

Tags map[string, string]

Contains key-value pairs of tags.

Type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAccessGroupType
type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAccount struct{…}

Response for account resources

ID string

Identifies the unique resource.

Etag string

ETag identifier for optimistic concurrency control. Formatted as “v1:” where the hash is the base64url-encoded SHA-256 (truncated to 128 bits) of the tags map canonicalized using RFC 8785 (JSON Canonicalization Scheme). Clients should treat ETags as opaque strings and pass them back via the If-Match header on write operations.

Name string

Human-readable name of the resource.

Tags map[string, string]

Contains key-value pairs of tags.

Type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAccountType
type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAIGateway struct{…}

Response for ai_gateway resources

ID string

Identifies the unique resource.

Etag string

ETag identifier for optimistic concurrency control. Formatted as “v1:” where the hash is the base64url-encoded SHA-256 (truncated to 128 bits) of the tags map canonicalized using RFC 8785 (JSON Canonicalization Scheme). Clients should treat ETags as opaque strings and pass them back via the If-Match header on write operations.

Name string

Human-readable name of the resource.

Tags map[string, string]

Contains key-value pairs of tags.

Type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAIGatewayType
type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAlertingPolicy struct{…}

Response for alerting_policy resources

ID string

Identifies the unique resource.

Etag string

ETag identifier for optimistic concurrency control. Formatted as “v1:” where the hash is the base64url-encoded SHA-256 (truncated to 128 bits) of the tags map canonicalized using RFC 8785 (JSON Canonicalization Scheme). Clients should treat ETags as opaque strings and pass them back via the If-Match header on write operations.

Name string

Human-readable name of the resource.

Tags map[string, string]

Contains key-value pairs of tags.

Type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAlertingPolicyType
type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAlertingWebhook struct{…}

Response for alerting_webhook resources

ID string

Identifies the unique resource.

Etag string

ETag identifier for optimistic concurrency control. Formatted as “v1:” where the hash is the base64url-encoded SHA-256 (truncated to 128 bits) of the tags map canonicalized using RFC 8785 (JSON Canonicalization Scheme). Clients should treat ETags as opaque strings and pass them back via the If-Match header on write operations.

Name string

Human-readable name of the resource.

Tags map[string, string]

Contains key-value pairs of tags.

Type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAlertingWebhookType
type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAPIGatewayOperation struct{…}

Response for api_gateway_operation resources

ID string

Identifies the unique resource.

Etag string

ETag identifier for optimistic concurrency control. Formatted as “v1:” where the hash is the base64url-encoded SHA-256 (truncated to 128 bits) of the tags map canonicalized using RFC 8785 (JSON Canonicalization Scheme). Clients should treat ETags as opaque strings and pass them back via the If-Match header on write operations.

Name string

Human-readable name of the resource.

Tags map[string, string]

Contains key-value pairs of tags.

Type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAPIGatewayOperationType
ZoneID string

Zone ID is required only for zone-level resources

maxLength32
minLength32
type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectCloudflaredTunnel struct{…}

Response for cloudflared_tunnel resources

ID string

Identifies the unique resource.

Etag string

ETag identifier for optimistic concurrency control. Formatted as “v1:” where the hash is the base64url-encoded SHA-256 (truncated to 128 bits) of the tags map canonicalized using RFC 8785 (JSON Canonicalization Scheme). Clients should treat ETags as opaque strings and pass them back via the If-Match header on write operations.

Name string

Human-readable name of the resource.

Tags map[string, string]

Contains key-value pairs of tags.

Type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectCloudflaredTunnelType
type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectCustomCertificate struct{…}

Response for custom_certificate resources

ID string

Identifies the unique resource.

Etag string

ETag identifier for optimistic concurrency control. Formatted as “v1:” where the hash is the base64url-encoded SHA-256 (truncated to 128 bits) of the tags map canonicalized using RFC 8785 (JSON Canonicalization Scheme). Clients should treat ETags as opaque strings and pass them back via the If-Match header on write operations.

Name string

Human-readable name of the resource.

Tags map[string, string]

Contains key-value pairs of tags.

Type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectCustomCertificateType
ZoneID string

Zone ID is required only for zone-level resources

maxLength32
minLength32
type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectCustomHostname struct{…}

Response for custom_hostname resources

ID string

Identifies the unique resource.

Etag string

ETag identifier for optimistic concurrency control. Formatted as “v1:” where the hash is the base64url-encoded SHA-256 (truncated to 128 bits) of the tags map canonicalized using RFC 8785 (JSON Canonicalization Scheme). Clients should treat ETags as opaque strings and pass them back via the If-Match header on write operations.

Name string

Human-readable name of the resource.

Tags map[string, string]

Contains key-value pairs of tags.

Type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectCustomHostnameType
ZoneID string

Zone ID is required only for zone-level resources

maxLength32
minLength32
type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectD1Database struct{…}

Response for d1_database resources

ID string

Identifies the unique resource.

Etag string

ETag identifier for optimistic concurrency control. Formatted as “v1:” where the hash is the base64url-encoded SHA-256 (truncated to 128 bits) of the tags map canonicalized using RFC 8785 (JSON Canonicalization Scheme). Clients should treat ETags as opaque strings and pass them back via the If-Match header on write operations.

Name string

Human-readable name of the resource.

Tags map[string, string]

Contains key-value pairs of tags.

Type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectD1DatabaseType
type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectDNSRecord struct{…}

Response for dns_record resources

ID string

Identifies the unique resource.

Etag string

ETag identifier for optimistic concurrency control. Formatted as “v1:” where the hash is the base64url-encoded SHA-256 (truncated to 128 bits) of the tags map canonicalized using RFC 8785 (JSON Canonicalization Scheme). Clients should treat ETags as opaque strings and pass them back via the If-Match header on write operations.

Name string

Human-readable name of the resource.

Tags map[string, string]

Contains key-value pairs of tags.

Type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectDNSRecordType
ZoneID string

Zone ID is required only for zone-level resources

maxLength32
minLength32
type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectDurableObjectNamespace struct{…}

Response for durable_object_namespace resources

ID string

Identifies the unique resource.

Etag string

ETag identifier for optimistic concurrency control. Formatted as “v1:” where the hash is the base64url-encoded SHA-256 (truncated to 128 bits) of the tags map canonicalized using RFC 8785 (JSON Canonicalization Scheme). Clients should treat ETags as opaque strings and pass them back via the If-Match header on write operations.

Name string

Human-readable name of the resource.

Tags map[string, string]

Contains key-value pairs of tags.

Type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectDurableObjectNamespaceType
type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectGatewayList struct{…}

Response for gateway_list resources

ID string

Identifies the unique resource.

Etag string

ETag identifier for optimistic concurrency control. Formatted as “v1:” where the hash is the base64url-encoded SHA-256 (truncated to 128 bits) of the tags map canonicalized using RFC 8785 (JSON Canonicalization Scheme). Clients should treat ETags as opaque strings and pass them back via the If-Match header on write operations.

Name string

Human-readable name of the resource.

Tags map[string, string]

Contains key-value pairs of tags.

Type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectGatewayListType
type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectGatewayRule struct{…}

Response for gateway_rule resources

ID string

Identifies the unique resource.

Etag string

ETag identifier for optimistic concurrency control. Formatted as “v1:” where the hash is the base64url-encoded SHA-256 (truncated to 128 bits) of the tags map canonicalized using RFC 8785 (JSON Canonicalization Scheme). Clients should treat ETags as opaque strings and pass them back via the If-Match header on write operations.

Name string

Human-readable name of the resource.

Tags map[string, string]

Contains key-value pairs of tags.

Type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectGatewayRuleType
type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectImage struct{…}

Response for image resources

ID string

Identifies the unique resource.

Etag string

ETag identifier for optimistic concurrency control. Formatted as “v1:” where the hash is the base64url-encoded SHA-256 (truncated to 128 bits) of the tags map canonicalized using RFC 8785 (JSON Canonicalization Scheme). Clients should treat ETags as opaque strings and pass them back via the If-Match header on write operations.

Name string

Human-readable name of the resource.

Tags map[string, string]

Contains key-value pairs of tags.

Type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectImageType
type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectKVNamespace struct{…}

Response for kv_namespace resources

ID string

Identifies the unique resource.

Etag string

ETag identifier for optimistic concurrency control. Formatted as “v1:” where the hash is the base64url-encoded SHA-256 (truncated to 128 bits) of the tags map canonicalized using RFC 8785 (JSON Canonicalization Scheme). Clients should treat ETags as opaque strings and pass them back via the If-Match header on write operations.

Name string

Human-readable name of the resource.

Tags map[string, string]

Contains key-value pairs of tags.

Type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectKVNamespaceType
type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectManagedClientCertificate struct{…}

Response for managed_client_certificate resources

ID string

Identifies the unique resource.

Etag string

ETag identifier for optimistic concurrency control. Formatted as “v1:” where the hash is the base64url-encoded SHA-256 (truncated to 128 bits) of the tags map canonicalized using RFC 8785 (JSON Canonicalization Scheme). Clients should treat ETags as opaque strings and pass them back via the If-Match header on write operations.

Name string

Human-readable name of the resource.

Tags map[string, string]

Contains key-value pairs of tags.

Type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectManagedClientCertificateType
ZoneID string

Zone ID is required only for zone-level resources

maxLength32
minLength32
type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectQueue struct{…}

Response for queue resources

ID string

Identifies the unique resource.

Etag string

ETag identifier for optimistic concurrency control. Formatted as “v1:” where the hash is the base64url-encoded SHA-256 (truncated to 128 bits) of the tags map canonicalized using RFC 8785 (JSON Canonicalization Scheme). Clients should treat ETags as opaque strings and pass them back via the If-Match header on write operations.

Name string

Human-readable name of the resource.

Tags map[string, string]

Contains key-value pairs of tags.

Type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectQueueType
type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectR2Bucket struct{…}

Response for r2_bucket resources

ID string

Identifies the unique resource.

Etag string

ETag identifier for optimistic concurrency control. Formatted as “v1:” where the hash is the base64url-encoded SHA-256 (truncated to 128 bits) of the tags map canonicalized using RFC 8785 (JSON Canonicalization Scheme). Clients should treat ETags as opaque strings and pass them back via the If-Match header on write operations.

Name string

Human-readable name of the resource.

Tags map[string, string]

Contains key-value pairs of tags.

Type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectR2BucketType
type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectResourceShare struct{…}

Response for resource_share resources

ID string

Identifies the unique resource.

Etag string

ETag identifier for optimistic concurrency control. Formatted as “v1:” where the hash is the base64url-encoded SHA-256 (truncated to 128 bits) of the tags map canonicalized using RFC 8785 (JSON Canonicalization Scheme). Clients should treat ETags as opaque strings and pass them back via the If-Match header on write operations.

Name string

Human-readable name of the resource.

Tags map[string, string]

Contains key-value pairs of tags.

Type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectResourceShareType
type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectStreamLiveInput struct{…}

Response for stream_live_input resources

ID string

Identifies the unique resource.

Etag string

ETag identifier for optimistic concurrency control. Formatted as “v1:” where the hash is the base64url-encoded SHA-256 (truncated to 128 bits) of the tags map canonicalized using RFC 8785 (JSON Canonicalization Scheme). Clients should treat ETags as opaque strings and pass them back via the If-Match header on write operations.

Name string

Human-readable name of the resource.

Tags map[string, string]

Contains key-value pairs of tags.

Type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectStreamLiveInputType
type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectStreamVideo struct{…}

Response for stream_video resources

ID string

Identifies the unique resource.

Etag string

ETag identifier for optimistic concurrency control. Formatted as “v1:” where the hash is the base64url-encoded SHA-256 (truncated to 128 bits) of the tags map canonicalized using RFC 8785 (JSON Canonicalization Scheme). Clients should treat ETags as opaque strings and pass them back via the If-Match header on write operations.

Name string

Human-readable name of the resource.

Tags map[string, string]

Contains key-value pairs of tags.

Type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectStreamVideoType
type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectWorker struct{…}

Response for worker resources

ID string

Identifies the unique resource.

Etag string

ETag identifier for optimistic concurrency control. Formatted as “v1:” where the hash is the base64url-encoded SHA-256 (truncated to 128 bits) of the tags map canonicalized using RFC 8785 (JSON Canonicalization Scheme). Clients should treat ETags as opaque strings and pass them back via the If-Match header on write operations.

Name string

Human-readable name of the resource.

Tags map[string, string]

Contains key-value pairs of tags.

Type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectWorkerType
type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectWorkerVersion struct{…}

Response for worker_version resources

ID string

Identifies the unique resource.

Etag string

ETag identifier for optimistic concurrency control. Formatted as “v1:” where the hash is the base64url-encoded SHA-256 (truncated to 128 bits) of the tags map canonicalized using RFC 8785 (JSON Canonicalization Scheme). Clients should treat ETags as opaque strings and pass them back via the If-Match header on write operations.

Name string

Human-readable name of the resource.

Tags map[string, string]

Contains key-value pairs of tags.

Type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectWorkerVersionType
WorkerID string

Worker ID is required only for worker_version resources

type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectZone struct{…}

Response for zone resources

ID string

Identifies the unique resource.

Etag string

ETag identifier for optimistic concurrency control. Formatted as “v1:” where the hash is the base64url-encoded SHA-256 (truncated to 128 bits) of the tags map canonicalized using RFC 8785 (JSON Canonicalization Scheme). Clients should treat ETags as opaque strings and pass them back via the If-Match header on write operations.

Name string

Human-readable name of the resource.

Tags map[string, string]

Contains key-value pairs of tags.

Type AccountTagUpdateResponseResourceTaggingTaggedResourceObjectZoneType
ZoneID string

Zone ID is required only for zone-level resources

maxLength32
minLength32

Set tags for an account-level resource

package main

import (
  "context"
  "fmt"

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

func main() {
  client := cloudflare.NewClient(
    option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
    option.WithAPIEmail("user@example.com"),
  )
  accountTag, err := client.ResourceTagging.AccountTags.Update(context.TODO(), resource_tagging.AccountTagUpdateParams{
    AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
    Body: resource_tagging.AccountTagUpdateParamsBodyResourceTaggingSetTagsRequestAccountLevelWorkerVersion{
      ResourceID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
      ResourceType: cloudflare.F(resource_tagging.AccountTagUpdateParamsBodyResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceTypeWorker),
      WorkerID: cloudflare.F("3f72a691-44b3-4c11-8642-c18a88ddaa5e"),
    },
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", accountTag)
}
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "023e105f4ecef8ad9ca31a8372d0c353",
    "etag": "v1:RBNvo1WzZ4oRRq0W9-hkng",
    "name": "my-worker-script",
    "tags": {
      "environment": "production",
      "team": "engineering"
    },
    "type": "access_application"
  }
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "023e105f4ecef8ad9ca31a8372d0c353",
    "etag": "v1:RBNvo1WzZ4oRRq0W9-hkng",
    "name": "my-worker-script",
    "tags": {
      "environment": "production",
      "team": "engineering"
    },
    "type": "access_application"
  }
}