Get tags for a zone-level resource
Retrieves tags for a specific zone-level resource.
Security
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
X-Auth-Email: user@example.comThe previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194ParametersExpand Collapse
params ZoneTagGetParams
Path param: Zone ID is required only for zone-level resources
ResourceType param.Field[ZoneTagGetParamsResourceType]Query param: The type of the resource.
Query param: The type of the resource.
ReturnsExpand Collapse
type ZoneTagGetResponse interface{…}Response for access_application resources
Response for access_application resources
type ZoneTagGetResponseResourceTaggingTaggedResourceObjectAccessApplication struct{…}Response for access_application resources
Response for access_application resources
ETag identifier for optimistic concurrency control. Formatted as “v1:
type ZoneTagGetResponseResourceTaggingTaggedResourceObjectAccessApplicationPolicy struct{…}Response for access_application_policy resources
Response for access_application_policy resources
Access application ID is required only for access_application_policy resources
ETag identifier for optimistic concurrency control. Formatted as “v1:
type ZoneTagGetResponseResourceTaggingTaggedResourceObjectAccessGroup struct{…}Response for access_group resources
Response for access_group resources
ETag identifier for optimistic concurrency control. Formatted as “v1:
type ZoneTagGetResponseResourceTaggingTaggedResourceObjectAccount struct{…}Response for account resources
Response for account resources
ETag identifier for optimistic concurrency control. Formatted as “v1:
type ZoneTagGetResponseResourceTaggingTaggedResourceObjectAIGateway struct{…}Response for ai_gateway resources
Response for ai_gateway resources
ETag identifier for optimistic concurrency control. Formatted as “v1:
type ZoneTagGetResponseResourceTaggingTaggedResourceObjectAlertingPolicy struct{…}Response for alerting_policy resources
Response for alerting_policy resources
ETag identifier for optimistic concurrency control. Formatted as “v1:
type ZoneTagGetResponseResourceTaggingTaggedResourceObjectAlertingWebhook struct{…}Response for alerting_webhook resources
Response for alerting_webhook resources
ETag identifier for optimistic concurrency control. Formatted as “v1:
type ZoneTagGetResponseResourceTaggingTaggedResourceObjectAPIGatewayOperation struct{…}Response for api_gateway_operation resources
Response for api_gateway_operation resources
ETag identifier for optimistic concurrency control. Formatted as “v1:
type ZoneTagGetResponseResourceTaggingTaggedResourceObjectCloudflaredTunnel struct{…}Response for cloudflared_tunnel resources
Response for cloudflared_tunnel resources
ETag identifier for optimistic concurrency control. Formatted as “v1:
type ZoneTagGetResponseResourceTaggingTaggedResourceObjectCustomCertificate struct{…}Response for custom_certificate resources
Response for custom_certificate resources
ETag identifier for optimistic concurrency control. Formatted as “v1:
type ZoneTagGetResponseResourceTaggingTaggedResourceObjectCustomHostname struct{…}Response for custom_hostname resources
Response for custom_hostname resources
ETag identifier for optimistic concurrency control. Formatted as “v1:
type ZoneTagGetResponseResourceTaggingTaggedResourceObjectD1Database struct{…}Response for d1_database resources
Response for d1_database resources
ETag identifier for optimistic concurrency control. Formatted as “v1:
type ZoneTagGetResponseResourceTaggingTaggedResourceObjectDNSRecord struct{…}Response for dns_record resources
Response for dns_record resources
ETag identifier for optimistic concurrency control. Formatted as “v1:
type ZoneTagGetResponseResourceTaggingTaggedResourceObjectDurableObjectNamespace struct{…}Response for durable_object_namespace resources
Response for durable_object_namespace resources
ETag identifier for optimistic concurrency control. Formatted as “v1:
type ZoneTagGetResponseResourceTaggingTaggedResourceObjectGatewayList struct{…}Response for gateway_list resources
Response for gateway_list resources
ETag identifier for optimistic concurrency control. Formatted as “v1:
type ZoneTagGetResponseResourceTaggingTaggedResourceObjectGatewayRule struct{…}Response for gateway_rule resources
Response for gateway_rule resources
ETag identifier for optimistic concurrency control. Formatted as “v1:
type ZoneTagGetResponseResourceTaggingTaggedResourceObjectImage struct{…}Response for image resources
Response for image resources
ETag identifier for optimistic concurrency control. Formatted as “v1:
type ZoneTagGetResponseResourceTaggingTaggedResourceObjectKVNamespace struct{…}Response for kv_namespace resources
Response for kv_namespace resources
ETag identifier for optimistic concurrency control. Formatted as “v1:
type ZoneTagGetResponseResourceTaggingTaggedResourceObjectManagedClientCertificate struct{…}Response for managed_client_certificate resources
Response for managed_client_certificate resources
ETag identifier for optimistic concurrency control. Formatted as “v1:
type ZoneTagGetResponseResourceTaggingTaggedResourceObjectQueue struct{…}Response for queue resources
Response for queue resources
ETag identifier for optimistic concurrency control. Formatted as “v1:
type ZoneTagGetResponseResourceTaggingTaggedResourceObjectR2Bucket struct{…}Response for r2_bucket resources
Response for r2_bucket resources
ETag identifier for optimistic concurrency control. Formatted as “v1:
type ZoneTagGetResponseResourceTaggingTaggedResourceObjectResourceShare struct{…}Response for resource_share resources
Response for resource_share resources
ETag identifier for optimistic concurrency control. Formatted as “v1:
type ZoneTagGetResponseResourceTaggingTaggedResourceObjectStreamLiveInput struct{…}Response for stream_live_input resources
Response for stream_live_input resources
ETag identifier for optimistic concurrency control. Formatted as “v1:
type ZoneTagGetResponseResourceTaggingTaggedResourceObjectStreamVideo struct{…}Response for stream_video resources
Response for stream_video resources
ETag identifier for optimistic concurrency control. Formatted as “v1:
type ZoneTagGetResponseResourceTaggingTaggedResourceObjectWorker struct{…}Response for worker resources
Response for worker resources
ETag identifier for optimistic concurrency control. Formatted as “v1:
type ZoneTagGetResponseResourceTaggingTaggedResourceObjectWorkerVersion struct{…}Response for worker_version resources
Response for worker_version resources
ETag identifier for optimistic concurrency control. Formatted as “v1:
type ZoneTagGetResponseResourceTaggingTaggedResourceObjectZone struct{…}Response for zone resources
Response for zone resources
ETag identifier for optimistic concurrency control. Formatted as “v1:
Get tags for a zone-level resource
package main
import (
"context"
"fmt"
"github.com/stainless-sdks/cloudflare-go"
"github.com/stainless-sdks/cloudflare-go/option"
"github.com/stainless-sdks/cloudflare-go/resource_tagging"
)
func main() {
client := cloudflare.NewClient(
option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
option.WithAPIEmail("user@example.com"),
)
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)
}
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": {
"id": "023e105f4ecef8ad9ca31a8372d0c353",
"etag": "v1:RBNvo1WzZ4oRRq0W9-hkng",
"name": "my-worker-script",
"tags": {
"environment": "production",
"team": "engineering"
},
"type": "access_application"
}
}Returns Examples
{
"errors": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"messages": [
{
"code": 1000,
"message": "message",
"documentation_url": "documentation_url",
"source": {
"pointer": "pointer"
}
}
],
"success": true,
"result": {
"id": "023e105f4ecef8ad9ca31a8372d0c353",
"etag": "v1:RBNvo1WzZ4oRRq0W9-hkng",
"name": "my-worker-script",
"tags": {
"environment": "production",
"team": "engineering"
},
"type": "access_application"
}
}