Obtaining ECS Metadata with a Specified Key
Function
This API is used to obtain ECS metadata with a specified key.
URI
GET /v2.1/{project_id}/servers/{server_id}/metadata/{key}
Table 1 describes the parameters in the URI.
Parameter | Mandatory | Description |
---|---|---|
project_id | Yes | Specifies the project ID. For details about how to obtain the ID, see Obtaining a Project ID. |
server_id | Yes | Specifies the ECS ID. |
key | Yes | Specifies the ECS metadata key. |
Request
None
Response
Table 2 describes the response parameters.
Parameter | Type | Description |
---|---|---|
meta | Object | Specifies the user-defined metadata key-value pair. |
Example Request
GET https://{endpoint}/v2.1/9c53a566cb3443ab910cf0daebca90c4/servers/998af54b-5762-4041-abc1-f98a2c27b3a2/metadata/key1
Example Response
{"meta": {"key1": "value1"}}
Returned Values
Parent topic: Metadata Management
- Function
- URI
- Request
- Response
- Example Request
- Example Response
- Returned Values