本文提供 Cloud Billing 承諾使用折扣 (CUD) 中繼資料的結構定義參考資訊,這些資料每天會匯出至 BigQuery 中的每個資料表。這項匯出作業會將依支出計算的 CUD 承諾中繼資料每日快照匯出至 BigQuery 資料表,您可以將這些資料與其他帳單資料匯出項目合併,以便更妥善地管理及回報 CUD。
輸入和輸出規則
如果您在專案或機構中為 BigQuery 資源使用 VPC Service Controls,請務必建立輸入和輸出規則,才能順利將資料匯出至 BigQuery。
-
建立輸入規則,授予使用者建立匯出的權限:
- ingressFrom: identities: - PRINCIPAL_IDENTIFIER_OF_USER_INITIATING_EXPORT sources: - accessLevel: "*" ingressTo: operations: - serviceName: bigquery.googleapis.com methodSelectors: - method: "*" resources: - projects/YOUR_PROJECT_ID_TO_HOST_EXPORT_DATA title: 'Ingress Rule Name'如要進一步瞭解主體 ID 格式,請參閱「主體 ID」。
- 建立輸出規則,允許透過 VPC Service Controls 存取 BigQuery 資料集: Google Cloud
- egressTo: operations: - serviceName: bigquery.googleapis.com methodSelectors: - method: "*" resources: - projects/132468967293 egressFrom: identityType: ANY_IDENTITY sources: - accessLevel: "*" sourceRestriction: RESTRICTION_STATUS title: 'Egress Rule Name'
CUD 匯出資料的結構定義
在您的 BigQuery 資料集中,Cloud Billing 帳戶 CUD 資料會載入至名為 cud_subscriptions_export 的資料表。
以下資訊說明匯出至 BigQuery 的資料架構。
| 欄位 | 類型 | 說明 |
|---|---|---|
billing_account_id |
字串 | 與 CUD 資料相關聯的帳單帳戶 ID,由 18 個英數字元組成,例如 010101-F0FFF0-10XX01。 |
cud_product.id |
字串 | 產品定義 ID,例如:
344fffc1-17f9-4e34-abf2-cfffff409fa2。 |
cud_product.display_name |
字串 | 與承諾相關聯的產品顯示名稱,例如 Gemini Enterprise Flexible Savings Plans。 |
cud_product.type |
字串 | 承諾類型,例如 Spend-Based。 |
consumption_model.id |
字串 | 承諾使用的計費模式 ID,例如 5515-81A8-03A2。 |
consumption_model.description |
字串 | 承諾的計費模式說明,例如 Gemini Enterprise Flexible Savings Plan - 1 Year。 |
subscription.entitlement_scope |
字串 | 承諾使用合約的授權範圍,例如:
billingAccounts/010101-F0FFF0-10XX01。 |
subscription.instance_id |
字串 | 訂閱項目執行個體 ID (GUID),例如 769c55ea-c50f-4258-bcf5-04b6688fa5fa。 |
subscription.display_name |
字串 | 承諾的顯示名稱,由您在購買時定義。 |
subscription.entitlement_period |
字串 | 承諾的重複週期,可為 Monthly 或 Hourly。 |
subscription.payment_terms |
字串 | 承諾的付款條件,例如 Postpay。 |
region |
字串 | 與承諾相關聯的區域,例如 us-central1。如果承諾是全域承諾,這個欄位會空白。 |
commitment_amount |
重複的記錄 | 承諾金額詳細資料。 |
commitment_amount.unit |
字串 | 承諾的資源用量測量單位,例如 $/mo 或 $/hr。 |
commitment_amount.value |
數字 | 承諾金額值。 |
commitment_fee |
錄製 | 承諾費用詳細資料。 |
commitment_fee.sku |
字串 | 與承諾費用相關聯的 SKU ID。 |
commitment_fee.description |
字串 | 費用 SKU 的說明。 |
term |
字串 | 以 ISO 8601 時長格式表示的承諾期限,其中 P1Y 代表一年,P3Y 代表三年。 |
start_time |
時間戳記 | 承諾的開始時間戳記,例如 2026-07-20 21:35:48 UTC。 |
end_time |
時間戳記 | 承諾的結束時間戳記,例如 2027-07-20 21:35:48 UTC。 |
entitlement_schedule |
重複的記錄 | 授權的排程詳細資料。 |
entitlement_schedule.start_time |
日期時間 | 排程時間範圍的開始時間 (以美洲/洛杉磯時區為準)。 |
entitlement_schedule.end_time |
日期時間 | 排定時段的結束時間 (美洲/洛杉磯時區)。 |
entitlement_schedule.commitment_amount |
數字 | 這個特定排程時段的承諾金額。 |
state |
字串 | 承諾的目前狀態,可為 Pending、Active 或 Expired。 |
相關主題
詳情請參閱下列主題。
與匯出的 Cloud Billing 資料相關的主題
Google Cloud 控制台提供的費用和價格報表
- 查看 Cloud Billing 報表和費用趨勢
- 查看及下載月結單或對帳單的費用明細
- 查看及下載 Google 雲端服務的價格
- 透過費用明細報表瞭解節約效益
- 分析承諾使用折扣的效益
- 查看費用和付款記錄