Azure Virtual Machines Capacity Reservation API

The CapacityReservation API from Azure Virtual Machines — 1 operation(s) for capacityreservation.

GitHub OpenAPI

Operations 1

GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations Capacity reservations list by capacity reservation group #

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-capacityreservation-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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. 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-capacityreservation-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Azure Compute resource management 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: CapacityReservation
paths:
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations
  : get:
      operationId: CapacityReservations_ListByCapacityReservationGroup
      tags:
      - CapacityReservation
      description: Lists all of the capacity reservations in the specified capacity reservation group. Use the nextLink property in the response to get the next page of capacity reservations.
      parameters:
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      - $ref: '#/components/parameters/ResourceGroupNameParameter'
      - name: capacityReservationGroupName
        in: path
        description: The name of the capacity reservation group.
        required: true
        schema:
          type: string
      - name: $expand
        in: query
        description: The expand expression to apply on the operation. Based on the expand param(s) specified we return Virtual Machine or ScaleSet VM Instance or both resource Ids which are associated to capacity reservation group in the response.
        required: false
        x-ms-enum:
          name: ExpandTypesForGetCapacityReservationGroups
          modelAsString: true
          values:
          - name: virtualMachineScaleSetVMs/$ref
            value: virtualMachineScaleSetVMs/$ref
          - name: virtualMachines/$ref
            value: virtualMachines/$ref
        schema:
          type: string
          enum:
          - virtualMachineScaleSetVMs/$ref
          - virtualMachines/$ref
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CapacityReservationListResult'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-pageable:
        nextLinkName: nextLink
      summary: Capacity reservations list by capacity reservation group
      x-summary-source: derived
components:
  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
  schemas:
    StatusLevelTypes:
      type: string
      description: The level code.
      enum:
      - Info
      - Warning
      - Error
      x-ms-enum:
        name: StatusLevelTypes
        modelAsString: false
    CapacityReservation:
      type: object
      description: Specifies information about the capacity reservation.
      properties:
        properties:
          $ref: '#/components/schemas/CapacityReservationProperties'
          description: Properties of the Capacity reservation.
          x-ms-client-flatten: true
        sku:
          $ref: '#/components/schemas/Sku'
          description: SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set.  For Block capacity reservations, sku.capacity can only accept values 1, 2, 4, 8, 16, 32, 64. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. When 'CapacityReservationSupported' is true, the SKU capability also specifies the 'SupportedCapacityReservationTypes', which lists the types of capacity reservations (such as Targeted or Block) that the SKU supports. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list) for supported values.
        zones:
          type: array
          description: The availability zones.
          items:
            type: string
      required:
      - sku
      allOf:
      - $ref: '#/components/schemas/TrackedResource'
    CapacityReservationProperties:
      type: object
      description: Properties of the Capacity reservation.
      properties:
        reservationId:
          type: string
          description: A unique id generated and assigned to the capacity reservation by the platform which does not change throughout the lifetime of the resource.
          readOnly: true
        platformFaultDomainCount:
          type: integer
          format: int32
          description: 'Specifies the value of fault domain count that Capacity Reservation supports for requested VM size. **Note:** The fault domain count specified for a resource (like virtual machines scale set) must be less than or equal to this value if it deploys using capacity reservation. Minimum api-version: 2022-08-01.'
          readOnly: true
        virtualMachinesAssociated:
          type: array
          description: A list of all virtual machine resource ids that are associated with the capacity reservation.
          items:
            $ref: '#/components/schemas/SubResourceReadOnly'
          readOnly: true
        provisioningTime:
          type: string
          format: date-time
          description: The date time when the capacity reservation was last updated.
          readOnly: true
        provisioningState:
          type: string
          description: The provisioning state, which only appears in the response.
          readOnly: true
        instanceView:
          $ref: '#/components/schemas/CapacityReservationInstanceView'
          description: The Capacity reservation instance view.
          readOnly: true
        timeCreated:
          type: string
          format: date-time
          description: 'Specifies the time at which the Capacity Reservation resource was created. Minimum api-version: 2021-11-01.'
          readOnly: true
        scheduleProfile:
          $ref: '#/components/schemas/ScheduleProfile'
          description: 'Defines the schedule for Block and Future capacity reservations. Specifies the schedule during which capacity reservation is active and VM or VMSS resource can be allocated using reservation. For Block capacity reservations, the scheduleProfile, start, and end fields are immutable after creation. Please refer to https://aka.ms/blockcapacityreservation for more details. Minimum API version for Block capacity reservations: 2025-04-01. Future capacity reservations must use this property with only a start time, which can be changed until the ‘modifiableUntil’ time. Please refer to https://aka.ms/futurecapacityreservation for more details. Minimum API version for Future capacity reservations: 2026-04-01.'
    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.
    CapacityReservationStateInfo:
      type: object
      description: Details related to the current state for a Future capacity reservation.
      properties:
        reservationState:
          $ref: '#/components/schemas/ReservationState'
          description: The current state of the capacity reservation.
    CloudError:
      type: object
      x-ms-external: true
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
      description: An error response from the Compute service.
    ScheduleProfile:
      type: object
      description: 'Defines the schedule for Block and Future capacity reservations. Specifies the schedule during which capacity reservation is active and VM or VMSS resource can be allocated using reservation. For Block capacity reservations, the scheduleProfile, start, and end fields are immutable after creation. Please refer to https://aka.ms/blockcapacityreservation for more details. Minimum API version for Block capacity reservations: 2025-04-01. Future capacity reservations must use this property with only a start time, which can be changed until the ‘modifiableUntil’ time. Please refer to https://aka.ms/futurecapacityreservation for more details. Minimum API version for Future capacity reservations: 2026-04-01.'
      properties:
        start:
          type: string
          description: 'The required start date for Block or Future capacity reservations. Block capacity reservations: Must be today or within 56 days in the future. For same-day scheduling, requests must be submitted before 11:30 AM UTC. Future capacity reservations: Must be at least 7 days in the future, and maximum 6 months in the future. Minimum API version for Future capacity reservations: 2026-04-01. Example: 2025-06-27, applicable for both Block and Future capacity reservations.'
        end:
          type: string
          description: 'The required end date for Block capacity reservations. Must be after the start date, with a duration of either 1–14 whole days or 3–26 whole weeks. Example: 2025-06-28.'
        minimumCommitmentDays:
          type: integer
          format: int32
          description: The minimum number of days that must pass after the start date before a Future capacity reservation can be updated or deleted once it has been committed. Will be populated with a default value if not provided.
        modifiableUntil:
          type: string
          format: date-time
          description: The date/time until which a Future capacity reservation can be updated or deleted. Read-only.
          readOnly: true
    CapacityReservationUtilization:
      type: object
      description: Represents the capacity reservation utilization in terms of resources allocated.
      properties:
        currentCapacity:
          type: integer
          format: int32
          description: 'The value provides the current capacity of the VM size which was reserved successfully and for which the customer is getting billed. Minimum api-version: 2022-08-01.'
          readOnly: true
        virtualMachinesAllocated:
          type: array
          description: A list of all virtual machines resource ids allocated against the capacity reservation.
          items:
            $ref: '#/components/schemas/SubResourceReadOnly'
          readOnly: true
        usedReservedCountBySubscription:
          type: object
          description: 'For open capacity reservations, this provides a map of the used reserved capacity count keyed by the subscription id (a GUID) that is consuming the capacity, i.e. each entry maps a consuming subscription id to the count of reserved capacity it is currently using. This is populated only for open capacity reservations and is not reported for targeted and block capacity reservations, which instead report allocation through virtualMachinesAllocated. Minimum api-version: 2026-04-01.'
          additionalProperties:
            format: int32
            type: integer
          readOnly: true
    ReservationState:
      type: string
      description: The current state of a Future capacity reservation.
      enum:
      - Pending
      - Declined
      - Approved
      - FulfillmentFailed
      - Committed
      - Live
      - PartiallyFulfilled
      x-ms-enum:
        name: ReservationState
        modelAsString: true
        values:
        - name: Pending
          value: Pending
          description: The capacity reservation request has been submitted and is awaiting evaluation.
        - name: Declined
          value: Declined
          description: The capacity reservation request was rejected, and will not change again without user action.
        - name: Approved
          value: Approved
          description: The capacity reservation request has been approved by Azure and is awaiting fulfillment.
        - name: FulfillmentFailed
          value: FulfillmentFailed
          description: A failure occurred while attempting to fulfill the capacity reservation request.
        - name: Committed
          value: Committed
          description: The capacity reservation is locked and cannot be updated or deleted prior to going live.
        - name: Live
          value: Live
          description: The capacity reservation is active and available for use, and cannot be modified or deleted until the minimum commitment period has elapsed.
        - name: PartiallyFulfilled
          value: PartiallyFulfilled
          description: Azure was only able to deliver a portion of the requested capacity. The capacity reservation cannot be modified or deleted until the minimum commitment period has elapsed. The portion of fulfilled capacity can be viewed by inspecting the capacity reservation's instance view, displayed as currentCapacity within the utilizationInfo.
    CapacityReservationInstanceView:
      type: object
      description: The instance view of a capacity reservation that provides as snapshot of the runtime properties of the capacity reservation that is managed by the platform and can change outside of control plane operations.
      properties:
        utilizationInfo:
          $ref: '#/components/schemas/CapacityReservationUtilization'
          description: Unutilized capacity of the capacity reservation.
        statuses:
          type: array
          description: The resource status information.
          items:
            $ref: '#/components/schemas/InstanceViewStatus'
          x-ms-identifiers: []
        reservationStateInfo:
          $ref: '#/components/schemas/CapacityReservationStateInfo'
          description: 'The reservation state information for a capacity reservation, this detail is primarily provided for Future capacity reservations. Minimum API version: 2026-04-01.'
    Sku:
      type: object
      description: 'Describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the hardware the scale set is currently on, you need to deallocate the VMs in the scale set before you modify the SKU name.'
      properties:
        name:
          type: string
          description: The sku name.
        tier:
          type: string
          description: Specifies the tier of virtual machines in a scale set.<br /><br /> Possible Values:<br /><br /> **Standard**<br /><br /> **Basic**
        capacity:
          type: integer
          format: int64
          description: Specifies the number of virtual machines in the scale set.
    CapacityReservationListResult:
      type: object
      description: The list capacity reservation operation response.
      properties:
        value:
          type: array
          description: The list of capacity reservations.
          items:
            $ref: '#/components/schemas/CapacityReservation'
        nextLink:
          type: string
          format: uri
          description: The URI to fetch the next page of capacity reservations. Call ListNext() with this URI to fetch the next page of capacity reservations.
      required:
      - value
    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'
    InstanceViewStatus:
      type: object
      description: Instance view status.
      properties:
        code:
          type: string
          description: The status code.
        level:
          $ref: '#/components/schemas/StatusLevelTypes'
          description: The level code.
        displayStatus:
          type: string
          description: The short localizable label for the status.
        message:
          type: string
          description: The detailed status message, including for alerts and error messages.
        time:
          type: string
          format: date-time
          description: The time of the status.
    SubResourceReadOnly:
      type: object
      properties:
        id:
          readOnly: true
          type: string
          description: Resource Id
  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'