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

# GET /instance

`GET /instance`

Get Instance Metadata for the Virtual Machine.

## Query parameters

- `api-version` string, 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.
    - `evictionPolicy` string — Describes how the VM will be evicted if space needs to be freed up. Only applicable to Spot VMs. For a non-spot VM, this will be an empty string.
    - `extendedLocation` ExtendedLocationProperties — Describes the extended location of the VM
      - `type` string — The type of the extended location of the VM
      - `name` string — The name of the extended location of the VM
    - `isHostCompatibilityLayerVm` string — Identifies if the VM runs on the Host Compatibility Layer.
    - `licenseType` string — Type of license for Azure Hybrid Benefit. Note that this is only present for AHB-enabled VMs.
    - `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.
    - `osProfile` OsProfile — This contains the data about the OS.
      - `adminUsername` string — This is admin account.
      - `computerName` string — This is the name of the VM.
      - `disablePasswordAuthentication` string — This specifies whether or not password authentication is disabled. Note that this is present only for Linux VMs. For a Windows VM, this value will be the empty string.
    - `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 the VM resides in.
    - `platformSubFaultDomain` string — This is the sub fault domain the VM resides in, if applicable.
    - `platformUpdateDomain` string — This is the update domain the VM resides in.
    - `priority` string — This is the priority of 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.
    - `securityProfile` SecurityProfile — This contains the data about the security profile associated with the VM.
      - `secureBootEnabled` string — Identifies if UEFI secure boot is enabled on the VM
      - `virtualTpmEnabled` string — Identifies if the virtual Trusted Platform Module (TPM) is enabled on the VM
      - `encryptionAtHost` string — Identifies if encryption at host is enabled on the VM
    - `host` Host — This contains data about host of VM
      - `id` string — This is the name of the host of VM. Note that a VM will either have a host or a hostGroup but not both
    - `hostGroup` HostGroup — This contains data about host group of VM
      - `id` string — This is the name of the host group of VM. Note that a VM will either have a host or a hostGroup but not both
    - `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.
          - `diskEncryptionKey` object — This is the key used for encrypting the disk.
            - `sourceVault` object — This specifies keyvault used to store the encryption key.
              - …
            - `secretUrl` string — This specifies the secret Url of the key stored in keyvault.
          - `keyEncryptionKey` object — This is the key used for encrypting the disk encryption key.
            - `sourceVault` object — This specifies keyvault used to store the encryption key.
              - …
            - `keyUrl` string — This specifies the secret Url of the key stored in keyvault.
        - `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
        - `bytesPerSecondThrottle` string — Disk read/write quota in bytes; only populated for Ultra Disks
        - `caching` string — This is the caching requirements.
        - `createOption` string — This is information about how the VM was created.
        - `diskCapacityBytes` string — Size of disk in bytes; only populated for Ultra Disks
        - `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.
        - `isSharedDisk` string — Identifies if the disk is shared between resources; only populated for Ultra Disks
        - `isUltraDisk` string — Identifies if the data disk is an Ultra 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.
        - `opsPerSecondThrottle` string — Disk read/write quota in IOPS; only populated for Ultra Disks
        - `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.
      - `resourceDisk` object — This contains data for the size of local temp disk of the VM, if it exists.
        - `size` string — The size of the local temp disk of the VM if it exists, in kilobytes. If the VM has no local temp disk, this value is 0.
    - `subscriptionId` string — This is the Azure subscription for the VM.
    - `tags` string — This is the list of tags for your VM.
    - `tagsList` TagsProperties[] — This is the list of tags for your VM formatted as a JSON array for easier programmatic parsing.
      - `name` string — This is the name of the tag. It is equivalent to the key in the key-value pair format.
      - `value` string — This is the value of the tag. It is, as expected, equivalent to the value in the key-value pair format.
    - `userData` string — The set of data specified when the VM was created for use during or after provisioning (Base64 encoded)
    - `version` string — This is the version of the VM image.
    - `virtualMachineScaleSet` VirtualMachineScaleSet — Information about the VMSS the VM belongs to (if applicable)
      - `id` string — This is the ID of the VMSS the VM belongs to (if applicable)
    - `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.
    - `additionalCapabilities` object — These are additional capabilities defined for VM.
      - `hibernationEnabled` string — This specifies if hibernation is enabled for 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

> 25 revisions in range; 1 could not be searched.

- **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/6e1cf4083a8b/schema)
