Capacity Reservation Groups - Get
The operation that retrieves information about a capacity reservation group.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}?api-version=2026-04-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}?api-version=2026-04-01&$expand=instanceView
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
capacity
|
path | True |
string |
The name of the capacity reservation group. |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
|
subscription
|
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 |
The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the capacity reservations under the capacity reservation group which is a snapshot of the runtime properties of a capacity reservation that is managed by the platform and can change outside of control plane operations. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Azure operation completed successfully. |
|
| Other Status Codes |
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 Group. |
| Get a capacity reservation Group. |
| Get a targeted capacity reservation group. |
| Get an open capacity reservation group with instance view. |
Get a block capacity reservation Group.
Sample request
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/blockCapacityReservationGroup?api-version=2026-04-01&$expand=instanceView
Sample response
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/blockCapacityReservationGroup",
"properties": {
"capacityReservations": [
{
"id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/blockCapacityReservationGroup/capacityReservations/blockCapacityReservation1"
},
{
"id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/blockCapacityReservationGroup/capacityReservations/blockCapacityReservation2"
}
],
"instanceView": {
"capacityReservations": [
{
"name": "blockCapacityReservation1",
"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"
}
]
},
{
"name": "blockCapacityReservation2",
"utilizationInfo": {
"currentCapacity": 5,
"virtualMachinesAllocated": [
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM3"
},
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM4"
}
]
},
"statuses": [
{
"code": "ProvisioningState/succeeded",
"level": "Info",
"displayStatus": "Provisioning succeeded"
}
]
}
]
},
"reservationType": "Block"
},
"location": "westus",
"tags": {
"{tagName}": "{tagValue}"
},
"name": "blockCapacityReservationGroup",
"zones": [
"3",
"1"
]
}
Get a capacity reservation Group.
Sample request
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup?api-version=2026-04-01&$expand=instanceView
Sample response
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/myCapacityReservationGroup",
"properties": {
"capacityReservations": [
{
"id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation1"
},
{
"id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation2"
}
],
"sharingProfile": {
"subscriptionIds": [
{
"id": "/subscriptions/{subscription-id1}"
},
{
"id": "/subscriptions/{subscription-id2}"
}
]
},
"instanceView": {
"capacityReservations": [
{
"name": "myCapacityReservation1",
"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"
}
]
},
{
"name": "myCapacityReservation2",
"utilizationInfo": {
"currentCapacity": 5,
"virtualMachinesAllocated": [
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM3"
},
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM4"
}
]
},
"statuses": [
{
"code": "ProvisioningState/succeeded",
"level": "Info",
"displayStatus": "Provisioning succeeded"
}
]
}
],
"sharedSubscriptionIds": [
{
"id": "/subscriptions/{subscription-id1}"
},
{
"id": "/subscriptions/{subscription-id2}"
}
]
}
},
"location": "westus",
"tags": {
"{tagName}": "{tagValue}"
},
"name": "myCapacityReservationGroup",
"zones": [
"3",
"1"
]
}
Get a targeted capacity reservation group.
Sample request
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/targetedCapacityReservationGroup?api-version=2026-04-01&$expand=instanceView
Sample response
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/targetedCapacityReservationGroup",
"properties": {
"capacityReservations": [
{
"id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/targetedCapacityReservationGroup/capacityReservations/targetedCapacityReservation1"
},
{
"id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/targetedCapacityReservationGroup/capacityReservations/targetedCapacityReservation2"
}
],
"sharingProfile": {
"subscriptionIds": [
{
"id": "/subscriptions/{subscription-id1}"
},
{
"id": "/subscriptions/{subscription-id2}"
}
]
},
"instanceView": {
"capacityReservations": [
{
"name": "targetedCapacityReservation1",
"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"
}
]
},
{
"name": "targetedCapacityReservation2",
"utilizationInfo": {
"currentCapacity": 5,
"virtualMachinesAllocated": [
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM3"
},
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM4"
}
]
},
"statuses": [
{
"code": "ProvisioningState/succeeded",
"level": "Info",
"displayStatus": "Provisioning succeeded"
}
]
}
],
"sharedSubscriptionIds": [
{
"id": "/subscriptions/{subscription-id1}"
},
{
"id": "/subscriptions/{subscription-id2}"
}
]
},
"reservationType": "Targeted"
},
"location": "westus",
"tags": {
"{tagName}": "{tagValue}"
},
"name": "targetedCapacityReservationGroup",
"zones": [
"3",
"1"
]
}
Get an open capacity reservation group with instance view.
Sample request
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/openCapacityReservationGroup?api-version=2026-04-01&$expand=instanceView
Sample response
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/CapacityReservationGroups/openCapacityReservationGroup",
"properties": {
"capacityReservations": [
{
"id": "subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/openCapacityReservationGroup/capacityReservations/openCapacityReservation1"
}
],
"sharingProfile": {
"subscriptionIds": [
{
"id": "/subscriptions/{subscription-id1}"
},
{
"id": "/subscriptions/{subscription-id2}"
}
]
},
"instanceView": {
"capacityReservations": [
{
"name": "openCapacityReservation1",
"utilizationInfo": {
"currentCapacity": 10,
"usedReservedCountBySubscription": {
"{subscription-id1}": 3,
"{subscription-id2}": 2
}
},
"statuses": [
{
"code": "ProvisioningState/succeeded",
"level": "Info",
"displayStatus": "Provisioning succeeded"
}
]
}
],
"sharedSubscriptionIds": [
{
"id": "/subscriptions/{subscription-id1}"
},
{
"id": "/subscriptions/{subscription-id2}"
}
]
},
"reservationType": "Open"
},
"location": "westus",
"tags": {
"{tagName}": "{tagValue}"
},
"name": "openCapacityReservationGroup",
"zones": [
"1",
"2"
]
}
Definitions
| Name | Description |
|---|---|
|
Api |
Api error. |
|
Api |
Api error base. |
|
Capacity |
Specifies information about the capacity reservation group that the capacity reservations should be assigned to. Currently, a capacity reservation can only be added to a capacity reservation group at creation time. An existing capacity reservation cannot be added or moved to another capacity reservation group. |
|
Capacity |
|
|
Capacity |
|
|
Capacity |
The instance view of a capacity reservation that includes the name of the capacity reservation. It is used for the response to the instance view of a capacity reservation group. |
|
Capacity |
Details related to the current state for a Future capacity reservation. |
|
Capacity |
Represents the capacity reservation utilization in terms of resources allocated. |
|
Cloud |
An error response from the Compute service. |
|
created |
The type of identity that created the resource. |
|
Inner |
Inner error details. |
|
Instance |
Instance view status. |
|
Reservation |
The current state of a Future capacity reservation. |
|
Reservation |
Indicates the type of capacity reservation. Allowed values are 'Block' for block capacity reservations that enable a VM to consume capacity only from this capacity block when it is associated using a capacity reservation group, 'Targeted' for reservations that enable a VM to consume capacity from an explicitly associated capacity reservation group and fall back to the publicly available capacity if the reservation is full, and 'Open' for reservations that a VM consumes when it is eligible from an implicitly associated capacity reservation group with the matching VM size and zone without associating that capacity reservation group and fall back to the publicly available capacity if the reservation is full. Future capacity reservations can be created in 'Targeted' or 'Open' capacity reservation groups. The reservation type is immutable and cannot be changed after the capacity reservation group is created. |
|
Resource |
|
|
Status |
The level code. |
|
Sub |
|
|
Sub |
|
|
system |
Metadata pertaining to creation and last modification of the resource. |
ApiError
Api error.
| Name | Type | Description |
|---|---|---|
| code |
string |
The error code. |
| details |
The Api error details |
|
| 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. |
CapacityReservationGroup
Specifies information about the capacity reservation group that the capacity reservations should be assigned to. Currently, a capacity reservation can only be added to a capacity reservation group at creation time. An existing capacity reservation cannot be added or moved to another capacity reservation group.
| 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.capacityReservations |
A list of all capacity reservation resource ids that belong to capacity reservation group. |
|
| properties.instanceView |
The capacity reservation group instance view which has the list of instance views for all the capacity reservations that belong to the capacity reservation group. |
|
| properties.reservationType |
Indicates the type of capacity reservation. Allowed values are 'Block' for block capacity reservations that enable a VM to consume capacity only from this capacity block when it is associated using a capacity reservation group, 'Targeted' for reservations that enable a VM to consume capacity from an explicitly associated capacity reservation group and fall back to the publicly available capacity if the reservation is full, and 'Open' for reservations that a VM consumes when it is eligible from an implicitly associated capacity reservation group with the matching VM size and zone without associating that capacity reservation group and fall back to the publicly available capacity if the reservation is full. The reservation type is immutable and cannot be changed after the capacity reservation group is created. |
|
| properties.sharingProfile |
Specifies the settings to enable sharing across subscriptions for the capacity reservation group resource. The capacity reservation group resource can generally be shared across subscriptions belonging to a single Azure AAD tenant or across AAD tenants if there is a trust relationship established between the tenants. Block capacity reservation does not support sharing across subscriptions. Note: Minimum api-version: 2023-09-01. Please refer to https://aka.ms/computereservationsharing for more details. |
|
| properties.virtualMachinesAssociated |
A list of references to all virtual machines associated to the capacity reservation group. |
|
| 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. |
CapacityReservationGroupInstanceView
| Name | Type | Description |
|---|---|---|
| capacityReservations |
List of instance view of the capacity reservations under the capacity reservation group. |
|
| sharedSubscriptionIds |
List of the subscriptions that the capacity reservation group is shared with. Note: Minimum api-version: 2023-09-01. Please refer to https://aka.ms/computereservationsharing for more details. |
CapacityReservationGroupInstanceViewTypes
| Value | Description |
|---|---|
| instanceView |
CapacityReservationInstanceViewWithName
The instance view of a capacity reservation that includes the name of the capacity reservation. It is used for the response to the instance view of a capacity reservation group.
| Name | Type | Description |
|---|---|---|
| name |
string |
The name of the capacity reservation. |
| reservationStateInfo |
The reservation state information for a capacity reservation, this detail is primarily provided for Future capacity reservations. Minimum API version: 2026-04-01. |
|
| statuses |
The resource status information. |
|
| utilizationInfo |
Unutilized capacity of the capacity reservation. |
CapacityReservationStateInfo
Details related to the current state for a Future capacity reservation.
| Name | Type | Description |
|---|---|---|
| reservationState |
The current state of the capacity reservation. |
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. |
| usedReservedCountBySubscription |
object |
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. |
| virtualMachinesAllocated |
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 |
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 |
The level code. |
|
| message |
string |
The detailed status message, including for alerts and error messages. |
| time |
string (date-time) |
The time of the status. |
ReservationState
The current state of a Future capacity reservation.
| Value | Description |
|---|---|
| Pending |
The capacity reservation request has been submitted and is awaiting evaluation. |
| Declined |
The capacity reservation request was rejected, and will not change again without user action. |
| Approved |
The capacity reservation request has been approved by Azure and is awaiting fulfillment. |
| FulfillmentFailed |
A failure occurred while attempting to fulfill the capacity reservation request. |
| Committed |
The capacity reservation is locked and cannot be updated or deleted prior to going live. |
| Live |
The capacity reservation is active and available for use, and cannot be modified or deleted until the minimum commitment period has elapsed. |
| PartiallyFulfilled |
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. |
ReservationType
Indicates the type of capacity reservation. Allowed values are 'Block' for block capacity reservations that enable a VM to consume capacity only from this capacity block when it is associated using a capacity reservation group, 'Targeted' for reservations that enable a VM to consume capacity from an explicitly associated capacity reservation group and fall back to the publicly available capacity if the reservation is full, and 'Open' for reservations that a VM consumes when it is eligible from an implicitly associated capacity reservation group with the matching VM size and zone without associating that capacity reservation group and fall back to the publicly available capacity if the reservation is full. Future capacity reservations can be created in 'Targeted' or 'Open' capacity reservation groups. The reservation type is immutable and cannot be changed after the capacity reservation group is created.
| Value | Description |
|---|---|
| Targeted |
Reservations that enable a VM to consume capacity from an explicitly associated capacity reservation group and fall back to the publicly available capacity if the reservation is full. |
| Block |
Block capacity reservations that enable a VM to consume capacity only from this capacity block when it is associated using a capacity reservation group. |
| Open |
Reservations that a VM consumes when it is eligible from an implicitly associated capacity reservation group with the matching VM size and zone without associating that capacity reservation group, and fall back to the publicly available capacity if the reservation is full. Minimum api-version: 2026-04-01. |
ResourceSharingProfile
| Name | Type | Description |
|---|---|---|
| subscriptionIds |
Specifies an array of subscription resource IDs that capacity reservation group is shared with. Block Capacity Reservations does not support sharing across subscriptions. Note: Minimum api-version: 2023-09-01. Please refer to https://aka.ms/computereservationsharing for more details. |
StatusLevelTypes
The level code.
| Value | Description |
|---|---|
| Info | |
| Warning | |
| Error |
SubResource
| Name | Type | Description |
|---|---|---|
| id |
string |
Resource Id |
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 |
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 |
The type of identity that last modified the resource. |