NAME

gcloud alpha logging sinks update - update a sink

SYNOPSIS

gcloud alpha logging sinks update SINK_NAME [DESTINATION] [--add-exclusion=[description=DESCRIPTION],[disabled=DISABLED],[filter=FILTER],[name=NAME]] [--clear-exclusions] [--custom-writer-identity=SERVICE_ACCOUNT_EMAIL] [--description=DESCRIPTION] [--disabled] [--log-filter=LOG_FILTER] [--remove-exclusions=[EXCLUSION ID,...]] [--update-exclusion=[description=DESCRIPTION],[disabled=DISABLED],[filter=FILTER],[name=NAME]] [--use-partitioned-tables] [--billing-account=BILLING_ACCOUNT_ID | --folder=FOLDER_ID | --organization=ORGANIZATION_ID | --project=PROJECT_ID] [GCLOUD_WIDE_FLAG ...]

DESCRIPTION

(ALPHA) Change the [DESTINATION] or --log-filter associated with a sink. The new destination must already exist and Cloud Logging must have permission to write to it.

Log entries are exported to the new destination immediately.

EXAMPLES

To only update a sink filter, run:

$ gcloud alpha logging sinks update my-sink \ --log-filter='severity>=ERROR'

Detailed information about filters can be found at: https://cloud.google.com/logging/docs/view/logging-query-language

POSITIONAL ARGUMENTS

SINK_NAME

The name of the sink to update.

[DESTINATION]

A new destination for the sink. If omitted, the sink's existing destination is unchanged.

FLAGS

--add-exclusion=[description=DESCRIPTION],[disabled=DISABLED],[filter=FILTER],[name=NAME]

Add an exclusion filter for log entries that are not to be routed to the sink' destination. This flag can be repeated.

The name and filter attributes are required. The following keys are accepted:

name

Required. An identifier, such as load-balancer-exclusion. Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods.

description

Optional. A description of this exclusion.

filter

Required. Entries that match this advanced log filter will be excluded. Filter cannot be empty.

disabled

Optional. By default, an exclusion is not disabled. To disable an exclusion, include this key and specify any value.

--clear-exclusions

Remove all logging exclusions from the sink.

--custom-writer-identity=SERVICE_ACCOUNT_EMAIL

Writer identity for the sink. Only available for writing to cross-project LogBucket sinks. Note a writer identity is automatically generated if needed for the sink when it is not explicitly provided.

--description=DESCRIPTION

Description of the sink.

--disabled

Disable the sink. Disabled sinks do not route logs to the sink destination. Specify --no-disabled to enable a disabled sink. If this flag is not specified, the value will not be updated.

--log-filter=LOG_FILTER

A new filter expression for the sink. If omitted, the sink's existing filter (if any) is unchanged.

--remove-exclusions=[EXCLUSION ID,...]

Specify the name of the Logging exclusion(s) to delete.

--update-exclusion=[description=DESCRIPTION],[disabled=DISABLED],[filter=FILTER],[name=NAME]

Update an exclusion filter for a log entry that is not to be exported. This flag can be repeated.

The name attribute is required. The following keys are accepted:

name

Required. An identifier, such as load-balancer-exclusion. Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods.

description

Optional. A description of this exclusion.

filter

Optional. Entries that match this advanced log filter will be excluded. Filter cannot be empty.

disabled

Optional. To disable an exclusion, include this key and specify any value. To enable a disabled exclusion, include this key, but do not specify any value. Do not include this key unless you want to change its value.

Settings for sink exporting data to BigQuery.
--use-partitioned-tables

If specified, use BigQuery's partitioned tables. By default, Logging creates dated tables based on the log entries' timestamps, e.g. 'syslog_20170523'. Partitioned tables remove the suffix and special query syntax https://cloud.google.com/bigquery/docs/querying-partitioned-tables must be used.

At most one of these can be specified:
--billing-account=BILLING_ACCOUNT_ID

Billing account of the sink to update.

--folder=FOLDER_ID

Folder of the sink to update.

--organization=ORGANIZATION_ID

Organization of the sink to update.

--project=PROJECT_ID

Project of the sink to update.

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

--project and its fallback core/project property play two roles in the invocation. It specifies the project of the resource to operate on. It also specifies the project for API enablement check, quota, and billing. To specify a different project for quota and billing, use --billing-project or billing/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 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 access allowlist. These variants are also available:

$ gcloud logging sinks update

$ gcloud beta logging sinks update