gcloud alpha logging settings update Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud alpha logging settings update - update the settings for the Cloud Logging Logs Router
- SYNOPSIS
gcloud alpha logging settings update(--folder=FOLDER_ID|--organization=ORGANIZATION_ID)[--disable-default-sink][--storage-location=STORAGE_LOCATION][--clear-kms-key| [--kms-key-name=KMS_KEY_NAME:--kms-keyring=KMS_KEYRING--kms-location=KMS_LOCATION--kms-project=KMS_PROJECT]][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(ALPHA)Use this command to update the--kms-key-name,--storage-location, --disable-default-sinkand --analytics-modeassociated with the Cloud Logging Logs Router.The Cloud KMS key must already exist and Cloud Logging must have permission toaccess it.
The storage location must be allowed by Org Policy.
Customer-managed encryption keys (CMEK) for the Logs Router can currently onlybe configured at the organization-level and will apply to all projects in theorganization.
- EXAMPLES
- To enable CMEK for the Logs Router for an organization, run:
gcloudalphaloggingsettingsupdate--organization=[ORGANIZATION_ID]--kms-key-name='projects/my-project/locations/my-location/keyRings/my-keyring/cryptoKeys/key'To disable CMEK for the Logs Router for an organization, run:
gcloudalphaloggingsettingsupdate--organization=[ORGANIZATION_ID]--clear-kms-keyTo update storage location for the Logs Router for an organization, run:
gcloudalphaloggingsettingsupdate--organization=[ORGANIZATION_ID]--storage-location=[LOCATION_ID]To update storage location for the Logs Router for a folder, run:
gcloudalphaloggingsettingsupdate--folder=[FOLDER_ID]--storage-location=[LOCATION_ID]To disable default sink for the Logs Router for an organization, run:
gcloudalphaloggingsettingsupdate--organization=[ORGANIZATION_ID]--disable-default-sink=trueTo enable default sink for the Logs Router for an organization, run:
gcloudalphaloggingsettingsupdate--organization=[ORGANIZATION_ID]--disable-default-sink=falseTo enable analytics for the log buckets under an organization, run:
gcloudalphaloggingsettingsupdate--organization=[ORGANIZATION_ID]--disable-default-sink=false--analytics-mode=required - REQUIRED FLAGS
- Exactly one of these must be specified:
--folder=FOLDER_ID- Folder to update Logs Router settings for.
--organization=ORGANIZATION_ID- Organization to update Logs Router settings for.
- Exactly one of these must be specified:
- OPTIONAL FLAGS
--disable-default-sink- Enable or disable
_Defaultsink for the_Defaultbucket. Specify --no-disable-default-sink to enable a disabled_Defaultsink. Note: It only applies to the newly created projectsand will not affect the projects created before. --storage-location=STORAGE_LOCATION- Update the storage location for
_Defaultbucket and_Requiredbucket. Note: It only applies to the newly createdprojects and will not affect the projects created before. - At most one of these can be specified:
--clear-kms-key- Disable CMEK for the Logs Router by clearing out Cloud KMS cryptokey in theorganization's CMEK settings.
- Key resource - The Cloud KMS (Key Management Service) cryptokey that will beused to protect the logs being processed by the Cloud Logging Logs Router. TheCloud KMS CryptoKey Encrypter/Decryper role must be assigned to the CloudLogging Logs Router service account. The arguments in this group can be used tospecify the attributes of this resource.
--kms-key-name=KMS_KEY_NAME- ID of the key or fully qualified identifier for the key.
To set the
kms-keyattribute:- provide the argument
--kms-key-nameon the command line.
This flag argument must be specified if any of the other arguments in this groupare specified.
- provide the argument
--kms-keyring=KMS_KEYRING- The KMS keyring of the key.
To set the
kms-keyringattribute:- provide the argument
--kms-key-nameon the command line with afully specified name; - provide the argument
--kms-keyringon the command line.
- provide the argument
--kms-location=KMS_LOCATION- The Google Cloud location for the key.
To set the
kms-locationattribute:- provide the argument
--kms-key-nameon the command line with afully specified name; - provide the argument
--kms-locationon the command line.
- provide the argument
--kms-project=KMS_PROJECT- The Google Cloud project for the key.
To set the
kms-projectattribute:- provide the argument
--kms-key-nameon the command line with afully specified name; - provide the argument
--kms-projecton the command line; - set the property
core/project.
- provide the argument
- 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:
gcloudloggingsettingsupdategcloudbetaloggingsettingsupdate
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.