forked from docs/doc-exports
Reviewed-by: Hajba, László Antal <laszlo-antal.hajba@t-systems.com> Co-authored-by: fanqinying <fanqinying@huawei.com> Co-committed-by: fanqinying <fanqinying@huawei.com>
10 KiB
10 KiB
Querying Tags of a Specified Resource Type
Function
Query all tags of a resource type.
URI
GET /v2/{project_id}/{resource_type}/tags
For details, see Table 1.
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
- Cannot be left blank.
- Must be unique for each resource.
- Can contain a maximum of 128 Unicode characters.
- Can contain letters, digits, spaces, and the following characters: _ . : = + - @
- Cannot start or end with a space, or cannot start with _sys_.
values
Array of strings
Tag value
- Can be left blank.
- Can contain a maximum of 255 Unicode characters.
- Can contain letters, digits, spaces, and the following characters: _ . : = + - @
- 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.
Parent topic: Tag Management