本文提供承諾使用折扣 (CUD) 訂閱項目中繼資料的結構定義參考資訊,這些中繼資料每天都會匯出至 BigQuery。這項匯出作業會將依支出計算的 CUD 和彈性節省方案 (FSP) 承諾使用合約中繼資料的每日快照,提供給 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 |
字串 | 與承諾使用合約相關聯的產品顯示名稱,例如 Flexible Savings Plans。 |
cud_product.type |
字串 | 承諾使用合約類型,例如 Spend-Based。 |
consumption_model.id |
字串 | 承諾使用的計費模式 ID,例如 5515-81A8-03A2。 |
consumption_model.description |
字串 | 承諾使用合約計費模式的說明,例如 Vertex AI FSP - 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.date_start |
日期時間 | 可預約時間範圍的開始時間 (美國/洛杉磯時區)。 |
entitlement_schedule.date_end |
日期時間 | 排程時間範圍的結束時間 (美國/洛杉磯時區)。 |
entitlement_schedule.commitment_amount |
數字 | 這個特定可預約時間範圍的承諾使用金額。 |
state |
字串 | 承諾使用合約目前的狀態,可以是 Pending、Active 或 Expired。 |