Querying Tags of a Specified Resource Type
Function
Query all tags of a resource type.
URI
GET /v2/{project_id}/{resource_type}/tags
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
Response
- Parameter description
Table 2 Parameters in the response Parameter
Type
Description
tags
Array of object
Tag list. For details, see Table 3.
Table 3 Description of the tag field Parameter
Type
Description
key
String
Tag key
A key can contain up to 36 Unicode characters. key must be specified. Equal signs (=), asterisks (*), left angle brackets (<), right angle brackets (>), backslashes (\), commas (,), vertical bars (|), and slashes (/) are not allowed. The first and last characters cannot be spaces.
values
Array of strings
Tag value
Each value can contain a maximum of 43 Unicode characters and can be an empty string. Equal signs (=), asterisks (*), left angle brackets (<), right angle brackets (>), backslashes (\), commas (,), vertical bars (|), and slashes (/) are not allowed. The first and last characters cannot be spaces.
- 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.
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