Create or replace image metadata

Method URI Description
PUT /v2/{tenant_id}/images/{image_id}/metadata Creates or replaces metadata for a specified image.

Replaces items that match the specified keys. If you omit a key that already exists, this key retains its value.

If the number of metadata items exceeds the quota for metadata items, an overLimit (413) fault might be thrown.

Normal response codes: 200

CAUTION:

Metadata cannot be changed for images that do not have a checksum set. Refer to "Update an image" for details on how to change the metadata for images that do not have a checksum set.

Request

This table shows the URI parameters for the create or replace image metadata request:

Name Type Description
{tenant_id} UUID Project ID
{image_id} UUID The UUID for the image.

Example. Create or replace image metadata: JSON request


{
	"metadata": {
		"auto_disk_config": "True",
		"Label": "Changed"
	}
}
     

Response

Example. Create or replace image metadata: JSON response


{
	"metadata": {
		"Label": "Changed",
		"auto_disk_config": "True"
	}
}