Update image metadata items
Method | URI | Description |
---|---|---|
POST | /v2/{tenant_id}/images/{image_id}/metadata | Updates the metadata items (identified by key) of the 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
CAUTION:
Metadata cannot be set for images that do not have a checksum set. Refer to "Update an image" for details on how to set the metadata for images that do not have a checksum set.
Request
This table shows the URI parameters for the update image metadata items request:
Name | Type | Description |
---|---|---|
{tenant_id} | UUID | Project ID |
{image_id} | UUID | The UUID for the image. |
This table shows the body parameters for the update image metadata items request:
Name | Type | Description |
---|---|---|
metadata | hash | A set of key/value pairs. These pair replace any existing key/value pairs in the resources metadata with matching keys. Any key/value pairs in the parameter with keys that do not occur in the existing resource metadata are added to the resources metadata. |
Example. Update image metadata items: JSON request
{
"metadata": {
"kernel_id": "False",
"Label": "UpdatedImage"
}
}
Response
Example. Update image metadata items: JSON response
{
"metadata": {
"Label": "UpdatedImage",
"architecture": "x86_64",
"auto_disk_config": "True",
"kernel_id": "False",
"ramdisk_id": "nokernel"
}
}