# Resource Tagging ## List tagged resources `client.ResourceTagging.List(ctx, params) (*CursorPaginationAfter[ResourceTaggingListResponse], error)` **get** `/accounts/{account_id}/tags/resources` Lists all tagged resources for an account. ### Parameters - `params ResourceTaggingListParams` - `AccountID param.Field[string]` Path param: Identifier. - `Cursor param.Field[string]` Query param: Cursor for pagination. - `Tag param.Field[[]string]` Query param: Filter resources by tag criteria. This parameter can be repeated multiple times, with AND logic between parameters. Supported syntax: - **Key-only**: `tag=` - Resource must have the tag key (e.g., `tag=production`) - **Key-value**: `tag==` - Resource must have the tag with specific value (e.g., `tag=env=prod`) - **Multiple values (OR)**: `tag==,` - Resource must have tag with any of the values (e.g., `tag=env=prod,staging`) - **Negate key-only**: `tag=!` - Resource must not have the tag key (e.g., `tag=!archived`) - **Negate key-value**: `tag=!=` - Resource must not have the tag with specific value (e.g., `tag=region!=us-west-1`) Multiple tag parameters are combined with AND logic. - `Type param.Field[[]ResourceTaggingListParamsType]` Query param: Filter by resource type. Can be repeated to filter by multiple types (OR logic). Example: ?type=zone&type=worker - `const ResourceTaggingListParamsTypeAccessApplication ResourceTaggingListParamsType = "access_application"` - `const ResourceTaggingListParamsTypeAccessApplicationPolicy ResourceTaggingListParamsType = "access_application_policy"` - `const ResourceTaggingListParamsTypeAccessGroup ResourceTaggingListParamsType = "access_group"` - `const ResourceTaggingListParamsTypeAccount ResourceTaggingListParamsType = "account"` - `const ResourceTaggingListParamsTypeAIGateway ResourceTaggingListParamsType = "ai_gateway"` - `const ResourceTaggingListParamsTypeAlertingPolicy ResourceTaggingListParamsType = "alerting_policy"` - `const ResourceTaggingListParamsTypeAlertingWebhook ResourceTaggingListParamsType = "alerting_webhook"` - `const ResourceTaggingListParamsTypeAPIGatewayOperation ResourceTaggingListParamsType = "api_gateway_operation"` - `const ResourceTaggingListParamsTypeCloudflaredTunnel ResourceTaggingListParamsType = "cloudflared_tunnel"` - `const ResourceTaggingListParamsTypeCustomCertificate ResourceTaggingListParamsType = "custom_certificate"` - `const ResourceTaggingListParamsTypeCustomHostname ResourceTaggingListParamsType = "custom_hostname"` - `const ResourceTaggingListParamsTypeD1Database ResourceTaggingListParamsType = "d1_database"` - `const ResourceTaggingListParamsTypeDNSRecord ResourceTaggingListParamsType = "dns_record"` - `const ResourceTaggingListParamsTypeDurableObjectNamespace ResourceTaggingListParamsType = "durable_object_namespace"` - `const ResourceTaggingListParamsTypeGatewayList ResourceTaggingListParamsType = "gateway_list"` - `const ResourceTaggingListParamsTypeGatewayRule ResourceTaggingListParamsType = "gateway_rule"` - `const ResourceTaggingListParamsTypeImage ResourceTaggingListParamsType = "image"` - `const ResourceTaggingListParamsTypeKVNamespace ResourceTaggingListParamsType = "kv_namespace"` - `const ResourceTaggingListParamsTypeManagedClientCertificate ResourceTaggingListParamsType = "managed_client_certificate"` - `const ResourceTaggingListParamsTypeQueue ResourceTaggingListParamsType = "queue"` - `const ResourceTaggingListParamsTypeR2Bucket ResourceTaggingListParamsType = "r2_bucket"` - `const ResourceTaggingListParamsTypeResourceShare ResourceTaggingListParamsType = "resource_share"` - `const ResourceTaggingListParamsTypeStreamLiveInput ResourceTaggingListParamsType = "stream_live_input"` - `const ResourceTaggingListParamsTypeStreamVideo ResourceTaggingListParamsType = "stream_video"` - `const ResourceTaggingListParamsTypeWorker ResourceTaggingListParamsType = "worker"` - `const ResourceTaggingListParamsTypeWorkerVersion ResourceTaggingListParamsType = "worker_version"` - `const ResourceTaggingListParamsTypeZone ResourceTaggingListParamsType = "zone"` ### Returns - `type ResourceTaggingListResponse interface{…}` Response for access_application resources - `type ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAccessApplication 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 ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAccessApplicationType` - `const ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAccessApplicationTypeAccessApplication ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAccessApplicationType = "access_application"` - `type ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAccessApplicationPolicy 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 - `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 ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAccessApplicationPolicyType` - `const ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAccessApplicationPolicyTypeAccessApplicationPolicy ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAccessApplicationPolicyType = "access_application_policy"` - `ZoneID string` Zone ID is required only for zone-level resources - `type ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAccessGroup 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 ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAccessGroupType` - `const ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAccessGroupTypeAccessGroup ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAccessGroupType = "access_group"` - `type ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAccount 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 ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAccountType` - `const ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAccountTypeAccount ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAccountType = "account"` - `type ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAIGateway 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 ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAIGatewayType` - `const ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAIGatewayTypeAIGateway ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAIGatewayType = "ai_gateway"` - `type ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAlertingPolicy 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 ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAlertingPolicyType` - `const ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAlertingPolicyTypeAlertingPolicy ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAlertingPolicyType = "alerting_policy"` - `type ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAlertingWebhook 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 ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAlertingWebhookType` - `const ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAlertingWebhookTypeAlertingWebhook ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAlertingWebhookType = "alerting_webhook"` - `type ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAPIGatewayOperation 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 ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAPIGatewayOperationType` - `const ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAPIGatewayOperationTypeAPIGatewayOperation ResourceTaggingListResponseResourceTaggingTaggedResourceObjectAPIGatewayOperationType = "api_gateway_operation"` - `ZoneID string` Zone ID is required only for zone-level resources - `type ResourceTaggingListResponseResourceTaggingTaggedResourceObjectCloudflaredTunnel 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 ResourceTaggingListResponseResourceTaggingTaggedResourceObjectCloudflaredTunnelType` - `const ResourceTaggingListResponseResourceTaggingTaggedResourceObjectCloudflaredTunnelTypeCloudflaredTunnel ResourceTaggingListResponseResourceTaggingTaggedResourceObjectCloudflaredTunnelType = "cloudflared_tunnel"` - `type ResourceTaggingListResponseResourceTaggingTaggedResourceObjectCustomCertificate 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 ResourceTaggingListResponseResourceTaggingTaggedResourceObjectCustomCertificateType` - `const ResourceTaggingListResponseResourceTaggingTaggedResourceObjectCustomCertificateTypeCustomCertificate ResourceTaggingListResponseResourceTaggingTaggedResourceObjectCustomCertificateType = "custom_certificate"` - `ZoneID string` Zone ID is required only for zone-level resources - `type ResourceTaggingListResponseResourceTaggingTaggedResourceObjectCustomHostname 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 ResourceTaggingListResponseResourceTaggingTaggedResourceObjectCustomHostnameType` - `const ResourceTaggingListResponseResourceTaggingTaggedResourceObjectCustomHostnameTypeCustomHostname ResourceTaggingListResponseResourceTaggingTaggedResourceObjectCustomHostnameType = "custom_hostname"` - `ZoneID string` Zone ID is required only for zone-level resources - `type ResourceTaggingListResponseResourceTaggingTaggedResourceObjectD1Database 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 ResourceTaggingListResponseResourceTaggingTaggedResourceObjectD1DatabaseType` - `const ResourceTaggingListResponseResourceTaggingTaggedResourceObjectD1DatabaseTypeD1Database ResourceTaggingListResponseResourceTaggingTaggedResourceObjectD1DatabaseType = "d1_database"` - `type ResourceTaggingListResponseResourceTaggingTaggedResourceObjectDNSRecord 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 ResourceTaggingListResponseResourceTaggingTaggedResourceObjectDNSRecordType` - `const ResourceTaggingListResponseResourceTaggingTaggedResourceObjectDNSRecordTypeDNSRecord ResourceTaggingListResponseResourceTaggingTaggedResourceObjectDNSRecordType = "dns_record"` - `ZoneID string` Zone ID is required only for zone-level resources - `type ResourceTaggingListResponseResourceTaggingTaggedResourceObjectDurableObjectNamespace 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 ResourceTaggingListResponseResourceTaggingTaggedResourceObjectDurableObjectNamespaceType` - `const ResourceTaggingListResponseResourceTaggingTaggedResourceObjectDurableObjectNamespaceTypeDurableObjectNamespace ResourceTaggingListResponseResourceTaggingTaggedResourceObjectDurableObjectNamespaceType = "durable_object_namespace"` - `type ResourceTaggingListResponseResourceTaggingTaggedResourceObjectGatewayList 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 ResourceTaggingListResponseResourceTaggingTaggedResourceObjectGatewayListType` - `const ResourceTaggingListResponseResourceTaggingTaggedResourceObjectGatewayListTypeGatewayList ResourceTaggingListResponseResourceTaggingTaggedResourceObjectGatewayListType = "gateway_list"` - `type ResourceTaggingListResponseResourceTaggingTaggedResourceObjectGatewayRule 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 ResourceTaggingListResponseResourceTaggingTaggedResourceObjectGatewayRuleType` - `const ResourceTaggingListResponseResourceTaggingTaggedResourceObjectGatewayRuleTypeGatewayRule ResourceTaggingListResponseResourceTaggingTaggedResourceObjectGatewayRuleType = "gateway_rule"` - `type ResourceTaggingListResponseResourceTaggingTaggedResourceObjectImage 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 ResourceTaggingListResponseResourceTaggingTaggedResourceObjectImageType` - `const ResourceTaggingListResponseResourceTaggingTaggedResourceObjectImageTypeImage ResourceTaggingListResponseResourceTaggingTaggedResourceObjectImageType = "image"` - `type ResourceTaggingListResponseResourceTaggingTaggedResourceObjectKVNamespace 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 ResourceTaggingListResponseResourceTaggingTaggedResourceObjectKVNamespaceType` - `const ResourceTaggingListResponseResourceTaggingTaggedResourceObjectKVNamespaceTypeKVNamespace ResourceTaggingListResponseResourceTaggingTaggedResourceObjectKVNamespaceType = "kv_namespace"` - `type ResourceTaggingListResponseResourceTaggingTaggedResourceObjectManagedClientCertificate 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 ResourceTaggingListResponseResourceTaggingTaggedResourceObjectManagedClientCertificateType` - `const ResourceTaggingListResponseResourceTaggingTaggedResourceObjectManagedClientCertificateTypeManagedClientCertificate ResourceTaggingListResponseResourceTaggingTaggedResourceObjectManagedClientCertificateType = "managed_client_certificate"` - `ZoneID string` Zone ID is required only for zone-level resources - `type ResourceTaggingListResponseResourceTaggingTaggedResourceObjectQueue 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 ResourceTaggingListResponseResourceTaggingTaggedResourceObjectQueueType` - `const ResourceTaggingListResponseResourceTaggingTaggedResourceObjectQueueTypeQueue ResourceTaggingListResponseResourceTaggingTaggedResourceObjectQueueType = "queue"` - `type ResourceTaggingListResponseResourceTaggingTaggedResourceObjectR2Bucket 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 ResourceTaggingListResponseResourceTaggingTaggedResourceObjectR2BucketType` - `const ResourceTaggingListResponseResourceTaggingTaggedResourceObjectR2BucketTypeR2Bucket ResourceTaggingListResponseResourceTaggingTaggedResourceObjectR2BucketType = "r2_bucket"` - `type ResourceTaggingListResponseResourceTaggingTaggedResourceObjectResourceShare 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 ResourceTaggingListResponseResourceTaggingTaggedResourceObjectResourceShareType` - `const ResourceTaggingListResponseResourceTaggingTaggedResourceObjectResourceShareTypeResourceShare ResourceTaggingListResponseResourceTaggingTaggedResourceObjectResourceShareType = "resource_share"` - `type ResourceTaggingListResponseResourceTaggingTaggedResourceObjectStreamLiveInput 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 ResourceTaggingListResponseResourceTaggingTaggedResourceObjectStreamLiveInputType` - `const ResourceTaggingListResponseResourceTaggingTaggedResourceObjectStreamLiveInputTypeStreamLiveInput ResourceTaggingListResponseResourceTaggingTaggedResourceObjectStreamLiveInputType = "stream_live_input"` - `type ResourceTaggingListResponseResourceTaggingTaggedResourceObjectStreamVideo 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 ResourceTaggingListResponseResourceTaggingTaggedResourceObjectStreamVideoType` - `const ResourceTaggingListResponseResourceTaggingTaggedResourceObjectStreamVideoTypeStreamVideo ResourceTaggingListResponseResourceTaggingTaggedResourceObjectStreamVideoType = "stream_video"` - `type ResourceTaggingListResponseResourceTaggingTaggedResourceObjectWorker 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 ResourceTaggingListResponseResourceTaggingTaggedResourceObjectWorkerType` - `const ResourceTaggingListResponseResourceTaggingTaggedResourceObjectWorkerTypeWorker ResourceTaggingListResponseResourceTaggingTaggedResourceObjectWorkerType = "worker"` - `type ResourceTaggingListResponseResourceTaggingTaggedResourceObjectWorkerVersion 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 ResourceTaggingListResponseResourceTaggingTaggedResourceObjectWorkerVersionType` - `const ResourceTaggingListResponseResourceTaggingTaggedResourceObjectWorkerVersionTypeWorkerVersion ResourceTaggingListResponseResourceTaggingTaggedResourceObjectWorkerVersionType = "worker_version"` - `WorkerID string` Worker ID is required only for worker_version resources - `type ResourceTaggingListResponseResourceTaggingTaggedResourceObjectZone 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 ResourceTaggingListResponseResourceTaggingTaggedResourceObjectZoneType` - `const ResourceTaggingListResponseResourceTaggingTaggedResourceObjectZoneTypeZone ResourceTaggingListResponseResourceTaggingTaggedResourceObjectZoneType = "zone"` - `ZoneID string` Zone ID is required only for zone-level resources ### Example ```go package main import ( "context" "fmt" "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"), ) page, err := client.ResourceTagging.List(context.TODO(), resource_tagging.ResourceTaggingListParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ``` #### Response ```json { "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" } ], "result_info": { "count": 20, "cursor": "eyJhY2NvdW50X2lkIjoxMjM0NTY3ODkwfQ" } } ``` # Account Tags ## Get tags for an account-level resource `client.ResourceTagging.AccountTags.Get(ctx, params) (*AccountTagGetResponse, error)` **get** `/accounts/{account_id}/tags` Retrieves tags for a specific account-level resource. ### Parameters - `params AccountTagGetParams` - `AccountID param.Field[string]` Path param: Identifier. - `ResourceID param.Field[string]` Query param: The ID of the resource to retrieve tags for. - `ResourceType param.Field[AccountTagGetParamsResourceType]` Query param: The type of the resource. - `const AccountTagGetParamsResourceTypeAccessApplication AccountTagGetParamsResourceType = "access_application"` - `const AccountTagGetParamsResourceTypeAccessGroup AccountTagGetParamsResourceType = "access_group"` - `const AccountTagGetParamsResourceTypeAccount AccountTagGetParamsResourceType = "account"` - `const AccountTagGetParamsResourceTypeAIGateway AccountTagGetParamsResourceType = "ai_gateway"` - `const AccountTagGetParamsResourceTypeAlertingPolicy AccountTagGetParamsResourceType = "alerting_policy"` - `const AccountTagGetParamsResourceTypeAlertingWebhook AccountTagGetParamsResourceType = "alerting_webhook"` - `const AccountTagGetParamsResourceTypeCloudflaredTunnel AccountTagGetParamsResourceType = "cloudflared_tunnel"` - `const AccountTagGetParamsResourceTypeD1Database AccountTagGetParamsResourceType = "d1_database"` - `const AccountTagGetParamsResourceTypeDurableObjectNamespace AccountTagGetParamsResourceType = "durable_object_namespace"` - `const AccountTagGetParamsResourceTypeGatewayList AccountTagGetParamsResourceType = "gateway_list"` - `const AccountTagGetParamsResourceTypeGatewayRule AccountTagGetParamsResourceType = "gateway_rule"` - `const AccountTagGetParamsResourceTypeImage AccountTagGetParamsResourceType = "image"` - `const AccountTagGetParamsResourceTypeKVNamespace AccountTagGetParamsResourceType = "kv_namespace"` - `const AccountTagGetParamsResourceTypeQueue AccountTagGetParamsResourceType = "queue"` - `const AccountTagGetParamsResourceTypeR2Bucket AccountTagGetParamsResourceType = "r2_bucket"` - `const AccountTagGetParamsResourceTypeResourceShare AccountTagGetParamsResourceType = "resource_share"` - `const AccountTagGetParamsResourceTypeStreamLiveInput AccountTagGetParamsResourceType = "stream_live_input"` - `const AccountTagGetParamsResourceTypeStreamVideo AccountTagGetParamsResourceType = "stream_video"` - `const AccountTagGetParamsResourceTypeWorker AccountTagGetParamsResourceType = "worker"` - `const AccountTagGetParamsResourceTypeWorkerVersion AccountTagGetParamsResourceType = "worker_version"` - `WorkerID param.Field[string]` Query param: Worker identifier. Required for worker_version resources. ### Returns - `type AccountTagGetResponse interface{…}` Response for access_application resources - `type AccountTagGetResponseResourceTaggingTaggedResourceObjectAccessApplication 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 AccountTagGetResponseResourceTaggingTaggedResourceObjectAccessApplicationType` - `const AccountTagGetResponseResourceTaggingTaggedResourceObjectAccessApplicationTypeAccessApplication AccountTagGetResponseResourceTaggingTaggedResourceObjectAccessApplicationType = "access_application"` - `type AccountTagGetResponseResourceTaggingTaggedResourceObjectAccessApplicationPolicy 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 - `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 AccountTagGetResponseResourceTaggingTaggedResourceObjectAccessApplicationPolicyType` - `const AccountTagGetResponseResourceTaggingTaggedResourceObjectAccessApplicationPolicyTypeAccessApplicationPolicy AccountTagGetResponseResourceTaggingTaggedResourceObjectAccessApplicationPolicyType = "access_application_policy"` - `ZoneID string` Zone ID is required only for zone-level resources - `type AccountTagGetResponseResourceTaggingTaggedResourceObjectAccessGroup 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 AccountTagGetResponseResourceTaggingTaggedResourceObjectAccessGroupType` - `const AccountTagGetResponseResourceTaggingTaggedResourceObjectAccessGroupTypeAccessGroup AccountTagGetResponseResourceTaggingTaggedResourceObjectAccessGroupType = "access_group"` - `type AccountTagGetResponseResourceTaggingTaggedResourceObjectAccount 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 AccountTagGetResponseResourceTaggingTaggedResourceObjectAccountType` - `const AccountTagGetResponseResourceTaggingTaggedResourceObjectAccountTypeAccount AccountTagGetResponseResourceTaggingTaggedResourceObjectAccountType = "account"` - `type AccountTagGetResponseResourceTaggingTaggedResourceObjectAIGateway 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 AccountTagGetResponseResourceTaggingTaggedResourceObjectAIGatewayType` - `const AccountTagGetResponseResourceTaggingTaggedResourceObjectAIGatewayTypeAIGateway AccountTagGetResponseResourceTaggingTaggedResourceObjectAIGatewayType = "ai_gateway"` - `type AccountTagGetResponseResourceTaggingTaggedResourceObjectAlertingPolicy 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 AccountTagGetResponseResourceTaggingTaggedResourceObjectAlertingPolicyType` - `const AccountTagGetResponseResourceTaggingTaggedResourceObjectAlertingPolicyTypeAlertingPolicy AccountTagGetResponseResourceTaggingTaggedResourceObjectAlertingPolicyType = "alerting_policy"` - `type AccountTagGetResponseResourceTaggingTaggedResourceObjectAlertingWebhook 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 AccountTagGetResponseResourceTaggingTaggedResourceObjectAlertingWebhookType` - `const AccountTagGetResponseResourceTaggingTaggedResourceObjectAlertingWebhookTypeAlertingWebhook AccountTagGetResponseResourceTaggingTaggedResourceObjectAlertingWebhookType = "alerting_webhook"` - `type AccountTagGetResponseResourceTaggingTaggedResourceObjectAPIGatewayOperation 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 AccountTagGetResponseResourceTaggingTaggedResourceObjectAPIGatewayOperationType` - `const AccountTagGetResponseResourceTaggingTaggedResourceObjectAPIGatewayOperationTypeAPIGatewayOperation AccountTagGetResponseResourceTaggingTaggedResourceObjectAPIGatewayOperationType = "api_gateway_operation"` - `ZoneID string` Zone ID is required only for zone-level resources - `type AccountTagGetResponseResourceTaggingTaggedResourceObjectCloudflaredTunnel 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 AccountTagGetResponseResourceTaggingTaggedResourceObjectCloudflaredTunnelType` - `const AccountTagGetResponseResourceTaggingTaggedResourceObjectCloudflaredTunnelTypeCloudflaredTunnel AccountTagGetResponseResourceTaggingTaggedResourceObjectCloudflaredTunnelType = "cloudflared_tunnel"` - `type AccountTagGetResponseResourceTaggingTaggedResourceObjectCustomCertificate 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 AccountTagGetResponseResourceTaggingTaggedResourceObjectCustomCertificateType` - `const AccountTagGetResponseResourceTaggingTaggedResourceObjectCustomCertificateTypeCustomCertificate AccountTagGetResponseResourceTaggingTaggedResourceObjectCustomCertificateType = "custom_certificate"` - `ZoneID string` Zone ID is required only for zone-level resources - `type AccountTagGetResponseResourceTaggingTaggedResourceObjectCustomHostname 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 AccountTagGetResponseResourceTaggingTaggedResourceObjectCustomHostnameType` - `const AccountTagGetResponseResourceTaggingTaggedResourceObjectCustomHostnameTypeCustomHostname AccountTagGetResponseResourceTaggingTaggedResourceObjectCustomHostnameType = "custom_hostname"` - `ZoneID string` Zone ID is required only for zone-level resources - `type AccountTagGetResponseResourceTaggingTaggedResourceObjectD1Database 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 AccountTagGetResponseResourceTaggingTaggedResourceObjectD1DatabaseType` - `const AccountTagGetResponseResourceTaggingTaggedResourceObjectD1DatabaseTypeD1Database AccountTagGetResponseResourceTaggingTaggedResourceObjectD1DatabaseType = "d1_database"` - `type AccountTagGetResponseResourceTaggingTaggedResourceObjectDNSRecord 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 AccountTagGetResponseResourceTaggingTaggedResourceObjectDNSRecordType` - `const AccountTagGetResponseResourceTaggingTaggedResourceObjectDNSRecordTypeDNSRecord AccountTagGetResponseResourceTaggingTaggedResourceObjectDNSRecordType = "dns_record"` - `ZoneID string` Zone ID is required only for zone-level resources - `type AccountTagGetResponseResourceTaggingTaggedResourceObjectDurableObjectNamespace 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 AccountTagGetResponseResourceTaggingTaggedResourceObjectDurableObjectNamespaceType` - `const AccountTagGetResponseResourceTaggingTaggedResourceObjectDurableObjectNamespaceTypeDurableObjectNamespace AccountTagGetResponseResourceTaggingTaggedResourceObjectDurableObjectNamespaceType = "durable_object_namespace"` - `type AccountTagGetResponseResourceTaggingTaggedResourceObjectGatewayList 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 AccountTagGetResponseResourceTaggingTaggedResourceObjectGatewayListType` - `const AccountTagGetResponseResourceTaggingTaggedResourceObjectGatewayListTypeGatewayList AccountTagGetResponseResourceTaggingTaggedResourceObjectGatewayListType = "gateway_list"` - `type AccountTagGetResponseResourceTaggingTaggedResourceObjectGatewayRule 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 AccountTagGetResponseResourceTaggingTaggedResourceObjectGatewayRuleType` - `const AccountTagGetResponseResourceTaggingTaggedResourceObjectGatewayRuleTypeGatewayRule AccountTagGetResponseResourceTaggingTaggedResourceObjectGatewayRuleType = "gateway_rule"` - `type AccountTagGetResponseResourceTaggingTaggedResourceObjectImage 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 AccountTagGetResponseResourceTaggingTaggedResourceObjectImageType` - `const AccountTagGetResponseResourceTaggingTaggedResourceObjectImageTypeImage AccountTagGetResponseResourceTaggingTaggedResourceObjectImageType = "image"` - `type AccountTagGetResponseResourceTaggingTaggedResourceObjectKVNamespace 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 AccountTagGetResponseResourceTaggingTaggedResourceObjectKVNamespaceType` - `const AccountTagGetResponseResourceTaggingTaggedResourceObjectKVNamespaceTypeKVNamespace AccountTagGetResponseResourceTaggingTaggedResourceObjectKVNamespaceType = "kv_namespace"` - `type AccountTagGetResponseResourceTaggingTaggedResourceObjectManagedClientCertificate 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 AccountTagGetResponseResourceTaggingTaggedResourceObjectManagedClientCertificateType` - `const AccountTagGetResponseResourceTaggingTaggedResourceObjectManagedClientCertificateTypeManagedClientCertificate AccountTagGetResponseResourceTaggingTaggedResourceObjectManagedClientCertificateType = "managed_client_certificate"` - `ZoneID string` Zone ID is required only for zone-level resources - `type AccountTagGetResponseResourceTaggingTaggedResourceObjectQueue 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 AccountTagGetResponseResourceTaggingTaggedResourceObjectQueueType` - `const AccountTagGetResponseResourceTaggingTaggedResourceObjectQueueTypeQueue AccountTagGetResponseResourceTaggingTaggedResourceObjectQueueType = "queue"` - `type AccountTagGetResponseResourceTaggingTaggedResourceObjectR2Bucket 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 AccountTagGetResponseResourceTaggingTaggedResourceObjectR2BucketType` - `const AccountTagGetResponseResourceTaggingTaggedResourceObjectR2BucketTypeR2Bucket AccountTagGetResponseResourceTaggingTaggedResourceObjectR2BucketType = "r2_bucket"` - `type AccountTagGetResponseResourceTaggingTaggedResourceObjectResourceShare 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 AccountTagGetResponseResourceTaggingTaggedResourceObjectResourceShareType` - `const AccountTagGetResponseResourceTaggingTaggedResourceObjectResourceShareTypeResourceShare AccountTagGetResponseResourceTaggingTaggedResourceObjectResourceShareType = "resource_share"` - `type AccountTagGetResponseResourceTaggingTaggedResourceObjectStreamLiveInput 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 AccountTagGetResponseResourceTaggingTaggedResourceObjectStreamLiveInputType` - `const AccountTagGetResponseResourceTaggingTaggedResourceObjectStreamLiveInputTypeStreamLiveInput AccountTagGetResponseResourceTaggingTaggedResourceObjectStreamLiveInputType = "stream_live_input"` - `type AccountTagGetResponseResourceTaggingTaggedResourceObjectStreamVideo 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 AccountTagGetResponseResourceTaggingTaggedResourceObjectStreamVideoType` - `const AccountTagGetResponseResourceTaggingTaggedResourceObjectStreamVideoTypeStreamVideo AccountTagGetResponseResourceTaggingTaggedResourceObjectStreamVideoType = "stream_video"` - `type AccountTagGetResponseResourceTaggingTaggedResourceObjectWorker 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 AccountTagGetResponseResourceTaggingTaggedResourceObjectWorkerType` - `const AccountTagGetResponseResourceTaggingTaggedResourceObjectWorkerTypeWorker AccountTagGetResponseResourceTaggingTaggedResourceObjectWorkerType = "worker"` - `type AccountTagGetResponseResourceTaggingTaggedResourceObjectWorkerVersion 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 AccountTagGetResponseResourceTaggingTaggedResourceObjectWorkerVersionType` - `const AccountTagGetResponseResourceTaggingTaggedResourceObjectWorkerVersionTypeWorkerVersion AccountTagGetResponseResourceTaggingTaggedResourceObjectWorkerVersionType = "worker_version"` - `WorkerID string` Worker ID is required only for worker_version resources - `type AccountTagGetResponseResourceTaggingTaggedResourceObjectZone 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 AccountTagGetResponseResourceTaggingTaggedResourceObjectZoneType` - `const AccountTagGetResponseResourceTaggingTaggedResourceObjectZoneTypeZone AccountTagGetResponseResourceTaggingTaggedResourceObjectZoneType = "zone"` - `ZoneID string` Zone ID is required only for zone-level resources ### Example ```go package main import ( "context" "fmt" "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"), ) accountTag, err := client.ResourceTagging.AccountTags.Get(context.TODO(), resource_tagging.AccountTagGetParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), ResourceID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), ResourceType: cloudflare.F(resource_tagging.AccountTagGetParamsResourceTypeWorker), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", accountTag) } ``` #### Response ```json { "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" } } ``` ## 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. ### Parameters - `params AccountTagUpdateParams` - `AccountID param.Field[string]` Path param: Identifier. - `ResourceID param.Field[string]` Body param: Identifies the unique resource. - `ResourceType param.Field[AccountTagUpdateParamsResourceTaggingSetTagsRequestAccountLevelWorkerVersionResourceType]` 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]]` Body param: Contains key-value pairs of tags. - `IfMatch param.Field[string]` 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. ### Returns - `type AccountTagUpdateResponse interface{…}` Response for access_application resources - `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` - `const AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAccessApplicationTypeAccessApplication AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAccessApplicationType = "access_application"` - `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 - `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` - `const AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAccessApplicationPolicyTypeAccessApplicationPolicy AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAccessApplicationPolicyType = "access_application_policy"` - `ZoneID string` Zone ID is required only for zone-level resources - `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` - `const AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAccessGroupTypeAccessGroup AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAccessGroupType = "access_group"` - `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` - `const AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAccountTypeAccount AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAccountType = "account"` - `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` - `const AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAIGatewayTypeAIGateway AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAIGatewayType = "ai_gateway"` - `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` - `const AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAlertingPolicyTypeAlertingPolicy AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAlertingPolicyType = "alerting_policy"` - `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` - `const AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAlertingWebhookTypeAlertingWebhook AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAlertingWebhookType = "alerting_webhook"` - `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` - `const AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAPIGatewayOperationTypeAPIGatewayOperation AccountTagUpdateResponseResourceTaggingTaggedResourceObjectAPIGatewayOperationType = "api_gateway_operation"` - `ZoneID string` Zone ID is required only for zone-level resources - `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` - `const AccountTagUpdateResponseResourceTaggingTaggedResourceObjectCloudflaredTunnelTypeCloudflaredTunnel AccountTagUpdateResponseResourceTaggingTaggedResourceObjectCloudflaredTunnelType = "cloudflared_tunnel"` - `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` - `const AccountTagUpdateResponseResourceTaggingTaggedResourceObjectCustomCertificateTypeCustomCertificate AccountTagUpdateResponseResourceTaggingTaggedResourceObjectCustomCertificateType = "custom_certificate"` - `ZoneID string` Zone ID is required only for zone-level resources - `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` - `const AccountTagUpdateResponseResourceTaggingTaggedResourceObjectCustomHostnameTypeCustomHostname AccountTagUpdateResponseResourceTaggingTaggedResourceObjectCustomHostnameType = "custom_hostname"` - `ZoneID string` Zone ID is required only for zone-level resources - `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` - `const AccountTagUpdateResponseResourceTaggingTaggedResourceObjectD1DatabaseTypeD1Database AccountTagUpdateResponseResourceTaggingTaggedResourceObjectD1DatabaseType = "d1_database"` - `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` - `const AccountTagUpdateResponseResourceTaggingTaggedResourceObjectDNSRecordTypeDNSRecord AccountTagUpdateResponseResourceTaggingTaggedResourceObjectDNSRecordType = "dns_record"` - `ZoneID string` Zone ID is required only for zone-level resources - `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` - `const AccountTagUpdateResponseResourceTaggingTaggedResourceObjectDurableObjectNamespaceTypeDurableObjectNamespace AccountTagUpdateResponseResourceTaggingTaggedResourceObjectDurableObjectNamespaceType = "durable_object_namespace"` - `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` - `const AccountTagUpdateResponseResourceTaggingTaggedResourceObjectGatewayListTypeGatewayList AccountTagUpdateResponseResourceTaggingTaggedResourceObjectGatewayListType = "gateway_list"` - `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` - `const AccountTagUpdateResponseResourceTaggingTaggedResourceObjectGatewayRuleTypeGatewayRule AccountTagUpdateResponseResourceTaggingTaggedResourceObjectGatewayRuleType = "gateway_rule"` - `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` - `const AccountTagUpdateResponseResourceTaggingTaggedResourceObjectImageTypeImage AccountTagUpdateResponseResourceTaggingTaggedResourceObjectImageType = "image"` - `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` - `const AccountTagUpdateResponseResourceTaggingTaggedResourceObjectKVNamespaceTypeKVNamespace AccountTagUpdateResponseResourceTaggingTaggedResourceObjectKVNamespaceType = "kv_namespace"` - `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` - `const AccountTagUpdateResponseResourceTaggingTaggedResourceObjectManagedClientCertificateTypeManagedClientCertificate AccountTagUpdateResponseResourceTaggingTaggedResourceObjectManagedClientCertificateType = "managed_client_certificate"` - `ZoneID string` Zone ID is required only for zone-level resources - `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` - `const AccountTagUpdateResponseResourceTaggingTaggedResourceObjectQueueTypeQueue AccountTagUpdateResponseResourceTaggingTaggedResourceObjectQueueType = "queue"` - `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` - `const AccountTagUpdateResponseResourceTaggingTaggedResourceObjectR2BucketTypeR2Bucket AccountTagUpdateResponseResourceTaggingTaggedResourceObjectR2BucketType = "r2_bucket"` - `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` - `const AccountTagUpdateResponseResourceTaggingTaggedResourceObjectResourceShareTypeResourceShare AccountTagUpdateResponseResourceTaggingTaggedResourceObjectResourceShareType = "resource_share"` - `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` - `const AccountTagUpdateResponseResourceTaggingTaggedResourceObjectStreamLiveInputTypeStreamLiveInput AccountTagUpdateResponseResourceTaggingTaggedResourceObjectStreamLiveInputType = "stream_live_input"` - `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` - `const AccountTagUpdateResponseResourceTaggingTaggedResourceObjectStreamVideoTypeStreamVideo AccountTagUpdateResponseResourceTaggingTaggedResourceObjectStreamVideoType = "stream_video"` - `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` - `const AccountTagUpdateResponseResourceTaggingTaggedResourceObjectWorkerTypeWorker AccountTagUpdateResponseResourceTaggingTaggedResourceObjectWorkerType = "worker"` - `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` - `const AccountTagUpdateResponseResourceTaggingTaggedResourceObjectWorkerVersionTypeWorkerVersion AccountTagUpdateResponseResourceTaggingTaggedResourceObjectWorkerVersionType = "worker_version"` - `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` - `const AccountTagUpdateResponseResourceTaggingTaggedResourceObjectZoneTypeZone AccountTagUpdateResponseResourceTaggingTaggedResourceObjectZoneType = "zone"` - `ZoneID string` Zone ID is required only for zone-level resources ### Example ```go package main import ( "context" "fmt" "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"), ) 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) } ``` #### Response ```json { "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" } } ``` ## 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. ### Parameters - `params AccountTagDeleteParams` - `AccountID param.Field[string]` Path param: Identifier. - `IfMatch param.Field[string]` 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. ### Example ```go 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()) } } ``` # Zone Tags ## Get tags for a zone-level resource `client.ResourceTagging.ZoneTags.Get(ctx, params) (*ZoneTagGetResponse, error)` **get** `/zones/{zone_id}/tags` Retrieves tags for a specific zone-level resource. ### Parameters - `params ZoneTagGetParams` - `ZoneID param.Field[string]` Path param: Zone ID is required only for zone-level resources - `ResourceID param.Field[string]` Query param: The ID of the resource to retrieve tags for. - `ResourceType param.Field[ZoneTagGetParamsResourceType]` Query param: The type of the resource. - `const ZoneTagGetParamsResourceTypeAccessApplicationPolicy ZoneTagGetParamsResourceType = "access_application_policy"` - `const ZoneTagGetParamsResourceTypeAPIGatewayOperation ZoneTagGetParamsResourceType = "api_gateway_operation"` - `const ZoneTagGetParamsResourceTypeCustomCertificate ZoneTagGetParamsResourceType = "custom_certificate"` - `const ZoneTagGetParamsResourceTypeCustomHostname ZoneTagGetParamsResourceType = "custom_hostname"` - `const ZoneTagGetParamsResourceTypeDNSRecord ZoneTagGetParamsResourceType = "dns_record"` - `const ZoneTagGetParamsResourceTypeManagedClientCertificate ZoneTagGetParamsResourceType = "managed_client_certificate"` - `const ZoneTagGetParamsResourceTypeZone ZoneTagGetParamsResourceType = "zone"` - `AccessApplicationID param.Field[string]` Query param: Access application ID identifier. Required for access_application_policy resources. ### Returns - `type ZoneTagGetResponse interface{…}` Response for access_application resources - `type ZoneTagGetResponseResourceTaggingTaggedResourceObjectAccessApplication 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 ZoneTagGetResponseResourceTaggingTaggedResourceObjectAccessApplicationType` - `const ZoneTagGetResponseResourceTaggingTaggedResourceObjectAccessApplicationTypeAccessApplication ZoneTagGetResponseResourceTaggingTaggedResourceObjectAccessApplicationType = "access_application"` - `type ZoneTagGetResponseResourceTaggingTaggedResourceObjectAccessApplicationPolicy 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 - `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 ZoneTagGetResponseResourceTaggingTaggedResourceObjectAccessApplicationPolicyType` - `const ZoneTagGetResponseResourceTaggingTaggedResourceObjectAccessApplicationPolicyTypeAccessApplicationPolicy ZoneTagGetResponseResourceTaggingTaggedResourceObjectAccessApplicationPolicyType = "access_application_policy"` - `ZoneID string` Zone ID is required only for zone-level resources - `type ZoneTagGetResponseResourceTaggingTaggedResourceObjectAccessGroup 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 ZoneTagGetResponseResourceTaggingTaggedResourceObjectAccessGroupType` - `const ZoneTagGetResponseResourceTaggingTaggedResourceObjectAccessGroupTypeAccessGroup ZoneTagGetResponseResourceTaggingTaggedResourceObjectAccessGroupType = "access_group"` - `type ZoneTagGetResponseResourceTaggingTaggedResourceObjectAccount 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 ZoneTagGetResponseResourceTaggingTaggedResourceObjectAccountType` - `const ZoneTagGetResponseResourceTaggingTaggedResourceObjectAccountTypeAccount ZoneTagGetResponseResourceTaggingTaggedResourceObjectAccountType = "account"` - `type ZoneTagGetResponseResourceTaggingTaggedResourceObjectAIGateway 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 ZoneTagGetResponseResourceTaggingTaggedResourceObjectAIGatewayType` - `const ZoneTagGetResponseResourceTaggingTaggedResourceObjectAIGatewayTypeAIGateway ZoneTagGetResponseResourceTaggingTaggedResourceObjectAIGatewayType = "ai_gateway"` - `type ZoneTagGetResponseResourceTaggingTaggedResourceObjectAlertingPolicy 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 ZoneTagGetResponseResourceTaggingTaggedResourceObjectAlertingPolicyType` - `const ZoneTagGetResponseResourceTaggingTaggedResourceObjectAlertingPolicyTypeAlertingPolicy ZoneTagGetResponseResourceTaggingTaggedResourceObjectAlertingPolicyType = "alerting_policy"` - `type ZoneTagGetResponseResourceTaggingTaggedResourceObjectAlertingWebhook 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 ZoneTagGetResponseResourceTaggingTaggedResourceObjectAlertingWebhookType` - `const ZoneTagGetResponseResourceTaggingTaggedResourceObjectAlertingWebhookTypeAlertingWebhook ZoneTagGetResponseResourceTaggingTaggedResourceObjectAlertingWebhookType = "alerting_webhook"` - `type ZoneTagGetResponseResourceTaggingTaggedResourceObjectAPIGatewayOperation 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 ZoneTagGetResponseResourceTaggingTaggedResourceObjectAPIGatewayOperationType` - `const ZoneTagGetResponseResourceTaggingTaggedResourceObjectAPIGatewayOperationTypeAPIGatewayOperation ZoneTagGetResponseResourceTaggingTaggedResourceObjectAPIGatewayOperationType = "api_gateway_operation"` - `ZoneID string` Zone ID is required only for zone-level resources - `type ZoneTagGetResponseResourceTaggingTaggedResourceObjectCloudflaredTunnel 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 ZoneTagGetResponseResourceTaggingTaggedResourceObjectCloudflaredTunnelType` - `const ZoneTagGetResponseResourceTaggingTaggedResourceObjectCloudflaredTunnelTypeCloudflaredTunnel ZoneTagGetResponseResourceTaggingTaggedResourceObjectCloudflaredTunnelType = "cloudflared_tunnel"` - `type ZoneTagGetResponseResourceTaggingTaggedResourceObjectCustomCertificate 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 ZoneTagGetResponseResourceTaggingTaggedResourceObjectCustomCertificateType` - `const ZoneTagGetResponseResourceTaggingTaggedResourceObjectCustomCertificateTypeCustomCertificate ZoneTagGetResponseResourceTaggingTaggedResourceObjectCustomCertificateType = "custom_certificate"` - `ZoneID string` Zone ID is required only for zone-level resources - `type ZoneTagGetResponseResourceTaggingTaggedResourceObjectCustomHostname 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 ZoneTagGetResponseResourceTaggingTaggedResourceObjectCustomHostnameType` - `const ZoneTagGetResponseResourceTaggingTaggedResourceObjectCustomHostnameTypeCustomHostname ZoneTagGetResponseResourceTaggingTaggedResourceObjectCustomHostnameType = "custom_hostname"` - `ZoneID string` Zone ID is required only for zone-level resources - `type ZoneTagGetResponseResourceTaggingTaggedResourceObjectD1Database 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 ZoneTagGetResponseResourceTaggingTaggedResourceObjectD1DatabaseType` - `const ZoneTagGetResponseResourceTaggingTaggedResourceObjectD1DatabaseTypeD1Database ZoneTagGetResponseResourceTaggingTaggedResourceObjectD1DatabaseType = "d1_database"` - `type ZoneTagGetResponseResourceTaggingTaggedResourceObjectDNSRecord 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 ZoneTagGetResponseResourceTaggingTaggedResourceObjectDNSRecordType` - `const ZoneTagGetResponseResourceTaggingTaggedResourceObjectDNSRecordTypeDNSRecord ZoneTagGetResponseResourceTaggingTaggedResourceObjectDNSRecordType = "dns_record"` - `ZoneID string` Zone ID is required only for zone-level resources - `type ZoneTagGetResponseResourceTaggingTaggedResourceObjectDurableObjectNamespace 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 ZoneTagGetResponseResourceTaggingTaggedResourceObjectDurableObjectNamespaceType` - `const ZoneTagGetResponseResourceTaggingTaggedResourceObjectDurableObjectNamespaceTypeDurableObjectNamespace ZoneTagGetResponseResourceTaggingTaggedResourceObjectDurableObjectNamespaceType = "durable_object_namespace"` - `type ZoneTagGetResponseResourceTaggingTaggedResourceObjectGatewayList 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 ZoneTagGetResponseResourceTaggingTaggedResourceObjectGatewayListType` - `const ZoneTagGetResponseResourceTaggingTaggedResourceObjectGatewayListTypeGatewayList ZoneTagGetResponseResourceTaggingTaggedResourceObjectGatewayListType = "gateway_list"` - `type ZoneTagGetResponseResourceTaggingTaggedResourceObjectGatewayRule 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 ZoneTagGetResponseResourceTaggingTaggedResourceObjectGatewayRuleType` - `const ZoneTagGetResponseResourceTaggingTaggedResourceObjectGatewayRuleTypeGatewayRule ZoneTagGetResponseResourceTaggingTaggedResourceObjectGatewayRuleType = "gateway_rule"` - `type ZoneTagGetResponseResourceTaggingTaggedResourceObjectImage 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 ZoneTagGetResponseResourceTaggingTaggedResourceObjectImageType` - `const ZoneTagGetResponseResourceTaggingTaggedResourceObjectImageTypeImage ZoneTagGetResponseResourceTaggingTaggedResourceObjectImageType = "image"` - `type ZoneTagGetResponseResourceTaggingTaggedResourceObjectKVNamespace 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 ZoneTagGetResponseResourceTaggingTaggedResourceObjectKVNamespaceType` - `const ZoneTagGetResponseResourceTaggingTaggedResourceObjectKVNamespaceTypeKVNamespace ZoneTagGetResponseResourceTaggingTaggedResourceObjectKVNamespaceType = "kv_namespace"` - `type ZoneTagGetResponseResourceTaggingTaggedResourceObjectManagedClientCertificate 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 ZoneTagGetResponseResourceTaggingTaggedResourceObjectManagedClientCertificateType` - `const ZoneTagGetResponseResourceTaggingTaggedResourceObjectManagedClientCertificateTypeManagedClientCertificate ZoneTagGetResponseResourceTaggingTaggedResourceObjectManagedClientCertificateType = "managed_client_certificate"` - `ZoneID string` Zone ID is required only for zone-level resources - `type ZoneTagGetResponseResourceTaggingTaggedResourceObjectQueue 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 ZoneTagGetResponseResourceTaggingTaggedResourceObjectQueueType` - `const ZoneTagGetResponseResourceTaggingTaggedResourceObjectQueueTypeQueue ZoneTagGetResponseResourceTaggingTaggedResourceObjectQueueType = "queue"` - `type ZoneTagGetResponseResourceTaggingTaggedResourceObjectR2Bucket 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 ZoneTagGetResponseResourceTaggingTaggedResourceObjectR2BucketType` - `const ZoneTagGetResponseResourceTaggingTaggedResourceObjectR2BucketTypeR2Bucket ZoneTagGetResponseResourceTaggingTaggedResourceObjectR2BucketType = "r2_bucket"` - `type ZoneTagGetResponseResourceTaggingTaggedResourceObjectResourceShare 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 ZoneTagGetResponseResourceTaggingTaggedResourceObjectResourceShareType` - `const ZoneTagGetResponseResourceTaggingTaggedResourceObjectResourceShareTypeResourceShare ZoneTagGetResponseResourceTaggingTaggedResourceObjectResourceShareType = "resource_share"` - `type ZoneTagGetResponseResourceTaggingTaggedResourceObjectStreamLiveInput 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 ZoneTagGetResponseResourceTaggingTaggedResourceObjectStreamLiveInputType` - `const ZoneTagGetResponseResourceTaggingTaggedResourceObjectStreamLiveInputTypeStreamLiveInput ZoneTagGetResponseResourceTaggingTaggedResourceObjectStreamLiveInputType = "stream_live_input"` - `type ZoneTagGetResponseResourceTaggingTaggedResourceObjectStreamVideo 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 ZoneTagGetResponseResourceTaggingTaggedResourceObjectStreamVideoType` - `const ZoneTagGetResponseResourceTaggingTaggedResourceObjectStreamVideoTypeStreamVideo ZoneTagGetResponseResourceTaggingTaggedResourceObjectStreamVideoType = "stream_video"` - `type ZoneTagGetResponseResourceTaggingTaggedResourceObjectWorker 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 ZoneTagGetResponseResourceTaggingTaggedResourceObjectWorkerType` - `const ZoneTagGetResponseResourceTaggingTaggedResourceObjectWorkerTypeWorker ZoneTagGetResponseResourceTaggingTaggedResourceObjectWorkerType = "worker"` - `type ZoneTagGetResponseResourceTaggingTaggedResourceObjectWorkerVersion 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 ZoneTagGetResponseResourceTaggingTaggedResourceObjectWorkerVersionType` - `const ZoneTagGetResponseResourceTaggingTaggedResourceObjectWorkerVersionTypeWorkerVersion ZoneTagGetResponseResourceTaggingTaggedResourceObjectWorkerVersionType = "worker_version"` - `WorkerID string` Worker ID is required only for worker_version resources - `type ZoneTagGetResponseResourceTaggingTaggedResourceObjectZone 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 ZoneTagGetResponseResourceTaggingTaggedResourceObjectZoneType` - `const ZoneTagGetResponseResourceTaggingTaggedResourceObjectZoneTypeZone ZoneTagGetResponseResourceTaggingTaggedResourceObjectZoneType = "zone"` - `ZoneID string` Zone ID is required only for zone-level resources ### Example ```go package main import ( "context" "fmt" "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"), ) zoneTag, err := client.ResourceTagging.ZoneTags.Get(context.TODO(), resource_tagging.ZoneTagGetParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), ResourceID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), ResourceType: cloudflare.F(resource_tagging.ZoneTagGetParamsResourceTypeZone), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", zoneTag) } ``` #### Response ```json { "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" } } ``` ## Set tags for a zone-level resource `client.ResourceTagging.ZoneTags.Update(ctx, params) (*ZoneTagUpdateResponse, error)` **put** `/zones/{zone_id}/tags` Creates or updates tags for a specific zone-level resource. Replaces all existing tags for the resource. ### Parameters - `params ZoneTagUpdateParams` - `ZoneID param.Field[string]` Path param: Zone ID is required only for zone-level resources - `ResourceID param.Field[string]` Body param: Identifies the unique resource. - `ResourceType param.Field[ZoneTagUpdateParamsResourceTaggingSetTagsRequestZoneLevelBaseResourceType]` Body param: Enum for base zone-level resource types (those with no extra required fields). - `const ZoneTagUpdateParamsResourceTaggingSetTagsRequestZoneLevelBaseResourceTypeAPIGatewayOperation ZoneTagUpdateParamsResourceTaggingSetTagsRequestZoneLevelBaseResourceType = "api_gateway_operation"` - `const ZoneTagUpdateParamsResourceTaggingSetTagsRequestZoneLevelBaseResourceTypeCustomCertificate ZoneTagUpdateParamsResourceTaggingSetTagsRequestZoneLevelBaseResourceType = "custom_certificate"` - `const ZoneTagUpdateParamsResourceTaggingSetTagsRequestZoneLevelBaseResourceTypeCustomHostname ZoneTagUpdateParamsResourceTaggingSetTagsRequestZoneLevelBaseResourceType = "custom_hostname"` - `const ZoneTagUpdateParamsResourceTaggingSetTagsRequestZoneLevelBaseResourceTypeDNSRecord ZoneTagUpdateParamsResourceTaggingSetTagsRequestZoneLevelBaseResourceType = "dns_record"` - `const ZoneTagUpdateParamsResourceTaggingSetTagsRequestZoneLevelBaseResourceTypeManagedClientCertificate ZoneTagUpdateParamsResourceTaggingSetTagsRequestZoneLevelBaseResourceType = "managed_client_certificate"` - `const ZoneTagUpdateParamsResourceTaggingSetTagsRequestZoneLevelBaseResourceTypeZone ZoneTagUpdateParamsResourceTaggingSetTagsRequestZoneLevelBaseResourceType = "zone"` - `Tags param.Field[map[string, string]]` Body param: Contains key-value pairs of tags. - `IfMatch param.Field[string]` 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. ### Returns - `type ZoneTagUpdateResponse interface{…}` Response for access_application resources - `type ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAccessApplication 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 ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAccessApplicationType` - `const ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAccessApplicationTypeAccessApplication ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAccessApplicationType = "access_application"` - `type ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAccessApplicationPolicy 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 - `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 ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAccessApplicationPolicyType` - `const ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAccessApplicationPolicyTypeAccessApplicationPolicy ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAccessApplicationPolicyType = "access_application_policy"` - `ZoneID string` Zone ID is required only for zone-level resources - `type ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAccessGroup 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 ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAccessGroupType` - `const ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAccessGroupTypeAccessGroup ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAccessGroupType = "access_group"` - `type ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAccount 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 ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAccountType` - `const ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAccountTypeAccount ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAccountType = "account"` - `type ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAIGateway 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 ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAIGatewayType` - `const ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAIGatewayTypeAIGateway ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAIGatewayType = "ai_gateway"` - `type ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAlertingPolicy 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 ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAlertingPolicyType` - `const ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAlertingPolicyTypeAlertingPolicy ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAlertingPolicyType = "alerting_policy"` - `type ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAlertingWebhook 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 ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAlertingWebhookType` - `const ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAlertingWebhookTypeAlertingWebhook ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAlertingWebhookType = "alerting_webhook"` - `type ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAPIGatewayOperation 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 ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAPIGatewayOperationType` - `const ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAPIGatewayOperationTypeAPIGatewayOperation ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectAPIGatewayOperationType = "api_gateway_operation"` - `ZoneID string` Zone ID is required only for zone-level resources - `type ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectCloudflaredTunnel 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 ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectCloudflaredTunnelType` - `const ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectCloudflaredTunnelTypeCloudflaredTunnel ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectCloudflaredTunnelType = "cloudflared_tunnel"` - `type ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectCustomCertificate 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 ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectCustomCertificateType` - `const ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectCustomCertificateTypeCustomCertificate ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectCustomCertificateType = "custom_certificate"` - `ZoneID string` Zone ID is required only for zone-level resources - `type ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectCustomHostname 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 ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectCustomHostnameType` - `const ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectCustomHostnameTypeCustomHostname ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectCustomHostnameType = "custom_hostname"` - `ZoneID string` Zone ID is required only for zone-level resources - `type ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectD1Database 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 ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectD1DatabaseType` - `const ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectD1DatabaseTypeD1Database ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectD1DatabaseType = "d1_database"` - `type ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectDNSRecord 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 ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectDNSRecordType` - `const ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectDNSRecordTypeDNSRecord ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectDNSRecordType = "dns_record"` - `ZoneID string` Zone ID is required only for zone-level resources - `type ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectDurableObjectNamespace 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 ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectDurableObjectNamespaceType` - `const ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectDurableObjectNamespaceTypeDurableObjectNamespace ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectDurableObjectNamespaceType = "durable_object_namespace"` - `type ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectGatewayList 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 ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectGatewayListType` - `const ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectGatewayListTypeGatewayList ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectGatewayListType = "gateway_list"` - `type ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectGatewayRule 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 ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectGatewayRuleType` - `const ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectGatewayRuleTypeGatewayRule ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectGatewayRuleType = "gateway_rule"` - `type ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectImage 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 ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectImageType` - `const ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectImageTypeImage ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectImageType = "image"` - `type ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectKVNamespace 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 ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectKVNamespaceType` - `const ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectKVNamespaceTypeKVNamespace ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectKVNamespaceType = "kv_namespace"` - `type ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectManagedClientCertificate 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 ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectManagedClientCertificateType` - `const ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectManagedClientCertificateTypeManagedClientCertificate ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectManagedClientCertificateType = "managed_client_certificate"` - `ZoneID string` Zone ID is required only for zone-level resources - `type ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectQueue 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 ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectQueueType` - `const ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectQueueTypeQueue ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectQueueType = "queue"` - `type ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectR2Bucket 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 ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectR2BucketType` - `const ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectR2BucketTypeR2Bucket ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectR2BucketType = "r2_bucket"` - `type ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectResourceShare 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 ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectResourceShareType` - `const ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectResourceShareTypeResourceShare ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectResourceShareType = "resource_share"` - `type ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectStreamLiveInput 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 ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectStreamLiveInputType` - `const ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectStreamLiveInputTypeStreamLiveInput ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectStreamLiveInputType = "stream_live_input"` - `type ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectStreamVideo 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 ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectStreamVideoType` - `const ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectStreamVideoTypeStreamVideo ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectStreamVideoType = "stream_video"` - `type ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectWorker 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 ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectWorkerType` - `const ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectWorkerTypeWorker ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectWorkerType = "worker"` - `type ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectWorkerVersion 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 ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectWorkerVersionType` - `const ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectWorkerVersionTypeWorkerVersion ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectWorkerVersionType = "worker_version"` - `WorkerID string` Worker ID is required only for worker_version resources - `type ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectZone 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 ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectZoneType` - `const ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectZoneTypeZone ZoneTagUpdateResponseResourceTaggingTaggedResourceObjectZoneType = "zone"` - `ZoneID string` Zone ID is required only for zone-level resources ### Example ```go package main import ( "context" "fmt" "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"), ) zoneTag, err := client.ResourceTagging.ZoneTags.Update(context.TODO(), resource_tagging.ZoneTagUpdateParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), Body: resource_tagging.ZoneTagUpdateParamsBodyResourceTaggingSetTagsRequestZoneLevelBase{ ResourceID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), ResourceType: cloudflare.F(resource_tagging.ZoneTagUpdateParamsBodyResourceTaggingSetTagsRequestZoneLevelBaseResourceTypeZone), }, }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", zoneTag) } ``` #### Response ```json { "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" } } ``` ## Delete tags from a zone-level resource `client.ResourceTagging.ZoneTags.Delete(ctx, params) error` **delete** `/zones/{zone_id}/tags` Removes all tags from a specific zone-level resource. ### Parameters - `params ZoneTagDeleteParams` - `ZoneID param.Field[string]` Path param: Zone ID is required only for zone-level resources - `IfMatch param.Field[string]` 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. ### Example ```go 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.ZoneTags.Delete(context.TODO(), resource_tagging.ZoneTagDeleteParams{ ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }) if err != nil { panic(err.Error()) } } ``` # Keys ## List tag keys `client.ResourceTagging.Keys.List(ctx, params) (*CursorPaginationAfter[string], error)` **get** `/accounts/{account_id}/tags/keys` Lists all distinct tag keys used across resources in an account. ### Parameters - `params KeyListParams` - `AccountID param.Field[string]` Path param: Identifier. - `Cursor param.Field[string]` Query param: Cursor for pagination. ### Returns - `type KeyListResponseEnvelopeResult string` ### Example ```go package main import ( "context" "fmt" "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"), ) page, err := client.ResourceTagging.Keys.List(context.TODO(), resource_tagging.KeyListParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ``` #### Response ```json { "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": [ "environment", "team", "region" ], "result_info": { "count": 20, "cursor": "eyJhY2NvdW50X2lkIjoxMjM0NTY3ODkwfQ" } } ``` # Values ## List tag values `client.ResourceTagging.Values.List(ctx, tagKey, params) (*CursorPaginationAfter[string], error)` **get** `/accounts/{account_id}/tags/values/{tag_key}` Lists all distinct values for a given tag key, optionally filtered by resource type. ### Parameters - `tagKey string` - `params ValueListParams` - `AccountID param.Field[string]` Path param: Identifier. - `Cursor param.Field[string]` Query param: Cursor for pagination. - `Type param.Field[ValueListParamsType]` Query param: Filter by resource type. - `const ValueListParamsTypeAccessApplication ValueListParamsType = "access_application"` - `const ValueListParamsTypeAccessApplicationPolicy ValueListParamsType = "access_application_policy"` - `const ValueListParamsTypeAccessGroup ValueListParamsType = "access_group"` - `const ValueListParamsTypeAccount ValueListParamsType = "account"` - `const ValueListParamsTypeAIGateway ValueListParamsType = "ai_gateway"` - `const ValueListParamsTypeAlertingPolicy ValueListParamsType = "alerting_policy"` - `const ValueListParamsTypeAlertingWebhook ValueListParamsType = "alerting_webhook"` - `const ValueListParamsTypeAPIGatewayOperation ValueListParamsType = "api_gateway_operation"` - `const ValueListParamsTypeCloudflaredTunnel ValueListParamsType = "cloudflared_tunnel"` - `const ValueListParamsTypeCustomCertificate ValueListParamsType = "custom_certificate"` - `const ValueListParamsTypeCustomHostname ValueListParamsType = "custom_hostname"` - `const ValueListParamsTypeD1Database ValueListParamsType = "d1_database"` - `const ValueListParamsTypeDNSRecord ValueListParamsType = "dns_record"` - `const ValueListParamsTypeDurableObjectNamespace ValueListParamsType = "durable_object_namespace"` - `const ValueListParamsTypeGatewayList ValueListParamsType = "gateway_list"` - `const ValueListParamsTypeGatewayRule ValueListParamsType = "gateway_rule"` - `const ValueListParamsTypeImage ValueListParamsType = "image"` - `const ValueListParamsTypeKVNamespace ValueListParamsType = "kv_namespace"` - `const ValueListParamsTypeManagedClientCertificate ValueListParamsType = "managed_client_certificate"` - `const ValueListParamsTypeQueue ValueListParamsType = "queue"` - `const ValueListParamsTypeR2Bucket ValueListParamsType = "r2_bucket"` - `const ValueListParamsTypeResourceShare ValueListParamsType = "resource_share"` - `const ValueListParamsTypeStreamLiveInput ValueListParamsType = "stream_live_input"` - `const ValueListParamsTypeStreamVideo ValueListParamsType = "stream_video"` - `const ValueListParamsTypeWorker ValueListParamsType = "worker"` - `const ValueListParamsTypeWorkerVersion ValueListParamsType = "worker_version"` - `const ValueListParamsTypeZone ValueListParamsType = "zone"` ### Returns - `type ValueListResponseEnvelopeResult string` ### Example ```go package main import ( "context" "fmt" "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"), ) page, err := client.ResourceTagging.Values.List( context.TODO(), "environment", resource_tagging.ValueListParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ``` #### Response ```json { "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": [ "production", "staging" ], "result_info": { "count": 20, "cursor": "eyJhY2NvdW50X2lkIjoxMjM0NTY3ODkwfQ" } } ```