De bewerking waarmee informatie over de capaciteitsreservering wordt opgehaald.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}?api-version=2026-04-01
Met optionele parameters:
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}/capacityReservations/{capacityReservationName}?api-version=2026-04-01&$expand=instanceView
URI-parameters
| Name |
In |
Vereist |
Type |
Description |
|
capacityReservationGroupName
|
path |
True
|
string
|
De naam van de capaciteitsreserveringsgroep.
|
|
capacityReservationName
|
path |
True
|
string
|
De naam van de capaciteitsreservering.
|
|
resourceGroupName
|
path |
True
|
string
minLength: 1 maxLength: 90
|
De naam van de resource group. De naam is hoofdletterongevoelig.
|
|
subscriptionId
|
path |
True
|
string
minLength: 1
|
De ID van het doelabonnement.
|
|
api-version
|
query |
True
|
string
minLength: 1
|
De API-versie die voor deze bewerking moet worden gebruikt.
|
|
$expand
|
query |
|
CapacityReservationInstanceViewTypes
|
De uitvouwexpressie die moet worden toegepast op de bewerking. 'InstanceView' haalt een momentopname op van de runtime-eigenschappen van de capaciteitsreservering die wordt beheerd door het platform en kan buiten besturingsvlakbewerkingen veranderen.
|
Antwoorden
Beveiliging
azure_auth
OAuth2-stroom voor Azure Active Directory.
Type:
oauth2
Stroom:
implicit
Autorisatie-URL:
https://login.microsoftonline.com/common/oauth2/authorize
Bereiken
| Name |
Description |
|
user_impersonation
|
Uw gebruikersaccount imiteren
|
Voorbeelden
Get a block capacity reservation.
Voorbeeldaanvraag
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/blockCapacityReservationGroup/capacityReservations/blockCapacityReservation?api-version=2026-04-01&$expand=instanceView
import com.azure.resourcemanager.compute.models.CapacityReservationInstanceViewTypes;
/**
* Samples for CapacityReservations Get.
*/
public final class Main {
/*
* x-ms-original-file: 2026-04-01/capacityReservationExamples/BlockCapacityReservation_Get.json
*/
/**
* Sample code: Get a block capacity reservation.
*
* @param manager Entry point to ComputeManager.
*/
public static void getABlockCapacityReservation(com.azure.resourcemanager.compute.ComputeManager manager) {
manager.serviceClient().getCapacityReservations().getWithResponse("myResourceGroup",
"blockCapacityReservationGroup", "blockCapacityReservation",
CapacityReservationInstanceViewTypes.INSTANCE_VIEW, com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.compute import ComputeManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-compute
# USAGE
python block_capacity_reservation_get.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ComputeManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.capacity_reservations.get(
resource_group_name="myResourceGroup",
capacity_reservation_group_name="blockCapacityReservationGroup",
capacity_reservation_name="blockCapacityReservation",
)
print(response)
# x-ms-original-file: 2026-04-01/capacityReservationExamples/BlockCapacityReservation_Get.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcompute_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v8"
)
// Generated from example definition: 2026-04-01/capacityReservationExamples/BlockCapacityReservation_Get.json
func ExampleCapacityReservationsClient_Get_getABlockCapacityReservation() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcompute.NewClientFactory("{subscriptionId}", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCapacityReservationsClient().Get(ctx, "myResourceGroup", "blockCapacityReservationGroup", "blockCapacityReservation", &armcompute.CapacityReservationsClientGetOptions{
Expand: to.Ptr(armcompute.CapacityReservationInstanceViewTypesInstanceView)})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcompute.CapacityReservationsClientGetResponse{
// CapacityReservation: armcompute.CapacityReservation{
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/blockCapacityReservationGroup/capacityReservations/blockCapacityReservation"),
// Properties: &armcompute.CapacityReservationProperties{
// PlatformFaultDomainCount: to.Ptr[int32](3),
// ReservationID: to.Ptr("{GUID}"),
// ProvisioningTime: to.Ptr(time.Date(2021, time.June, 27, 1, 2, 38, 313846900, time.UTC)),
// VirtualMachinesAssociated: []*armcompute.SubResourceReadOnly{
// {
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1"),
// },
// {
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2"),
// },
// {
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM3"),
// },
// },
// ProvisioningState: to.Ptr("Succeeded"),
// InstanceView: &armcompute.CapacityReservationInstanceView{
// UtilizationInfo: &armcompute.CapacityReservationUtilization{
// CurrentCapacity: to.Ptr[int32](5),
// VirtualMachinesAllocated: []*armcompute.SubResourceReadOnly{
// {
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1"),
// },
// {
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2"),
// },
// },
// },
// Statuses: []*armcompute.InstanceViewStatus{
// {
// Code: to.Ptr("ProvisioningState/succeeded"),
// Level: to.Ptr(armcompute.StatusLevelTypesInfo),
// DisplayStatus: to.Ptr("Provisioning succeeded"),
// },
// },
// },
// ScheduleProfile: &armcompute.ScheduleProfile{
// Start: to.Ptr("2025-08-01T12:00:00Z"),
// End: to.Ptr("2025-08-02T11:30:00Z"),
// },
// TimeCreated: to.Ptr(time.Date(2021, time.June, 27, 1, 2, 38, 313846900, time.UTC)),
// },
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "department": to.Ptr("HR"),
// },
// SKU: &armcompute.SKU{
// Name: to.Ptr("Standard_ND96isr_H100_v5"),
// Capacity: to.Ptr[int64](1),
// },
// Zones: []*string{
// to.Ptr("1"),
// },
// Name: to.Ptr("blockCapacityReservation"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ComputeManagementClient } = require("@azure/arm-compute");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to the operation that retrieves information about the capacity reservation.
*
* @summary the operation that retrieves information about the capacity reservation.
* x-ms-original-file: 2026-04-01/capacityReservationExamples/BlockCapacityReservation_Get.json
*/
async function getABlockCapacityReservation() {
const credential = new DefaultAzureCredential();
const subscriptionId = "{subscriptionId}";
const client = new ComputeManagementClient(credential, subscriptionId);
const result = await client.capacityReservations.get(
"myResourceGroup",
"blockCapacityReservationGroup",
"blockCapacityReservation",
{ expand: "instanceView" },
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Voorbeeldrespons
{
"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.
Voorbeeldaanvraag
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation?api-version=2026-04-01&$expand=instanceView
import com.azure.resourcemanager.compute.models.CapacityReservationInstanceViewTypes;
/**
* Samples for CapacityReservations Get.
*/
public final class Main {
/*
* x-ms-original-file: 2026-04-01/capacityReservationExamples/CapacityReservation_Get.json
*/
/**
* Sample code: Get a capacity reservation.
*
* @param manager Entry point to ComputeManager.
*/
public static void getACapacityReservation(com.azure.resourcemanager.compute.ComputeManager manager) {
manager.serviceClient().getCapacityReservations().getWithResponse("myResourceGroup",
"myCapacityReservationGroup", "myCapacityReservation", CapacityReservationInstanceViewTypes.INSTANCE_VIEW,
com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.compute import ComputeManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-compute
# USAGE
python capacity_reservation_get.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ComputeManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.capacity_reservations.get(
resource_group_name="myResourceGroup",
capacity_reservation_group_name="myCapacityReservationGroup",
capacity_reservation_name="myCapacityReservation",
)
print(response)
# x-ms-original-file: 2026-04-01/capacityReservationExamples/CapacityReservation_Get.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcompute_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v8"
)
// Generated from example definition: 2026-04-01/capacityReservationExamples/CapacityReservation_Get.json
func ExampleCapacityReservationsClient_Get_getACapacityReservation() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcompute.NewClientFactory("{subscriptionId}", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCapacityReservationsClient().Get(ctx, "myResourceGroup", "myCapacityReservationGroup", "myCapacityReservation", &armcompute.CapacityReservationsClientGetOptions{
Expand: to.Ptr(armcompute.CapacityReservationInstanceViewTypesInstanceView)})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcompute.CapacityReservationsClientGetResponse{
// CapacityReservation: armcompute.CapacityReservation{
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/myCapacityReservationGroup/capacityReservations/myCapacityReservation"),
// Properties: &armcompute.CapacityReservationProperties{
// PlatformFaultDomainCount: to.Ptr[int32](3),
// ReservationID: to.Ptr("{GUID}"),
// ProvisioningTime: to.Ptr(time.Date(2021, time.June, 27, 1, 2, 38, 313846900, time.UTC)),
// VirtualMachinesAssociated: []*armcompute.SubResourceReadOnly{
// {
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1"),
// },
// {
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2"),
// },
// {
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM3"),
// },
// },
// ProvisioningState: to.Ptr("Succeeded"),
// InstanceView: &armcompute.CapacityReservationInstanceView{
// UtilizationInfo: &armcompute.CapacityReservationUtilization{
// CurrentCapacity: to.Ptr[int32](5),
// VirtualMachinesAllocated: []*armcompute.SubResourceReadOnly{
// {
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1"),
// },
// {
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2"),
// },
// },
// },
// Statuses: []*armcompute.InstanceViewStatus{
// {
// Code: to.Ptr("ProvisioningState/succeeded"),
// Level: to.Ptr(armcompute.StatusLevelTypesInfo),
// DisplayStatus: to.Ptr("Provisioning succeeded"),
// },
// },
// },
// TimeCreated: to.Ptr(time.Date(2021, time.June, 27, 1, 2, 38, 313846900, time.UTC)),
// },
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "department": to.Ptr("HR"),
// },
// SKU: &armcompute.SKU{
// Name: to.Ptr("Standard_DS1_v2"),
// Capacity: to.Ptr[int64](4),
// },
// Zones: []*string{
// to.Ptr("1"),
// },
// Name: to.Ptr("myCapacityReservation"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ComputeManagementClient } = require("@azure/arm-compute");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to the operation that retrieves information about the capacity reservation.
*
* @summary the operation that retrieves information about the capacity reservation.
* x-ms-original-file: 2026-04-01/capacityReservationExamples/CapacityReservation_Get.json
*/
async function getACapacityReservation() {
const credential = new DefaultAzureCredential();
const subscriptionId = "{subscriptionId}";
const client = new ComputeManagementClient(credential, subscriptionId);
const result = await client.capacityReservations.get(
"myResourceGroup",
"myCapacityReservationGroup",
"myCapacityReservation",
{ expand: "instanceView" },
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Voorbeeldrespons
{
"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 Future capacity reservation.
Voorbeeldaanvraag
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/futureCapacityReservationGroup/capacityReservations/futureCapacityReservation?api-version=2026-04-01&$expand=instanceView
import com.azure.resourcemanager.compute.models.CapacityReservationInstanceViewTypes;
/**
* Samples for CapacityReservations Get.
*/
public final class Main {
/*
* x-ms-original-file: 2026-04-01/capacityReservationExamples/FutureCapacityReservation_Get.json
*/
/**
* Sample code: Get a Future capacity reservation.
*
* @param manager Entry point to ComputeManager.
*/
public static void getAFutureCapacityReservation(com.azure.resourcemanager.compute.ComputeManager manager) {
manager.serviceClient().getCapacityReservations().getWithResponse("myResourceGroup",
"futureCapacityReservationGroup", "futureCapacityReservation",
CapacityReservationInstanceViewTypes.INSTANCE_VIEW, com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.compute import ComputeManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-compute
# USAGE
python future_capacity_reservation_get.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ComputeManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.capacity_reservations.get(
resource_group_name="myResourceGroup",
capacity_reservation_group_name="futureCapacityReservationGroup",
capacity_reservation_name="futureCapacityReservation",
)
print(response)
# x-ms-original-file: 2026-04-01/capacityReservationExamples/FutureCapacityReservation_Get.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcompute_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v8"
)
// Generated from example definition: 2026-04-01/capacityReservationExamples/FutureCapacityReservation_Get.json
func ExampleCapacityReservationsClient_Get_getAFutureCapacityReservation() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcompute.NewClientFactory("{subscriptionId}", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCapacityReservationsClient().Get(ctx, "myResourceGroup", "futureCapacityReservationGroup", "futureCapacityReservation", &armcompute.CapacityReservationsClientGetOptions{
Expand: to.Ptr(armcompute.CapacityReservationInstanceViewTypesInstanceView)})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcompute.CapacityReservationsClientGetResponse{
// CapacityReservation: armcompute.CapacityReservation{
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/futureCapacityReservationGroup/capacityReservations/futureCapacityReservation"),
// Properties: &armcompute.CapacityReservationProperties{
// PlatformFaultDomainCount: to.Ptr[int32](3),
// ReservationID: to.Ptr("{GUID}"),
// ProvisioningTime: to.Ptr(time.Date(2021, time.June, 27, 1, 2, 38, 313846900, time.UTC)),
// VirtualMachinesAssociated: []*armcompute.SubResourceReadOnly{
// {
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1"),
// },
// {
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2"),
// },
// {
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM3"),
// },
// },
// ProvisioningState: to.Ptr("Succeeded"),
// InstanceView: &armcompute.CapacityReservationInstanceView{
// UtilizationInfo: &armcompute.CapacityReservationUtilization{
// CurrentCapacity: to.Ptr[int32](4),
// VirtualMachinesAllocated: []*armcompute.SubResourceReadOnly{
// {
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1"),
// },
// {
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2"),
// },
// },
// },
// Statuses: []*armcompute.InstanceViewStatus{
// {
// Code: to.Ptr("ProvisioningState/succeeded"),
// Level: to.Ptr(armcompute.StatusLevelTypesInfo),
// DisplayStatus: to.Ptr("Provisioning succeeded"),
// },
// },
// ReservationStateInfo: &armcompute.CapacityReservationStateInfo{
// ReservationState: to.Ptr(armcompute.ReservationStateLive),
// },
// },
// ScheduleProfile: &armcompute.ScheduleProfile{
// Start: to.Ptr("2026-08-01T12:00:00Z"),
// MinimumCommitmentDays: to.Ptr[int32](30),
// ModifiableUntil: to.Ptr(time.Date(2026, time.June, 6, 12, 0, 0, 0, time.UTC)),
// },
// TimeCreated: to.Ptr(time.Date(2021, time.June, 27, 1, 2, 38, 313846900, time.UTC)),
// },
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "department": to.Ptr("HR"),
// },
// SKU: &armcompute.SKU{
// Name: to.Ptr("Standard_DS1_v2"),
// Capacity: to.Ptr[int64](4),
// },
// Zones: []*string{
// to.Ptr("1"),
// },
// Name: to.Ptr("futureCapacityReservation"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ComputeManagementClient } = require("@azure/arm-compute");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to the operation that retrieves information about the capacity reservation.
*
* @summary the operation that retrieves information about the capacity reservation.
* x-ms-original-file: 2026-04-01/capacityReservationExamples/FutureCapacityReservation_Get.json
*/
async function getAFutureCapacityReservation() {
const credential = new DefaultAzureCredential();
const subscriptionId = "{subscriptionId}";
const client = new ComputeManagementClient(credential, subscriptionId);
const result = await client.capacityReservations.get(
"myResourceGroup",
"futureCapacityReservationGroup",
"futureCapacityReservation",
{ expand: "instanceView" },
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Voorbeeldrespons
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/futureCapacityReservationGroup/capacityReservations/futureCapacityReservation",
"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": 4,
"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"
}
],
"reservationStateInfo": {
"reservationState": "Live"
}
},
"scheduleProfile": {
"start": "2026-08-01T12:00:00Z",
"minimumCommitmentDays": 30,
"modifiableUntil": "2026-06-06T12:00:00Z"
},
"timeCreated": "2021-06-27T01:02:38.3138469+00:00"
},
"location": "westus",
"tags": {
"department": "HR"
},
"sku": {
"name": "Standard_DS1_v2",
"capacity": 4
},
"zones": [
"1"
],
"name": "futureCapacityReservation"
}
Get a targeted capacity reservation.
Voorbeeldaanvraag
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/targetedCapacityReservationGroup/capacityReservations/targetedCapacityReservation?api-version=2026-04-01&$expand=instanceView
import com.azure.resourcemanager.compute.models.CapacityReservationInstanceViewTypes;
/**
* Samples for CapacityReservations Get.
*/
public final class Main {
/*
* x-ms-original-file: 2026-04-01/capacityReservationExamples/TargetedCapacityReservation_Get.json
*/
/**
* Sample code: Get a targeted capacity reservation.
*
* @param manager Entry point to ComputeManager.
*/
public static void getATargetedCapacityReservation(com.azure.resourcemanager.compute.ComputeManager manager) {
manager.serviceClient().getCapacityReservations().getWithResponse("myResourceGroup",
"targetedCapacityReservationGroup", "targetedCapacityReservation",
CapacityReservationInstanceViewTypes.INSTANCE_VIEW, com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.compute import ComputeManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-compute
# USAGE
python targeted_capacity_reservation_get.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ComputeManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.capacity_reservations.get(
resource_group_name="myResourceGroup",
capacity_reservation_group_name="targetedCapacityReservationGroup",
capacity_reservation_name="targetedCapacityReservation",
)
print(response)
# x-ms-original-file: 2026-04-01/capacityReservationExamples/TargetedCapacityReservation_Get.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcompute_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v8"
)
// Generated from example definition: 2026-04-01/capacityReservationExamples/TargetedCapacityReservation_Get.json
func ExampleCapacityReservationsClient_Get_getATargetedCapacityReservation() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcompute.NewClientFactory("{subscriptionId}", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCapacityReservationsClient().Get(ctx, "myResourceGroup", "targetedCapacityReservationGroup", "targetedCapacityReservation", &armcompute.CapacityReservationsClientGetOptions{
Expand: to.Ptr(armcompute.CapacityReservationInstanceViewTypesInstanceView)})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcompute.CapacityReservationsClientGetResponse{
// CapacityReservation: armcompute.CapacityReservation{
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/targetedCapacityReservationGroup/capacityReservations/targetedCapacityReservation"),
// Properties: &armcompute.CapacityReservationProperties{
// PlatformFaultDomainCount: to.Ptr[int32](3),
// ReservationID: to.Ptr("{GUID}"),
// ProvisioningTime: to.Ptr(time.Date(2021, time.June, 27, 1, 2, 38, 313846900, time.UTC)),
// VirtualMachinesAssociated: []*armcompute.SubResourceReadOnly{
// {
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1"),
// },
// {
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2"),
// },
// {
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM3"),
// },
// },
// ProvisioningState: to.Ptr("Succeeded"),
// InstanceView: &armcompute.CapacityReservationInstanceView{
// UtilizationInfo: &armcompute.CapacityReservationUtilization{
// CurrentCapacity: to.Ptr[int32](5),
// VirtualMachinesAllocated: []*armcompute.SubResourceReadOnly{
// {
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM1"),
// },
// {
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachines/myVM2"),
// },
// },
// },
// Statuses: []*armcompute.InstanceViewStatus{
// {
// Code: to.Ptr("ProvisioningState/succeeded"),
// Level: to.Ptr(armcompute.StatusLevelTypesInfo),
// DisplayStatus: to.Ptr("Provisioning succeeded"),
// },
// },
// },
// TimeCreated: to.Ptr(time.Date(2021, time.June, 27, 1, 2, 38, 313846900, time.UTC)),
// },
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "department": to.Ptr("HR"),
// },
// SKU: &armcompute.SKU{
// Name: to.Ptr("Standard_DS1_v2"),
// Capacity: to.Ptr[int64](4),
// },
// Zones: []*string{
// to.Ptr("1"),
// },
// Name: to.Ptr("targetedCapacityReservation"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ComputeManagementClient } = require("@azure/arm-compute");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to the operation that retrieves information about the capacity reservation.
*
* @summary the operation that retrieves information about the capacity reservation.
* x-ms-original-file: 2026-04-01/capacityReservationExamples/TargetedCapacityReservation_Get.json
*/
async function getATargetedCapacityReservation() {
const credential = new DefaultAzureCredential();
const subscriptionId = "{subscriptionId}";
const client = new ComputeManagementClient(credential, subscriptionId);
const result = await client.capacityReservations.get(
"myResourceGroup",
"targetedCapacityReservationGroup",
"targetedCapacityReservation",
{ expand: "instanceView" },
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Voorbeeldrespons
{
"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"
}
Get an open capacity reservation with instance view.
Voorbeeldaanvraag
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/openCapacityReservationGroup/capacityReservations/openCapacityReservation?api-version=2026-04-01&$expand=instanceView
import com.azure.resourcemanager.compute.models.CapacityReservationInstanceViewTypes;
/**
* Samples for CapacityReservations Get.
*/
public final class Main {
/*
* x-ms-original-file: 2026-04-01/capacityReservationExamples/OpenCapacityReservation_Get.json
*/
/**
* Sample code: Get an open capacity reservation with instance view.
*
* @param manager Entry point to ComputeManager.
*/
public static void
getAnOpenCapacityReservationWithInstanceView(com.azure.resourcemanager.compute.ComputeManager manager) {
manager.serviceClient().getCapacityReservations().getWithResponse("myResourceGroup",
"openCapacityReservationGroup", "openCapacityReservation",
CapacityReservationInstanceViewTypes.INSTANCE_VIEW, com.azure.core.util.Context.NONE);
}
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
from azure.identity import DefaultAzureCredential
from azure.mgmt.compute import ComputeManagementClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-compute
# USAGE
python open_capacity_reservation_get.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = ComputeManagementClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)
response = client.capacity_reservations.get(
resource_group_name="myResourceGroup",
capacity_reservation_group_name="openCapacityReservationGroup",
capacity_reservation_name="openCapacityReservation",
)
print(response)
# x-ms-original-file: 2026-04-01/capacityReservationExamples/OpenCapacityReservation_Get.json
if __name__ == "__main__":
main()
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
package armcompute_test
import (
"context"
"log"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v8"
)
// Generated from example definition: 2026-04-01/capacityReservationExamples/OpenCapacityReservation_Get.json
func ExampleCapacityReservationsClient_Get_getAnOpenCapacityReservationWithInstanceView() {
cred, err := azidentity.NewDefaultAzureCredential(nil)
if err != nil {
log.Fatalf("failed to obtain a credential: %v", err)
}
ctx := context.Background()
clientFactory, err := armcompute.NewClientFactory("{subscriptionId}", cred, nil)
if err != nil {
log.Fatalf("failed to create client: %v", err)
}
res, err := clientFactory.NewCapacityReservationsClient().Get(ctx, "myResourceGroup", "openCapacityReservationGroup", "openCapacityReservation", &armcompute.CapacityReservationsClientGetOptions{
Expand: to.Ptr(armcompute.CapacityReservationInstanceViewTypesInstanceView)})
if err != nil {
log.Fatalf("failed to finish the request: %v", err)
}
// You could use response here. We use blank identifier for just demo purposes.
_ = res
// If the HTTP response code is 200 as defined in example definition, your response structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes.
// res = armcompute.CapacityReservationsClientGetResponse{
// CapacityReservation: armcompute.CapacityReservation{
// ID: to.Ptr("/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/openCapacityReservationGroup/capacityReservations/openCapacityReservation"),
// Properties: &armcompute.CapacityReservationProperties{
// PlatformFaultDomainCount: to.Ptr[int32](3),
// ReservationID: to.Ptr("{GUID}"),
// ProvisioningTime: to.Ptr(time.Date(2021, time.June, 27, 1, 2, 38, 313846900, time.UTC)),
// ProvisioningState: to.Ptr("Succeeded"),
// InstanceView: &armcompute.CapacityReservationInstanceView{
// UtilizationInfo: &armcompute.CapacityReservationUtilization{
// CurrentCapacity: to.Ptr[int32](10),
// UsedReservedCountBySubscription: map[string]*int32{
// "{subscription-id1}": to.Ptr[int32](3),
// "{subscription-id2}": to.Ptr[int32](2),
// },
// },
// Statuses: []*armcompute.InstanceViewStatus{
// {
// Code: to.Ptr("ProvisioningState/succeeded"),
// Level: to.Ptr(armcompute.StatusLevelTypesInfo),
// DisplayStatus: to.Ptr("Provisioning succeeded"),
// },
// },
// },
// TimeCreated: to.Ptr(time.Date(2021, time.June, 27, 1, 2, 38, 313846900, time.UTC)),
// },
// Location: to.Ptr("westus"),
// Tags: map[string]*string{
// "{tagName}": to.Ptr("{tagValue}"),
// },
// SKU: &armcompute.SKU{
// Name: to.Ptr("Standard_DS1_v2"),
// Capacity: to.Ptr[int64](10),
// },
// Zones: []*string{
// to.Ptr("1"),
// },
// Name: to.Ptr("openCapacityReservation"),
// },
// }
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
const { ComputeManagementClient } = require("@azure/arm-compute");
const { DefaultAzureCredential } = require("@azure/identity");
/**
* This sample demonstrates how to the operation that retrieves information about the capacity reservation.
*
* @summary the operation that retrieves information about the capacity reservation.
* x-ms-original-file: 2026-04-01/capacityReservationExamples/OpenCapacityReservation_Get.json
*/
async function getAnOpenCapacityReservationWithInstanceView() {
const credential = new DefaultAzureCredential();
const subscriptionId = "{subscriptionId}";
const client = new ComputeManagementClient(credential, subscriptionId);
const result = await client.capacityReservations.get(
"myResourceGroup",
"openCapacityReservationGroup",
"openCapacityReservation",
{ expand: "instanceView" },
);
console.log(result);
}
To use the Azure SDK library in your project, see this documentation. To provide feedback on this code sample, open a GitHub issue
Voorbeeldrespons
{
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Compute/capacityReservationGroups/openCapacityReservationGroup/capacityReservations/openCapacityReservation",
"properties": {
"platformFaultDomainCount": 3,
"reservationId": "{GUID}",
"provisioningTime": "2021-06-27T01:02:38.3138469+00:00",
"provisioningState": "Succeeded",
"instanceView": {
"utilizationInfo": {
"currentCapacity": 10,
"usedReservedCountBySubscription": {
"{subscription-id1}": 3,
"{subscription-id2}": 2
}
},
"statuses": [
{
"code": "ProvisioningState/succeeded",
"level": "Info",
"displayStatus": "Provisioning succeeded"
}
]
},
"timeCreated": "2021-06-27T01:02:38.3138469+00:00"
},
"location": "westus",
"tags": {
"{tagName}": "{tagValue}"
},
"sku": {
"name": "Standard_DS1_v2",
"capacity": 10
},
"zones": [
"1"
],
"name": "openCapacityReservation"
}
Definities
| Name |
Description |
|
ApiError
|
Api-fout.
|
|
ApiErrorBase
|
Api-foutbasis.
|
|
CapacityReservation
|
Hiermee geeft u informatie over de capaciteitsreservering.
|
|
CapacityReservationInstanceView
|
De instantieweergave van een capaciteitsreservering die een momentopname biedt van de runtime-eigenschappen van de capaciteitsreservering die wordt beheerd door het platform en die buiten bewerkingen van het besturingsvlak kan worden gewijzigd.
|
|
CapacityReservationInstanceViewTypes
|
|
|
CapacityReservationStateInfo
|
Details met betrekking tot de huidige staat voor een toekomstige capaciteitsreservering.
|
|
CapacityReservationUtilization
|
Vertegenwoordigt het capaciteitsreserveringsgebruik in termen van toegewezen resources.
|
|
CloudError
|
Een foutreactie van de Compute-service.
|
|
createdByType
|
Het identiteitstype dat de resource heeft gemaakt.
|
|
InnerError
|
Interne foutdetails.
|
|
InstanceViewStatus
|
Status van exemplaarweergave.
|
|
ReservationState
|
De huidige stand van zaken van een Future capaciteitsreservering.
|
|
ScheduleProfile
|
Definieert het schema voor blok- en toekomstige capaciteitsreserveringen. Hiermee geeft u het schema op waarin capaciteitsreservering actief is en VM of VMSS-resource kan worden toegewezen met behulp van reservering. Voor reserveringen van Block-capaciteit zijn de velden scheduleProfile, start en end onveranderlijk na aanmaak. Raadpleeg https://aka.ms/blockcapacityreservation voor meer informatie. Minimale API-versie voor reserveringen van blokcapaciteit: 2025-04-01. Toekomstige capaciteitsreserveringen moeten deze eigenschap gebruiken met slechts een starttijd, die kan worden gewijzigd tot de 'modifiableUntil'-tijd. Raadpleeg https://aka.ms/futurecapacityreservation voor meer informatie. Minimale API-versie voor toekomstige capaciteitsreserveringen: 2026-04-01.
|
|
Sku
|
Beschrijft een SKU van een virtuele-machineschaalset. OPMERKING: Als de nieuwe VM-SKU niet wordt ondersteund op de hardware waarop de schaalset zich momenteel bevindt, moet u de toewijzing van de VM's in de schaalset ongedaan maken voordat u de SKU-naam wijzigt.
|
|
StatusLevelTypes
|
De niveaucode.
|
|
SubResourceReadOnly
|
|
|
systemData
|
Metagegevens met betrekking tot het maken en de laatste wijziging van de resource.
|
ApiError
Object
Api-fout.
| Name |
Type |
Description |
|
code
|
string
|
De foutcode.
|
|
details
|
ApiErrorBase[]
|
Details van de API-fout
|
|
innererror
|
InnerError
|
De interne API-fout
|
|
message
|
string
|
Het foutbericht.
|
|
target
|
string
|
Het doel van de specifieke fout.
|
ApiErrorBase
Object
Api-foutbasis.
| Name |
Type |
Description |
|
code
|
string
|
De foutcode.
|
|
message
|
string
|
Het foutbericht.
|
|
target
|
string
|
Het doel van de specifieke fout.
|
CapacityReservation
Object
Hiermee geeft u informatie over de capaciteitsreservering.
| Name |
Type |
Description |
|
id
|
string
|
Volledig gekwalificeerde resource-id voor de resource. Bijv. - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
|
|
location
|
string
|
De geografische locatie waar de resource zich bevindt
|
|
name
|
string
|
De naam van de resource
|
|
properties.instanceView
|
CapacityReservationInstanceView
|
De weergave capaciteitsreserveringsexemplaren.
|
|
properties.platformFaultDomainCount
|
integer
(int32)
|
Hiermee geeft u de waarde op van het aantal foutdomeinen dat capaciteitsreservering ondersteunt voor de aangevraagde VM-grootte.
Opmerking: Het aantal foutdomeinen dat is opgegeven voor een resource (zoals virtuele-machinesschaalset) moet kleiner zijn dan of gelijk zijn aan deze waarde als deze wordt geïmplementeerd met behulp van capaciteitsreservering. Minimale API-versie: 2022-08-01.
|
|
properties.provisioningState
|
string
|
De inrichtingsstatus, die alleen in het antwoord wordt weergegeven.
|
|
properties.provisioningTime
|
string
(date-time)
|
De datum waarop de capaciteitsreservering voor het laatst is bijgewerkt.
|
|
properties.reservationId
|
string
|
Een unieke id die door het platform wordt gegenereerd en toegewezen aan de capaciteitsreservering, die gedurende de levensduur van de resource niet verandert.
|
|
properties.scheduleProfile
|
ScheduleProfile
|
Definieert het schema voor blok- en toekomstige capaciteitsreserveringen. Hiermee geeft u het schema op waarin capaciteitsreservering actief is en VM of VMSS-resource kan worden toegewezen met behulp van reservering. Voor reserveringen van Block-capaciteit zijn de velden scheduleProfile, start en end onveranderlijk na aanmaak. Raadpleeg https://aka.ms/blockcapacityreservation voor meer informatie. Minimale API-versie voor reserveringen van blokcapaciteit: 2025-04-01. Toekomstige capaciteitsreserveringen moeten deze eigenschap gebruiken met slechts een starttijd, die kan worden gewijzigd tot de 'modifiableUntil'-tijd. Raadpleeg https://aka.ms/futurecapacityreservation voor meer informatie. Minimale API-versie voor toekomstige capaciteitsreserveringen: 2026-04-01.
|
|
properties.timeCreated
|
string
(date-time)
|
Hiermee geeft u het tijdstip op waarop de capaciteitsreserveringsresource is gemaakt. Minimale API-versie: 2021-11-01.
|
|
properties.virtualMachinesAssociated
|
SubResourceReadOnly[]
|
Een lijst met alle resource-id's van virtuele machines die zijn gekoppeld aan de capaciteitsreservering.
|
|
sku
|
Sku
|
SKU van de resource waarvoor capaciteit moet worden gereserveerd. De naam en capaciteit van de SKU moeten worden ingesteld. Voor reserveringen voor blokcapaciteit kan sku.capacity alleen de waarden 1, 2, 4, 8, 16, 32, 64 accepteren. Momenteel worden VM-SKU's met de mogelijkheid 'CapacityReservationSupported' ingesteld op true ondersteund. Wanneer 'CapacityReservationSupported' true is, geeft de SKU-mogelijkheid ook de 'SupportedCapacityReservationTypes' op, waarin de typen capaciteitsreserveringen (zoals Targeted of Block) worden vermeld die door de SKU worden ondersteund. Raadpleeg Lijst met Microsoft.Compute-SKU's in een regio (https://docs.microsoft.com/rest/api/compute/resourceskus/list) voor ondersteunde waarden.
|
|
systemData
|
systemData
|
Azure Resource Manager-metagegevens met createdBy- en modifiedBy-gegevens.
|
|
tags
|
object
|
Resourcetags.
|
|
type
|
string
|
Het type bron. Bijvoorbeeld 'Microsoft.Compute/virtualMachines' of 'Microsoft.Storage/storageAccounts'
|
|
zones
|
string[]
|
De beschikbaarheidszones.
|
CapacityReservationInstanceView
Object
De instantieweergave van een capaciteitsreservering die een momentopname biedt van de runtime-eigenschappen van de capaciteitsreservering die wordt beheerd door het platform en die buiten bewerkingen van het besturingsvlak kan worden gewijzigd.
| Name |
Type |
Description |
|
reservationStateInfo
|
CapacityReservationStateInfo
|
De informatie over reserveringsstatus voor een capaciteitsreservering, deze details worden voornamelijk verstrekt voor reserveringen voor toekomstige capaciteit. Minimale API-versie: 2026-04-01.
|
|
statuses
|
InstanceViewStatus[]
|
De informatie over de resourcestatus.
|
|
utilizationInfo
|
CapacityReservationUtilization
|
Niet-gebruikte capaciteit van de capaciteitsreservering.
|
CapacityReservationInstanceViewTypes
Opsomming
| Waarde |
Description |
|
instanceView
|
|
CapacityReservationStateInfo
Object
Details met betrekking tot de huidige staat voor een toekomstige capaciteitsreservering.
| Name |
Type |
Description |
|
reservationState
|
ReservationState
|
De huidige staat van de capaciteitsreservering.
|
CapacityReservationUtilization
Object
Vertegenwoordigt het capaciteitsreserveringsgebruik in termen van toegewezen resources.
| Name |
Type |
Description |
|
currentCapacity
|
integer
(int32)
|
De waarde biedt de huidige capaciteit van de VM-grootte die is gereserveerd en waarvoor de klant wordt gefactureerd. Minimale API-versie: 2022-08-01.
|
|
usedReservedCountBySubscription
|
object
|
Voor reserveringen met open capaciteit levert dit een kaart op van het aantal gebruikte gereserveerde capaciteiten, gesleuteld door de abonnements-ID (een GUID) die de capaciteit verbruikt, d.w.z. elke invoer koppelt een verbruikend abonnements-ID aan de telling van de gereserveerde capaciteit die het momenteel gebruikt. Dit wordt alleen ingevuld voor reserveringen met open capaciteit en wordt niet gerapporteerd voor gerichte en blokcapaciteitsreserveringen, die in plaats daarvan de toewijzing rapporteren via virtualMachinesAllocated. Minimale api-versie: 2026-04-01.
|
|
virtualMachinesAllocated
|
SubResourceReadOnly[]
|
Een lijst met alle resource-id's van virtuele machines die zijn toegewezen aan de capaciteitsreservering.
|
CloudError
Object
Een foutreactie van de Compute-service.
| Name |
Type |
Description |
|
error
|
ApiError
|
Api-fout.
|
createdByType
Opsomming
Het identiteitstype dat de resource heeft gemaakt.
| Waarde |
Description |
|
User
|
|
|
Application
|
|
|
ManagedIdentity
|
|
|
Key
|
|
InnerError
Object
Interne foutdetails.
| Name |
Type |
Description |
|
errordetail
|
string
|
Het interne foutbericht of de uitzonderingsdump.
|
|
exceptiontype
|
string
|
Het uitzonderingstype.
|
InstanceViewStatus
Object
Status van exemplaarweergave.
| Name |
Type |
Description |
|
code
|
string
|
De statuscode.
|
|
displayStatus
|
string
|
Het korte lokaliseerbare label voor de status.
|
|
level
|
StatusLevelTypes
|
De niveaucode.
|
|
message
|
string
|
Het gedetailleerde statusbericht, inclusief voor waarschuwingen en foutberichten.
|
|
time
|
string
(date-time)
|
Het tijdstip van de status.
|
ReservationState
Opsomming
De huidige stand van zaken van een Future capaciteitsreservering.
| Waarde |
Description |
|
Pending
|
Het verzoek om capaciteitsreservering is ingediend en wacht op evaluatie.
|
|
Declined
|
Het verzoek om capaciteitsreservering is afgewezen en zal niet opnieuw veranderen zonder actie van de gebruiker.
|
|
Approved
|
Het verzoek om capaciteitsreservering is goedgekeurd door Azure en wacht op vervulling.
|
|
FulfillmentFailed
|
Er deed zich een storing op tijdens het proberen te vervullen van het verzoek om capaciteitsreservering.
|
|
Committed
|
De capaciteitsreservering is vergrendeld en kan niet worden bijgewerkt of verwijderd voordat deze live gaat.
|
|
Live
|
De capaciteitsreservering is actief en beschikbaar voor gebruik, en kan niet worden gewijzigd of verwijderd totdat de minimale verplichtingsperiode is verstreken.
|
|
PartiallyFulfilled
|
Azure kon slechts een deel van de gevraagde capaciteit leveren. De capaciteitsreservering kan niet worden gewijzigd of verwijderd totdat de minimale verplichtingsperiode is verstreken. Het deel van de voltooide capaciteit kan worden bekeken door de instanceweergave van de capaciteitreservering te bekijken, weergegeven als currentCapacity binnen de utilizationInfo.
|
ScheduleProfile
Object
Definieert het schema voor blok- en toekomstige capaciteitsreserveringen. Hiermee geeft u het schema op waarin capaciteitsreservering actief is en VM of VMSS-resource kan worden toegewezen met behulp van reservering. Voor reserveringen van Block-capaciteit zijn de velden scheduleProfile, start en end onveranderlijk na aanmaak. Raadpleeg https://aka.ms/blockcapacityreservation voor meer informatie. Minimale API-versie voor reserveringen van blokcapaciteit: 2025-04-01. Toekomstige capaciteitsreserveringen moeten deze eigenschap gebruiken met slechts een starttijd, die kan worden gewijzigd tot de 'modifiableUntil'-tijd. Raadpleeg https://aka.ms/futurecapacityreservation voor meer informatie. Minimale API-versie voor toekomstige capaciteitsreserveringen: 2026-04-01.
| Name |
Type |
Description |
|
end
|
string
|
De vereiste einddatum voor reserveringen van blokcapaciteit. Moet na de startdatum zijn, met een duur van 1-14 hele dagen of 3-26 hele weken. Voorbeeld: 2025-06-28.
|
|
minimumCommitmentDays
|
integer
(int32)
|
Het minimale aantal dagen dat na de startdatum moet verstrijken voordat een reservering voor toekomstige capaciteit kan worden bijgewerkt of verwijderd zodra deze is vastgelegd. Wordt ingevuld met een standaardwaarde als het niet wordt opgegeven.
|
|
modifiableUntil
|
string
(date-time)
|
De datum/tijd waarop een reservering voor toekomstige capaciteit kan worden bijgewerkt of verwijderd. Alleen lezen.
|
|
start
|
string
|
De vereiste startdatum voor reserveringen voor Block of Future capaciteit. Reserveringen voor de capaciteit blokkeren: Moet vandaag of binnen 56 dagen in de toekomst zijn. Voor planning op dezelfde dag moeten verzoeken vóór 11:30 uur UTC worden ingediend. Toekomstige capaciteitsreserveringen: Moeten minstens 7 dagen in de toekomst zijn, en maximaal 6 maanden in de toekomst. Minimale API-versie voor toekomstige capaciteitsreserveringen: 2026-04-01. Voorbeeld: 2025-06-27, van toepassing op zowel Block- als Future-capaciteitreserveringen.
|
Sku
Object
Beschrijft een SKU van een virtuele-machineschaalset. OPMERKING: Als de nieuwe VM-SKU niet wordt ondersteund op de hardware waarop de schaalset zich momenteel bevindt, moet u de toewijzing van de VM's in de schaalset ongedaan maken voordat u de SKU-naam wijzigt.
| Name |
Type |
Description |
|
capacity
|
integer
(int64)
|
Hiermee geeft u het aantal virtuele machines in de schaalset op.
|
|
name
|
string
|
De SKU-naam.
|
|
tier
|
string
|
Hiermee geeft u de laag van virtuele machines in een schaalset.
Mogelijke waarden:
Standard
Basic
|
StatusLevelTypes
Opsomming
De niveaucode.
| Waarde |
Description |
|
Info
|
|
|
Warning
|
|
|
Error
|
|
SubResourceReadOnly
Object
| Name |
Type |
Description |
|
id
|
string
|
Resource-id
|
systemData
Object
Metagegevens met betrekking tot het maken en de laatste wijziging van de resource.
| Name |
Type |
Description |
|
createdAt
|
string
(date-time)
|
De tijdstempel van het aanmaken van resources (UTC).
|
|
createdBy
|
string
|
De identiteit die de resource heeft gemaakt.
|
|
createdByType
|
createdByType
|
Het identiteitstype dat de resource heeft gemaakt.
|
|
lastModifiedAt
|
string
(date-time)
|
De tijdstempel van de laatste wijziging van de resource (UTC)
|
|
lastModifiedBy
|
string
|
De identiteit die de resource voor het laatst heeft gewijzigd.
|
|
lastModifiedByType
|
createdByType
|
Het type identiteit dat de resource voor het laatst heeft gewijzigd.
|