Generate Detailed Cost Report - Create Operation

指定された日付範囲、請求期間 (エンタープライズ顧客のみ) または請求書 ID の詳細なコスト レポートを、特定のスコープで非同期的に生成します。 呼び出しは、作成された操作へのリンクを提供するヘッダー Azure-Consumption-AsyncOperation を含む 202 を返します。 操作の呼び出しによって状態が提供され、操作が完了した場合は、生成された詳細なコスト レポートが格納されている BLOB ファイルが提供されます。

POST https://management.azure.com/{scope}/providers/Microsoft.CostManagement/generateDetailedCostReport?api-version=2023-11-01

URI パラメーター

名前 / 必須 説明
scope
path True

string

サブスクリプション、リソース グループ、課金アカウント、またはその他の課金スコープの ARM リソース ID。 詳細については、「https://aka.ms/costmgmt/scopes」を参照してください。

api-version
query True

string

この操作に使用する API バージョン。

要求本文

名前 説明
billingPeriod

string

YearMonth (例: 202008) 形式の請求期間。 従来のエンタープライズのお客様のみがこれを使用できます。 timePeriod パラメーターまたは invoiceId パラメーターまたは billingPeriod パラメーターのいずれか 1 つだけを指定できます。 現在の月のコストが指定されていない場合。

customerId

string

Microsoft 顧客契約スコープの顧客 ID (これには請求書 ID も必要です)。

invoiceId

string

従量課金制とMicrosoft 顧客契約スコープの請求書 ID。 timePeriod パラメーターまたは invoiceId パラメーターまたは billingPeriod パラメーターのいずれか 1 つだけを指定できます。 現在の月のコストが指定されていない場合。

metric

GenerateDetailedCostReportMetricType

詳細レポートの種類。 既定では ActualCost が提供されます

timePeriod

GenerateDetailedCostReportTimePeriod

コスト詳細レポートのデータをプルするための期間があります。 timePeriod パラメーターまたは invoiceId パラメーターまたは billingPeriod パラメーターのいずれか 1 つだけを指定できます。 現在の月のコストが指定されていない場合。

応答

名前 説明
200 OK

GenerateDetailedCostReportOperationResult

要求処理が完了しました。

202 Accepted

受理されました。 要求が処理されます。 Location ヘッダーを使用して、状態をチェックします。

ヘッダー

  • Location: string
  • Azure-Consumption-AsyncOperation: string
  • Azure-AsyncOperation: string
  • Retry-After: integer
Other Status Codes

GenerateDetailedCostReportErrorResponse

操作に失敗した理由を説明するエラー応答。

セキュリティ

azure_auth

Azure Active Directory OAuth2 フロー。

型: oauth2
フロー: implicit
Authorization URL (承認 URL): https://login.microsoftonline.com/common/oauth2/authorize

スコープ

名前 説明
user_impersonation ユーザー アカウントの借用

GenerateDetailedCostReportByBillingAccountLegacyAndBillingPeriod
GenerateDetailedCostReportByBillingProfileAndInvoiceId
GenerateDetailedCostReportByBillingProfileAndInvoiceIdAndCustomerId
GenerateDetailedCostReportByCustomerAndTimePeriod
GenerateDetailedCostReportBySubscriptionAndTimePeriod

GenerateDetailedCostReportByBillingAccountLegacyAndBillingPeriod

要求のサンプル

POST https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345/providers/Microsoft.CostManagement/generateDetailedCostReport?api-version=2023-11-01

{
  "metric": "ActualCost",
  "billingPeriod": "202008"
}

応答のサンプル

{
  "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/operationResults/00000000-0000-0000-0000-000000000000",
  "name": "00000000-0000-0000-0000-000000000000",
  "type": "Microsoft.Consumption/operationResult",
  "properties": {
    "downloadUrl": "https://ccmreportstorageeastus.blob.core.windows.net/armreports/20201207/00000000-0000-0000-0000-000000000000?sv=2020-05-31&sr=b&sig=abcd",
    "validTill": "2020-12-08T05:55:59.4394737Z"
  }
}
Location: https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345/providers/Microsoft.CostManagement/operationResults/ad0d632f-1186-41fe-89f9-ae29e198d223?api-version=2021-10-01
Azure-Consumption-AsyncOperation: https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345/providers/Microsoft.CostManagement/operationStatus/ad0d632f-1186-41fe-89f9-ae29e198d223?api-version=2021-10-01
Retry-After: 60

GenerateDetailedCostReportByBillingProfileAndInvoiceId

要求のサンプル

POST https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/generateDetailedCostReport?api-version=2023-11-01

{
  "metric": "ActualCost",
  "invoiceId": "M1234567"
}

応答のサンプル

{
  "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/operationResults/00000000-0000-0000-0000-000000000000",
  "name": "00000000-0000-0000-0000-000000000000",
  "type": "Microsoft.Consumption/operationResult",
  "properties": {
    "downloadUrl": "https://ccmreportstorageeastus.blob.core.windows.net/armreports/20201207/00000000-0000-0000-0000-000000000000?sv=2020-05-31&sr=b&sig=abcd",
    "validTill": "2020-12-08T05:55:59.4394737Z"
  }
}
Location: https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/operationResults/ad0d632f-1186-41fe-89f9-ae29e198d223?api-version=2021-10-01
Azure-Consumption-AsyncOperation: https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/operationStatus/ad0d632f-1186-41fe-89f9-ae29e198d223?api-version=2021-10-01
Retry-After: 60

GenerateDetailedCostReportByBillingProfileAndInvoiceIdAndCustomerId

要求のサンプル

POST https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/generateDetailedCostReport?api-version=2023-11-01

{
  "metric": "ActualCost",
  "invoiceId": "M1234567",
  "customerId": "456789"
}

応答のサンプル

{
  "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/operationResults/00000000-0000-0000-0000-000000000000",
  "name": "00000000-0000-0000-0000-000000000000",
  "type": "Microsoft.Consumption/operationResult",
  "properties": {
    "downloadUrl": "https://ccmreportstorageeastus.blob.core.windows.net/armreports/20201207/00000000-0000-0000-0000-000000000000?sv=2020-05-31&sr=b&sig=abcd",
    "validTill": "2020-12-08T05:55:59.4394737Z"
  }
}
Location: https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/operationResults/ad0d632f-1186-41fe-89f9-ae29e198d223?api-version=2021-10-01
Azure-Consumption-AsyncOperation: https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/billingProfiles/13579/providers/Microsoft.CostManagement/operationStatus/ad0d632f-1186-41fe-89f9-ae29e198d223?api-version=2021-10-01
Retry-After: 60

GenerateDetailedCostReportByCustomerAndTimePeriod

要求のサンプル

POST https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/customers/13579/providers/Microsoft.CostManagement/generateDetailedCostReport?api-version=2023-11-01

{
  "metric": "ActualCost",
  "timePeriod": {
    "start": "2020-03-01",
    "end": "2020-03-15"
  }
}

応答のサンプル

{
  "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/operationResults/00000000-0000-0000-0000-000000000000",
  "name": "00000000-0000-0000-0000-000000000000",
  "type": "Microsoft.Consumption/operationResult",
  "properties": {
    "downloadUrl": "https://ccmreportstorageeastus.blob.core.windows.net/armreports/20201207/00000000-0000-0000-0000-000000000000?sv=2020-05-31&sr=b&sig=abcd",
    "validTill": "2020-12-08T05:55:59.4394737Z"
  }
}
Location: https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/customers/13579/providers/Microsoft.CostManagement/operationResults/ad0d632f-1186-41fe-89f9-ae29e198d223?api-version=2021-10-01
Azure-Consumption-AsyncOperation: https://management.azure.com/providers/Microsoft.Billing/billingAccounts/12345:6789/customers/13579/providers/Microsoft.CostManagement/operationStatus/ad0d632f-1186-41fe-89f9-ae29e198d223?api-version=2021-10-01
Retry-After: 60

GenerateDetailedCostReportBySubscriptionAndTimePeriod

要求のサンプル

POST https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/generateDetailedCostReport?api-version=2023-11-01

{
  "metric": "ActualCost",
  "timePeriod": {
    "start": "2020-03-01",
    "end": "2020-03-15"
  }
}

応答のサンプル

{
  "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/operationResults/00000000-0000-0000-0000-000000000000",
  "name": "00000000-0000-0000-0000-000000000000",
  "type": "Microsoft.Consumption/operationResult",
  "properties": {
    "downloadUrl": "https://ccmreportstorageeastus.blob.core.windows.net/armreports/20201207/00000000-0000-0000-0000-000000000000?sv=2020-05-31&sr=b&sig=abcd",
    "validTill": "2020-12-08T05:55:59.4394737Z"
  }
}
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/operationResults/00000000-0000-0000-0000-000000000000?api-version=2021-10-01
Azure-Consumption-AsyncOperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/operationStatus/00000000-0000-0000-0000-000000000000?api-version=2021-10-01
Retry-After: 60

定義

名前 説明
ErrorDetails

エラーの詳細。

GenerateDetailedCostReportDefinition

コスト詳細レポートの定義。

GenerateDetailedCostReportErrorResponse

エラー応答は、サービスが受信要求を処理できないことを示します。 理由は、エラー メッセージに表示されます。

いくつかのエラー応答:

  • 413 要求エンティティが大きすぎる - 要求が調整されました。 要求を満たすために必要なデータ量が、許可されている最大サイズの 2 Gb を超えています。 代わりに、エクスポート機能を利用してください。

  • 429 TooManyRequests - 要求が調整されました。 "x-ms-ratelimit-microsoft.consumption-retry-after" ヘッダーで指定された時間を待ってから再試行します。

  • 503 ServiceUnavailable - サービスは一時的に使用できません。 "Retry-After" ヘッダーで指定された時刻まで待ってから、再試行してください。

GenerateDetailedCostReportMetricType

詳細レポートの種類。 既定では ActualCost が提供されます

GenerateDetailedCostReportOperationResult

コスト詳細レポートの実行時間の長い操作の結果。

GenerateDetailedCostReportTimePeriod

コスト詳細レポートのデータをプルするための開始日と終了日。

ErrorDetails

エラーの詳細。

名前 説明
code

string

エラー コード。

message

string

操作が失敗した理由を示すエラー メッセージ。

GenerateDetailedCostReportDefinition

コスト詳細レポートの定義。

名前 説明
billingPeriod

string

YearMonth (例: 202008) 形式の請求期間。 従来のエンタープライズのお客様のみがこれを使用できます。 timePeriod パラメーターまたは invoiceId パラメーターまたは billingPeriod パラメーターのいずれか 1 つだけを指定できます。 現在の月のコストが指定されていない場合。

customerId

string

Microsoft 顧客契約スコープの顧客 ID (これには請求書 ID も必要です)。

invoiceId

string

従量課金制とMicrosoft 顧客契約スコープの請求書 ID。 timePeriod パラメーターまたは invoiceId パラメーターまたは billingPeriod パラメーターのいずれか 1 つだけを指定できます。 現在の月のコストが指定されていない場合。

metric

GenerateDetailedCostReportMetricType

詳細レポートの種類。 既定では ActualCost が提供されます

timePeriod

GenerateDetailedCostReportTimePeriod

コスト詳細レポートのデータをプルするための期間があります。 timePeriod パラメーターまたは invoiceId パラメーターまたは billingPeriod パラメーターのいずれか 1 つだけを指定できます。 現在の月のコストが指定されていない場合。

GenerateDetailedCostReportErrorResponse

エラー応答は、サービスが受信要求を処理できないことを示します。 理由は、エラー メッセージに表示されます。

いくつかのエラー応答:

  • 413 要求エンティティが大きすぎる - 要求が調整されました。 要求を満たすために必要なデータ量が、許可されている最大サイズの 2 Gb を超えています。 代わりに、エクスポート機能を利用してください。

  • 429 TooManyRequests - 要求が調整されました。 "x-ms-ratelimit-microsoft.consumption-retry-after" ヘッダーで指定された時間を待ってから再試行します。

  • 503 ServiceUnavailable - サービスは一時的に使用できません。 "Retry-After" ヘッダーで指定された時刻まで待ってから、再試行してください。

名前 説明
error

ErrorDetails

エラーの詳細。

GenerateDetailedCostReportMetricType

詳細レポートの種類。 既定では ActualCost が提供されます

名前 説明
ActualCost

string

AmortizedCost

string

GenerateDetailedCostReportOperationResult

コスト詳細レポートの実行時間の長い操作の結果。

名前 説明
id

string

実行時間の長い操作の ARM リソース ID。

name

string

実行時間の長い操作の名前。

properties.downloadUrl

string

生成されたレポートをダウンロードする URL。

properties.expiryTime

string

レポート URL が無効になるか、UTC で期限切れになる時刻 (例: 2020-12-08T05:55:59.4394737Z)。

properties.validTill

string

レポート URL が無効になるか、UTC で期限切れになる時刻 (例: 2020-12-08T05:55:59.4394737Z)。

type

string

実行時間の長い操作の種類。

GenerateDetailedCostReportTimePeriod

コスト詳細レポートのデータをプルするための開始日と終了日。

名前 説明
end

string

データをプルする終了日。形式 2020-03-15 の例

start

string

データをプルする開始日。 形式 2020-03-15 の例