Configuring ECS Metadata (Discarded)
Function
This API is used to configure ECS metadata.
When you call this API, all the metadata of this ECS will be deleted, and the ECS uses the value configured in the request.
This API has been discarded. Use the API described in Updating ECS Metadata.
Constraints
An ECS must be in active, stopped, paused, or suspended state, which is specified by OS-EXT-STS:vm_state.
URI
PUT /v2.1/{project_id}/servers/{server_id}/metadata
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. |
Request
Table 2 describes the request parameters.
Parameter |
Type |
Mandatory |
Description |
---|---|---|---|
metadata |
Object |
Yes |
Specifies the user-defined metadata key-value pair. For a metadata key: A key contains a maximum of 255 Unicode characters and cannot be empty. A key can contain uppercase letters (A-Z), lowercase letters (a-z), digits (0-9), hyphens (-), underscores (_), colons (:), and periods (.). For a metadata value: A value contains a maximum of 255 Unicode characters. |
Response
Table 3 describes the response parameters.
Example Request
Configure the metadata of a specified ECS.
PUT https://{endpoint}/v2.1/{project_id}/servers/{server_id}/metadata { "metadata": { "key1": "value1", "key2": "value2" } }
Example Response
{ "metadata": { "key1": "value1", "key2": "value2" } }
Returned Values
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