Usage Details - List
定義されたスコープの使用状況の詳細をListsします。 使用状況の詳細は、この API を介して 2014 年 5 月 1 日以降にのみ使用できます。
注:Microsoft は今後、Consumption Usage Details API を廃止する予定です。 この API に新しい依存関係を設定することはお勧めしません。 代わりに Cost Details API を使用してください。 廃止日が決まったら、お客様に通知します。詳細については、「コストの詳細レポートの生成 - 操作の作成」を参照してください。
GET https://management.azure.com/{scope}/providers/Microsoft.Consumption/usageDetails?api-version=2023-05-01
GET https://management.azure.com/{scope}/providers/Microsoft.Consumption/usageDetails?$expand={$expand}&$filter={$filter}&$skiptoken={$skiptoken}&$top={$top}&api-version=2023-05-01&metric={metric}
URI パラメーター
名前 | / | 必須 | 型 | 説明 |
---|---|---|---|---|
scope
|
path | True |
string |
使用状況の詳細操作に関連付けられているスコープ。 これには、サブスクリプション スコープの '/subscriptions/{subscriptionId}/' が含まれます。 '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for Billing Account scope, '/providers/Microsoft.Billing/departments/{departmentId}' for Department scope, '/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}' for EnrollmentAccount scope および '/providers/Microsoft.Management/managementGroups/{managementGroupId}' for Management Group scope. サブスクリプション、課金アカウント、部門、登録アカウント、管理グループの場合は、'/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' を使用して、スコープに請求期間を追加することもできます。 たとえば、部門スコープで請求期間を指定するには、'/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}' を使用します。 また、Modern Commerce アカウントのスコープは、billingAccount スコープの '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' です。 billingProfile スコープの場合は '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/{billingProfileId}'、invoiceSection スコープの場合は '/providers/Microsoft.Billing/billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}'、invoiceSection スコープの場合は '/providers/Microsoft)。Billing/billingAccounts/{billingAccountId}/customers/{customerId}' はパートナーに固有です。 |
api-version
|
query | True |
string |
クライアント要求で使用される API のバージョン。 現在のバージョンは 2023-03-01 です。 |
$expand
|
query |
string |
使用の詳細の一覧内で properties/additionalInfo または properties/meterDetails を展開するために使用できます。 既定では、これらのフィールドは使用状況の詳細を一覧表示するときに含まれません。 |
|
$filter
|
query |
string |
properties/resourceGroup、properties/resourceName、properties/resourceId、properties/chargeType、properties/reservationId、properties/publisherType、タグで usageDetails をフィルター処理するために使用できます。 フィルターは、'eq'、'lt'、'gt'、'le'、'ge'、および 'and' をサポートしています。 現在、'ne'、'or'、または 'not' はサポートされていません。 タグ フィルターは、キーと値がコロン (:)で区切られたキー値ペア文字列です。 PublisherType フィルターは、Azure と Marketplace の 2 つの値を受け入れ、Web ダイレクト オファーの種類で現在サポートされています |
|
$skiptoken
|
query |
string |
Skiptoken は、前の操作で部分的な結果が返された場合にのみ使用されます。 前の応答に nextLink 要素が含まれている場合、nextLink 要素の値には、後続の呼び出しに使用する開始点を指定する skiptoken パラメーターが含まれます。 |
|
$top
|
query |
integer int32 |
結果の数を最新の N usageDetails に制限するために使用できます。 |
|
metric
|
query |
さまざまな種類のコスト/使用状況レコードを選択できます。 |
応答
名前 | 型 | 説明 |
---|---|---|
200 OK |
OK です。 要求は成功しました。 |
|
204 No Content |
コンテンツなし。 要求は成功しましたが、結果は返されていません。 |
|
Other Status Codes |
操作に失敗した理由を説明するエラー応答。 |
セキュリティ
azure_auth
Azure Active Directory OAuth2 フロー。
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
名前 | 説明 |
---|---|
user_impersonation | ユーザー アカウントの借用 |
例
BillingAccountUsageDetailsList-Legacy
Sample Request
GET https://management.azure.com/providers/Microsoft.Billing/BillingAccounts/1234/providers/Microsoft.Consumption/usageDetails?api-version=2023-05-01
Sample Response
{
"value": [
{
"id": "/providers/Microsoft.Billing/BillingAccounts/1234/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"kind": "legacy",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Account Name 1",
"billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
"billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Account Name 1",
"accountName": "Account Name 1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"date": "2019-03-30T00:00:00.0000000Z",
"product": "Product Name 1",
"partNumber": "Part Number 1",
"meterId": "00000000-0000-0000-0000-000000000000",
"meterDetails": null,
"quantity": 0.7329,
"effectivePrice": 0.000402776395232,
"cost": 0.000295194820065,
"unitPrice": 4.38,
"billingCurrency": "CAD",
"resourceLocation": "USEast",
"consumedService": "Microsoft.Storage",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"resourceName": "Resource Name 1",
"invoiceSection": "Invoice Section 1",
"costCenter": "DEV",
"resourceGroup": "Resource Group 1",
"offerId": "Offer Id 1",
"isAzureCreditEligible": false,
"chargeType": "Usage",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59"
}
}
]
}
BillingAccountUsageDetailsList-Modern
Sample Request
GET https://management.azure.com/providers/Microsoft.Billing/BillingAccounts/1234:56789/providers/Microsoft.Consumption/usageDetails?api-version=2023-05-01
Sample Response
{
"value": [
{
"id": "/providers/Microsoft.Billing/BillingAccounts/1234:56789/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"kind": "modern",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"billingAccountId": "1234:56789",
"billingAccountName": "Account Name 1",
"billingPeriodStartDate": "2019-09-01T00:00:00.0000000Z",
"billingPeriodEndDate": "2019-10-31T00:00:00.0000000Z",
"billingProfileId": "2468",
"billingProfileName": "Account Name 1",
"subscriptionGuid": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"date": "2019-10-30T00:00:00.0000000Z",
"meterId": "00000000-0000-0000-0000-000000000000",
"quantity": 0.7329,
"unitPrice": 4.38,
"billingCurrencyCode": "USD",
"resourceLocation": "USEast",
"consumedService": "Microsoft.Storage",
"instanceName": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"invoiceSectionId": "98765",
"invoiceSectionName": "Invoice Section 1",
"costCenter": "DEV",
"resourceGroup": "Resource Group 1",
"isAzureCreditEligible": false,
"chargeType": "Usage",
"additionalInfo": "{ \"UsageType\": \"ComputeHR\", \"ImageType\": \"Windows Client BYOL\", \"ServiceType\": \"Standard_D1\", \"VMName\": null, \"VMProperties\": null, \"VCPUs\": 1, \"CPUs\": 0}",
"costInBillingCurrency": 1.84763819095477,
"costInPricingCurrency": 1.84763819095477,
"exchangeRate": "1",
"exchangeRateDate": "2019-09-30T00:00:00Z",
"invoiceId": "",
"previousInvoiceId": "",
"pricingCurrencyCode": "USD",
"product": "Virtual Machines D Series - D1 - US East",
"productIdentifier": "DZH318Z0BQ4B00FV",
"productOrderId": "a3db7880-70eb-4b4c-6a79-1425a058df5a",
"productOrderName": "Azure plan",
"publisherName": "Microsoft",
"publisherType": "Microsoft",
"resourceLocationNormalized": "US East",
"serviceInfo1": "",
"serviceInfo2": "Windows Client BYOL",
"servicePeriodEndDate": "2019-12-01T00:00:00Z",
"servicePeriodStartDate": "2019-09-01T00:00:00Z",
"customerTenantId": "00000000-0000-0000-0000-000000000000",
"customerName": "Modern Azure Customer 1",
"partnerTenantId": "00000000-0000-0000-0000-000000000000",
"partnerName": "Partner Name 1",
"resellerMpnId": "",
"resellerName": "Reseller Name 1",
"publisherId": "",
"reservationId": "",
"reservationName": "",
"frequency": "UsageBased",
"term": "",
"marketPrice": 0.077,
"costInUSD": 1.84763819095477,
"paygCostInBillingCurrency": 1.848,
"paygCostInUSD": 1.848,
"exchangeRatePricingToBilling": 0.077,
"partnerEarnedCreditRate": 0.077,
"partnerEarnedCreditApplied": "0",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59"
}
}
]
}
BillingAccountUsageDetailsListForBillingPeriod-Legacy
Sample Request
GET https://management.azure.com/providers/Microsoft.Billing/BillingAccounts/1234/providers/Microsoft.Consumption/usageDetails?api-version=2023-05-01
Sample Response
{
"value": [
{
"id": "/providers/Microsoft.Billing/BillingAccounts/1234/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"kind": "legacy",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Account Name 1",
"billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
"billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Account Name 1",
"accountName": "Account Name 1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"date": "2019-03-30T00:00:00.0000000Z",
"product": "Product Name 1",
"partNumber": "Part Number 1",
"meterId": "00000000-0000-0000-0000-000000000000",
"meterDetails": null,
"quantity": 0.8234,
"effectivePrice": 0.010534556373432,
"cost": 0.000342194841184,
"unitPrice": 3.74,
"billingCurrency": "CAD",
"resourceLocation": "USEast",
"consumedService": "Microsoft.Storage",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"resourceName": "Resource Name 1",
"invoiceSection": "Invoice Section 1",
"costCenter": "DEV",
"resourceGroup": "Resource Group 1",
"offerId": "Offer Id 1",
"isAzureCreditEligible": false,
"chargeType": "Usage",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59"
}
}
]
}
BillingProfileUsageDetailsList-Modern
Sample Request
GET https://management.azure.com/providers/Microsoft.Billing/BillingAccounts/1234:56789/billingProfiles/2468/providers/Microsoft.Consumption/usageDetails?api-version=2023-05-01
Sample Response
{
"value": [
{
"id": "/providers/Microsoft.Billing/BillingAccounts/1234:56789/billingProfiles/2468/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"kind": "modern",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"billingAccountId": "1234:56789",
"billingAccountName": "Account Name 1",
"billingPeriodStartDate": "2019-09-01T00:00:00.0000000Z",
"billingPeriodEndDate": "2019-10-31T00:00:00.0000000Z",
"billingProfileId": "2468",
"billingProfileName": "Account Name 1",
"subscriptionGuid": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"date": "2019-10-30T00:00:00.0000000Z",
"meterId": "00000000-0000-0000-0000-000000000000",
"quantity": 0.7329,
"unitPrice": 4.38,
"billingCurrencyCode": "USD",
"resourceLocation": "USEast",
"consumedService": "Microsoft.Storage",
"instanceName": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"invoiceSectionId": "98765",
"invoiceSectionName": "Invoice Section 1",
"costCenter": "DEV",
"resourceGroup": "Resource Group 1",
"isAzureCreditEligible": false,
"chargeType": "Usage",
"additionalInfo": "{ \"UsageType\": \"ComputeHR\", \"ImageType\": \"Windows Client BYOL\", \"ServiceType\": \"Standard_D1\", \"VMName\": null, \"VMProperties\": null, \"VCPUs\": 1, \"CPUs\": 0}",
"costInBillingCurrency": 1.84763819095477,
"costInPricingCurrency": 1.84763819095477,
"exchangeRate": "1",
"exchangeRateDate": "2019-09-30T00:00:00Z",
"invoiceId": "",
"previousInvoiceId": "",
"pricingCurrencyCode": "USD",
"product": "Virtual Machines D Series - D1 - US East",
"productIdentifier": "DZH318Z0BQ4B00FV",
"productOrderId": "a3db7880-70eb-4b4c-6a79-1425a058df5a",
"productOrderName": "Azure plan",
"publisherName": "Microsoft",
"publisherType": "Microsoft",
"resourceLocationNormalized": "US East",
"serviceInfo1": "",
"serviceInfo2": "Windows Client BYOL",
"servicePeriodEndDate": "2019-12-01T00:00:00Z",
"servicePeriodStartDate": "2019-09-01T00:00:00Z",
"customerTenantId": "00000000-0000-0000-0000-000000000000",
"customerName": "Modern Azure Customer 1",
"partnerTenantId": "00000000-0000-0000-0000-000000000000",
"partnerName": "Partner Name 1",
"resellerMpnId": "",
"resellerName": "Reseller Name 1",
"publisherId": "",
"reservationId": "",
"reservationName": "",
"frequency": "UsageBased",
"term": "",
"marketPrice": 0.077,
"costInUSD": 1.84763819095477,
"paygCostInBillingCurrency": 1.848,
"paygCostInUSD": 1.848,
"exchangeRatePricingToBilling": 0.077,
"partnerEarnedCreditRate": 0.077,
"partnerEarnedCreditApplied": "0",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59"
}
}
]
}
CustomerUsageDetailsList-Modern
Sample Request
GET https://management.azure.com/providers/Microsoft.Billing/BillingAccounts/1234:56789/customers/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2023-05-01
Sample Response
{
"value": [
{
"id": "/providers/Microsoft.Billing/BillingAccounts/1234:56789/customers/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"kind": "modern",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"billingAccountId": "1234:56789",
"billingAccountName": "Account Name 1",
"billingPeriodStartDate": "2019-09-01T00:00:00.0000000Z",
"billingPeriodEndDate": "2019-10-31T00:00:00.0000000Z",
"billingProfileId": "2468",
"billingProfileName": "Account Name 1",
"subscriptionGuid": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"date": "2019-10-30T00:00:00.0000000Z",
"meterId": "00000000-0000-0000-0000-000000000000",
"quantity": 0.7329,
"unitPrice": 4.38,
"billingCurrencyCode": "USD",
"resourceLocation": "USEast",
"consumedService": "Microsoft.Storage",
"instanceName": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"invoiceSectionId": "98765",
"invoiceSectionName": "Invoice Section 1",
"costCenter": "DEV",
"resourceGroup": "Resource Group 1",
"isAzureCreditEligible": false,
"chargeType": "Usage",
"additionalInfo": "{ \"UsageType\": \"ComputeHR\", \"ImageType\": \"Windows Client BYOL\", \"ServiceType\": \"Standard_D1\", \"VMName\": null, \"VMProperties\": null, \"VCPUs\": 1, \"CPUs\": 0}",
"costInBillingCurrency": 1.84763819095477,
"costInPricingCurrency": 1.84763819095477,
"exchangeRate": "1",
"exchangeRateDate": "2019-09-30T00:00:00Z",
"invoiceId": "",
"previousInvoiceId": "",
"pricingCurrencyCode": "USD",
"product": "Virtual Machines D Series - D1 - US East",
"productIdentifier": "DZH318Z0BQ4B00FV",
"productOrderId": "a3db7880-70eb-4b4c-6a79-1425a058df5a",
"productOrderName": "Azure plan",
"publisherName": "Microsoft",
"publisherType": "Microsoft",
"resourceLocationNormalized": "US East",
"serviceInfo1": "",
"serviceInfo2": "Windows Client BYOL",
"servicePeriodEndDate": "2019-12-01T00:00:00Z",
"servicePeriodStartDate": "2019-09-01T00:00:00Z",
"customerTenantId": "00000000-0000-0000-0000-000000000000",
"customerName": "Modern Azure Customer 1",
"partnerTenantId": "00000000-0000-0000-0000-000000000000",
"partnerName": "Partner Name 1",
"resellerMpnId": "",
"resellerName": "Reseller Name 1",
"publisherId": "",
"reservationId": "",
"reservationName": "",
"frequency": "UsageBased",
"term": "",
"marketPrice": 0.077,
"costInUSD": 1.84763819095477,
"paygCostInBillingCurrency": 1.848,
"paygCostInUSD": 1.848,
"exchangeRatePricingToBilling": 0.077,
"partnerEarnedCreditRate": 0.077,
"partnerEarnedCreditApplied": "0",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59"
}
}
]
}
DepartmentUsageDetailsList-Legacy
Sample Request
GET https://management.azure.com/providers/Microsoft.Billing/Departments/1234/providers/Microsoft.Consumption/usageDetails?api-version=2023-05-01
Sample Response
{
"value": [
{
"id": "/providers/Microsoft.Billing/Departments/1234/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"kind": "legacy",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Account Name 1",
"billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
"billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Account Name 1",
"accountName": "Account Name 1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"date": "2019-03-30T00:00:00.0000000Z",
"product": "Product Name 1",
"partNumber": "Part Number 1",
"meterId": "00000000-0000-0000-0000-000000000000",
"meterDetails": null,
"quantity": 0.7329,
"effectivePrice": 0.000402776395232,
"cost": 0.000295194820065,
"unitPrice": 4.38,
"billingCurrency": "CAD",
"resourceLocation": "USEast",
"consumedService": "Microsoft.Storage",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"resourceName": "Resource Name 1",
"invoiceSection": "Invoice Section 1",
"costCenter": "DEV",
"resourceGroup": "Resource Group 1",
"offerId": "Offer Id 1",
"isAzureCreditEligible": false,
"chargeType": "Usage",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59"
}
}
]
}
DepartmentUsageDetailsListForBillingPeriod-Legacy
Sample Request
GET https://management.azure.com/providers/Microsoft.Billing/Departments/1234/providers/Microsoft.Consumption/usageDetails?api-version=2023-05-01
Sample Response
{
"value": [
{
"id": "/providers/Microsoft.Billing/Departments/1234/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"kind": "legacy",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Account Name 1",
"billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
"billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Account Name 1",
"accountName": "Account Name 1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"date": "2019-03-30T00:00:00.0000000Z",
"product": "Product Name 1",
"partNumber": "Part Number 1",
"meterId": "00000000-0000-0000-0000-000000000000",
"meterDetails": null,
"quantity": 0.8234,
"effectivePrice": 0.010534556373432,
"cost": 0.000342194841184,
"unitPrice": 3.74,
"billingCurrency": "CAD",
"resourceLocation": "USEast",
"consumedService": "Microsoft.Storage",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"resourceName": "Resource Name 1",
"invoiceSection": "Invoice Section 1",
"costCenter": "DEV",
"resourceGroup": "Resource Group 1",
"offerId": "Offer Id 1",
"isAzureCreditEligible": false,
"chargeType": "Usage",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59"
}
}
]
}
EnrollmentAccountUsageDetailsList-Legacy
Sample Request
GET https://management.azure.com/providers/Microsoft.Billing/EnrollmentAccounts/1234/providers/Microsoft.Consumption/usageDetails?api-version=2023-05-01
Sample Response
{
"value": [
{
"id": "/providers/Microsoft.Billing/EnrollmentAccounts/1234/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"kind": "legacy",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Account Name 1",
"billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
"billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Account Name 1",
"accountName": "Account Name 1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"date": "2019-03-30T00:00:00.0000000Z",
"product": "Product Name 1",
"partNumber": "Part Number 1",
"meterId": "00000000-0000-0000-0000-000000000000",
"meterDetails": null,
"quantity": 0.7329,
"effectivePrice": 0.000402776395232,
"cost": 0.000295194820065,
"unitPrice": 4.38,
"billingCurrency": "CAD",
"resourceLocation": "USEast",
"consumedService": "Microsoft.Storage",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"resourceName": "Resource Name 1",
"invoiceSection": "Invoice Section 1",
"costCenter": "DEV",
"resourceGroup": "Resource Group 1",
"offerId": "Offer Id 1",
"isAzureCreditEligible": false,
"chargeType": "Usage",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59"
}
}
]
}
EnrollmentAccountUsageDetailsListForBillingPeriod-Legacy
Sample Request
GET https://management.azure.com/providers/Microsoft.Billing/EnrollmentAccounts/1234/providers/Microsoft.Consumption/usageDetails?api-version=2023-05-01
Sample Response
{
"value": [
{
"id": "/providers/Microsoft.Billing/EnrollmentAccounts/1234/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"kind": "legacy",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Account Name 1",
"billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
"billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Account Name 1",
"accountName": "Account Name 1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"date": "2019-03-30T00:00:00.0000000Z",
"product": "Product Name 1",
"partNumber": "Part Number 1",
"meterId": "00000000-0000-0000-0000-000000000000",
"meterDetails": null,
"quantity": 0.8234,
"effectivePrice": 0.010534556373432,
"cost": 0.000342194841184,
"unitPrice": 3.74,
"billingCurrency": "CAD",
"resourceLocation": "USEast",
"consumedService": "Microsoft.Storage",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"resourceName": "Resource Name 1",
"invoiceSection": "Invoice Section 1",
"costCenter": "DEV",
"resourceGroup": "Resource Group 1",
"offerId": "Offer Id 1",
"isAzureCreditEligible": false,
"chargeType": "Usage",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59"
}
}
]
}
InvoiceSectionUsageDetailsList-Modern
Sample Request
GET https://management.azure.com/providers/Microsoft.Billing/BillingAccounts/1234:56789/invoiceSections/98765/providers/Microsoft.Consumption/usageDetails?api-version=2023-05-01
Sample Response
{
"value": [
{
"id": "/providers/Microsoft.Billing/BillingAccounts/1234:56789/invoiceSections/98765/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"kind": "modern",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"billingAccountId": "1234:56789",
"billingAccountName": "Account Name 1",
"billingPeriodStartDate": "2019-09-01T00:00:00.0000000Z",
"billingPeriodEndDate": "2019-10-31T00:00:00.0000000Z",
"billingProfileId": "2468",
"billingProfileName": "Account Name 1",
"subscriptionGuid": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"date": "2019-10-30T00:00:00.0000000Z",
"meterId": "00000000-0000-0000-0000-000000000000",
"quantity": 0.7329,
"unitPrice": 4.38,
"billingCurrencyCode": "USD",
"resourceLocation": "USEast",
"consumedService": "Microsoft.Storage",
"instanceName": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"invoiceSectionId": "98765",
"invoiceSectionName": "Invoice Section 1",
"costCenter": "DEV",
"resourceGroup": "Resource Group 1",
"isAzureCreditEligible": false,
"chargeType": "Usage",
"additionalInfo": "{ \"UsageType\": \"ComputeHR\", \"ImageType\": \"Windows Client BYOL\", \"ServiceType\": \"Standard_D1\", \"VMName\": null, \"VMProperties\": null, \"VCPUs\": 1, \"CPUs\": 0}",
"costInBillingCurrency": 1.84763819095477,
"costInPricingCurrency": 1.84763819095477,
"exchangeRate": "1",
"exchangeRateDate": "2019-09-30T00:00:00Z",
"invoiceId": "",
"previousInvoiceId": "",
"pricingCurrencyCode": "USD",
"product": "Virtual Machines D Series - D1 - US East",
"productIdentifier": "DZH318Z0BQ4B00FV",
"productOrderId": "a3db7880-70eb-4b4c-6a79-1425a058df5a",
"productOrderName": "Azure plan",
"publisherName": "Microsoft",
"publisherType": "Microsoft",
"resourceLocationNormalized": "US East",
"serviceInfo1": "",
"serviceInfo2": "Windows Client BYOL",
"servicePeriodEndDate": "2019-12-01T00:00:00Z",
"servicePeriodStartDate": "2019-09-01T00:00:00Z",
"customerTenantId": "00000000-0000-0000-0000-000000000000",
"customerName": "Modern Azure Customer 1",
"partnerTenantId": "00000000-0000-0000-0000-000000000000",
"partnerName": "Partner Name 1",
"resellerMpnId": "",
"resellerName": "Reseller Name 1",
"publisherId": "",
"reservationId": "",
"reservationName": "",
"frequency": "UsageBased",
"term": "",
"marketPrice": 0.077,
"costInUSD": 1.84763819095477,
"paygCostInBillingCurrency": 1.848,
"paygCostInUSD": 1.848,
"exchangeRatePricingToBilling": 0.077,
"partnerEarnedCreditRate": 0.077,
"partnerEarnedCreditApplied": "0",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59"
}
}
]
}
ManagementGroupUsageDetailsList-Legacy
Sample Request
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2023-05-01
Sample Response
{
"value": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"kind": "legacy",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Account Name 1",
"billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
"billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Account Name 1",
"accountName": "Account Name 1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"date": "2019-03-30T00:00:00.0000000Z",
"product": "Product Name 1",
"partNumber": "Part Number 1",
"meterId": "00000000-0000-0000-0000-000000000000",
"meterDetails": null,
"quantity": 0.8234,
"effectivePrice": 0.010534556373432,
"cost": 0.000342194841184,
"unitPrice": 3.74,
"billingCurrency": "CAD",
"resourceLocation": "USEast",
"consumedService": "Microsoft.Storage",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"resourceName": "Resource Name 1",
"invoiceSection": "Invoice Section 1",
"costCenter": "DEV",
"resourceGroup": "Resource Group 1",
"offerId": "Offer Id 1",
"isAzureCreditEligible": false,
"chargeType": "Usage",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59"
}
},
{
"id": "/scope/providers/Microsoft.Billing/billingPeriods/20180801/providers/Microsoft.Consumption/usageDetails/usageDetails_Id2",
"name": "usageDetails_Id2",
"type": "Microsoft.Consumption/usageDetails",
"kind": "legacy",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Account Name 2",
"billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
"billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Account Name 2",
"accountName": "Account Name 1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"date": "2019-03-30T00:00:00.0000000Z",
"product": "Product Name 2",
"partNumber": "Part Number 2",
"meterId": "11111111-1111-1111-1111-111111111111",
"meterDetails": null,
"quantity": 0.7329,
"effectivePrice": 0.000402776395232,
"cost": 0.000295194820065,
"unitPrice": 4.38,
"billingCurrency": "CAD",
"resourceLocation": "USEast",
"consumedService": "Microsoft.Storage",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 2/providers/Microsoft.Storage/storageAccounts/Resource Name 2",
"resourceName": "Resource Name 2",
"invoiceSection": "Invoice Section 2",
"costCenter": "DEV",
"resourceGroup": "Resource Group 2",
"offerId": "Offer Id 2",
"isAzureCreditEligible": false,
"chargeType": "Usage",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59"
}
}
]
}
ManagementGroupUsageDetailsListForBillingPeriod-Legacy
Sample Request
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2023-05-01
Sample Response
{
"value": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"kind": "legacy",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Account Name 1",
"billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
"billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Account Name 1",
"accountName": "Account Name 1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"date": "2019-03-30T00:00:00.0000000Z",
"product": "Product Name 1",
"partNumber": "Part Number 1",
"meterId": "00000000-0000-0000-0000-000000000000",
"meterDetails": null,
"quantity": 0.8234,
"effectivePrice": 0.010534556373432,
"cost": 0.000342194841184,
"unitPrice": 3.74,
"billingCurrency": "CAD",
"resourceLocation": "USEast",
"consumedService": "Microsoft.Storage",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"resourceName": "Resource Name 1",
"invoiceSection": "Invoice Section 1",
"costCenter": "DEV",
"resourceGroup": "Resource Group 1",
"offerId": "Offer Id 1",
"isAzureCreditEligible": false,
"chargeType": "Usage",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59"
}
},
{
"id": "/scope/providers/Microsoft.Billing/billingPeriods/billingPeriodName/providers/Microsoft.Consumption/usageDetails/usageDetails_Id2",
"name": "usageDetails_Id2",
"type": "Microsoft.Consumption/usageDetails",
"kind": "legacy",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Account Name 2",
"billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
"billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Account Name 2",
"accountName": "Account Name 2",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 2",
"date": "2019-03-30T00:00:00.0000000Z",
"product": "Product Name 2",
"partNumber": "Part Number 2",
"meterId": "11111111-1111-1111-1111-111111111111",
"meterDetails": null,
"quantity": 0.4759,
"effectivePrice": 0.073488920944598,
"cost": 0.000821821271948,
"unitPrice": 5.74,
"billingCurrency": "CAD",
"resourceLocation": "USEast",
"consumedService": "Microsoft.Storage",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 2/providers/Microsoft.Storage/storageAccounts/Resource Name 2",
"resourceName": "Resource Name 2",
"invoiceSection": "Invoice Section 2",
"costCenter": "DEV",
"resourceGroup": "Resource Group 2",
"offerId": "Offer Id 2",
"isAzureCreditEligible": false,
"chargeType": "UnusedReservation",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59"
}
}
]
}
UsageDetailsExpand-Legacy
Sample Request
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?$expand=meterDetails,additionalInfo&$filter=tags eq 'dev:tools'&$top=1&api-version=2023-05-01
Sample Response
{
"value": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"kind": "legacy",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Account Name 1",
"billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
"billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Account Name 1",
"accountName": "Account Name 1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"date": "2019-03-30T00:00:00.0000000Z",
"product": "Product Name 1",
"partNumber": "Part Number 1",
"meterId": "00000000-0000-0000-0000-000000000000",
"meterDetails": {
"meterName": "Data Transfer Out (GB)",
"meterCategory": "Networking",
"meterSubCategory": "ExpressRoute",
"unitOfMeasure": "GB",
"serviceFamily": "Compute"
},
"quantity": 0.8234,
"effectivePrice": 0.010464556322455,
"cost": 0.000342194841184,
"unitPrice": 3.54,
"billingCurrency": "CAD",
"resourceLocation": "USEast",
"consumedService": "Microsoft.Storage",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"resourceName": "Resource Name 1",
"invoiceSection": "Invoice Section 1",
"costCenter": "DEV",
"resourceGroup": "Resource Group 1",
"offerId": "Offer Id 1",
"isAzureCreditEligible": false,
"chargeType": "Usage",
"frequency": "UsageBased",
"additionalInfo": "{\"MyType\":\"\",\"ServiceType\":\"\",\"VMName\":\"\",\"UsageType\":\"MyUsage\"}",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59"
}
}
]
}
UsageDetailsList-Legacy
Sample Request
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2023-05-01
Sample Response
{
"value": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"kind": "legacy",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Customer Name 1",
"billingPeriodStartDate": "2019-04-01T00:00:00.0000000Z",
"billingPeriodEndDate": "2019-04-30T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Customer Name 1",
"accountName": "AccountName",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "SubscriptionName 1",
"date": "2019-04-09T00:00:00.0000000Z",
"product": "Product1",
"partNumber": "Part Number 1",
"meterId": "00000000-0000-0000-0000-000000000000",
"meterDetails": null,
"quantity": 3.6E-05,
"effectivePrice": 0.054693034210767,
"cost": 1.980949998E-06,
"unitPrice": 5.47,
"billingCurrency": "CAD",
"resourceLocation": "uswest",
"consumedService": "Microsoft.ClassicStorage",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource-Group-westus/providers/Microsoft.ClassicStorage/storageAccounts/ResourceName1",
"resourceName": "ResourceName1",
"invoiceSection": "Invoice Section 1",
"costCenter": "BAS",
"resourceGroup": "Resource-Group-westus",
"offerId": "Offer Id 1",
"isAzureCreditEligible": false,
"chargeType": "Usage",
"frequency": "UsageBased",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59"
}
}
]
}
UsageDetailsListByMetricActualCost-Legacy
Sample Request
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2023-05-01&metric=actualcost
Sample Response
{
"value": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"kind": "legacy",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Customer Name 1",
"billingPeriodStartDate": "2019-04-01T00:00:00.0000000Z",
"billingPeriodEndDate": "2019-04-30T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Customer Name 1",
"accountName": "AccountName",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "SubscriptionName 1",
"date": "2019-04-09T00:00:00.0000000Z",
"product": "Product1",
"partNumber": "Part Number 1",
"meterId": "00000000-0000-0000-0000-000000000000",
"meterDetails": null,
"quantity": 3.6E-05,
"effectivePrice": 0.054693055510767,
"cost": 1.968949998E-06,
"unitPrice": 5.47,
"billingCurrency": "CAD",
"resourceLocation": "uswest",
"consumedService": "Microsoft.ClassicStorage",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource-Group-westus/providers/Microsoft.ClassicStorage/storageAccounts/ResourceName1",
"resourceName": "ResourceName1",
"invoiceSection": "Invoice Section 1",
"costCenter": "BAS",
"resourceGroup": "Resource-Group-westus",
"offerId": "Offer Id 1",
"isAzureCreditEligible": false,
"chargeType": "Usage",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59"
}
}
]
}
UsageDetailsListByMetricAmortizedCost-Legacy
Sample Request
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2023-05-01&metric=amortizedcost
Sample Response
{
"value": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"kind": "legacy",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Customer Name 1",
"billingPeriodStartDate": "2019-04-01T00:00:00.0000000Z",
"billingPeriodEndDate": "2019-04-30T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Customer Name 1",
"accountName": "AccountName",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "SubscriptionName 1",
"date": "2019-04-09T00:00:00.0000000Z",
"product": "Product1",
"partNumber": "Part Number 1",
"meterId": "00000000-0000-0000-0000-000000000000",
"meterDetails": null,
"quantity": 3.6E-05,
"effectivePrice": 0.054693055510767,
"cost": 1.968949998E-06,
"unitPrice": 5.47,
"billingCurrency": "CAD",
"resourceLocation": "uswest",
"consumedService": "Microsoft.ClassicStorage",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource-Group-westus/providers/Microsoft.ClassicStorage/storageAccounts/ResourceName1",
"resourceName": "ResourceName1",
"invoiceSection": "Invoice Section 1",
"costCenter": "BAS",
"resourceGroup": "Resource-Group-westus",
"offerId": "Offer Id 1",
"isAzureCreditEligible": false,
"chargeType": "Usage",
"frequency": "UsageBased",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59"
}
}
]
}
UsageDetailsListByMetricUsage-Legacy
Sample Request
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2023-05-01&metric=usage
Sample Response
{
"value": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"kind": "legacy",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Customer Name 1",
"billingPeriodStartDate": "2019-04-01T00:00:00.0000000Z",
"billingPeriodEndDate": "2019-04-30T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Customer Name 1",
"accountName": "AccountName",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "SubscriptionName 1",
"date": "2019-04-09T00:00:00.0000000Z",
"product": "Product1",
"partNumber": "Part Number 1",
"meterId": "00000000-0000-0000-0000-000000000000",
"meterDetails": null,
"quantity": 3.6E-05,
"effectivePrice": 0.054693055510767,
"cost": 1.968949998E-06,
"unitPrice": 5.47,
"billingCurrency": "CAD",
"resourceLocation": "uswest",
"consumedService": "Microsoft.ClassicStorage",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource-Group-westus/providers/Microsoft.ClassicStorage/storageAccounts/ResourceName1",
"resourceName": "ResourceName1",
"invoiceSection": "Invoice Section 1",
"costCenter": "BAS",
"resourceGroup": "Resource-Group-westus",
"offerId": "Offer Id 1",
"isAzureCreditEligible": false,
"chargeType": "Usage",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59"
}
}
]
}
UsageDetailsListFilterByTag-Legacy
Sample Request
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?$filter=tags eq 'dev:tools'&api-version=2023-05-01
Sample Response
{
"value": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"kind": "legacy",
"tags": {
"dev": "tools"
},
"properties": {
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Account Name 1",
"billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
"billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Account Name 1",
"accountName": "Account Name 1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"date": "2019-03-30T00:00:00.0000000Z",
"product": "Product Name 1",
"partNumber": "Part Number 1",
"meterId": "00000000-0000-0000-0000-000000000000",
"meterDetails": null,
"quantity": 0.8234,
"effectivePrice": 0.010534556373432,
"cost": 0.000342194841184,
"unitPrice": 3.74,
"billingCurrency": "CAD",
"resourceLocation": "USEast",
"consumedService": "Microsoft.Storage",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"resourceName": "Resource Name 1",
"invoiceSection": "Invoice Section 1",
"costCenter": "DEV",
"resourceGroup": "Resource Group 1",
"offerId": "Offer Id 1",
"isAzureCreditEligible": false,
"chargeType": "Usage",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59"
}
}
]
}
UsageDetailsListForBillingPeriod-Legacy
Sample Request
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2023-05-01
Sample Response
{
"value": [
{
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201903/providers/Microsoft.Consumption/usageDetails/usageDetails_Id1",
"name": "usageDetails_Id1",
"type": "Microsoft.Consumption/usageDetails",
"kind": "legacy",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"billingAccountId": "xxxxxxxx",
"billingAccountName": "Account Name 1",
"billingPeriodStartDate": "2019-03-01T00:00:00.0000000Z",
"billingPeriodEndDate": "2019-03-31T00:00:00.0000000Z",
"billingProfileId": "xxxxxxxx",
"billingProfileName": "Account Name 1",
"accountName": "Account Name 1",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "Subscription Name 1",
"date": "2019-03-30T00:00:00.0000000Z",
"product": "Product Name 1",
"partNumber": "Part Number 1",
"meterId": "00000000-0000-0000-0000-000000000000",
"meterDetails": null,
"quantity": 0.8234,
"effectivePrice": 0.010534556373432,
"cost": 0.000342194841184,
"unitPrice": 3.74,
"billingCurrency": "CAD",
"resourceLocation": "USEast",
"consumedService": "Microsoft.Storage",
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/Resource Group 1/providers/Microsoft.Storage/storageAccounts/Resource Name 1",
"resourceName": "Resource Name 1",
"invoiceSection": "Invoice Section 1",
"costCenter": "DEV",
"resourceGroup": "Resource Group 1",
"offerId": "Offer Id 1",
"isAzureCreditEligible": false,
"chargeType": "Usage",
"benefitId": "00000000-0000-0000-0000-000000000000",
"benefitName": "Reservation_purchase_03-09-2018_10-59"
}
}
]
}
定義
名前 | 説明 |
---|---|
Error |
エラーの詳細。 |
Error |
エラー応答は、サービスが受信要求を処理できないことを示します。 理由は、エラー メッセージに表示されます。 いくつかのエラー応答:
|
Legacy |
従来の使用状況の詳細。 |
Meter |
メーターの詳細のプロパティ。 |
metrictype |
さまざまな種類のコスト/使用状況レコードを選択できます。 |
Modern |
最新の使用状況の詳細。 |
pricing |
メーターに対する価格設定の方法を示す識別子。 |
Usage |
使用状況の詳細を一覧表示した結果。 利用可能な使用状況の詳細の一覧が、請求期間別の逆時系列順に表示されます。 |
ErrorDetails
エラーの詳細。
名前 | 型 | 説明 |
---|---|---|
code |
string |
エラー コード。 |
message |
string |
操作が失敗した理由を示すエラー メッセージ。 |
ErrorResponse
エラー応答は、サービスが受信要求を処理できないことを示します。 理由は、エラー メッセージに表示されます。
いくつかのエラー応答:
429 TooManyRequests - 要求が調整されました。 "x-ms-ratelimit-microsoft.consumption-retry-after" ヘッダーで指定された時間を待ってから再試行します。
503 ServiceUnavailable - サービスは一時的に使用できません。 "Retry-After" ヘッダーで指定された時刻まで待ってから、再試行してください。
名前 | 型 | 説明 |
---|---|---|
error |
エラーの詳細。 |
LegacyUsageDetail
従来の使用状況の詳細。
名前 | 型 | 説明 |
---|---|---|
etag |
string |
リソースの etag。 |
id |
string |
イベントの完全修飾 ARM ID。 |
kind |
string:
legacy |
使用状況の詳細の種類を指定します。 |
name |
string |
イベントを一意に識別する ID。 |
properties.accountName |
string |
アカウント名。 |
properties.accountOwnerId |
string |
アカウント所有者 ID。 |
properties.additionalInfo |
string |
この使用項目の追加の詳細。 既定では、$expandで指定されていない限り、この値は設定されません。 このフィールドを使用して、実際の VM サイズ (ServiceType) や予約割引が適用される比率などの使用状況明細固有の詳細を取得します。 |
properties.benefitId |
string |
該当する特典の一意識別子。 |
properties.benefitName |
string |
該当する特典の名前。 |
properties.billingAccountId |
string |
課金アカウント識別子。 |
properties.billingAccountName |
string |
課金アカウント名。 |
properties.billingCurrency |
string |
課金通貨。 |
properties.billingPeriodEndDate |
string |
請求期間の終了日。 |
properties.billingPeriodStartDate |
string |
請求期間の開始日。 |
properties.billingProfileId |
string |
課金プロファイル識別子。 |
properties.billingProfileName |
string |
課金プロファイル名。 |
properties.chargeType |
string |
料金は、クレジット、使用量、Marketplace の購入、予約料金、または払い戻しを表します。 |
properties.consumedService |
string |
使用されたサービス名。 使用量を出力する、または購入された Azure リソース プロバイダーの名前。 この値は、マーケットプレースの使用には提供されません。 |
properties.cost |
number |
税引き前のコストの金額。 |
properties.costCenter |
string |
部署であり、コスト センターが提供されている場合は、この部門のコスト センター。 |
properties.date |
string |
使用状況レコードの日付。 |
properties.effectivePrice |
number |
使用量に対して課金される有効な価格。 |
properties.frequency |
string |
この料金が発生する頻度を示します。 1 回だけ発生する購入の場合は OneTime、毎月繰り返される料金の場合は月単位、サービスの使用量に基づく料金については UsageBased。 |
properties.invoiceSection |
string |
請求書セクション名。 |
properties.isAzureCreditEligible |
boolean |
Azure クレジットの対象です。 |
properties.meterDetails |
メーターに関する詳細。 既定では、$expandで指定されていない限り、この値は設定されません。 |
|
properties.meterId |
string |
測定 ID (GUID)。 Marketplace では使用できません。 予約インスタンスの場合、これは予約が購入されたプライマリ メーターを表します。 予約を購入した実際の VM サイズについては、「productOrderName」を参照してください。 |
properties.offerId |
string |
オファー ID。例: MS-AZR-0017P、MS-AZR-0148P。 |
properties.partNumber |
string |
使用されるサービスのパート番号。 価格シートとの結合に使用できます。 Marketplace では使用できません。 |
properties.payGPrice |
number |
リソースの小売価格。 |
properties.planName |
string |
プラン名。 |
properties.pricingModel |
メーターに対する価格設定の方法を示す識別子。 |
|
properties.product |
string |
使用されたサービスまたは購入の製品名。 Marketplace では使用できません。 |
properties.productOrderId |
string |
製品注文 ID。予約の場合、これは予約注文 ID です。 |
properties.productOrderName |
string |
製品の注文名。 予約の場合、これは購入された SKU です。 |
properties.publisherName |
string |
パブリッシャー名。 |
properties.publisherType |
string |
パブリッシャーの種類。 |
properties.quantity |
number |
使用数量。 |
properties.reservationId |
string |
予約の ARM リソース ID。 予約に関連するレコードにのみ適用されます。 |
properties.reservationName |
string |
ユーザーが予約の表示名を指定しました。 特定の日の姓が日次データに入力されます。 予約に関連するレコードにのみ適用されます。 |
properties.resourceGroup |
string |
リソース グループ名。 |
properties.resourceId |
string |
Azure Resource Manager使用状況の詳細リソースの一意識別子。 |
properties.resourceLocation |
string |
リソースの場所。 |
properties.resourceName |
string |
リソース名。 |
properties.serviceInfo1 |
string |
サービス固有のメタデータ。 |
properties.serviceInfo2 |
string |
サービス固有の省略可能なメタデータを設定する、以前から使用されているフィールド。 |
properties.subscriptionId |
string |
サブスクリプション guid。 |
properties.subscriptionName |
string |
サブスクリプションの名前。 |
properties.term |
string |
用語 (月単位)。 毎月の定期的な購入の場合は 1 か月。 1年間の予約で12ヶ月。 3年間の予約で36ヶ月。 |
properties.unitPrice |
number |
単価は、お客様に適用される価格です。 (EA またはその他の契約価格)。 |
tags |
object |
リソース タグ。 |
type |
string |
リソースの種類。 |
MeterDetailsResponse
メーターの詳細のプロパティ。
名前 | 型 | 説明 |
---|---|---|
meterCategory |
string |
メーターのカテゴリ (たとえば、"クラウド サービス"、"ネットワーク" など)。 |
meterName |
string |
指定された測定カテゴリ内のメーターの名前 |
meterSubCategory |
string |
メーターのサブカテゴリ (たとえば、"A6 クラウド サービス"、"ExpressRoute (IXP)")。 |
serviceFamily |
string |
サービス ファミリ。 |
unitOfMeasure |
string |
メーターの使用量が課金される単位 (たとえば、'Hours'、'GB' など)。 |
metrictype
さまざまな種類のコスト/使用状況レコードを選択できます。
名前 | 型 | 説明 |
---|---|---|
actualcost |
string |
実績コスト データ。 |
amortizedcost |
string |
償却コスト データ。 |
usage |
string |
使用状況データ。 |
ModernUsageDetail
最新の使用状況の詳細。
名前 | 型 | 説明 |
---|---|---|
etag |
string |
リソースの etag。 |
id |
string |
イベントの完全修飾 ARM ID。 |
kind |
string:
modern |
使用状況の詳細の種類を指定します。 |
name |
string |
イベントを一意に識別する ID。 |
properties.additionalInfo |
string |
この使用項目の追加の詳細。 このフィールドを使用して、実際の VM サイズ (ServiceType) や予約割引が適用される比率など、使用状況の行項目固有の詳細を取得します。 |
properties.benefitId |
string |
該当する特典の一意識別子。 |
properties.benefitName |
string |
該当する特典の名前。 |
properties.billingAccountId |
string |
課金アカウント識別子。 |
properties.billingAccountName |
string |
課金アカウントの名前。 |
properties.billingCurrencyCode |
string |
請求されるコストを定義する通貨。 |
properties.billingPeriodEndDate |
string |
請求期間の終了日 (請求書の場合と同様)。 |
properties.billingPeriodStartDate |
string |
請求書のように請求期間の開始日。 |
properties.billingProfileId |
string |
Microsoft 顧客契約をオンボードした顧客と、SaaS、Marketplace、RI などの権利購入を行った CSP の顧客全体で、請求書全体のコストを単一の課金通貨でグループ化する課金プロファイルの識別子。 |
properties.billingProfileName |
string |
Microsoft 顧客契約をオンボードした顧客と、SaaS、Marketplace、RI などの権利購入を行った CSP の顧客全体で、請求書全体のコストを単一の課金通貨でグループ化する課金プロファイルの名前。 |
properties.chargeType |
string |
料金がクレジット、使用量、Marketplace の購入、予約料金、または払い戻しを表します。 |
properties.consumedService |
string |
使用されたサービス名。 使用量を出力する、または購入された Azure リソース プロバイダーの名前。 この値は、マーケットプレースの使用には提供されません。 |
properties.costAllocationRuleName |
string |
コスト割り当てルールの名前。 |
properties.costCenter |
string |
部門であり、コスト センターが提供されている場合は、この部門のコスト センター。 |
properties.costInBillingCurrency |
number |
請求通貨での税引き前の ExtendedCost またはブレンド コスト。 |
properties.costInPricingCurrency |
number |
価格に関連する価格通貨での税引き前の ExtendedCost またはブレンド コスト。 |
properties.costInUSD |
number |
税引き前の推定拡張コストまたはブレンド コスト (米国ドル)。 |
properties.customerName |
string |
顧客の AAD テナントの名前。 |
properties.customerTenantId |
string |
顧客の AAD テナントの識別子。 |
properties.date |
string |
使用状況レコードの日付。 |
properties.effectivePrice |
number |
使用量に対して課金される有効な価格。 |
properties.exchangeRate |
string |
価格通貨から課金通貨への換算に使用される為替レート。 |
properties.exchangeRateDate |
string |
価格通貨から請求通貨への換算で使用される為替レートの日付。 |
properties.exchangeRatePricingToBilling |
number |
価格通貨から課金通貨への為替レート。 |
properties.frequency |
string |
この料金が発生する頻度を示します。 1 回だけ発生する購入の場合は OneTime、毎月繰り返される料金の場合は月単位、使用量はサービスの使用量に基づく料金です。 |
properties.instanceName |
string |
インスタンス名。 |
properties.invoiceId |
string |
特定のトランザクションが表示される請求書の請求書 ID。 |
properties.invoiceSectionId |
string |
請求書で課金されているプロジェクトの識別子。 パートナーによってオンボードされた Microsoft 顧客契約には適用されません。 |
properties.invoiceSectionName |
string |
請求書で課金されているプロジェクトの名前。 パートナーによってオンボードされた Microsoft 顧客契約には適用されません。 |
properties.isAzureCreditEligible |
boolean |
Azure クレジットを使用するためにコストを支払う資格があるかどうかを判断します。 |
properties.marketPrice |
number |
使用量に対して課金される市場価格。 |
properties.meterCategory |
string |
使用状況の最上位レベルのサービスを識別します。 |
properties.meterId |
string |
測定 ID (GUID)。 Marketplace では使用できません。 予約インスタンスの場合、これは予約が購入されたプライマリ メーターを表します。 予約を購入した実際の VM サイズについては、「productOrderName」を参照してください。 |
properties.meterName |
string |
消費量の測定対象となるメーターの名前を識別します。 |
properties.meterRegion |
string |
データセンターの場所に基づいて価格が設定されるサービスについて、データセンターの場所を示します。 |
properties.meterSubCategory |
string |
レートに影響を与える可能性がある Azure サービスの種類またはサブカテゴリを定義します。 |
properties.partnerEarnedCreditApplied |
string |
パートナー獲得クレジットが適用されているかどうかを示すフラグ。 |
properties.partnerEarnedCreditRate |
number |
パートナー管理者リンク アクセスに基づいたパートナー獲得クレジット (PEC) がある場合に適用される割引率。 |
properties.partnerName |
string |
パートナーの AAD テナントの名前。 |
properties.partnerTenantId |
string |
パートナーの AAD テナントの識別子。 |
properties.payGPrice |
number |
リソースの小売価格。 |
properties.paygCostInBillingCurrency |
number |
課金通貨での税引き前の PayG コストの金額。 |
properties.paygCostInUSD |
number |
税引き前の PayG コスト (米ドル通貨)。 |
properties.previousInvoiceId |
string |
返金 (負のコスト) がある、元の請求書への参照。 これは、払い戻しがある場合にのみ設定されます。 |
properties.pricingCurrencyCode |
string |
価格課金通貨。 |
properties.pricingModel |
メーターの価格を示す識別子 |
|
properties.product |
string |
請求書に記載されている従量課金または購入による料金が発生した製品の名前。 Marketplace では使用できません。 |
properties.productIdentifier |
string |
消費または購入による料金が発生した製品の識別子。 これは、パートナー センターの productId と SkuId の連結キーです。 |
properties.productOrderId |
string |
サブスクリプションが属している資産または Azure プラン名の識別子。 例: Azure プラン。 予約の場合、これは予約注文 ID です。 |
properties.productOrderName |
string |
製品の注文名。 予約の場合、これは購入された SKU です。 |
properties.provider |
string |
製品カテゴリまたは基幹業務の識別子 (例: Azure、Microsoft 365、AWS e.t.c) |
properties.publisherId |
string |
パブリッシャー ID。 |
properties.publisherName |
string |
Microsoft またはサード パーティの発行元を含むサービスの発行元の名前。 |
properties.publisherType |
string |
発行元が第一者、第三者リセラー、または第三者機関であるかどうかを識別する発行元の種類。 |
properties.quantity |
number |
購入または消費された数量を測定します。課金期間中に使用されたメーターの量。 |
properties.resellerMpnId |
string |
サブスクリプションに関連付けられているリセラーの MPNId。 |
properties.resellerName |
string |
リセラー名。 |
properties.reservationId |
string |
予約の ARM リソース ID。 予約に関連するレコードにのみ適用されます。 |
properties.reservationName |
string |
ユーザーが指定した予約の表示名。 特定の日の姓が日単位のデータに入力されます。 予約に関連するレコードにのみ適用されます。 |
properties.resourceGroup |
string |
リソースの一貫性のあるライフサイクル管理に使用される Azure リソース グループの名前。 |
properties.resourceLocation |
string |
リソースの場所の名前。 |
properties.resourceLocationNormalized |
string |
リソースの場所が正規化されました。 |
properties.serviceFamily |
string |
購入または課金された製品のサービス ファミリを一覧表示します (例: ストレージ。コンピューティング)。 |
properties.serviceInfo1 |
string |
サービス固有のメタデータ。 |
properties.serviceInfo2 |
string |
サービス固有の省略可能なメタデータを設定する、以前から使用されているフィールド。 |
properties.servicePeriodEndDate |
string |
料金についてサービス使用量の評価が行われた期間の終了日。 Azure サービスの料金は、評価期間に基づいて決定されます。 |
properties.servicePeriodStartDate |
string |
料金についてサービス使用量の評価が行われた評価期間の開始日。 Azure サービスの料金は、評価期間に対して決定されます。 |
properties.subscriptionGuid |
string |
Azure サブスクリプションの Microsoft によって生成された一意の識別子。 |
properties.subscriptionName |
string |
Azure サブスクリプションの名前。 |
properties.term |
string |
用語 (月単位)。 プランの有効期間を表示します。 次に例を示します。 予約インスタンスの場合、予約インスタンスの年間期間が 12 か月と表示されます。 1 回限りの購入または定期的な購入の場合、用語には 1 か月が表示されます。これは Azure の使用には適用されません。 |
properties.unitOfMeasure |
string |
サービスが課金される単位を特定します。 たとえば、GB、時間数、10,000 単位などです。 |
properties.unitPrice |
number |
単価は、お客様に適用される価格です。 (EA またはその他の契約価格)。 |
tags |
object |
リソース タグ。 |
type |
string |
リソースの種類。 |
pricingModelType
メーターに対する価格設定の方法を示す識別子。
名前 | 型 | 説明 |
---|---|---|
On Demand |
string |
|
Reservation |
string |
|
Spot |
string |
UsageDetailsListResult
使用状況の詳細を一覧表示した結果。 利用可能な使用状況の詳細の一覧が、請求期間別の逆時系列順に表示されます。
名前 | 型 | 説明 |
---|---|---|
nextLink |
string |
結果の次のページへのリンク (URL)。 |
value | UsageDetail[]: |
使用状況の詳細の一覧。 |