你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Reservations Summaries - List By Reservation Order And Reservation

Lists the reservations summaries for 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/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.Consumption/reservationSummaries?grain={grain}&api-version=2024-08-01
GET https://management.azure.com/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.Consumption/reservationSummaries?grain={grain}&$filter={$filter}&api-version=2024-08-01

URI Parameters

Name In Required Type Description
reservationId
path True

string

Id of the reservation

reservationOrderId
path True

string

Order Id of the reservation

api-version
query True

string

Version of the API to be used with the client request. The current version is 2023-03-01.

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'

Responses

Name Type Description
200 OK

ReservationSummariesListResult

OK. The request has succeeded.

Other Status Codes

ErrorResponse

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

ReservationSummariesDailyWithReservationId
ReservationSummariesMonthlyWithReservationId

ReservationSummariesDailyWithReservationId

Sample request

GET https://management.azure.com/providers/Microsoft.Capacity/reservationorders/00000000-0000-0000-0000-000000000000/reservations/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationSummaries?grain=daily&$filter=properties/usageDate ge 2017-10-01 AND properties/usageDate le 2017-11-20&api-version=2024-08-01

Sample response

{
  "value": [
    {
      "id": "providers/Microsoft.Capacity/reservationOrders/00000000-0000-0000-0000-000000000000/reservations/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationSummaries/20171001",
      "name": "00000000-0000-0000-0000-000000000000_00000000-0000-0000-0000-000000000000_20171001",
      "type": "Microsoft.Consumption/reservationSummaries",
      "tags": {
        "env": "newcrp",
        "dev": "tools"
      },
      "properties": {
        "reservationOrderId": "00000000-0000-0000-0000-000000000000",
        "reservationId": "00000000-0000-0000-0000-000000000000",
        "skuName": "Standard_D8s_v3",
        "kind": "Reservation",
        "reservedHours": 0,
        "usageDate": "2017-10-01T00:00:00Z",
        "usedHours": 0,
        "minUtilizationPercentage": 0,
        "avgUtilizationPercentage": 0,
        "maxUtilizationPercentage": 0,
        "purchasedQuantity": 0,
        "remainingQuantity": 0,
        "totalReservedQuantity": 155,
        "usedQuantity": 0,
        "utilizedPercentage": 0
      }
    }
  ]
}

ReservationSummariesMonthlyWithReservationId

Sample request

GET https://management.azure.com/providers/Microsoft.Capacity/reservationorders/00000000-0000-0000-0000-000000000000/reservations/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationSummaries?grain=monthly&api-version=2024-08-01

Sample response

{
  "value": [
    {
      "id": "providers/Microsoft.Capacity/reservationOrders/00000000-0000-0000-0000-000000000000/reservations/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationSummaries/20171001",
      "name": "00000000-0000-0000-0000-000000000000_00000000-0000-0000-0000-000000000000_20171001",
      "type": "Microsoft.Consumption/reservationSummaries",
      "tags": {
        "env": "newcrp",
        "dev": "tools"
      },
      "properties": {
        "reservationOrderId": "00000000-0000-0000-0000-000000000000",
        "reservationId": "00000000-0000-0000-0000-000000000000",
        "skuName": "Standard_D8s_v3",
        "kind": "Reservation",
        "reservedHours": 0,
        "usageDate": "2017-10-01T00:00:00Z",
        "usedHours": 0,
        "minUtilizationPercentage": 0,
        "avgUtilizationPercentage": 0,
        "maxUtilizationPercentage": 0,
        "purchasedQuantity": 0,
        "remainingQuantity": 0,
        "totalReservedQuantity": 155,
        "usedQuantity": 0,
        "utilizedPercentage": 0
      }
    }
  ]
}

Definitions

Name Description
datagrain

Can be daily or monthly

ErrorDetails

The details of the error.

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.

  • 504 Gateway Timeout - Service timed out while processing the request. Reduce the date range in the request, if possible.

ReservationSummariesListResult

Result of listing reservation summaries.

ReservationSummary

reservation summary resource.

datagrain

Can be daily or monthly

Name Type Description
daily

string

Daily grain of data

monthly

string

Monthly grain of data

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.

  • 504 Gateway Timeout - Service timed out while processing the request. Reduce the date range in the request, if possible.

Name Type Description
error

ErrorDetails

The details of the error.

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

The full qualified ARM ID of an event.

name

string

The ID that uniquely identifies an event.

properties.avgUtilizationPercentage

number

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

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

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

This is the purchased quantity for the reservationId.

properties.remainingQuantity

number

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

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

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

properties.usageDate

string

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

properties.usedHours

number

Total used hours by the reservation

properties.usedQuantity

number

This is the used quantity for the reservationId.

properties.utilizedPercentage

number

This is the utilized percentage for the reservation Id.

tags

object

Resource tags.

type

string

Resource type.