Share via


Reservations - List By Billing Account

Lists the reservations in the billing account and the roll up counts of reservations group by provisioning states.

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/reservations?api-version=2024-04-01
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/reservations?api-version=2024-04-01&filter={filter}&orderBy={orderBy}&skiptoken={skiptoken}&refreshSummary={refreshSummary}&selectedState={selectedState}&take={take}

URI Parameters

Name In Required Type Description
billingAccountName
path True

string

pattern: ^([0-9]+|([Pp][Cc][Nn]\.[A-Za-z0-9]+)|[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}(:[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}_[0-9]{4}(-[0-9]{2}){2})?)$

The ID that uniquely identifies a billing account.

api-version
query True

string

The version of the API to be used with the client request. The current version is 2024-04-01.

filter
query

string

The filter query option allows clients to filter a collection of resources that are addressed by a request URL.

orderBy
query

string

The orderby query option allows clients to request resources in a particular order.

refreshSummary
query

string

To indicate whether to refresh the roll up counts of the reservations group by provisioning states

selectedState
query

string

The selected provisioning state

skiptoken
query

number

The number of reservations to skip from the list before returning results

take
query

number

The number of reservations to return in API response.

Responses

Name Type Description
200 OK

ReservationsListResult

OK. The request has succeeded.

Other Status Codes

ErrorResponse

Error response describing why the operation failed.

Examples

reservationsListByBillingAccount

Sample request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/reservations?api-version=2024-04-01&selectedState=Succeeded

Sample response

{
  "value": [
    {
      "id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/reservationOrders/00000000-0000-0000-0000-000000000001/reservations/00000000-0000-0000-0000-000000000000",
      "name": "00000000-0000-0000-0000-000000000000",
      "type": "microsoft.billing/billingAccounts/reservationOrders/reservations",
      "location": "global",
      "sku": {
        "name": "mock_sku"
      },
      "tags": {
        "key1": "value1",
        "key2": "value2"
      },
      "properties": {
        "reservedResourceType": "VirtualMachineSoftware",
        "userFriendlyRenewState": "Off",
        "skuDescription": "Sku description",
        "renew": false,
        "archived": false,
        "quantity": 1,
        "appliedScopeType": "Shared",
        "displayName": "VirtualMachineSoftware_01-18-2022_13-51",
        "provisioningState": "Succeeded",
        "term": "P3Y",
        "displayProvisioningState": "Succeeded",
        "userFriendlyAppliedScopeType": "Shared",
        "expiryDateTime": "2025-01-18T21:54:31.0741034Z",
        "purchaseDateTime": "2022-01-18T21:51:29.9063671Z",
        "benefitStartTime": "2022-01-18T21:54:31.0741034Z",
        "lastUpdatedDateTime": "0001-01-01T00:00:00.0000000",
        "expiryDate": "2025-01-18",
        "purchaseDate": "2022-01-18",
        "effectiveDateTime": "0001-01-01T00:00:00Z",
        "instanceFlexibility": "On",
        "utilization": {
          "trend": "SAME",
          "aggregates": [
            {
              "grain": 1,
              "grainUnit": "days",
              "value": 0,
              "valueUnit": "percentage"
            },
            {
              "grain": 7,
              "grainUnit": "days",
              "value": 0,
              "valueUnit": "percentage"
            },
            {
              "grain": 30,
              "grainUnit": "days",
              "value": 0,
              "valueUnit": "percentage"
            }
          ]
        },
        "billingPlan": "Monthly",
        "billingScopeId": "/subscriptions/eef82110-c91b-4395-9420-fcfcbefc5a47",
        "productCode": "20000000-0000-0000-0000-000000000005"
      }
    }
  ],
  "summary": {
    "noBenefitCount": 0,
    "warningCount": 0,
    "succeededCount": 1,
    "failedCount": 0,
    "expiringCount": 0,
    "expiredCount": 0,
    "pendingCount": 0,
    "cancelledCount": 0,
    "processingCount": 0
  },
  "nextLink": null
}

Definitions

Name Description
AppliedScopeType

Type of the Applied Scope.

createdByType

The type of identity that created the resource.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

ExtendedStatusDefinitionProperties

Extended status definition properties

InstanceFlexibility

Turning this on will apply the reservation discount to other VMs in the same VM size group. Only specify for VirtualMachines reserved resource type.

Price

The price.

RenewPropertiesResponse

The renew properties for a reservation.

Reservation

The definition of the reservation.

ReservationAppliedScopeProperties

Properties specific to applied scope type. Not required if not applicable. Required and need to provide tenantId and managementGroupId if AppliedScopeType is ManagementGroup

ReservationBillingPlan

Represent the billing plans.

ReservationExtendedStatusInfo

Extended status information for the reservation.

ReservationMergeProperties

Properties of reservation merge

ReservationPurchaseRequest

The request for reservation purchase

ReservationSkuProperty

The property of reservation sku object.

ReservationsListResult

The list of reservations and summary of roll out count of reservations in each state.

ReservationSplitProperties

Properties of reservation split

ReservationStatusCode

The status of the reservation.

ReservationSummary

The roll up count summary of reservations in each state

ReservationSwapProperties

Properties of reservation swap

ReservationUtilizationAggregates

The aggregate values of reservation utilization

SkuName

The name of sku

systemData

Metadata pertaining to creation and last modification of the resource.

AppliedScopeType

Type of the Applied Scope.

Value Description
Single
Shared
ManagementGroup

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

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.

ExtendedStatusDefinitionProperties

Extended status definition properties

Name Type Description
subscriptionId

string

Subscription Id

InstanceFlexibility

Turning this on will apply the reservation discount to other VMs in the same VM size group. Only specify for VirtualMachines reserved resource type.

Value Description
On
Off

Price

The price.

Name Type Description
amount

number (double)

currencyCode

string

The ISO 4217 3-letter currency code for the currency used by this purchase record.

RenewPropertiesResponse

The renew properties for a reservation.

Name Type Description
billingCurrencyTotal

Price

Currency and amount that customer will be charged in customer's local currency for renewal purchase. Tax is not included.

pricingCurrencyTotal

Price

Amount that Microsoft uses for record. Used during refund for calculating refund limit. Tax is not included. This is locked price 30 days before expiry.

purchaseProperties

ReservationPurchaseRequest

The request for reservation purchase

Reservation

The definition of the reservation.

Name Type Description
etag

integer (int32)

id

string (arm-id)

Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

location

string

The location of the reservation.

name

string

The name of the resource

properties.appliedScopeProperties

ReservationAppliedScopeProperties

Properties specific to applied scope type. Not required if not applicable. Required and need to provide tenantId and managementGroupId if AppliedScopeType is ManagementGroup

properties.appliedScopeType

string

The applied scope type of the reservation.

properties.appliedScopes

string[]

The array of applied scopes of a reservation. Will be null if the reservation is in Shared scope

properties.archived

boolean

Indicates if the reservation is archived

properties.benefitStartTime

string (date-time)

This is the DateTime when the reservation benefit started.

properties.billingPlan

ReservationBillingPlan

The billing plan options available for this sku.

properties.billingScopeId

string

Subscription that will be charged for purchasing reservation or savings plan

properties.capabilities

string

Capabilities of the reservation

properties.displayName

string

The display name of the reservation

properties.displayProvisioningState

string

The provisioning state of the reservation for display, e.g. Succeeded

properties.effectiveDateTime

string (date-time)

The effective date time of the reservation

properties.expiryDate

string

The expiry date of the reservation

properties.expiryDateTime

string (date-time)

This is the date-time when the reservation will expire.

properties.extendedStatusInfo

ReservationExtendedStatusInfo

The message giving detailed information about the status code.

properties.instanceFlexibility

InstanceFlexibility

Allows reservation discount to be applied across skus within the same auto fit group. Not all skus support instance size flexibility.

properties.lastUpdatedDateTime

string (date-time)

DateTime of the last time the reservation was updated.

properties.mergeProperties

ReservationMergeProperties

Properties of reservation merge

properties.productCode

string

Represents UPN

properties.provisioningState

string

The provisioning state of the reservation, e.g. Succeeded

properties.provisioningSubState

string

The provisioning state of the reservation, e.g. Succeeded

properties.purchaseDate

string (date)

This is the date when the reservation was purchased.

properties.purchaseDateTime

string (date-time)

This is the date-time when the reservation was purchased.

properties.quantity

number

The number of the reservation.

properties.renew

boolean

The renew state of the reservation

properties.renewDestination

string

Reservation Id of the reservation which is purchased because of renew. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.

properties.renewProperties

RenewPropertiesResponse

The renew properties for a reservation.

properties.renewSource

string

The renew source of the reservation

properties.reservedResourceType

string

The reserved source type of the reservation, e.g. virtual machine.

properties.reviewDateTime

string (date-time)

This is the date-time when the Azure Hybrid Benefit needs to be reviewed.

properties.skuDescription

string

The sku description of the reservation

properties.splitProperties

ReservationSplitProperties

Properties of reservation split

properties.swapProperties

ReservationSwapProperties

Properties of reservation swap

properties.term

string

The term of the reservation, e.g. P1Y

properties.userFriendlyAppliedScopeType

string

The applied scope type of the reservation for display, e.g. Shared

properties.userFriendlyRenewState

string

The renew state of the reservation for display, e.g. On

properties.utilization.aggregates

ReservationUtilizationAggregates[]

The array of aggregates of a reservation's utilization

properties.utilization.trend

string

last 7 day utilization trend for a reservation

sku

ReservationSkuProperty

The sku information associated to this reservation

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

tags

object

Tags for this reservation

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

ReservationAppliedScopeProperties

Properties specific to applied scope type. Not required if not applicable. Required and need to provide tenantId and managementGroupId if AppliedScopeType is ManagementGroup

Name Type Description
displayName

string

Display name

managementGroupId

string

Fully-qualified identifier of the management group where the benefit must be applied.

resourceGroupId

string

Fully-qualified identifier of the resource group.

subscriptionId

string

Fully-qualified identifier of the subscription.

tenantId

string

Tenant ID where the reservation should apply benefit.

ReservationBillingPlan

Represent the billing plans.

Value Description
Upfront
Monthly

ReservationExtendedStatusInfo

Extended status information for the reservation.

Name Type Description
message

string

The message giving detailed information about the status code.

properties

ExtendedStatusDefinitionProperties

Properties for extended status information

statusCode

ReservationStatusCode

The status of the reservation.

ReservationMergeProperties

Properties of reservation merge

Name Type Description
mergeDestination

string

Reservation resource id Created due to the merge. Format of the resource id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}

mergeSources

string[]

Resource ids of the source reservation's merged to form this reservation. Format of the resource id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}

ReservationPurchaseRequest

The request for reservation purchase

Name Type Default value Description
location

string

The Azure region where the reserved resource lives.

properties.appliedScopeProperties

ReservationAppliedScopeProperties

Properties specific to applied scope type. Not required if not applicable. Required and need to provide tenantId and managementGroupId if AppliedScopeType is ManagementGroup

properties.appliedScopeType

AppliedScopeType

Type of the Applied Scope.

properties.appliedScopes

string[]

List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared.

properties.billingPlan

ReservationBillingPlan

Represent the billing plans.

properties.billingScopeId

string

Subscription that will be charged for purchasing reservation or savings plan

properties.displayName

string

Friendly name of the reservation

properties.instanceFlexibility

InstanceFlexibility

Allows reservation discount to be applied across skus within the same auto fit group. Not all skus support instance size flexibility.

properties.quantity

integer (int32)

Quantity of the skus that are part of the reservation. Must be greater than zero.

properties.renew

boolean

False

Setting this to true will automatically purchase a new reservation on the expiration date time.

properties.reservedResourceProperties.instanceFlexibility

InstanceFlexibility

Turning this on will apply the reservation discount to other VMs in the same VM size group. Only specify for VirtualMachines reserved resource type.

properties.reservedResourceType

string

The reserved source type of the reservation, e.g. virtual machine.

properties.reviewDateTime

string (date-time)

This is the date-time when the Azure hybrid benefit needs to be reviewed.

properties.term

string

The term of the reservation, e.g. P1Y

sku

SkuName

The name of sku

ReservationSkuProperty

The property of reservation sku object.

Name Type Description
name

string

The name of the reservation sku.

ReservationsListResult

The list of reservations and summary of roll out count of reservations in each state.

Name Type Description
nextLink

string

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

summary

ReservationSummary

The roll out count summary of the reservations

value

Reservation[]

The list of reservations.

ReservationSplitProperties

Properties of reservation split

Name Type Description
splitDestinations

string[]

List of destination resource id that are created due to split. Format of the resource id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}

splitSource

string

Resource id of the reservation from which this is split. Format of the resource id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}

ReservationStatusCode

The status of the reservation.

Value Description
None
Pending
Processing
Active
PurchaseError
PaymentInstrumentError
Split
Merged
Expired
Succeeded
CapacityError
CapacityRestricted
Exchanged
UnknownError
RiskCheckFailed
CreditLineCheckFailed
Warning
NoBenefitDueToSubscriptionTransfer
NoBenefitDueToSubscriptionDeletion
NoBenefit

ReservationSummary

The roll up count summary of reservations in each state

Name Type Description
cancelledCount

number

The number of reservation in Cancelled state

expiredCount

number

The number of reservation in Expired state

expiringCount

number

The number of reservation in Expiring state

failedCount

number

The number of reservation in Failed state

noBenefitCount

number

The number of reservation in 'No Benefit' state

pendingCount

number

The number of reservation in Pending state

processingCount

number

The number of reservation in Processing state

succeededCount

number

The number of reservation in Succeeded state

warningCount

number

The number of reservation in Warning state

ReservationSwapProperties

Properties of reservation swap

Name Type Description
swapDestination

string

Reservation resource id that the original resource gets swapped to. Format of the resource id is /providers/microsoft.capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}

swapSource

string

Resource id of the source reservation that gets swapped. Format of the resource id is /providers/microsoft.capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}

ReservationUtilizationAggregates

The aggregate values of reservation utilization

Name Type Description
grain

number

The grain of the aggregate

grainUnit

string

The grain unit of the aggregate

value

number

The aggregate value

valueUnit

string

The aggregate value unit

SkuName

The name of sku

Name Type Description
name

string

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.