Querying Tags of a Specific Instance
Function
This API is used to query tags of a specific instance.
Calling Method
For details, see Calling APIs.
URI
GET /v2/{project_id}/{resource_type}/{resource_id}/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. |
resource_id |
Yes |
String |
Resource ID |
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 tag objects |
Tag list |
enterpriseProjectOrDefault |
String |
Enterprise Project or Default Project |
Parameter |
Type |
Description |
---|---|---|
key |
String |
Tag key. A key can contain up to 36 Unicode characters. It cannot be left blank. A tag value cannot contain special characters (=*<>,|/) or start or end with spaces. |
value |
String |
Tag value. A tag value contains a maximum of 43 Unicode characters and can be left blank. A tag value cannot contain special characters (=*<>,|/) or start or end with spaces. |
Example Requests
None
Example Responses
Status code: 200
Response to the request for querying resource tags
{ "tags" : [ { "key" : "key1", "value" : "value1" }, { "key" : "key2", "value" : "value2" } ], "enterpriseProjectOrDefault" : 0 }
Status Codes
Status Code |
Description |
---|---|
200 |
Response to the request for querying resource tags |
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.