2.6.9. Update image metadata items

 
MethodURIDescription
POST/v2/images/{image_id}/metadata

Updates metadata items by key for a specified image.

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)

 2.6.9.1. Request

This table shows the URI parameters for the update image metadata items request:

NameTypeDescription

{image_id}

​U​U​ID

The UUID for the image.

 

Example 2.71. Update image metadata items: JSON request

{
    "metadata": {
        "kernel_id": "False",
        "Label": "UpdatedImage"
    }
}

 

Example 2.72. Update image metadata items: XML request

<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://docs.openstack.org/compute/api/v1.1">
    <meta key="kernel_id">False</meta>
    <meta key="Label">UpdatedImage</meta>
</metadata>

 2.6.9.2. Response

 

Example 2.73. Update image metadata items: JSON response

{
    "metadata": {
        "Label": "UpdatedImage",
        "architecture": "x86_64",
        "auto_disk_config": "True",
        "kernel_id": "False",
        "ramdisk_id": "nokernel"
    }
}

 

Example 2.74. Update image metadata items: XML response

<?xml version='1.0' encoding='UTF-8'?>
<metadata xmlns="http://docs.openstack.org/compute/api/v1.1">
  <meta key="kernel_id">False</meta>
  <meta key="ramdisk_id">nokernel</meta>
  <meta key="Label">UpdatedImage</meta>
  <meta key="architecture">x86_64</meta>
  <meta key="auto_disk_config">True</meta>
</metadata>

Questions? Discuss on ask.openstack.org
Found an error? Report a bug against this page


loading table of contents...