Generate Reservation Details Report - By Billing Profile Id
Generates the reservations details report for provided date range asynchronously by billing profile. The Reservation usage details can be viewed by only certain enterprise roles by default. For more details on the roles see, https://docs.microsoft.com/en-us/azure/cost-management-billing/reservations/reservation-utilization#view-utilization-in-the-azure-portal-with-azure-rbac-access
POST https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/providers/Microsoft.CostManagement/generateReservationDetailsReport?startDate={startDate}&endDate={endDate}&api-version=2023-11-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
billing
|
path | True |
string |
Billing account ID |
billing
|
path | True |
string |
Billing profile ID. |
api-version
|
query | True |
string |
The API version to use for this operation. |
end
|
query | True |
string |
End Date |
start
|
query | True |
string |
Start Date |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Request processing completed. |
|
202 Accepted |
Accepted. Request will be processed. Use the Location header to check the status. Headers
|
|
Other Status Codes |
Error response describing why the operation failed. |
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
ReservationDetails
Sample request
POST https://management.azure.com/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000/billingProfiles/CZSFR-SDFXC-DSDF/providers/Microsoft.CostManagement/generateReservationDetailsReport?startDate=2020-01-01&endDate=2020-01-30&api-version=2023-11-01
Sample response
Location: https://management.azure.com/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000/billingProfiles/CZSFR-SDFXC-DSDF/providers/Microsoft.CostManagement/reservationDetailsOperationResults/cf9f95c9-af6b-41dd-a622-e6f4fc60c3ee?api-version=2019-11-01
Retry-After: 60
{
"status": "Completed",
"properties": {
"reportUrl": "https://storage.blob.core.windows.net/details/20200911/00000000-0000-0000-0000-000000000000?sv=2016-05-31&sr=b&sig=jep8HT2aphfUkyERRZa5LRfd9RPzjXbzB%2F9TNiQ",
"validUntil": "2020-09-12T02:56:55.5021869Z"
}
}
Definitions
Name | Description |
---|---|
Error |
The details of the error. |
Error |
Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. Some Error responses:
|
Operation |
The status of the long running operation. |
Operation |
The status of the long running operation. |
Reservation |
The CSV file from the reportUrl blob link consists of reservation usage data with the following schema at daily granularity |
ErrorDetails
The details of the error.
Name | Type | Description |
---|---|---|
code |
string |
Error code. |
message |
string |
Error message indicating why the operation failed. |
ErrorResponse
Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.
Some Error responses:
429 TooManyRequests - Request is throttled. Retry after waiting for the time specified in the "x-ms-ratelimit-microsoft.consumption-retry-after" header.
503 ServiceUnavailable - Service is temporarily unavailable. Retry after waiting for the time specified in the "Retry-After" header.
Name | Type | Description |
---|---|---|
error |
The details of the error. |
OperationStatus
The status of the long running operation.
Name | Type | Description |
---|---|---|
properties.reportUrl |
The CSV file from the reportUrl blob link consists of reservation usage data with the following schema at daily granularity |
|
properties.validUntil |
string |
The time at which report URL becomes invalid. |
status |
The status of the long running operation. |
OperationStatusType
The status of the long running operation.
Name | Type | Description |
---|---|---|
Completed |
string |
|
Failed |
string |
|
Running |
string |
ReservationReportSchema
The CSV file from the reportUrl blob link consists of reservation usage data with the following schema at daily granularity
Name | Type | Description |
---|---|---|
InstanceFlexibilityGroup |
string |
|
InstanceFlexibilityRatio |
string |
|
InstanceId |
string |
|
Kind |
string |
|
ReservationId |
string |
|
ReservationOrderId |
string |
|
ReservedHours |
string |
|
SkuName |
string |
|
TotalReservedQuantity |
string |
|
UsageDate |
string |
|
UsedHours |
string |