Usage Details - List
定義されたスコープの使用状況の詳細を一覧表示します。 使用状況の詳細は、この API を介して 2014 年 5 月 1 日以降にのみ使用できます。
注:Microsoft は、将来のある時点で従量課金の使用状況の詳細 API を廃止する予定です。 この API に新しい依存関係を設定することはお勧めしません。 代わりに Cost Details API を使用してください。 提供終了日が決まったら、お客様に通知します。詳細については、「コスト詳細レポートの生成 - 操作 の作成」を参照してください。
GET https://management.azure.com/{scope}/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
GET https://management.azure.com/{scope}/providers/Microsoft.Consumption/usageDetails?$expand={$expand}&$filter={$filter}&$skiptoken={$skiptoken}&$top={$top}&api-version=2024-08-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 and '/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}' です。 '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}' for billingProfile scope, '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/billingProfiles/{billingProfileId}/invoiceSections/{invoiceSectionId}' for invoiceSection scope, and '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/customers/{customerId}' specific for partners. |
api-version
|
query | True |
string |
クライアント要求で使用する API のバージョン。 現在のバージョンは 2023-03-01 です。 |
$expand
|
query |
string |
使用の詳細の一覧内でプロパティ/additionalInfo または properties/meterDetails を展開するために使用できます。 既定では、これらのフィールドは使用状況の詳細を一覧表示するときに含まれません。 |
|
$filter
|
query |
string |
usageDetails を properties/resourceGroup、properties/resourceName、properties/resourceId、properties/chargeType、properties/reservationId、properties/publisherType、タグでフィルター処理するために使用できます。 フィルターでは、'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) minimum: 1maximum: 1000 |
結果の数を最新の N usageDetails に制限するために使用できます。 |
|
metric
|
query |
さまざまな種類のコスト/使用状況レコードを選択できます。 |
応答
名前 | 型 | 説明 |
---|---|---|
200 OK |
わかりました。 要求は成功しました。 |
|
204 No Content |
コンテンツなし。 要求は成功しましたが、結果は返されていません。 |
|
Other Status Codes |
操作が失敗した理由を説明するエラー応答。 |
セキュリティ
azure_auth
Azure Active Directory OAuth2 フロー。
型:
oauth2
フロー:
implicit
Authorization URL (承認 URL):
https://login.microsoftonline.com/common/oauth2/authorize
スコープ
名前 | 説明 |
---|---|
user_impersonation | ユーザー アカウントを偽装する |
例
BillingAccountUsageDetailsList-Legacy
要求のサンプル
GET https://management.azure.com/providers/Microsoft.Billing/BillingAccounts/1234/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
応答のサンプル
{
"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
要求のサンプル
GET https://management.azure.com/providers/Microsoft.Billing/BillingAccounts/1234:56789/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
応答のサンプル
{
"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
要求のサンプル
GET https://management.azure.com/providers/Microsoft.Billing/BillingAccounts/1234/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
応答のサンプル
{
"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
要求のサンプル
GET https://management.azure.com/providers/Microsoft.Billing/BillingAccounts/1234:56789/billingProfiles/2468/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
応答のサンプル
{
"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
要求のサンプル
GET https://management.azure.com/providers/Microsoft.Billing/BillingAccounts/1234:56789/customers/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
応答のサンプル
{
"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
要求のサンプル
GET https://management.azure.com/providers/Microsoft.Billing/Departments/1234/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
応答のサンプル
{
"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
要求のサンプル
GET https://management.azure.com/providers/Microsoft.Billing/Departments/1234/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
応答のサンプル
{
"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
要求のサンプル
GET https://management.azure.com/providers/Microsoft.Billing/EnrollmentAccounts/1234/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
応答のサンプル
{
"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
要求のサンプル
GET https://management.azure.com/providers/Microsoft.Billing/EnrollmentAccounts/1234/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
応答のサンプル
{
"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
要求のサンプル
GET https://management.azure.com/providers/Microsoft.Billing/BillingAccounts/1234:56789/invoiceSections/98765/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
応答のサンプル
{
"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
要求のサンプル
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
応答のサンプル
{
"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
要求のサンプル
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
応答のサンプル
{
"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
要求のサンプル
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=2024-08-01
応答のサンプル
{
"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
要求のサンプル
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
応答のサンプル
{
"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
要求のサンプル
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01&metric=actualcost
応答のサンプル
{
"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
要求のサンプル
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01&metric=amortizedcost
応答のサンプル
{
"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
要求のサンプル
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01&metric=usage
応答のサンプル
{
"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
要求のサンプル
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?$filter=tags eq 'dev:tools'&api-version=2024-08-01
応答のサンプル
{
"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
要求のサンプル
GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/usageDetails?api-version=2024-08-01
応答のサンプル
{
"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" ヘッダーで指定された時刻を待機した後に再試行します。
504 ゲートウェイ タイムアウト - 要求の処理中にサービスがタイムアウトしました。 可能であれば、要求の日付範囲を減らします。
名前 | 型 | 説明 |
---|---|---|
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 (date-time) |
請求期間の終了日。 |
properties.billingPeriodStartDate |
string (date-time) |
請求期間の開始日。 |
properties.billingProfileId |
string |
課金プロファイル識別子。 |
properties.billingProfileName |
string |
課金プロファイル名。 |
properties.chargeType |
string |
料金がクレジット、使用量、Marketplace の購入、予約料金、または払い戻しを表します。 |
properties.consumedService |
string |
使用されるサービス名。 使用状況を出力する、または購入された Azure リソース プロバイダーの名前。 この値は、マーケットプレースでの使用には指定されません。 |
properties.cost |
number (decimal) |
税引き前のコストの金額。 |
properties.costCenter |
string |
部門であり、コスト センターが提供されている場合は、この部門のコスト センター。 |
properties.date |
string (date-time) |
使用状況レコードの日付。 |
properties.effectivePrice |
number (decimal) |
使用に対して課金される有効な価格。 |
properties.frequency |
string |
この料金が発生する頻度を示します。 1 回だけ発生する購入の場合は OneTime、毎月繰り返される料金の場合は月単位、使用量はサービスの使用量に基づいて課金されます。 |
properties.invoiceSection |
string |
請求書セクション名。 |
properties.isAzureCreditEligible |
boolean |
Azure クレジットの対象です。 |
properties.meterDetails |
メーターに関する詳細。 既定では、$expandで指定されていない限り、これは設定されません。 |
|
properties.meterId |
string (uuid) |
測定 ID (GUID)。 Marketplace では使用できません。 予約インスタンスの場合、これは予約が購入されたプライマリ メーターを表します。 予約を購入する実際の VM サイズについては、productOrderName を参照してください。 |
properties.offerId |
string |
オファー ID。例: MS-AZR-0017P、MS-AZR-0148P。 |
properties.partNumber |
string |
使用されるサービスの部品番号。 価格シートとの結合に使用できます。 Marketplace では使用できません。 |
properties.payGPrice |
number (decimal) |
リソースの小売価格。 |
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 (decimal) |
使用量。 |
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 (decimal) |
単価は、お客様に適用される価格です。 (EA またはその他の契約価格)。 |
tags |
object |
リソース タグ。 |
type |
string |
リソースの種類。 |
MeterDetailsResponse
メーターの詳細のプロパティ。
名前 | 型 | 説明 |
---|---|---|
meterCategory |
string |
メーターのカテゴリ ("クラウド サービス"、"ネットワーク" など)。 |
meterName |
string |
指定されたメーター カテゴリ内のメーターの名前 |
meterSubCategory |
string |
メーターのサブカテゴリ (例: "A6 クラウド サービス"、"ExpressRoute (IXP)")。 |
serviceFamily |
string |
サービス ファミリ。 |
unitOfMeasure |
string |
メーター使用量が課金される単位 (たとえば、"Hours"、"GB")。 |
metrictype
さまざまな種類のコスト/使用状況レコードを選択できます。
値 | 説明 |
---|---|
actualcost |
実績コスト データ。 |
amortizedcost |
償却コスト データ。 |
usage |
使用状況データ。 |
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 (date-time) |
請求期間の終了日 (請求書など)。 |
properties.billingPeriodStartDate |
string (date-time) |
請求期間の開始日 (請求書と同様)。 |
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 (decimal) |
請求通貨での税引き前の ExtendedCost またはブレンド コスト。 |
properties.costInPricingCurrency |
number (decimal) |
価格に関連する価格通貨での税引き前の ExtendedCost またはブレンド コスト。 |
properties.costInUSD |
number (decimal) |
推定拡張コストまたは税引き前ブレンド コスト (USD)。 |
properties.customerName |
string |
顧客の AAD テナントの名前。 |
properties.customerTenantId |
string |
顧客の AAD テナントの識別子。 |
properties.date |
string (date-time) |
使用状況レコードの日付。 |
properties.effectivePrice |
number (decimal) |
使用に対して課金される有効な価格。 |
properties.exchangeRate |
string |
価格通貨から請求通貨への換算に使用される為替レート。 |
properties.exchangeRateDate |
string (date-time) |
価格通貨から請求通貨への換算で使用される為替レートの日付。 |
properties.exchangeRatePricingToBilling |
number (decimal) |
価格通貨から請求通貨への為替レート。 |
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 (decimal) |
使用量に対して課金される市場価格。 |
properties.meterCategory |
string |
使用状況の最上位レベルのサービスを識別します。 |
properties.meterId |
string (uuid) |
測定 ID (GUID)。 Marketplace では使用できません。 予約インスタンスの場合、これは予約が購入されたプライマリ メーターを表します。 予約を購入する実際の VM サイズについては、productOrderName を参照してください。 |
properties.meterName |
string |
消費量の測定対象となるメーターの名前を識別します。 |
properties.meterRegion |
string |
データセンターの場所に基づいて価格が設定されるサービスについて、データセンターの場所を示します。 |
properties.meterSubCategory |
string |
レートに影響する可能性がある Azure サービスの種類またはサブカテゴリを定義します。 |
properties.partnerEarnedCreditApplied |
string |
パートナー獲得クレジットが適用されているかどうかを示すフラグ。 |
properties.partnerEarnedCreditRate |
number (decimal) |
パートナー管理者のリンク アクセスに基づいてパートナー獲得クレジット (PEC) がある場合に適用される割引率。 |
properties.partnerName |
string |
パートナーの AAD テナントの名前。 |
properties.partnerTenantId |
string |
パートナーの AAD テナントの識別子。 |
properties.payGPrice |
number (decimal) |
リソースの小売価格。 |
properties.paygCostInBillingCurrency |
number (decimal) |
課金通貨での税引き前の PayG コストの金額。 |
properties.paygCostInUSD |
number (decimal) |
税引き前の 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 (decimal) |
購入または消費された数量を測定します。請求期間中に使用されたメーターの量。 |
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 |
購入または課金された製品のサービス ファミリを一覧表示します (例: Storage;コンピューティング)。 |
properties.serviceInfo1 |
string |
サービス固有のメタデータ。 |
properties.serviceInfo2 |
string |
サービス固有の省略可能なメタデータを設定する、以前から使用されているフィールド。 |
properties.servicePeriodEndDate |
string (date-time) |
料金についてサービス使用量の評価が行われた期間の終了日。 Azure サービスの料金は、評価期間に基づいて決定されます。 |
properties.servicePeriodStartDate |
string (date-time) |
料金についてサービス使用量の評価が行われた評価期間の開始日。 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 (decimal) |
単価は、お客様に適用される価格です。 (EA またはその他の契約価格)。 |
tags |
object |
リソース タグ。 |
type |
string |
リソースの種類。 |
pricingModelType
メーターに対する価格設定の方法を示す識別子。
値 | 説明 |
---|---|
On Demand | |
Reservation | |
Spot |
UsageDetailsListResult
使用状況の詳細を一覧表示した結果。 利用可能な使用状況の詳細の一覧が、請求期間別の時系列順に逆順に表示されます。
名前 | 型 | 説明 |
---|---|---|
nextLink |
string |
結果の次のページへのリンク (URL)。 |
value | UsageDetail[]: |
使用状況の詳細の一覧。 |