---
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.
    - `customData` string — This is the base64 encoded custom data for the running VM.
    - `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.
    - `sku` string — This is the specific SKU for the VM image.
    - `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) `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/eb496c25f2af/schema)
