summary import { ComputeManagementClient } from "@msinternal/compute-resource-manager" ; import { DefaultAzureCredential } from "@azure/identity" ; async function getACapacityReservation ( ) { const subscriptionId = "{subscriptionId}" ; const resourceGroupName = "myResourceGroup" ; const capacityReservationGroupName = "myCapacityReservationGroup" ; const capacityReservationName = "myCapacityReservation" ; const credential = new DefaultAzureCredential ( ) ; const client = new ComputeManagementClient ( credential , subscriptionId ) ; const result = await client . capacityReservations . get ( resourceGroupName , capacityReservationGroupName , capacityReservationName ) ; console . log ( result ) ; } getACapacityReservation ( ) . catch ( console . error ) ;