共用方式為


Generate Benefit Utilization Summaries Report - Generate By Reservation Id

觸發產生所提供保留之權益使用率摘要報告。

POST https://management.azure.com/providers/Microsoft.Capacity/reservationorders/{reservationOrderId}/reservations/{reservationId}/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport?api-version=2023-11-01

URI 參數

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

string

保留識別碼

reservationOrderId
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 模擬您的用戶帳戶

範例

GenerateUtilizationSummariesReportByReservation

Sample Request

POST https://management.azure.com/providers/Microsoft.Capacity/reservationorders/00000000-0000-0000-0000-000000000000/reservations/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/generateBenefitUtilizationSummariesReport?api-version=2023-11-01

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

Sample Response

Location: https://management.azure.com/providers/Microsoft.Capacity/reservationorders/00000000-0000-0000-0000-000000000000/reservations/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/benefitUtilizationSummariesOperationResults/cf9f95c9-af6b-41dd-a622-e6f4fc60c3ee?api-version=2023-11-01
Retry-After: 60
{
  "input": {
    "grain": "Daily",
    "benefitOrderId": "00000000-0000-0000-0000-000000000000",
    "benefitId": "00000000-0000-0000-0000-000000000000",
    "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