---
title: "GET /instance"
method: GET
path: "/instance"
---

# GET /instance

`GET /instance`

Get Instance Metadata for the Virtual Machine.

## Query parameters

- `api-version` '2018-10-01', required

## Headers

- `Metadata` 'true', required

## Response `200`

OK

- Instance — This is the response from the Instance_GetMetadata operation.
  - `compute` Compute — Compute Metadata
    - `azEnvironment` string — This is the name of the environment in which the VM is running.
    - `location` string — This is the Azure Region in which the VM is running.
    - `name` string — This is the name of the VM.
    - `offer` string — This is the offer information for the VM image. This value is only present for images deployed from the Azure Image Gallery.
    - `osType` string — This value indicates the type of OS the VM is running, either Linux or Windows.
    - `placementGroupId` string — This is the placement group of your Virtual Machine Scale Set.
    - `plan` PlanProperties — This contains the data about the plan.
      - `name` string — This is the Plan ID.
      - `publisher` string — This is the publisher ID.
      - `product` string — This is the product of the image from the Marketplace.
    - `publicKeys` PublicKeysProperties[] — This is information about the SSH certificate
      - `path` string — This specifies the full path on the VM where the SSH public key is stored.
      - `keyData` string — This is the SSH public key certificate used to authenticate with the VM.
    - `platformFaultDomain` string — This is the fault domain in which the VM.
    - `platformUpdateDomain` string — This is the update domain in which the VM.
    - `provider` string — This is the provider of the VM.
    - `publisher` string — This is the publisher of the VM image.
    - `resourceGroupName` string — This is the resource group for the VM.
    - `resourceId` string — This is the fully qualified ID for the VM.
    - `sku` string — This is the specific SKU for the VM image.
    - `storageProfile` StorageProfile — This contains the data about the storage disks associated with the VM.
      - `imageReference` ImageReference — This contains information about the OS image.
        - `id` string — This is the resource ID.
        - `offer` string — This is the offer of the platform or marketplace image.
        - `publisher` string — This is the image publisher.
        - `sku` string — This is the image SKU.
        - `version` string — This is the version of the platform or marketplace image.
      - `osDisk` OsDisk — This contains information about the OS disk used by the VM.
        - `caching` string — This is the caching requirements.
        - `createOption` string — This is information about how the VM was created.
        - `diffDiskSettings` DiffDiskSettings — This is the ephemeral disk settings.
          - `option` string — This specifies the ephemeral disk settings.
        - `diskSizeGB` string — This is the size of the disk in GB.
        - `encryptionSettings` EncryptionSettings — This is the encryption settings for the disk.
          - `enabled` string — This specifies whether or not disk encryption is enabled on the VM.
        - `image` DiskImage — This is the source user image virtual hard disk.
          - `uri` string — This is the uri of the virtual hard disk.
        - `managedDisk` ManagedDisk — This is managed disk parameters.
          - `id` string — This is the resource ID.
          - `storageAccountType` string — This is the storage account type for the managed disk.
        - `name` string — This is the disk name.
        - `osType` string — This is the type of OS included in the disk.
        - `vhd` VirtualHardDisk — This is the virtual hard disk.
          - `uri` string — This is the uri of the virtual hard disk.
        - `writeAcceleratorEnabled` string — This specifies whether or not writeAccelerator is enabled on the disk.
      - `dataDisks` DataDisk[] — Data disk information
        - `caching` string — This is the caching requirements.
        - `createOption` string — This is information about how the VM was created.
        - `diskSizeGB` string — This is the size of the disk in GB.
        - `image` DiskImage — This is the source user image virtual hard disk.
          - `uri` string — This is the uri of the virtual hard disk.
        - `lun` string — This is the logical unit number of the disk.
        - `managedDisk` ManagedDisk — This is managed disk parameters.
          - `id` string — This is the resource ID.
          - `storageAccountType` string — This is the storage account type for the managed disk.
        - `name` string — This is the disk name.
        - `vhd` VirtualHardDisk — This is the virtual hard disk.
          - `uri` string — This is the uri of the virtual hard disk.
        - `writeAcceleratorEnabled` string — This specifies whether or not writeAccelerator is enabled on the disk.
    - `subscriptionId` string — This is the Azure subscription for the VM.
    - `tags` string — This is the list of tags for your VM.
    - `version` string — This is the version of the VM image.
    - `vmId` string — This is the unique identifier for the VM.
    - `vmScaleSetName` string — This is the resource name of the VMSS.
    - `vmSize` string — This is the size of the VM.
    - `zone` string — This is the availability zone of the VM.
  - `network` Network — Network Metadata
    - `interface` NetworkInterface[] — This contains data about the network interface.
      - `ipv4` object — This contains the IPv4 address.
        - `ipAddress` Ipv4Properties[] — This is the IP address
          - `privateIpAddress` string — This is the private IP address assigned to the interface.
          - `publicIpAddress` string — This is the public IP address assigned to the interface.
        - `subnet` SubnetProperties[] — This is the subnet
          - `address` string — This is the address range of the subnet.
          - `prefix` string — This is the prefix of the subnet.
      - `ipv6` object — This contains the IPv6 address.
        - `ipAddress` Ipv6Properties[] — This is the IP address
          - `privateIpAddress` string — This is the private IPv6 address assigned to the interface.
      - `macAddress` string — This is the MAC address of the interface.

## Other responses

- `default` — Error response describing why the operation failed.

## Changes

- **2026-07-13** (2018-02-01) `503e7225df0f` — 7 info
  - added the non-success response with the status `400`
  - added the non-success response with the status `403`
  - added the non-success response with the status `404`
  - added the non-success response with the status `405`
  - …3 more
- **2026-07-13** (2018-02-01) `eb496c25f2af` — 7 info
  - removed the non-success response with the status `400`
  - removed the non-success response with the status `403`
  - removed the non-success response with the status `404`
  - removed the non-success response with the status `405`
  - …3 more

[Change history](https://skmtc.dev/azure/apis/imds-instancemetadataservice/changes/instance/get.md)

---

[API](https://skmtc.dev/azure/apis/imds-instancemetadataservice.md) · [All operations](https://skmtc.dev/azure/apis/imds-instancemetadataservice/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/imds-instancemetadataservice/revisions/e65fff975b3a/schema)
