1
0
Fork 0
mirror of https://github.com/imjasonh/gcloud-help synced 2026-07-10 19:31:55 +00:00
gcloud-help/gcloud/alpha/logging/settings/update

153 lines
5.8 KiB
Text
Raw Normal View History

2022-03-01 04:29:52 +00:00
NAME
2023-01-19 00:56:33 +00:00
gcloud alpha logging settings update - update the settings for the Cloud
2022-03-01 04:29:52 +00:00
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
2024-05-01 09:26:55 +00:00
(ALPHA) Use this command to update the --kms-key-name, --storage-location,
--disable-default-sink and --analytics-mode associated with the Cloud
Logging Logs Router.
2022-03-01 04:29:52 +00:00
The Cloud KMS key must already exist and Cloud Logging must have permission
to access it.
The storage location must be allowed by Org Policy.
Customer-managed encryption keys (CMEK) for the Logs Router can currently
only be configured at the organization-level and will apply to all projects
in the organization.
EXAMPLES
To enable CMEK for the Logs Router for an organization, run:
$ gcloud alpha logging settings update \
2022-03-01 21:43:54 +00:00
--organization=[ORGANIZATION_ID] \
--kms-key-name='projects/my-project/locations/my-location/keyRin\
gs/my-keyring/cryptoKeys/key'
2022-03-01 04:29:52 +00:00
To disable CMEK for the Logs Router for an organization, run:
$ gcloud alpha logging settings update \
--organization=[ORGANIZATION_ID] --clear-kms-key
To update storage location for the Logs Router for an organization, run:
$ gcloud alpha logging settings update \
2022-03-01 21:43:54 +00:00
--organization=[ORGANIZATION_ID] \
--storage-location=[LOCATION_ID]
2022-03-01 04:29:52 +00:00
To update storage location for the Logs Router for a folder, run:
$ gcloud alpha logging settings update --folder=[FOLDER_ID] \
--storage-location=[LOCATION_ID]
To disable default sink for the Logs Router for an organization, run:
$ gcloud alpha logging settings update \
--organization=[ORGANIZATION_ID] --disable-default-sink=true
To enable default sink for the Logs Router for an organization, run:
$ gcloud alpha logging settings update \
--organization=[ORGANIZATION_ID] --disable-default-sink=false
2024-05-01 09:26:55 +00:00
To enable analytics for the log buckets under an organization, run:
$ gcloud alpha logging settings update \
--organization=[ORGANIZATION_ID] --disable-default-sink=false \
2024-10-02 09:51:07 +00:00
--analytics-mode=required
2024-05-01 09:26:55 +00:00
2022-03-01 04:29:52 +00:00
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.
OPTIONAL FLAGS
--disable-default-sink
2023-01-19 00:56:33 +00:00
Enable or disable _Default sink for the _Default bucket. Specify
--no-disable-default-sink to enable a disabled _Default sink. Note: It
2022-03-01 04:29:52 +00:00
only applies to the newly created projects and will not affect the
projects created before.
--storage-location=STORAGE_LOCATION
2023-01-19 00:56:33 +00:00
Update the storage location for _Default bucket and _Required bucket.
2022-03-01 04:29:52 +00:00
Note: It only applies to the newly created projects 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 the organization's CMEK settings.
Key resource - The Cloud KMS (Key Management Service) cryptokey that
will be used to protect the logs being processed by the Cloud Logging
Logs Router. The Cloud KMS CryptoKey Encrypter/Decryper role must be
assigned to the Cloud Logging Logs Router service account. The arguments
in this group can be used to specify the attributes of this resource.
--kms-key-name=KMS_KEY_NAME
2023-05-04 10:43:54 +00:00
ID of the key or fully qualified identifier for the key.
To set the kms-key attribute:
2022-03-01 04:29:52 +00:00
▫ provide the argument --kms-key-name on the command line.
2022-08-10 08:48:58 +00:00
This flag argument must be specified if any of the other arguments
in this group are specified.
2022-03-01 04:29:52 +00:00
--kms-keyring=KMS_KEYRING
2023-05-04 10:43:54 +00:00
The KMS keyring of the key.
To set the kms-keyring attribute:
2022-03-01 04:29:52 +00:00
▫ provide the argument --kms-key-name on the command line with a
fully specified name;
▫ provide the argument --kms-keyring on the command line.
--kms-location=KMS_LOCATION
2023-05-04 10:43:54 +00:00
The Google Cloud location for the key.
To set the kms-location attribute:
2022-03-01 04:29:52 +00:00
▫ provide the argument --kms-key-name on the command line with a
fully specified name;
▫ provide the argument --kms-location on the command line.
--kms-project=KMS_PROJECT
2023-05-04 10:43:54 +00:00
The Google Cloud project for the key.
To set the kms-project attribute:
2022-03-01 04:29:52 +00:00
▫ provide the argument --kms-key-name on the command line with a
fully specified name;
▫ provide the argument --kms-project on the command line;
▫ set the property core/project.
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 alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct
project, you might be trying to access an API with an invitation-only early
2022-09-08 09:21:50 +00:00
access allowlist. These variants are also available:
$ gcloud logging settings update
$ gcloud beta logging settings update
2022-03-01 04:29:52 +00:00