Querying Project Tags
Function
Projects are used to group and isolate OpenStack resources, which include computing, storage, and network resources. A project can be a department or a team. Multiple projects can be created under one account.
This API is used to query all tags used by a user in a specified project.
This API supports checking fine-grained permissions for enterprise projects. For details, see ecs:cloudServers:list.
URI
GET /v1/{project_id}/cloudservers/tags
|
Parameter |
Mandatory |
Description |
|---|---|---|
|
project_id |
Yes |
Specifies the project ID. For details about how to obtain the ID, see Obtaining a Project ID. |
Request
None
Response
Table 2 describes the response parameters.
|
Parameter |
Type |
Description |
|---|---|---|
|
key |
String |
Specifies the tag key.
|
|
values |
Array of strings |
Specifies the tag value.
|
Example Request
GET https://{endpoint}/v1/{project_id}/cloudservers/tags
Example Response
{
"tags": [
{
"key": "key1",
"values": [
"value1",
"value2"
]
},
{
"key": "key2",
"values": [
"value1",
"value2"
]
}
]
}
Returned Values
Error Codes
Last Article: Deleting Tags from an ECS in a Batch
Next Article: Querying Tags of an ECS
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.