Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Lu, Huayi <luhuayi@huawei.com> Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
12 KiB
Querying Tags in a Specified Project
Function
This API is used to query all tags of a tenant for a specified resource type in a specified project.
URI
GET /v1.0/{project_id}/clusters/tags
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
Request Parameters
None
Response Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
tags |
Yes |
List<tag> |
Tag list. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
key |
Yes |
String |
Key. A tag key can contain a maximum of 36 Unicode characters, which cannot be null. The first and last characters cannot be spaces. It can contain uppercase letters (A to Z), lowercase letters (a to z), digits (0-9), hyphens (-), and underscores (_). |
values |
Yes |
List<String> |
Value. A tag value can contain a maximum of 43 Unicode characters, which can be null. The first and last characters cannot be spaces. It can contain uppercase letters (A to Z), lowercase letters (a to z), digits (0-9), hyphens (-), and underscores (_). |
Example Request
GET /v1.0/89cd04f168b84af6be287f71730fdb4b/clusters/tags
Example Responses
{ "tags": [ { "key": "key1", "values": [ "value1", "value2" ] }, { "key": "key2", "values": [ "value1", "value2" ] } ] }
Status Code
Returned Value |
Description |
---|---|
200 |
Query succeeded. |
400 |
Invalid parameter. |
401 |
Authentication failed. |
403 |
Insufficient permission. |
404 |
No resources found. |
500 |
Internal service error. |