Metadata

A metadata key/value entry.

JSON representation
{
  "kind": string,
  "fingerprint": string,
  "items": [
    {
      "key": string,
      "value": string
    }
  ]
}
Fields
kind

string

[Output Only] Type of the resource. Always

compute#metadata

for metadata.

fingerprint

string (bytes format)

Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error

412 conditionNotMet

.

To see the latest fingerprint, make a

get()

request to retrieve the resource.

A base64-encoded string.

items[]

object

Array of key/value pairs. The total size of all keys and values must be less than 512 KB.

items[].key

string

Key for the metadata entry. Keys must conform to the following regexp:

[a-zA-Z0-9-_]+

, and be less than 128 bytes in length. This is reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project.

items[].value

string

Value for the metadata entry. These are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on values is that their size must be less than or equal to 262144 bytes (256 KiB).