gcloud alpha compute project-info set-usage-bucket Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud alpha compute project-info set-usage-bucket - set usage reporting bucket for a project
- SYNOPSIS
gcloud alpha compute project-info set-usage-bucket(--bucket=BUCKET|--no-bucket)[--prefix=PREFIX][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(ALPHA)gcloud alpha compute project-infoset-usage-bucketconfigures usage reporting for projects.Setting usage reporting will cause a log of usage per resource to be written toa specified Google Cloud Storage bucket daily.
For example, to write daily logs of the form usage_gce_YYYYMMDD.csv to thebucket
my-bucket, run:gcloudcomputeproject-infoset-usage-bucket--bucket=gs://my-bucketTo disable this feature, issue the command:
gcloudcomputeproject-infoset-usage-bucket--no-bucket- REQUIRED FLAGS
- Exactly one of these must be specified:
--bucket=BUCKET- Name of an existing Google Cloud Storage bucket where the usage report objectshould be stored. This can either be the bucket name by itself, such as
my-bucket, or the bucket name withgs://orhttps://storage.googleapis.com/in front of it, such asgs://my-bucket. The Google Service Account for performing usagereporting is granted write access to this bucket. The user running this commandmust be an owner of the bucket.To clear the usage bucket, use
--no-bucket. --no-bucket- Unsets the bucket. This disables usage report storage.
- Exactly one of these must be specified:
- OPTIONAL FLAGS
--prefix=PREFIX- Optional prefix for the name of the usage report object stored in the bucket. Ifnot supplied, then this defaults to
.The report is stored as a CSV file named PREFIX_gce_YYYYMMDD.csv where YYYYMMDDis the day of the usage according to Pacific Time. The prefix should conform toGoogle Cloud Storage object naming conventions. This flag must not be providedwhen clearing the usage bucket.usage
- GCLOUD WIDE FLAGS
- These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$gcloud helpfor details. - NOTES
- This command is currently in alpha and might change without notice. If thiscommand fails with API permission errors despite specifying the correct project,you might be trying to access an API with an invitation-only early accessallowlist. These variants are also available:
gcloudcomputeproject-infoset-usage-bucketgcloudbetacomputeproject-infoset-usage-bucket
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-05-07 UTC.