共用方式為


Reservation Transactions - List

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

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/reservationTransactions?api-version=2024-08-01
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/reservationTransactions?$filter={$filter}&api-version=2024-08-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。

類型: oauth2
Flow: implicit
授權 URL: https://login.microsoftonline.com/common/oauth2/authorize

範圍

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

範例

ReservationTransactionsByEnrollmentNumber

範例要求

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=2024-08-01&useMarkupIfPartner=True&previewMarkupPercentage=15.5

範例回覆

{
  "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」 標頭中指定的時間後重試。

  • 504 閘道逾時 - 處理要求時服務逾時。 儘可能減少要求中的日期範圍。

ReservationTransaction

保留交易資源。

ReservationTransactionsListResult

列出保留建議的結果。

ErrorDetails

錯誤的詳細數據。

名稱 類型 Description
code

string

錯誤碼。

message

string

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

ErrorResponse

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

某些錯誤回應:

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

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

  • 504 閘道逾時 - 處理要求時服務逾時。 儘可能減少要求中的日期範圍。

名稱 類型 Description
error

ErrorDetails

錯誤的詳細數據。

ReservationTransaction

保留交易資源。

名稱 類型 Description
id

string

資源標識碼。

name

string

資源名稱。

properties.accountName

string

進行交易的帳戶名稱。

properties.accountOwnerEmail

string

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

properties.amount

number (decimal)

交易的費用。

properties.armSkuName

string

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

properties.billingFrequency

string

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

properties.billingMonth

integer (int32)

事件起始的計費月份(yyyyMMdd)。

properties.costCenter

string

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

properties.currency

string

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

properties.currentEnrollment

string

目前的註冊。

properties.departmentName

string

部門名稱。

properties.description

string

交易的描述。

properties.eventDate

string (date-time)

交易的日期

properties.eventType

string

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

properties.monetaryCommitment

number (decimal)

註冊範圍中的預付金金額。

properties.overage

number (decimal)

註冊範圍的超額金額。

properties.purchasingEnrollment

string

購買註冊。

properties.purchasingSubscriptionGuid

string (uuid)

建立交易的訂用帳戶 GUID。

properties.purchasingSubscriptionName

string

建立交易的訂用帳戶名稱。

properties.quantity

number (decimal)

交易的數量。

properties.region

string

交易的區域。

properties.reservationOrderId

string

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

properties.reservationOrderName

string

保留訂單的名稱。

properties.term

string

這是交易的詞彙。

tags

string[]

資源標籤。

type

string

資源類型。

ReservationTransactionsListResult

列出保留建議的結果。

名稱 類型 Description
nextLink

string

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

value

ReservationTransaction[]

保留建議的清單。