Capacity Reservations - Get

The operation that retrieves information about the capacity reservation.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}?api-version=2025-11-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}?api-version=2025-11-01&$expand=instanceView

URI Parameters

Name In Required Type Description
capacityReservationGroupName
path True

string

The name of the capacity reservation group.

capacityReservationName
path True

string

The name of the capacity reservation.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string

minLength: 1

The ID of the target subscription.

api-version
query True

string

minLength: 1

The API version to use for this operation.

$expand
query

CapacityReservationInstanceViewTypes

The expand expression to apply on the operation. 'InstanceView' retrieves a snapshot of the runtime properties of the capacity reservation that is managed by the platform and can change outside of control plane operations.

Responses

Name Type Description
200 OK

CapacityReservation

Azure operation completed successfully.

Other Status Codes

CloudError

An unexpected error response.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Get a block capacity reservation.
Get a capacity reservation.
Get a targeted capacity reservation.

Get a block capacity reservation.

Sample request

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/blockCapacityReservationGroup/capacityReservations/blockCapacityReservation?api-version=2025-11-01&$expand=instanceView

Sample response

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/blockCapacityReservationGroup/capacityReservations/blockCapacityReservation",
  "properties": {
    "platformFaultDomainCount": 3,
    "reservationId": "{GUID}",
    "provisioningTime": "2021-06-27T01:02:38.3138469+00:00",
    "virtualMachinesAssociated": [
      {
        "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1"
      },
      {
        "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2"
      },
      {
        "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM3"
      }
    ],
    "provisioningState": "Succeeded",
    "instanceView": {
      "utilizationInfo": {
        "currentCapacity": 5,
        "virtualMachinesAllocated": [
          {
            "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1"
          },
          {
            "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2"
          }
        ]
      },
      "statuses": [
        {
          "code": "ProvisioningState/succeeded",
          "level": "Info",
          "displayStatus": "Provisioning succeeded"
        }
      ]
    },
    "scheduleProfile": {
      "start": "2025-08-01T12:00:00Z",
      "end": "2025-08-02T11:30:00Z"
    },
    "timeCreated": "2021-06-27T01:02:38.3138469+00:00"
  },
  "location": "westus",
  "tags": {
    "department": "HR"
  },
  "sku": {
    "name": "Standard_ND96isr_H100_v5",
    "capacity": 1
  },
  "zones": [
    "1"
  ],
  "name": "blockCapacityReservation"
}

Get a capacity reservation.

Sample request

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation?api-version=2025-11-01&$expand=instanceView

Sample response

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation",
  "properties": {
    "platformFaultDomainCount": 3,
    "reservationId": "{GUID}",
    "provisioningTime": "2021-06-27T01:02:38.3138469+00:00",
    "virtualMachinesAssociated": [
      {
        "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1"
      },
      {
        "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2"
      },
      {
        "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM3"
      }
    ],
    "provisioningState": "Succeeded",
    "instanceView": {
      "utilizationInfo": {
        "currentCapacity": 5,
        "virtualMachinesAllocated": [
          {
            "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1"
          },
          {
            "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2"
          }
        ]
      },
      "statuses": [
        {
          "code": "ProvisioningState/succeeded",
          "level": "Info",
          "displayStatus": "Provisioning succeeded"
        }
      ]
    },
    "timeCreated": "2021-06-27T01:02:38.3138469+00:00"
  },
  "location": "westus",
  "tags": {
    "department": "HR"
  },
  "sku": {
    "name": "Standard_DS1_v2",
    "capacity": 4
  },
  "zones": [
    "1"
  ],
  "name": "myCapacityReservation"
}

Get a targeted capacity reservation.

Sample request

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/targetedCapacityReservationGroup/capacityReservations/targetedCapacityReservation?api-version=2025-11-01&$expand=instanceView

Sample response

{
  "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/targetedCapacityReservationGroup/capacityReservations/targetedCapacityReservation",
  "properties": {
    "platformFaultDomainCount": 3,
    "reservationId": "{GUID}",
    "provisioningTime": "2021-06-27T01:02:38.3138469+00:00",
    "virtualMachinesAssociated": [
      {
        "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1"
      },
      {
        "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2"
      },
      {
        "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM3"
      }
    ],
    "provisioningState": "Succeeded",
    "instanceView": {
      "utilizationInfo": {
        "currentCapacity": 5,
        "virtualMachinesAllocated": [
          {
            "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1"
          },
          {
            "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2"
          }
        ]
      },
      "statuses": [
        {
          "code": "ProvisioningState/succeeded",
          "level": "Info",
          "displayStatus": "Provisioning succeeded"
        }
      ]
    },
    "timeCreated": "2021-06-27T01:02:38.3138469+00:00"
  },
  "location": "westus",
  "tags": {
    "department": "HR"
  },
  "sku": {
    "name": "Standard_DS1_v2",
    "capacity": 4
  },
  "zones": [
    "1"
  ],
  "name": "targetedCapacityReservation"
}

Definitions

Name Description
ApiError

Api error.

ApiErrorBase

Api error base.

CapacityReservation

Specifies information about the capacity reservation.

CapacityReservationInstanceView

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.

CapacityReservationInstanceViewTypes
CapacityReservationUtilization

Represents the capacity reservation utilization in terms of resources allocated.

CloudError

An error response from the Compute service.

createdByType

The type of identity that created the resource.

InnerError

Inner error details.

InstanceViewStatus

Instance view status.

ScheduleProfile

Defines the schedule for Block-type capacity reservations. Specifies the schedule during which capacity reservation is active and VM or VMSS resource can be allocated using reservation. This property is required and only supported when the capacity reservation group type is 'Block'. The scheduleProfile, start, and end fields are immutable after creation. Minimum API version: 2025-04-01. Please refer to https://aka.ms/blockcapacityreservation for more details.

Sku

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.

StatusLevelTypes

The level code.

SubResourceReadOnly
systemData

Metadata pertaining to creation and last modification of the resource.

ApiError

Api error.

Name Type Description
code

string

The error code.

details

ApiErrorBase[]

The Api error details

innererror

InnerError

The Api inner error

message

string

The error message.

target

string

The target of the particular error.

ApiErrorBase

Api error base.

Name Type Description
code

string

The error code.

message

string

The error message.

target

string

The target of the particular error.

CapacityReservation

Specifies information about the capacity reservation.

Name Type Description
id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

location

string

The geo-location where the resource lives

name

string

The name of the resource

properties.instanceView

CapacityReservationInstanceView

The Capacity reservation instance view.

properties.platformFaultDomainCount

integer (int32)

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.

properties.provisioningState

string

The provisioning state, which only appears in the response.

properties.provisioningTime

string (date-time)

The date time when the capacity reservation was last updated.

properties.reservationId

string

A unique id generated and assigned to the capacity reservation by the platform which does not change throughout the lifetime of the resource.

properties.scheduleProfile

ScheduleProfile

Defines the schedule for Block-type capacity reservations. Specifies the schedule during which capacity reservation is active and VM or VMSS resource can be allocated using reservation. This property is required and only supported when the capacity reservation group type is 'Block'. The scheduleProfile, start, and end fields are immutable after creation. Minimum API version: 2025-04-01. Please refer to https://aka.ms/blockcapacityreservation for more details.

properties.timeCreated

string (date-time)

Specifies the time at which the Capacity Reservation resource was created. Minimum api-version: 2021-11-01.

properties.virtualMachinesAssociated

SubResourceReadOnly[]

A list of all virtual machine resource ids that are associated with the capacity reservation.

sku

Sku

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.

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

tags

object

Resource tags.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

zones

string[]

The availability zones.

CapacityReservationInstanceView

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.

Name Type Description
statuses

InstanceViewStatus[]

The resource status information.

utilizationInfo

CapacityReservationUtilization

Unutilized capacity of the capacity reservation.

CapacityReservationInstanceViewTypes

Value Description
instanceView

CapacityReservationUtilization

Represents the capacity reservation utilization in terms of resources allocated.

Name Type Description
currentCapacity

integer (int32)

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.

virtualMachinesAllocated

SubResourceReadOnly[]

A list of all virtual machines resource ids allocated against the capacity reservation.

CloudError

An error response from the Compute service.

Name Type Description
error

ApiError

Api error.

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

InnerError

Inner error details.

Name Type Description
errordetail

string

The internal error message or exception dump.

exceptiontype

string

The exception type.

InstanceViewStatus

Instance view status.

Name Type Description
code

string

The status code.

displayStatus

string

The short localizable label for the status.

level

StatusLevelTypes

The level code.

message

string

The detailed status message, including for alerts and error messages.

time

string (date-time)

The time of the status.

ScheduleProfile

Defines the schedule for Block-type capacity reservations. Specifies the schedule during which capacity reservation is active and VM or VMSS resource can be allocated using reservation. This property is required and only supported when the capacity reservation group type is 'Block'. The scheduleProfile, start, and end fields are immutable after creation. Minimum API version: 2025-04-01. Please refer to https://aka.ms/blockcapacityreservation for more details.

Name Type Description
end

string

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.

start

string

The required start date for 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. Example: 2025-06-27.

Sku

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.

Name Type Description
capacity

integer (int64)

Specifies the number of virtual machines in the scale set.

name

string

The sku name.

tier

string

Specifies the tier of virtual machines in a scale set.

Possible Values:

Standard

Basic

StatusLevelTypes

The level code.

Value Description
Info
Warning
Error

SubResourceReadOnly

Name Type Description
id

string

Resource Id

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string (date-time)

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.