共用方式為


Generate Benefit Utilization Summaries Report - Generate By Billing Account

觸發產生所提供計費帳戶的權益使用率摘要報告。 此 API 僅支援註冊帳戶。

POST https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport?api-version=2023-11-01

URI 參數

名稱 位於 必要 類型 Description
billingAccountId
path True

string

計費帳戶識別碼

api-version
query True

string

用於此作業的 API 版本。

要求本文

名稱 必要 類型 Description
endDate True

string

摘要數據的結束日期,將在報表中提供。

grain True

grain

摘要數據在報表中提供的粒紋。 接受的值為 『Daily』 或 『Monthly』。

startDate True

string

摘要數據的開始日期,將在報表中提供。

benefitId

string

權益標識元權益使用率摘要報告是針對的。 權益標識碼範圍的必要專案。 不支援權益訂單或任何計費範圍。

benefitOrderId

string

權益訂單標識符權益使用率摘要報告是針對的。 權益訂單和權益標識碼範圍的必要專案。 不支援任何計費範圍。

billingAccountId

string

權益使用率摘要報告的計費帳戶。 計費帳戶和帳單配置檔範圍的必要專案。 不支援任何權益範圍。

billingProfileId

string

計費配置檔標識符權益使用率摘要報告是針對的。 計費配置檔範圍的必要專案。 不支援計費帳戶或任何權益範圍。

kind

benefitKind

所要求的權益數據類型。 計費帳戶和帳單配置檔範圍的必要專案。 隱含且不會在權益範圍傳遞。 支援的值為 Reservation 和 SavingsPlan

回應

名稱 類型 Description
200 OK

BenefitUtilizationSummariesOperationStatus

產生權益使用率摘要報告的狀態。 這可能是進行中、失敗或已完成。

202 Accepted

已接受。 將會處理要求。 使用位置標頭來檢查狀態。

Headers

  • Location: string
  • Retry-After: integer
Other Status Codes

ErrorResponse

描述作業失敗原因的錯誤回應。

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名稱 Description
user_impersonation 模擬您的用戶帳戶

範例

GenerateUtilizationSummariesReportByBillingAccount

Sample Request

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

{
  "kind": "Reservation",
  "endDate": "2022-08-31T00:00:00Z",
  "startDate": "2022-06-01T00:00:00Z",
  "grain": "Daily"
}

Sample Response

Location: https://management.azure.com/providers/Microsoft.Billing/billingAccounts/8099099/providers/Microsoft.CostManagement/benefitUtilizationSummariesOperationResults/cf9f95c9-af6b-41dd-a622-e6f4fc60c3ee?api-version=2023-11-01
Retry-After: 60
{
  "input": {
    "grain": "Daily",
    "billingAccountId": "8099099",
    "kind": "Reservation",
    "endDate": "2022-08-31T00:00:00Z",
    "startDate": "2022-06-01T00:00:00Z"
  },
  "status": "Complete",
  "properties": {
    "reportUrl": "https://storage.blob.core.windows.net/details/20220611/00000000-0000-0000-0000-000000000000?sv=2016-05-31&sr=b&sig=jep8HT2aphfUkyERRZa5LRfd9RPzjXbzB%2F9TNiQ",
    "secondaryReportUrl": "https://storage-secondary.blob.core.windows.net/details/20220611/00000000-0000-0000-0000-000000000000?sv=2016-05-31&sr=b&sig=jep8HT2aphfUkyERRZa5LRfd9RPzjXbzB%2F9TNiQ",
    "validUntil": "2022-06-12T02:56:55.5021869Z"
  }
}

定義

名稱 Description
AsyncOperationStatusProperties

物件,表示產生異步報表的日期之前,報表 URL 和有效。

benefitKind

Reservation 或 SavingsPlan。

BenefitUtilizationSummariesOperationStatus

權益使用率摘要報告的狀態。 提供異步權益使用率摘要要求輸入、狀態和報告 sas URL。

BenefitUtilizationSummariesRequest

異步權益使用率摘要要求的屬性。

BenefitUtilizationSummaryReportSchema

reportUrl 和 secondaryReportUrl Blob 連結中的 CSV 檔案將包含下列權益使用率數據行。 UtilizedPercentage 將會是 0,用於節省方案報告和非數據磚保留。 數據磚保留的使用率百分比會是 0。

ErrorDetails

錯誤的詳細數據。

ErrorResponse

錯誤回應表示服務無法處理傳入要求。 錯誤訊息中會提供原因。

某些錯誤回應:

  • 429 TooManyRequests - 要求已節流。 等候 「x-ms-ratelimit-microsoft.consumption-retry-after」 標頭中指定的時間後重試。

  • 503 ServiceUnavailable - 服務暫時無法使用。 請在等候「Retry-After」標頭中指定的時間之後重試。

grain

使用量的粒紋。 支援的值:'Hourly'

OperationStatusType

建立權益使用率摘要報告的狀態。

AsyncOperationStatusProperties

物件,表示產生異步報表的日期之前,報表 URL 和有效。

名稱 類型 Description
reportUrl

BenefitUtilizationSummaryReportSchema

異步權益使用率摘要報告的SasURL。 如果報表處於 [執行中] 或 [失敗] 狀態,將會是空的。

secondaryReportUrl

BenefitUtilizationSummaryReportSchema

在發生主要中斷時,次要記憶體中異步權益使用率摘要的Sas URL 報告。 如果報表處於 [執行中] 或 [失敗] 狀態,將會是空的。

validUntil

string

reportUrl 中提供的 sas URL 到期日期。

benefitKind

Reservation 或 SavingsPlan。

名稱 類型 Description
IncludedQuantity

string

權益為 IncludedQuantity。

Reservation

string

權益為保留。

SavingsPlan

string

權益為 SavingsPlan。

BenefitUtilizationSummariesOperationStatus

權益使用率摘要報告的狀態。 提供異步權益使用率摘要要求輸入、狀態和報告 sas URL。

名稱 類型 Description
input

BenefitUtilizationSummariesRequest

提供用來建立權益使用率摘要報表的輸入。

properties

AsyncOperationStatusProperties

包含異步權益使用率摘要報告的 sas URL,以及 URL 的有效日期。 如果報表處於執行中或失敗狀態,這些值將會是空的

status

OperationStatusType

建立權益使用率摘要報告的狀態。

BenefitUtilizationSummariesRequest

異步權益使用率摘要要求的屬性。

名稱 類型 Description
benefitId

string

權益標識元權益使用率摘要報告是針對的。 權益標識碼範圍的必要專案。 不支援權益訂單或任何計費範圍。

benefitOrderId

string

權益訂單標識符權益使用率摘要報告是針對的。 權益訂單和權益標識碼範圍的必要專案。 不支援任何計費範圍。

billingAccountId

string

權益使用率摘要報告的計費帳戶。 計費帳戶和帳單配置檔範圍的必要專案。 不支援任何權益範圍。

billingProfileId

string

計費配置檔標識符權益使用率摘要報告是針對的。 計費配置檔範圍的必要專案。 不支援計費帳戶或任何權益範圍。

endDate

string

摘要數據的結束日期,將在報表中提供。

grain

grain

摘要數據在報表中提供的粒紋。 接受的值為 『Daily』 或 『Monthly』。

kind

benefitKind

所要求的權益數據類型。 計費帳戶和帳單配置檔範圍的必要專案。 隱含且不會在權益範圍傳遞。 支援的值為 Reservation 和 SavingsPlan

startDate

string

摘要數據的開始日期,將在報表中提供。

BenefitUtilizationSummaryReportSchema

reportUrl 和 secondaryReportUrl Blob 連結中的 CSV 檔案將包含下列權益使用率數據行。 UtilizedPercentage 將會是 0,用於節省方案報告和非數據磚保留。 數據磚保留的使用率百分比會是 0。

名稱 類型 Description
AvgUtilizationPercentage

string

BenefitId

string

BenefitOrderId

string

BenefitType

string

Kind

string

MaxUtilizationPercentage

string

MinUtilizationPercentage

string

UsageDate

string

UtilizedPercentage

string

ErrorDetails

錯誤的詳細數據。

名稱 類型 Description
code

string

錯誤碼。

message

string

錯誤訊息,指出作業失敗的原因。

ErrorResponse

錯誤回應表示服務無法處理傳入要求。 錯誤訊息中會提供原因。

某些錯誤回應:

  • 429 TooManyRequests - 要求已節流。 等候 「x-ms-ratelimit-microsoft.consumption-retry-after」 標頭中指定的時間後重試。

  • 503 ServiceUnavailable - 服務暫時無法使用。 請在等候「Retry-After」標頭中指定的時間之後重試。

名稱 類型 Description
error

ErrorDetails

錯誤的詳細數據。

grain

使用量的粒紋。 支援的值:'Hourly'

名稱 類型 Description
Daily

string

每小時粒紋會對應到每天的值。

Hourly

string

每小時粒紋對應至每小時的值。

Monthly

string

每小時粒紋對應至每個月的值。

OperationStatusType

建立權益使用率摘要報告的狀態。

名稱 類型 Description
Complete

string

Failed

string

Running

string