How to access IMDS
IMDS is available only from within a VM itself. Once you connect to a VM, use the following base URL to request metadata:GET method and include the Metadata: true header. Requests without this header return 400 Bad Request. Requests that use any method other than GET return 405 Method Not Allowed.
Metadata updates
IMDS provides metadata captured at VM start time. The following endpoints are not refreshed in real time:instance-dataparent-datanetwork-datauser-data
Unlike the other endpoints,
instance-events provides live updates and does not require a VM restart. A maintenance event may take up to five minutes to appear in the response.Example requests
The following examples show how to retrieve different types of metadata from IMDS.Getting all VM metadata
To get all available VM metadata in JSON format, run:labels is always returned as a JSON object. If no labels were set, IMDS returns an empty object.
The following fields are optional and are returned only when available for the VM:
hostnameservice_account_idgpu_cluster_idinfiniband_fabricinfiniband_topology_path
Getting a specific metadata field
To get a specific metadata field as plain text, run:Getting VM labels
To get all labels for the VM, run:Getting parent resource metadata
To get parent resource metadata in JSON format, run:To access
parent-data, the VM must have an attached service account with permissions to read the parent resource metadata. Otherwise, the request returns 403 Forbidden.Getting user data
To get the user data that was provided when the VM was created, run:Getting network data
To get the VM network data, run:Getting service account information
To get information about the service account attached to the VM and its IAM token, run:Getting maintenance events
To check if a maintenance event is scheduled for the VM, run:Request throttling
Nebius AI Cloud applies throttling to IMDS requests on a per-VM basis to reduce accidental overload and abuse:- 10 requests per second for regular requests
- 20 requests per second for burst requests
429 Too Many Requests.