Azure Virtual Machines Images API

The Images API from Azure Virtual Machines — 3 operation(s) for images.

GitHub OpenAPI

Operations 6

GET /subscriptions/{subscriptionId}/providers/Microsoft.Compute/images Images list #
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images Images list by resource group #
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName} Images get #
PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName} Images create or update #
PATCH /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName} Images update #
DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName} Images delete #

Documentation

Specifications

SDKs

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/microsoft-azure-virtual-machines:microsoft-azure-virtual-machines-images-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

microsoft-azure-virtual-machines-images-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Azure Compute resource management API. Images API
  version: '2026-04-01'
  description: Compute Client
  x-typespec-generated:
  - emitter: '@azure-tools/typespec-autorest'
servers:
- url: https://management.azure.com
security:
- azure_auth:
  - user_impersonation
tags:
- name: Images
paths:
  /subscriptions/{subscriptionId}/providers/Microsoft.Compute/images:
    get:
      operationId: Images_List
      tags:
      - Images
      description: Gets the list of Images in the subscription. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images.
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImageListResult'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-pageable:
        nextLinkName: nextLink
      summary: Images list
      x-summary-source: derived
  /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images:
    get:
      operationId: Images_ListByResourceGroup
      tags:
      - Images
      description: Gets the list of images under a resource group. Use nextLink property in the response to get the next page of Images. Do this till nextLink is null to fetch all the Images.
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImageListResult'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-pageable:
        nextLinkName: nextLink
      summary: Images list by resource group
      x-summary-source: derived
  /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}:
    get:
      operationId: Images_Get
      tags:
      - Images
      description: Gets an image.
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - name: imageName
        in: path
        description: The name of the image.
        required: true
        schema:
          type: string
      - name: $expand
        in: query
        description: The expand expression to apply on the operation.
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Image'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      summary: Images get
      x-summary-source: derived
    put:
      operationId: Images_CreateOrUpdate
      tags:
      - Images
      description: Create or update an image.
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - name: imageName
        in: path
        description: The name of the image.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Resource 'Image' update operation succeeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Image'
        '201':
          description: Resource 'Image' create operation succeeded
          headers:
            Location:
              description: The Location header contains the URL where the status of the long running operation can be checked.
              schema:
                type: string
            Retry-After:
              description: The Retry-After header can indicate how long the client should wait before polling the operation status.
              schema:
                type: integer
                format: int32
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Image'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-long-running-operation-options:
        final-state-via: location
        final-state-schema: '#/definitions/Image'
      x-ms-long-running-operation: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Image'
        description: Parameters supplied to the Create Image operation.
        required: true
      summary: Images create or update
      x-summary-source: derived
    patch:
      operationId: Images_Update
      tags:
      - Images
      description: Update an image.
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - name: imageName
        in: path
        description: The name of the image.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Azure operation completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Image'
        '201':
          description: Resource 'Image' create operation succeeded
          headers:
            Location:
              description: The Location header contains the URL where the status of the long running operation can be checked.
              schema:
                type: string
            Retry-After:
              description: The Retry-After header can indicate how long the client should wait before polling the operation status.
              schema:
                type: integer
                format: int32
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Image'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-long-running-operation-options:
        final-state-via: location
        final-state-schema: '#/definitions/Image'
      x-ms-long-running-operation: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImageUpdate'
        description: Parameters supplied to the Update Image operation.
        required: true
      summary: Images update
      x-summary-source: derived
    delete:
      operationId: Images_Delete
      tags:
      - Images
      description: Deletes an Image.
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - name: imageName
        in: path
        description: The name of the image.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Resource deleted successfully.
        '202':
          description: Resource deletion accepted.
          headers:
            Location:
              description: The Location header contains the URL where the status of the long running operation can be checked.
              schema:
                type: string
            Retry-After:
              description: The Retry-After header can indicate how long the client should wait before polling the operation status.
              schema:
                type: integer
                format: int32
        '204':
          description: Resource does not exist.
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-long-running-operation-options:
        final-state-via: location
      x-ms-long-running-operation: true
      summary: Images delete
      x-summary-source: derived
components:
  schemas:
    Image:
      type: object
      description: The source user image virtual hard disk. The virtual hard disk will be copied before being attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.
      properties:
        properties:
          $ref: '#/components/schemas/ImageProperties'
          description: Describes the properties of an Image.
          x-ms-client-flatten: true
        extendedLocation:
          $ref: '#/components/schemas/ExtendedLocation'
          description: The extended location of the Image.
      allOf:
      - $ref: '#/components/schemas/TrackedResource'
    ApiError:
      type: object
      properties:
        details:
          type: array
          items:
            $ref: '#/components/schemas/ApiErrorBase'
          x-ms-identifiers:
          - message
          - target
          description: The Api error details
        innererror:
          $ref: '#/components/schemas/InnerError'
          description: The Api inner error
        code:
          type: string
          description: The error code.
        target:
          type: string
          description: The target of the particular error.
        message:
          type: string
          description: The error message.
      description: Api error.
    DiskEncryptionSetParameters:
      type: object
      description: Describes the parameter of customer managed disk encryption set resource id that can be specified for disk. **Note:** The disk encryption set resource id can only be specified for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details.
      allOf:
      - $ref: '#/components/schemas/SubResource'
    ImageListResult:
      type: object
      description: The List Image operation response.
      properties:
        value:
          type: array
          description: The list of Images
          items:
            $ref: '#/components/schemas/Image'
        nextLink:
          type: string
          format: uri
          description: The uri to fetch the next page of Images. Call ListNext() with this to fetch the next page of Images.
      required:
      - value
    SubResource:
      type: object
      properties:
        id:
          type: string
          description: Resource Id
    ImageDataDisk:
      type: object
      description: Describes a data disk.
      properties:
        lun:
          type: integer
          format: int32
          description: Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM.
      required:
      - lun
      allOf:
      - $ref: '#/components/schemas/ImageDisk'
    ExtendedLocation:
      type: object
      description: The complex type of the extended location.
      properties:
        name:
          type: string
          description: The name of the extended location.
        type:
          $ref: '#/components/schemas/ExtendedLocationType'
          description: The type of the extended location.
    TrackedResource:
      type: object
      title: Tracked Resource
      description: The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'
      properties:
        tags:
          type: object
          description: Resource tags.
          additionalProperties:
            type: string
          x-ms-mutability:
          - read
          - create
          - update
        location:
          type: string
          description: The geo-location where the resource lives
          x-ms-mutability:
          - read
          - create
      required:
      - location
      allOf:
      - $ref: '#/components/schemas/Resource'
    Common.OperatingSystemTypes:
      type: string
      description: 'This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD. Possible values are: **Windows,** **Linux.**'
      enum:
      - Windows
      - Linux
      x-ms-enum:
        name: OperatingSystemTypes
        modelAsString: false
    ImageOSDisk:
      type: object
      description: Describes an Operating System disk.
      properties:
        osType:
          $ref: '#/components/schemas/Common.OperatingSystemTypes'
          description: 'This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image. Possible values are: **Windows,** **Linux.**'
        osState:
          $ref: '#/components/schemas/Common.OperatingSystemStateTypes'
          description: The OS State. For managed images, use Generalized.
      required:
      - osType
      - osState
      allOf:
      - $ref: '#/components/schemas/ImageDisk'
    StorageAccountTypes:
      type: string
      description: 'Specifies the storage account type for the managed disk. Managed OS disk storage account type can only be set when you create the scale set. NOTE: UltraSSD_LRS can only be used with data disks. It cannot be used with OS Disk. Standard_LRS uses Standard HDD. StandardSSD_LRS uses Standard SSD. Premium_LRS uses Premium SSD. UltraSSD_LRS uses Ultra disk. Premium_ZRS uses Premium SSD zone redundant storage. StandardSSD_ZRS uses Standard SSD zone redundant storage. For more information regarding disks supported for Windows Virtual Machines, refer to https://docs.microsoft.com/azure/virtual-machines/windows/disks-types and, for Linux Virtual Machines, refer to https://docs.microsoft.com/azure/virtual-machines/linux/disks-types'
      enum:
      - Standard_LRS
      - Premium_LRS
      - StandardSSD_LRS
      - UltraSSD_LRS
      - Premium_ZRS
      - StandardSSD_ZRS
      - PremiumV2_LRS
      x-ms-enum:
        name: StorageAccountTypes
        modelAsString: true
        values:
        - name: Standard_LRS
          value: Standard_LRS
        - name: Premium_LRS
          value: Premium_LRS
        - name: StandardSSD_LRS
          value: StandardSSD_LRS
        - name: UltraSSD_LRS
          value: UltraSSD_LRS
        - name: Premium_ZRS
          value: Premium_ZRS
        - name: StandardSSD_ZRS
          value: StandardSSD_ZRS
        - name: PremiumV2_LRS
          value: PremiumV2_LRS
    ImageDisk:
      type: object
      description: Describes a image disk.
      properties:
        snapshot:
          $ref: '#/components/schemas/SubResource'
          description: The snapshot.
        managedDisk:
          $ref: '#/components/schemas/SubResource'
          description: The managedDisk.
        blobUri:
          type: string
          description: The Virtual Hard Disk.
        caching:
          $ref: '#/components/schemas/CachingTypes'
          description: 'Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage.**'
        diskSizeGB:
          type: integer
          format: int32
          description: Specifies the size of empty data disks in gigabytes. This element can be used to overwrite the name of the disk in a virtual machine image. This value cannot be larger than 1023 GB.
        storageAccountType:
          $ref: '#/components/schemas/StorageAccountTypes'
          description: 'Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk.'
        diskEncryptionSet:
          $ref: '#/components/schemas/DiskEncryptionSetParameters'
          description: Specifies the customer managed disk encryption set resource id for the managed image disk.
    CachingTypes:
      type: string
      description: 'Specifies the caching requirements. Possible values are: **None,** **ReadOnly,** **ReadWrite.** The default values are: **None for Standard storage. ReadOnly for Premium storage**'
      enum:
      - None
      - ReadOnly
      - ReadWrite
      x-ms-enum:
        name: CachingTypes
        modelAsString: false
    ImageProperties:
      type: object
      description: Describes the properties of an Image.
      properties:
        sourceVirtualMachine:
          $ref: '#/components/schemas/SubResource'
          description: The source virtual machine from which Image is created.
        storageProfile:
          $ref: '#/components/schemas/ImageStorageProfile'
          description: Specifies the storage settings for the virtual machine disks.
        provisioningState:
          type: string
          description: The provisioning state.
          readOnly: true
        hyperVGeneration:
          $ref: '#/components/schemas/HyperVGenerationTypes'
          description: Specifies the HyperVGenerationType of the VirtualMachine created from the image. From API Version 2019-03-01 if the image source is a blob, then we need the user to specify the value, if the source is managed resource like disk or snapshot, we may require the user to specify the property if we cannot deduce it from the source managed resource.
    CloudError:
      type: object
      x-ms-external: true
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
      description: An error response from the Compute service.
    ImageStorageProfile:
      type: object
      description: Describes a storage profile.
      properties:
        osDisk:
          $ref: '#/components/schemas/ImageOSDisk'
          description: Specifies information about the operating system disk used by the virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).
        dataDisks:
          type: array
          description: Specifies the parameters that are used to add a data disk to a virtual machine. <br><br> For more information about disks, see [About disks and VHDs for Azure virtual machines](https://docs.microsoft.com/azure/virtual-machines/managed-disks-overview).
          items:
            $ref: '#/components/schemas/ImageDataDisk'
          x-ms-identifiers:
          - lun
        zoneResilient:
          type: boolean
          description: Specifies whether an image is zone resilient or not. Default is false. Zone resilient images can be created only in regions that provide Zone Redundant Storage (ZRS).
    ImageUpdate:
      type: object
      description: The source user image virtual hard disk. Only tags may be updated.
      properties:
        properties:
          $ref: '#/components/schemas/ImageProperties'
          description: Describes the properties of an Image.
          x-ms-client-flatten: true
      allOf:
      - $ref: '#/components/schemas/UpdateResource'
    HyperVGenerationTypes:
      type: string
      description: Specifies the HyperVGeneration Type
      enum:
      - V1
      - V2
      x-ms-enum:
        name: HyperVGenerationTypes
        modelAsString: true
        values:
        - name: V1
          value: V1
        - name: V2
          value: V2
    Common.OperatingSystemStateTypes:
      type: string
      description: The OS State. For managed images, use Generalized.
      enum:
      - Generalized
      - Specialized
      x-ms-enum:
        name: OperatingSystemStateTypes
        modelAsString: false
        values:
        - name: Generalized
          value: Generalized
          description: Generalized image. Needs to be provisioned during deployment time.
        - name: Specialized
          value: Specialized
          description: Specialized image. Contains already provisioned OS Disk.
    UpdateResource:
      type: object
      description: The Update Resource model definition.
      properties:
        tags:
          type: object
          description: Resource tags
          additionalProperties:
            type: string
  parameters:
    SubscriptionIdParameter:
      name: subscriptionId
      in: path
      description: The ID of the target subscription.
      required: true
      schema:
        type: string
        minLength: 1
    ResourceGroupNameParameter:
      name: resourceGroupName
      in: path
      description: The name of the resource group. The name is case insensitive.
      required: true
      x-ms-parameter-location: method
      schema:
        type: string
        maxLength: 90
        minLength: 1
    ApiVersionParameter:
      name: api-version
      in: query
      description: The API version to use for this operation.
      required: true
      schema:
        type: string
        minLength: 1
  securitySchemes:
    azure_auth:
      type: oauth2
      flows:
        implicit:
          scopes:
            user_impersonation: impersonate your user account
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
      description: Azure Active Directory OAuth2 Flow.
x-ms-paths:
  ? /subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions?$expand=Properties
  : get:
      operationId: VirtualMachineImages_ListWithProperties
      tags:
      - VirtualMachineImages
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/LocationParameter'
      - name: publisherName
        in: path
        description: A valid image publisher.
        required: true
        type: string
      - name: offer
        in: path
        description: A valid image publisher offer.
        required: true
        type: string
      - name: skus
        in: path
        description: A valid image SKU.
        required: true
        type: string
      - name: $expand
        in: query
        description: The expand expression to apply on the operation.
        required: true
        type: string
      - name: $top
        in: query
        required: false
        type: integer
        format: int32
      - name: $orderby
        in: query
        required: false
        type: string
      responses:
        '200':
          description: Azure operation completed successfully.
          schema:
            type: array
            items:
              $ref: '#/components/schemas/VirtualMachineImage'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/components/schemas/CloudError'