- API Reference
- APIs
- Tag Management
- Querying Tags of a Specified Resource Type
Querying Tags of a Specified Resource Type¶
Function¶
Query all tags of a resource type.
URI¶
GET /v2/{project_id}/{resource_type}/tags
For details, see Table 1.
Parameter | Mandatory | Type | Description |
---|---|---|---|
project_id | Yes | String | Project ID. You can obtain it in Obtaining a Project ID. |
resource_type | Yes | String | Resource type.
|
Request¶
None
Parameter description
None
Example request
Query tags of all private zones in a project:
GET https://{DNS_Endpoint}/v2/{project_id}/DNS-private_zone/tags
Response¶
Parameter description
¶ Parameter
Type
Description
key
String
Tag key
A key can contain up to 36 Unicode characters. The key cannot be empty.
values
Array of strings
Tag value
Each value can contain up to 43 Unicode characters and can be an empty string.
Example response
{ "tags": [ { "key": "key1", "values": [ "value1", "value2" ] }, { "key": "key2", "values": [ "value1", "value2" ] } ] }
Returned Value¶
If a 2xx status code is returned, for example, 200, 202, or 204, the request is successful.
For details, see Status Code.