Get-AzureRmConsumptionReservationDetail
Get reservations details for provided date range.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
Get-AzureRmConsumptionReservationDetail
-StartDate <DateTime>
-EndDate <DateTime>
-ReservationOrderId <String>
[-ReservationId <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzureRmConsumptionReservationDetail cmdlet gets reservations details for provided date range.
Examples
Example 1: Get reservation details with reservation order Id for provided date range
PS C:\> Get-AzureRmConsumptionReservationDetail -ReservationOrderId ca69259e-bd4f-45c3-bf28-3f353f9cce9b -StartDate 2017-10-01 -EndDate 2017-12-07
Id: providers/Microsoft.Capacity/reservationOrders/ca69259e-bd4f-45c3-bf28-3f353f9cce9b/reservations/f37f4b70-52ba-4344-a8bd-28abfd21d640providers/Microsoft.Consumption/reservationDetails/20171007
InstanceId: subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/testrg/providers/microsoft.compute/virtualmachines/std2swindows
Name: ca69259e-bd4f-45c3-bf28-3f353f9cce9b_f37f4b70-52ba-4344-a8bd-28abfd21d640_20171007
ReservationId: f37f4b70-52ba-4344-a8bd-28abfd21d640
ReservationOrderId: ca69259e-bd4f-45c3-bf28-3f353f9cce9b
ReservedHour: 24
SkuName: Standard_DS2_v2
TotalReservedQuantity: 1
Type: Microsoft.Consumption/reservationDetails
UsageDate: 10/7/2017 12:00:00 AM
UsedHour: 24
Example 2: Get reservation details with reservation order Id and reservation Id for provided date range
PS C:\> Get-AzureRmConsumptionReservationDetail -ReservationOrderId ca69259e-bd4f-45c3-bf28-3f353f9cce9b -ReservationId f37f4b70-52ba-4344-a8bd-28abfd21d640 -StartDate 2017-10-01 -EndDate 2017-12-07
Id: providers/Microsoft.Capacity/reservationOrders/ca69259e-bd4f-45c3-bf28-3f353f9cce9b/reservations/f37f4b70-52ba-4344-a8bd-28abfd21d640providers/Microsoft.Consumption/reservationDetails/20171007
InstanceId: subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/testrg/providers/microsoft.compute/virtualmachines/std2swindows
Name: ca69259e-bd4f-45c3-bf28-3f353f9cce9b_f37f4b70-52ba-4344-a8bd-28abfd21d640_20171007
ReservationId: f37f4b70-52ba-4344-a8bd-28abfd21d640
ReservationOrderId: ca69259e-bd4f-45c3-bf28-3f353f9cce9b
ReservedHour: 24
SkuName: Standard_DS2_v2
TotalReservedQuantity: 1
Type: Microsoft.Consumption/reservationDetails
UsageDate: 10/7/2017 12:00:00 AM
UsedHour: 24
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EndDate
The end data (YYYY-MM-DD in UTC) of the reservation detail.
Type: | DateTime |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ReservationId
The identifier of a reservation within a reservation order.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ReservationOrderId
The identifier of a reservation purchase.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StartDate
The start data (YYYY-MM-DD in UTC) of the reservation detail.
Type: | DateTime |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None