本文提供 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」。
- 建立輸出規則,允許 Google Cloud 透過 VPC Service Controls 存取 BigQuery 資料集:
- 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 資料相關聯的 18 個英數字元帳單帳戶 ID,例如 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 雲端服務價格
- 透過費用明細報表瞭解您的節約效益
- 分析承諾使用折扣的效益
- 查看費用和付款記錄