Querying Tags of a Specified Resource Type
Function
This API is used to query tags of a specified resource type, which refers to the collection of all resource tags within a specified project.
Authorization
Each account has full permissions to call all APIs, but its IAM users need permission assignments to do so. For specific permission requirements, refer to Permissions Policies and Supported Actions.
URI
GET /v3/{project_id}/{resource_type}/tags
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID, which is used for resource isolation. For details about how to obtain a project ID, see Obtaining a Project ID. |
|
resource_type |
Yes |
String |
Resource type. The options are:
|
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
limit |
No |
Integer |
Number of records displayed on each page. The default value is 1000. |
|
offset |
No |
Integer |
Query result offset. The default value is 0. |
Request Parameters
None
Response Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
tags |
Array of objects |
List of resource tags. For details, see Table 4. |
|
count |
Long |
Number of tags. |
Example Request
None
Example Response
{
"tags": [
{
"key": "key1",
"values": [
"value1",
"value2"
]
},
{
"key": "key2",
"values": [
"value1",
"value2"
]
}
]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
The modification is successful. |
|
400 |
Request error. |
|
500 |
Internal server error. |
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.