- API Reference
- APIs (Recommended)
- Tag Management
- Querying Tags of an ECS
Querying Tags of an ECS¶
Function¶
This API is used to query the tags of a specified ECS.
The Tag Management Service (TMS) uses this API to query all tags of an ECS.
URI¶
GET /v1/{project_id}/cloudservers/{server_id}/tags
Table 1 describes the parameters in the URI.
Parameter | Mandatory | Description |
---|---|---|
project_id | Yes | Specifies the project ID. |
server_id | Yes | Specifies the ECS ID. |
Request¶
None
Response¶
Table 2 describes the response parameters.
Parameter | Type | Description |
---|---|---|
key | String | Specifies the tag key. |
value | String | Specifies the tag value. |
Example Request¶
Query all tags of a specified ECS.
GET https://{endpoint}/v1/{project_id}/cloudservers/{server_id}/tags
Example Response¶
{
"tags": [
{
"key": "key1",
"value": "value1"
},
{
"key": "key2",
"value": "value3"
}
]
}
Returned Values¶
Error Codes¶
See Error Codes.
last updated: 2024-09-18 06:47 UTC - commit: 5590be450513845ba3a3952212e526033f49cc63
Page Contents