Querying All Tags of a Specific Resource
Function
This API is used to query all tags of a specific resource.
Calling Method
For details, see Calling APIs.
URI
GET /v2/{project_id}/{resource_type}/tags
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID |
resource_type |
Yes |
String |
Resource type. The value can be DNS-public_zone, DNS-private_zone, DNS-public_recordset, DNS-private_recordset, or DNS-ptr_record. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
tags |
Array of tagValues objects |
Tag list |
Parameter |
Type |
Description |
---|---|---|
key |
String |
Tag key. A key can contain a maximum of 127 Unicode characters. key must be specified. (This parameter is not verified during search.) |
values |
Array of strings |
Tag value. Each value can contain a maximum of 255 Unicode characters. The asterisk () is a reserved character. If the value starts with an asterisk (), fuzzy search is performed based on the value following the asterisk (*). If values is missing, any value is matched. All values of a tag key are in the OR relationship. |
Example Requests
None
Example Responses
Status code: 200
Tag list
{ "tags" : [ { "key" : "key1", "values" : [ "value1", "value2" ] }, { "key" : "key2", "values" : [ "value1", "value2" ] } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
Tag list |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.