Querying Resource Tags
Function
This API is used to obtain the resource tag list.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
URI
GET /v2/{projectid}/{resourcetype}/{resourceid}/tags
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| projectid | Yes | String | Project ID |
| resourcetype | Yes | String | You need to specify asm-mesh, or the query cannot be performed. |
| resourceid | Yes | String | Mesh ID |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | API calling can be authenticated using a token or AK/SK. If you use a token, this parameter is mandatory and must be set to the token. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| tags | Array of resource_tag objects | Tag list This field is mandatory when the tenant permission is used. For the op_service permission, choose either this field or sys_tags. |
| sys_tags | Array of resource_tag objects | System tag list Only used for system tags |
| Parameter | Type | Description |
|---|---|---|
| key | String | Key. It can contain a maximum of 128 characters. The key must comply with specifications described in 3.1 Character Set Specifications for Key. |
| value | String | Value. Each value can contain a maximum of 255 characters. The value must comply with specifications described in 3.2 Character Set Specifications for Value. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| errorCode | String | Error code |
Status code: 404
| Parameter | Type | Description |
|---|---|---|
| errorCode | String | Error code |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| errorCode | String | Error code |
Example Requests
None
Example Responses
None
Status Codes
| Status Code | Description |
|---|---|
| 200 | The resource tag list is obtained. |
| 400 | Failed to obtain the resource tag list due to incorrect parameters. |
| 404 | No resources were found. |
| 500 | Internal 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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot