Structure of CUD metadata export

Preview

This product or feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of theService Specific Terms. Pre-GA products and features are available "as is" and might have limited support. For more information, see thelaunch stage descriptions.

This document provides reference information for the schema ofCloud Billing committed use discount (CUD) metadata that's exporteddaily to each table in BigQuery. This export provides a dailysnapshot of yourspend-based CUDscommitment metadata to a BigQuery table,which you can join with other billing data exports for better CUD managementand reporting.

Ingress and egress rules

If you useVPC Service Controlsfor BigQuery resources on your project or organization, you mustcreate ingress and egress rules to properly enable data exports to BigQuery.

  1. Create aningress rule that gives the individual access to create the export:
      - ingressFrom:      identities:      -PRINCIPAL_IDENTIFIER_OF_USER_INITIATING_EXPORT      sources:      - accessLevel: "*"  ingressTo:      roles:      - roles/bigquery.dataOwner      resources:      - projects/YOUR_PROJECT_ID_TO_HOST_EXPORT_DATA  title: 'Ingress Rule Name'

    SeePrincipal identifiers for more information about principal identifier formats.

  2. Create anegress rule to allow Google Cloud access to the BigQuery dataset through VPC Service Controls:
      - egressTo:      roles:      - roles/bigquery.dataOwner      resources:      - projects/132468967293  egressFrom:      identityType: ANY_IDENTITY      sources:      - accessLevel: "*"      sourceRestriction: RESTRICTION_STATUS  title: 'Egress Rule Name'
  3. Note: If you skip this step, you will receive the following error when you attempt to initiate the export:You don't have permissions to enable the dataset.

Schema of the CUD export data

In your BigQuery dataset, your Cloud Billing accountCUD data is loaded into a data table namedcud_subscriptions_export.

The following information describes the schema of the data that's exported toBigQuery.

FieldTypeDescription
billing_account_idStringThe 18-character, alphanumeric billing account ID associated with the CUD data, for example,010101-F0FFF0-10XX01.
cud_product.idStringThe subscription definition ID, for example344fffc1-17f9-4e34-abf2-cfffff409fa2.
cud_product.display_nameStringThe friendly name of the product associated with the commitment, for exampleFlexible CUD.
cud_product.typeStringThe type of product commitment, for exampleSpend-Based.
consumption_model.idStringThe ID of theconsumption model used by the CUD, for example5515-81A8-03A2.
consumption_model.descriptionStringThe description of theconsumption model for the CUD, for exampleCloud Spanner CUD - 1 Year.
subscription.entitlement_scopeStringThe scope of the entitlement for the CUD, for example, an account-scoped entitlement might bebillingAccounts/010101-F0FFF0-10XX01.
subscription.instance_idStringThe subscription instance ID which is a GUID, for example769c55ea-c50f-4258-bcf5-04b6688fa5fa.
subscription.display_nameStringThe display name for the CUD, defined by the customer at time of purchase, for exampleRecommended Cloud Run CUD commitment in us-central1 on Sep 3, 2023.
regionStringThe region associated with the CUD, for exampleus-central1.
commitent_amount.unitStringThe measurement unit of resource consumption for the commitment, for example,$/hr.
commitent_amount.valueNumericThe commitment amount purchased, for example100 or0.05.
termStringThe term of the commitment inISO 8601 duration format, whereP1Y represents one year, andP3Y represents three years.
start_timeTimestampThe start timestamp for the commitment, for example2024-09-27 18:08:20 UTC.
end_timeTimestampThe end timestamp for the commitment, for example2025-02-18 12:11:20 UTC.
stateStringThe state of the commitment, for exampleActive orExpired.

Related topics

Topics related to exported Cloud Billing data

Cost and pricing reports available in the Google Cloud console

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-15 UTC.