Method | URI | Description |
---|---|---|
POST | /v2/{tenant_id}/servers/{server_id}/metadata | Updates metadata items by key for a specified server. |
Replaces items that match the specified keys and does not modify items not specified in the request.
An overLimit (413) fault might be thrown if the operation causes the quota for metadata items to be exceeded.
Normal response codes: 200
Error response codes: computeFault (400, 500, …), serviceUnavailable (503), badRequest (400), unauthorized (401), forbidden (403), badMethod (405), overLimit (413), itemNotFound (404), badMediaType (415), buildInProgress (409)
This table shows the URI parameters for the update server metadata items request:
Name | Type | Description |
---|---|---|
| UUID | The tenant ID in a multi-tenancy cloud. |
| UUID | The UUID for the server. |
Example 2.56. Update server metadata items: XML request
<?xml version='1.0' encoding='UTF-8'?> <metadata xmlns="http://docs.openstack.org/compute/api/v1.1"> <meta key="type">staging_server</meta> </metadata>
Example 2.57. Update server metadata items: JSON response
{ "metadata":{ "name":"test_server", "server_type":"test" } }
Example 2.58. Update server metadata items: XML response
<?xml version='1.0' encoding='UTF-8'?> <metadata xmlns="http://docs.openstack.org/compute/api/v1.1"> <meta key="type">staging_server</meta> </metadata>