本文提供每日匯出至 BigQuery 的承諾用量折扣 (CUD) 訂閱項目中繼資料結構定義參考資訊。這項匯出作業會將依支出計算的 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 訂閱資料相關聯的帳單帳戶 ID,由 18 個英數字元組成,例如 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。 |