Metadata folders
The VM instance metadata service provides access to the following metadata folders:
Folder | Path |
---|---|
computeMetadata |
/computeMetadata/v1/ |
user-data |
/latest/user-data/ |
computeMetadata
The computeMetadata
folder contains the following main keys:
Key name (path) |
Description |
Value example |
instance/attributes/enable-oslogin |
Key responsible for access to the VM instance via OS Login. Possible values:- |
|
instance/attributes/install-unified-agent |
Key responsible for installing the Unified Agent on the VM instance. Possible values:- |
|
instance/attributes/serial-port-enable |
Key responsible for access to the VM instance via the serial console. Possible values:- |
|
instance/description |
VM description. |
|
instance/hostname |
Full internal VM name (FQDN). |
|
instance/id |
VM ID. |
|
instance/maintenance-event |
Key indicating whether the VM instance maintenance event has occurred. |
|
instance/name |
VM name. |
|
instance/zone |
Availability zone ID in |
|
instance/disks/ |
List of VM disk indexes. |
|
instance/disks/<disk_index>/device-name |
Disk ID. |
|
instance/disks/<disk_index>/mode |
Disk operating mode. |
|
instance/disks/<disk_index>/type |
Disk type. |
|
instance/disks/<disk_index>/index |
Index in the list of VM disk indexes. |
|
instance/network-interfaces/ |
List of indexes of the VM instance network interfaces. |
|
instance/network-interfaces/<interface_index>/ip |
Internal IPv4 address of the VM instance network interface. |
|
instance/network-interfaces/<interface_index>/mac |
MAC address of the VM instance network interface. |
|
instance/network-interfaces/<interface_index>/network |
ID of the subnet the network interface is connected to. |
|
instance/network-interfaces/<interface_index>/access-configs/<interface_index>/external-ip |
Public IP address of the VM instance network interface. |
|
instance/network-interfaces/<interface_index>/access-configs/<interface_index>/type |
Type of external connectivity of the VM instance network interface. |
|
instance/service-accounts/ |
Key indicating whether a service account is linked to the VM instance. If a service account is not linked, the key does not return anything. |
|
instance/service-accounts/default/token |
|
|
instance/vendor/cloud-id |
ID of the cloud the VM instance is created in. |
|
instance/vendor/folder-id |
ID of the folder the VM instance is created in. |
|
instance/vendor/identity/document |
Identity document in JSON format containing information about the VM instance ID ( |
|
instance/vendor/identity/base64 |
Cryptographic signature of the identity document in Base64 |
|
instance/vendor/identity/dsa |
Cryptographic signature of the identity document in DSA |
|
instance/vendor/labels |
List of label keys linked to the VM instance. |
|
instance/vendor/labels/<label_key> |
Value of selected label key from the list. |
|
instance/vendor/environment |
Cloud region. |
|
yandex/folder-id |
ID of the folder the VM instance was created in. |
|
user-data
The user-data
folder contains no separate keys, so the data is provided all at once when accessing the root key of the /latest/user-data/
folder.
This folder stores the metadata specified by the user when creating or modifying the VM instance. This information is received by the cloud-init
To get information from this folder, you need to run a request.
Alert
All data in the user-data
metadata folder will be publicly available to any user with terminal access to the VM instance.