- NAME
-
- gcloud logging sinks update - update a sink
- SYNOPSIS
-
-
gcloud 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
] [--include-children
] [--intercept-children
] [--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
-
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 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
andname
attributes are required. The following keys are accepted:filter
name
-
Required. An identifier, such as
. Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods.load-balancer-exclusion
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. This flag can only be used if the destination is a log bucket in a different project. The writer identity is automatically generated when it is not provided for a sink.
--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.
--include-children
- Whether to export logs from all child projects and folders. Only applies to sinks for organizations and folders.
--intercept-children
- Whether to intercept logs from all child projects and folders. Only applies to sinks for organizations and folders.
--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
attribute is required. The following keys are accepted:name
name
-
Required. An identifier, such as
. Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods.load-balancer-exclusion
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 usinggcloud config set project PROJECTID
.--project
and its fallbackcore/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
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
-
These variants are also available:
gcloud alpha logging sinks update
gcloud beta logging sinks update
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-03-26 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{
"last_modified": "Last updated 2024-03-26 UTC.",
"state": ""
}