共用方式為


從 EA 保留執行個體費用 API 移轉

先前使用 Enterprise 報表 consumption.azure.com API 取得保留執行個體費用的 EA 客戶,需要移轉到同位 Azure Resource Manager API。 下列指示可協助您移轉和討論舊 API 與新 API 之間的任何合約差異。

注意

所有 Azure 企業報告 API 都會淘汰。 您應該儘快移轉至 Microsoft 成本管理 API

將許可權指派給服務主體以呼叫 API

呼叫 API 之前,您必須使用正確的權限設定服務主體。 您可以使用服務主體呼叫 API。 如需詳細資訊,請參閱 將許可權指派給成本管理 API

呼叫保留的執行個體費用 API

使用下列要求 URI 來呼叫新的保留執行個體費用 API。

支援的要求

依日期範圍取得保留費用

https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Consumption/reservationTransactions?$filter=properties/eventDate+ge+2020-05-20+AND+properties/eventDate+le+2020-05-30&api-version=2023-05-01 

回應主題變更

舊回應

[
    {
        "purchasingEnrollment": "string",
        "armSkuName": "Standard_F1s",
        "term": "P1Y",
        "region": "eastus",
        "PurchasingsubscriptionGuid": "aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e",
        "PurchasingsubscriptionName": "string",
        "accountName": "string",
        "accountOwnerEmail": "string",
        "departmentName": "string",
        "costCenter": "",
        "currentEnrollment": "string",
        "billingFrequency": "OneTime",
        "eventDate": "string",
        "reservationOrderId": "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb",
        "description": "Standard_F1s eastus 1 Year",
        "eventType": "Purchase",
        "quantity": int,
        "amount": double,
        "currency": "string",
        "reservationOrderName": "string"
    },
]

新回應

{
  "id": "/billingAccounts/123456/providers/Microsoft.Consumption/reservationtransactions/201909091919",
  "name": "201909091919",
  "type": "Microsoft.Consumption/reservationTransactions",
  "tags": [],
  "properties": {
    "eventDate": "2019-09-09T19:19:04Z",
    "reservationOrderId": "aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb",
    "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": "aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e",
    "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
}