Querying Resource Tags
Function
This API is used to query resource tags.
API Calling
For details, see Calling APIs.
URI
GET /v3/{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 is cts-tracker. |
resource_id |
Yes |
String |
Resource ID. |
Request Parameters
None.
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
tags |
Array of ResourceTag objects |
Tag list. |
Parameter |
Type |
Description |
---|---|---|
key |
String |
Tag key, which can contain a maximum of 128 Unicode characters. A tag value can contain letters, digits, spaces, and special characters (_.:/=+-@). It cannot start or end with a space, or start with _sys_. |
value |
String |
Tag value, which can contain a maximum of 255 Unicode characters. If value is specified, tags are deleted by key and value. If value is not specified, tags are deleted by key. A tag value can contain letters, digits, spaces, and special characters (_.:/=+-@) but cannot start or end with a space. |
Example Request
https://{endpoint}/v3/{project_id}/{resource_type}/{resource_id}/tags
Example Response
Status code: 200
The request is successful.
{ "tags" : [ { "key" : "key1", "value" : "value1" }, { "key" : "key2", "value" : "value2" }, { "key" : "_sys_enterprise_project_id", "value" : "0" } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
The request is successful. |
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot