gcloud beta logging buckets update

NAME
gcloud beta logging buckets update - update a bucket
SYNOPSIS
gcloud beta logging buckets updateBUCKET_ID--location=LOCATION[--add-index=[KEY=VALUE, …,…]][--async][--clear-indexes][--cmek-kms-key-name=CMEK_KMS_KEY_NAME][--description=DESCRIPTION][--enable-analytics][--locked][--remove-indexes=[FIELDPATH,…]][--restricted-fields=[RESTRICTED_FIELD,…]][--retention-days=RETENTION_DAYS][--update-index=[KEY=VALUE, …,…]][--billing-account=BILLING_ACCOUNT_ID    |--folder=FOLDER_ID    |--organization=ORGANIZATION_ID    |--project=PROJECT_ID][GCLOUD_WIDE_FLAG]
DESCRIPTION
(BETA) Update the properties of a bucket.
EXAMPLES
To update a bucket in your project, run:
gcloudbetaloggingbucketsupdatemy-bucket--location=global--description=my-new-description

To update a bucket in your project and remove all indexes, run:

gcloudbetaloggingbucketsupdatemy-bucket--location=global--clear-indexes

To update a bucket in your project and remove an index, run:

gcloudbetaloggingbucketsupdatemy-bucket--location=global--remove-indexes=jsonPayload.foo2

To update a bucket in your project and add an index, run:

gcloudbetaloggingbucketsupdatemy-bucket--location=global--add-index=fieldPath=jsonPayload.foo2,type=INDEX_TYPE_STRING

To update a bucket in your project and update an existing index, run:

gcloudbetaloggingbucketsupdatemy-bucket--location=global--update-index=fieldPath=jsonPayload.foo,type=INDEX_TYPE_INTEGER

To update a bucket in your project and update existing cmek, run:

gcloudbetaloggingbucketsupdatemy-bucket--location=global--cmek-kms-key-name=CMEK_KEY_NAME

To asynchronously enroll a bucket in your project into Log Analytics, run:

gcloudbetaloggingbucketsupdatemy-bucket--location=global--async--enable-analytics
POSITIONAL ARGUMENTS
BUCKET_ID
The id of the bucket to update.
REQUIRED FLAGS
--location=LOCATION
Location of the bucket.
OPTIONAL FLAGS
--add-index=[KEY=VALUE, …,…]
Add an index to be added to the log bucket. This flag can be repeated. ThefieldPath andtype attributes are required. For example:--index=fieldPath=jsonPayload.foo,type=INDEX_TYPE_STRING. The following keys areaccepted:
fieldPath
The LogEntry field path to index. For example: jsonPayload.request.status. Pathsare limited to 800 characters and can include only letters, digits, underscores,hyphens, and periods.
type
The type of data in this index. For example: INDEX_TYPE_STRING Supported typesare strings and integers.
--async
Return immediately, without waiting for the operation in progress to complete.
--clear-indexes
Remove all logging indexes from the bucket.
--cmek-kms-key-name=CMEK_KMS_KEY_NAME
A validkms_key_name will enable CMEK for the bucket.
--description=DESCRIPTION
A new description for the bucket.
--enable-analytics
Whether to opt the bucket into Log Analytics. Once opted in, the bucket cannotbe opted out of Log Analytics.
--locked
Lock the bucket and prevent it from being modified or deleted (unless it isempty).
--remove-indexes=[FIELDPATH,…]
Specify the field path of the logging index(es) to delete.
--restricted-fields=[RESTRICTED_FIELD,…]
A new set of restricted fields for the bucket.
--retention-days=RETENTION_DAYS
A new retention period for the bucket.
--update-index=[KEY=VALUE, …,…]
Update an index to be added to the log bucket. This will update the type of theindex, and also update its createTime to the new update time. This flag can berepeated. ThefieldPath andtype attributes are required. For example:--index=fieldPath=jsonPayload.foo,type=INDEX_TYPE_STRING. The following keys areaccepted:
fieldPath
The LogEntry field path to index. For example: jsonPayload.request.status. Pathsare limited to 800 characters and can include only letters, digits, underscores,hyphens, and periods.
type
The type of data in this index. For example: INDEX_TYPE_STRING Supported typesare strings and integers.
At most one of these can be specified:
--billing-account=BILLING_ACCOUNT_ID
Billing account of the bucket to update.
--folder=FOLDER_ID
Folder of the bucket to update.
--organization=ORGANIZATION_ID
Organization of the bucket to update.
--project=PROJECT_ID
Project of the bucket to update.

The Google Cloud project ID to use for this invocation. If omitted, then thecurrent project is assumed; the current project can be listed usinggcloudconfig list --format='text(core.project)' and can be set usinggcloud config set project PROJECTID.

--project and its fallbackcore/project property playtwo roles in the invocation. It specifies the project of the resource to operateon. It also specifies the project for API enablement check, quota, and billing.To specify a different project for quota and billing, use--billing-project orbilling/quota_project property.

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 help for details.

NOTES
This command is currently in beta and might change without notice. Thesevariants are also available:
gcloudloggingbucketsupdate
gcloudalphaloggingbucketsupdate

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.