共用方式為


Reservation Transactions - List

計費帳戶範圍上保留實例的交易清單。 注意:退款交易會連同購買交易一起張貼 (,也就是在購買計費月份) 。 例如,退款是在 2021 年 5 月要求。 此退款交易的事件日期會是 2021 年 5 月,但保留購買時的計費月份為 2020 年 4 月。 注意:ARM 的承載大小限制為 12 MB,因此當回應大小超過 ARM 限制時,目前呼叫端會取得 400。 在這種情況下,應該使用較小的日期範圍來呼叫 API。

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/reservationTransactions?api-version=2023-05-01
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/reservationTransactions?$filter={$filter}&api-version=2023-05-01&useMarkupIfPartner={useMarkupIfPartner}&previewMarkupPercentage={previewMarkupPercentage}

URI 參數

名稱 位於 必要 類型 Description
billingAccountId
path True

string

BillingAccount 識別符

api-version
query True

string

要與用戶端要求搭配使用的 API 版本。 目前的版本為 2023-03-01。

$filter
query

string

依日期範圍篩選保留交易。 開始日期和結束日期的屬性/EventDate。 篩選條件支援 『le』 和 『ge』。 注意:API 會傳回整個開始日期和結束日期計費月份的數據。 例如,篩選屬性/eventDate+ge+2020-01-01+AND+properties/eventDate+le+2020-12-29 會包含整個 2020 年 12 月 (的數據,也就是將包含 12 月 30 日和 31 日日期的記錄)

previewMarkupPercentage
query

number

decimal

要套用的預覽標記百分比。

useMarkupIfPartner
query

boolean

如果呼叫端是合作夥伴,則套用標記至交易。

回應

名稱 類型 Description
200 OK

ReservationTransactionsListResult

正常。 要求已成功。

Other Status Codes

ErrorResponse

描述作業失敗原因的錯誤回應。

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

ReservationTransactionsByEnrollmentNumber

Sample Request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.Consumption/reservationTransactions?$filter=properties/eventDate+ge+2020-05-20+AND+properties/eventDate+le+2020-05-30&api-version=2023-05-01&useMarkupIfPartner=True&previewMarkupPercentage=15.5

Sample Response

{
  "value": [
    {
      "id": "/billingAccounts/123456/providers/Microsoft.Consumption/reservationtransactions/201909091919",
      "name": "201909091919",
      "type": "Microsoft.Consumption/reservationTransactions",
      "tags": [],
      "properties": {
        "eventDate": "2019-09-09T19:19:04Z",
        "reservationOrderId": "00000000-0000-0000-0000-000000000000",
        "description": "Standard_DS1_v2 westus 1 Year",
        "eventType": "Refund",
        "quantity": 1,
        "amount": -21,
        "currency": "USD",
        "reservationOrderName": "Transaction-DS1_v2",
        "purchasingEnrollment": "123456",
        "armSkuName": "Standard_DS1_v2",
        "term": "P1Y",
        "region": "westus",
        "purchasingSubscriptionGuid": "a838a8c3-a408-49e1-ac90-42cb95bff9b2",
        "purchasingSubscriptionName": "Infrastructure Subscription",
        "accountName": "Microsoft Infrastructure",
        "accountOwnerEmail": "admin@microsoft.com",
        "departmentName": "Unassigned",
        "costCenter": "",
        "currentEnrollment": "123456",
        "billingFrequency": "recurring",
        "billingMonth": 20190901,
        "monetaryCommitment": 523123.9,
        "overage": 23234.49
      }
    },
    {
      "id": "/billingAccounts/123456/providers/Microsoft.Consumption/reservationtransactions/201909091919",
      "name": "201909091919",
      "type": "Microsoft.Consumption/reservationTransactions",
      "tags": [],
      "properties": {
        "eventDate": "2019-09-09T19:19:04Z",
        "reservationOrderId": "00000000-0000-0000-0000-000000000000",
        "description": "Standard_DS1_v2 westus 1 Year",
        "eventType": "Purchase",
        "quantity": 1,
        "amount": 21,
        "currency": "USD",
        "reservationOrderName": "Transaction-DS1_v2",
        "purchasingEnrollment": "123456",
        "armSkuName": "Standard_DS1_v2",
        "term": "P1Y",
        "region": "westus",
        "purchasingSubscriptionGuid": "a838a8c3-a408-49e1-ac90-42cb95bff9b2",
        "purchasingSubscriptionName": "Infrastructure Subscription",
        "accountName": "Microsoft Infrastructure",
        "accountOwnerEmail": "admin@microsoft.com",
        "departmentName": "Unassigned",
        "costCenter": "",
        "currentEnrollment": "123456",
        "billingFrequency": "recurring",
        "billingMonth": 20190901,
        "monetaryCommitment": 523123.9,
        "overage": 23234.49
      }
    }
  ]
}

定義

名稱 Description
ErrorDetails

錯誤的詳細數據。

ErrorResponse

錯誤回應表示服務無法處理傳入要求。 錯誤訊息中會提供原因。

某些錯誤回應:

  • 429 TooManyRequests - 要求已節流。 等候 「x-ms-ratelimit-microsoft.consumption-retry-after」 標頭中指定的時間後重試。

  • 503 ServiceUnavailable - 服務暫時無法使用。 請在等候「Retry-After」標頭中指定的時間之後重試。

ReservationTransaction

保留交易資源。

ReservationTransactionsListResult

列出保留建議的結果。

ErrorDetails

錯誤的詳細數據。

名稱 類型 Description
code

string

錯誤碼。

message

string

錯誤訊息,指出作業失敗的原因。

ErrorResponse

錯誤回應表示服務無法處理傳入要求。 錯誤訊息中會提供原因。

某些錯誤回應:

  • 429 TooManyRequests - 要求已節流。 等候 「x-ms-ratelimit-microsoft.consumption-retry-after」 標頭中指定的時間後重試。

  • 503 ServiceUnavailable - 服務暫時無法使用。 請在等候「Retry-After」標頭中指定的時間之後重試。

名稱 類型 Description
error

ErrorDetails

錯誤的詳細數據。

ReservationTransaction

保留交易資源。

名稱 類型 Description
id

string

資源標識碼。

name

string

資源名稱。

properties.accountName

string

進行交易的帳戶名稱。

properties.accountOwnerEmail

string

進行交易之帳戶擁有者的電子郵件。

properties.amount

number

交易的費用。

properties.armSkuName

string

這是 ARM Sku 名稱。 它可以用來與 serviceType 字段聯結,以在使用量記錄中的其他資訊中加入。

properties.billingFrequency

string

計費頻率,可以是一次性或週期性。

properties.billingMonth

integer

計費月份 (yyyyMMdd) ,事件起始所在。

properties.costCenter

string

如果此部門是部門且提供成本中心,則為此部門的成本中心。

properties.currency

string

支付交易費用的 ISO 貨幣,例如美元。

properties.currentEnrollment

string

目前的註冊。

properties.departmentName

string

部門名稱。

properties.description

string

交易的描述。

properties.eventDate

string

交易的日期

properties.eventType

string

交易類型 (購買、取消或退款) 。

properties.monetaryCommitment

number

註冊範圍的預付金金額。

properties.overage

number

註冊範圍的超額金額。

properties.purchasingEnrollment

string

購買註冊。

properties.purchasingSubscriptionGuid

string

進行交易的訂用帳戶 GUID。

properties.purchasingSubscriptionName

string

進行交易的訂用帳戶名稱。

properties.quantity

number

交易的數量。

properties.region

string

交易的區域。

properties.reservationOrderId

string

保留訂單標識碼是保留購買的標識碼。 每個保留訂單標識碼都代表單一購買交易。 保留訂單包含保留。 保留順序會指定保留的 VM 大小和區域。

properties.reservationOrderName

string

保留訂單的名稱。

properties.term

string

這是交易的詞彙。

tags

string[]

資源標籤。

type

string

資源類型。

ReservationTransactionsListResult

列出保留建議的結果。

名稱 類型 Description
nextLink

string

連結 (url) 到下一頁的結果。

value

ReservationTransaction[]

保留建議的清單。