Share via


Reservations Summaries - List

Lists the reservations summaries for the defined scope daily or monthly grain. Note: ARM has a payload size limit of 12MB, so currently callers get 400 when the response size exceeds the ARM limit. In such cases, API call should be made with smaller date ranges.

GET https://management.azure.com/{resourceScope}/providers/Microsoft.Consumption/reservationSummaries?api-version=2024-08-01&grain={grain}
GET https://management.azure.com/{resourceScope}/providers/Microsoft.Consumption/reservationSummaries?api-version=2024-08-01&grain={grain}&startDate={startDate}&endDate={endDate}&$filter={$filter}&reservationId={reservationId}&reservationOrderId={reservationOrderId}

URI Parameters

Name In Required Type Description
resourceScope
path True

string

The fully qualified Azure Resource manager identifier of the resource.

api-version
query True

string

minLength: 1

The API version to use for this operation.

grain
query True

Datagrain

Can be daily or monthly

$filter
query

string

Required only for daily grain. The properties/UsageDate for start date and end date. The filter supports 'le' and 'ge'. Not applicable when querying with billing profile

endDate
query

string

End date. Only applicable when querying with billing profile

reservationId
query

string

Reservation Id GUID. Only valid if reservationOrderId is also provided. Filter to a specific reservation

reservationOrderId
query

string

Reservation Order Id GUID. Required if reservationId is provided. Filter to a specific reservation order

startDate
query

string

Start date. Only applicable when querying with billing profile

Responses

Name Type Description
200 OK

ReservationSummariesListResult

The request has succeeded.

Other Status Codes

ErrorResponse

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

ReservationSummariesDailyWithBillingAccountId
ReservationSummariesDailyWithBillingProfileId
ReservationSummariesMonthlyWithBillingAccountId
ReservationSummariesMonthlyWithBillingProfileId
ReservationSummariesMonthlyWithBillingProfileIdReservationId

ReservationSummariesDailyWithBillingAccountId

Sample request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345/providers/Microsoft.Consumption/reservationSummaries?api-version=2024-08-01&grain=daily&$filter=properties/usageDate ge 2017-10-01 AND properties/usageDate le 2017-11-20

Sample response

{
  "value": [
    {
      "name": "reservationSummaries_Id1",
      "type": "Microsoft.Consumption/reservationSummaries",
      "id": "/providers/Microsoft.Billing/billingAccounts/12345/providers/Microsoft.Consumption/reservationSummaries/reservationSummaries_Id1",
      "properties": {
        "avgUtilizationPercentage": 0,
        "maxUtilizationPercentage": 0,
        "minUtilizationPercentage": 0,
        "reservationId": "00000000-0000-0000-0000-000000000000",
        "reservationOrderId": "00000000-0000-0000-0000-000000000000",
        "reservedHours": 720,
        "skuName": "Standard_B1s",
        "usageDate": "2018-09-01T00:00:00-07:00",
        "usedHours": 0
      },
      "tags": null
    }
  ]
}

ReservationSummariesDailyWithBillingProfileId

Sample request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:2468/billingProfiles/13579/providers/Microsoft.Consumption/reservationSummaries?api-version=2024-08-01&grain=daily&startDate=2017-10-01&endDate=2017-11-20

Sample response

{
  "value": [
    {
      "name": "reservationSummaries_Id1",
      "type": "Microsoft.Consumption/reservationSummaries",
      "id": "/providers/Microsoft.Billing/billingAccounts/12345:2468/billingProfiles/13579/providers/Microsoft.Consumption/reservationSummaries/reservationSummaries_Id1",
      "properties": {
        "avgUtilizationPercentage": 0,
        "maxUtilizationPercentage": 0,
        "minUtilizationPercentage": 0,
        "reservationId": "00000000-0000-0000-0000-000000000000",
        "reservationOrderId": "00000000-0000-0000-0000-000000000000",
        "reservedHours": 720,
        "skuName": "Standard_B1s",
        "usageDate": "2018-09-01T00:00:00-07:00",
        "usedHours": 0
      },
      "tags": null
    }
  ]
}

ReservationSummariesMonthlyWithBillingAccountId

Sample request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345/providers/Microsoft.Consumption/reservationSummaries?api-version=2024-08-01&grain=monthly

Sample response

{
  "value": [
    {
      "name": "reservationSummaries_Id1",
      "type": "Microsoft.Consumption/reservationSummaries",
      "id": "/providers/Microsoft.Billing/billingAccounts/12345/providers/Microsoft.Consumption/reservationSummaries/reservationSummaries_Id1",
      "properties": {
        "avgUtilizationPercentage": 0,
        "maxUtilizationPercentage": 0,
        "minUtilizationPercentage": 0,
        "reservationId": "00000000-0000-0000-0000-000000000000",
        "reservationOrderId": "00000000-0000-0000-0000-000000000000",
        "reservedHours": 720,
        "skuName": "Standard_B1s",
        "usageDate": "2018-09-01T00:00:00-07:00",
        "usedHours": 0
      },
      "tags": null
    }
  ]
}

ReservationSummariesMonthlyWithBillingProfileId

Sample request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:2468/billingProfiles/13579/providers/Microsoft.Consumption/reservationSummaries?api-version=2024-08-01&grain=monthly

Sample response

{
  "value": [
    {
      "name": "reservationSummaries_Id1",
      "type": "Microsoft.Consumption/reservationSummaries",
      "id": "/providers/Microsoft.Billing/billingAccounts/12345:2468/billingProfiles/13579/providers/Microsoft.Consumption/reservationSummaries/reservationSummaries_Id1",
      "properties": {
        "avgUtilizationPercentage": 0,
        "maxUtilizationPercentage": 0,
        "minUtilizationPercentage": 0,
        "reservationId": "00000000-0000-0000-0000-000000000000",
        "reservationOrderId": "00000000-0000-0000-0000-000000000000",
        "reservedHours": 720,
        "skuName": "Standard_B1s",
        "usageDate": "2018-09-01T00:00:00-07:00",
        "usedHours": 0
      },
      "tags": null
    }
  ]
}

ReservationSummariesMonthlyWithBillingProfileIdReservationId

Sample request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:2468/billingProfiles/13579/providers/Microsoft.Consumption/reservationSummaries?api-version=2024-08-01&grain=monthly&reservationId=1c6b6358-709f-484c-85f1-72e862a0cf3b&reservationOrderId=9f39ba10-794f-4dcb-8f4b-8d0cb47c27dc

Sample response

{
  "value": [
    {
      "name": "reservationSummaries_Id1",
      "type": "Microsoft.Consumption/reservationSummaries",
      "id": "/providers/Microsoft.Billing/billingAccounts/12345:2468/billingProfiles/13579/providers/Microsoft.Consumption/reservationSummaries/reservationSummaries_Id1",
      "properties": {
        "avgUtilizationPercentage": 0,
        "maxUtilizationPercentage": 0,
        "minUtilizationPercentage": 0,
        "reservationId": "1c6b6358-709f-484c-85f1-72e862a0cf3b",
        "reservationOrderId": "9f39ba10-794f-4dcb-8f4b-8d0cb47c27dc",
        "reservedHours": 720,
        "skuName": "Standard_B1s",
        "usageDate": "2018-09-01T00:00:00-07:00",
        "usedHours": 0
      },
      "tags": null
    }
  ]
}

Definitions

Name Description
createdByType

The type of identity that created the resource.

Datagrain
ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

ReservationSummariesListResult

Result of listing reservation summaries.

ReservationSummary

reservation summary resource.

systemData

Metadata pertaining to creation and last modification of the resource.

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

Datagrain

Value Description
daily

Daily grain of data

monthly

Monthly grain of data

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

ReservationSummariesListResult

Result of listing reservation summaries.

Name Type Description
nextLink

string

The link (url) to the next page of results.

value

ReservationSummary[]

The list of reservation summaries.

ReservationSummary

reservation summary resource.

Name Type Description
etag

string

The etag for the resource.

id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

The name of the resource

properties.avgUtilizationPercentage

number (decimal)

This is average utilization for the entire time range. (day or month depending on the grain)

properties.kind

string

The reservation kind.

properties.maxUtilizationPercentage

number (decimal)

This is the maximum hourly utilization in the usage time (day or month). E.g. if usage record corresponds to 12/10/2017 and on that for hour 4 and 5, utilization was 100%, this field will return 100% for that day.

properties.minUtilizationPercentage

number (decimal)

This is the minimum hourly utilization in the usage time (day or month). E.g. if usage record corresponds to 12/10/2017 and on that for hour 4 and 5, utilization was 10%, this field will return 10% for that day

properties.purchasedQuantity

number (decimal)

This is the purchased quantity for the reservationId.

properties.remainingQuantity

number (decimal)

This is the remaining quantity for the reservationId.

properties.reservationId

string

The reservation ID is the identifier of a reservation within a reservation order. Each reservation is the grouping for applying the benefit scope and also specifies the number of instances to which the reservation benefit can be applied to.

properties.reservationOrderId

string

The reservation order ID is the identifier for a reservation purchase. Each reservation order ID represents a single purchase transaction. A reservation order contains reservations. The reservation order specifies the VM size and region for the reservations.

properties.reservedHours

number (decimal)

This is the total hours reserved. E.g. if reservation for 1 instance was made on 1 PM, this will be 11 hours for that day and 24 hours from subsequent days

properties.skuName

string

This is the ARM Sku name. It can be used to join with the serviceType field in additional info in usage records.

properties.totalReservedQuantity

number (decimal)

This is the total count of instances that are reserved for the reservationId.

properties.usageDate

string (date-time)

Data corresponding to the utilization record. If the grain of data is monthly, it will be first day of month.

properties.usedHours

number (decimal)

Total used hours by the reservation

properties.usedQuantity

number (decimal)

This is the used quantity for the reservationId.

properties.utilizedPercentage

number (decimal)

This is the utilized percentage for the reservation Id.

systemData

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"

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

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

createdByType

The type of identity that last modified the resource.