Share via


Migreren vanuit de API voor kosten voor gereserveerde EA-instanties

EA-klanten die voorheen de Enterprise Reporting consumption.azure.com-API gebruikten om kosten voor gereserveerde instanties te verkrijgen, moeten worden gemigreerd naar een Azure Resource Manager-API voor pariteit. De volgende instructies helpen u bij het migreren en bespreken van contractverschillen tussen de oude API en de nieuwe API.

Notitie

Alle Azure Enterprise Reporting-API's worden buiten gebruik gesteld. U moet zo snel mogelijk migreren naar Microsoft Cost Management-API's .

Machtigingen toewijzen aan een service-principal om de API aan te roepen

Voordat u de API aanroept, moet u een service-principal configureren met de juiste machtiging. U gebruikt de service-principal om de API aan te roepen. Zie Machtigingen toewijzen aan Cost Management-API's voor meer informatie.

De API voor kosten voor gereserveerde instanties aanroepen

Gebruik de volgende aanvraag-URI's voor het aanroepen van de nieuwe API voor Kosten voor gereserveerde instanties.

Ondersteunde aanvragen

Reserveringskosten ophalen op datumbereik

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 

Wijzigingen in antwoordtekst

Oud antwoord:

[
    {
        "purchasingEnrollment": "string",
        "armSkuName": "Standard_F1s",
        "term": "P1Y",
        "region": "eastus",
        "PurchasingsubscriptionGuid": "00000000-0000-0000-0000-000000000000",
        "PurchasingsubscriptionName": "string",
        "accountName": "string",
        "accountOwnerEmail": "string",
        "departmentName": "string",
        "costCenter": "",
        "currentEnrollment": "string",
        "billingFrequency": "OneTime",
        "eventDate": "string",
        "reservationOrderId": "00000000-0000-0000-0000-000000000000",
        "description": "Standard_F1s eastus 1 Year",
        "eventType": "Purchase",
        "quantity": int,
        "amount": double,
        "currency": "string",
        "reservationOrderName": "string"
    },
]

Nieuw antwoord:

{
  "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
}