Listing 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 for the same account.
This API is used to list all tags attached to a specified project.
Debugging
You can debug this API in API Explorer.
Authorization
- If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
- If you are using identity policy-based authorization, the permissions listed below are required.
|
Action |
Access Level |
Resource Type (*: required) |
Condition Key |
Alias |
Dependencies |
|---|---|---|---|---|---|
|
ecs:cloudServers:listServerTags |
list |
- |
- |
ecs:cloudServers:list |
- |
URI
GET /v1/{project_id}/cloudservers/tags
|
Parameter |
Mandatory |
Description |
|---|---|---|
|
project_id |
Yes |
Definition Specifies the project ID. For details about how to obtain the ID, see Obtaining a Project ID. Constraints N/A Range N/A Default Value N/A |
Request
None
Response
Table 2 describes the response parameters.
|
Parameter |
Type |
Description |
|---|---|---|
|
tags |
Array of objects |
Definition Specifies the tag list. For details, see Table 3. Range A maximum of 20 tags are supported. They cannot start with _sys_. |
|
Parameter |
Type |
Description |
|---|---|---|
|
key |
String |
Definition Specifies the tag key. Range
|
|
values |
Array of strings |
Definition Specifies the tag value. Range
|
Example Request
List all tags attached to a specified project.
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
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