HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/current/help/man/man1/gcloud_alpha_monitoring_channels_update.1
.TH "GCLOUD_ALPHA_MONITORING_CHANNELS_UPDATE" 1



.SH "NAME"
.HP
gcloud alpha monitoring channels update \- update a notification channel



.SH "SYNOPSIS"
.HP
\f5gcloud alpha monitoring channels update\fR \fICHANNEL\fR [\fB\-\-channel\-content\fR=\fICHANNEL_CONTENT\fR\ |\ \fB\-\-channel\-content\-from\-file\fR=\fIPATH_TO_FILE\fR] [\fB\-\-fields\fR=[\fIfield\fR,...]\ |\ \fB\-\-description\fR=\fIDESCRIPTION\fR\ \fB\-\-display\-name\fR=\fIDISPLAY_NAME\fR\ \fB\-\-[no\-]enabled\fR\ \fB\-\-type\fR=\fITYPE\fR\ \fB\-\-update\-channel\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]\ \fB\-\-clear\-channel\-labels\fR\ |\ \fB\-\-remove\-channel\-labels\fR=[\fIKEY\fR,...]\ \fB\-\-update\-user\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]\ \fB\-\-clear\-user\-labels\fR\ |\ \fB\-\-remove\-user\-labels\fR=[\fIKEY\fR,...]] [\fIGCLOUD_WIDE_FLAG\ ...\fR]



.SH "DESCRIPTION"

\fB(ALPHA)\fR Updates a notification channel.

If \f5\-\-channel\-content\fR or \f5\-\-channel\-content\-from\-file\fR are
specified:

.RS 2m
.IP "\(bu" 2m
\-\-fields can be specified; only the specified fields will be updated.
.IP "\(bu" 2m
Alternatively, the channel will be replaced with the provided channel. The
channel can be modified further using the flags from the notification channel
settings group below.
.RE
.sp

Otherwise, the channel will be updated with the values specified in the flags
from the notification channel settings group.

For information about the JSON/YAML format of a notification channel:
https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.notificationChannels

\fBNote:\fR When specifying the Channel as a YAML/JSON, the use of
\f5channelLabels\fR as an alternative name for \f5labels\fR is supported.


.SH "EXAMPLES"
The following command updates an existing email notification channel to point
from its original email address to "newaddress@newdomain.tld":

.RS 2m
$ gcloud alpha monitoring channels update \e
    "projects/12345/notificationChannels/67890" \e
    \-\-update\-channel\-labels=email_address=newaddress@newdomain.tld
.RE



.SH "POSITIONAL ARGUMENTS"

.RS 2m
.TP 2m

Notification Channel resource \- Name of the Notification Channel to update This
represents a Cloud resource. (NOTE) Some attributes are not given arguments in
this group but can be set in other ways.

To set the \f5project\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5channel\fR on the command line with a fully specified
name;
.IP "\(em" 2m
provide the argument \f5\-\-project\fR on the command line;
.IP "\(em" 2m
set the property \f5core/project\fR.
.RE
.sp

This must be specified.


.RS 2m
.TP 2m
\fICHANNEL\fR

ID of the Notification Channel or fully qualified identifier for the
Notification Channel.

To set the \f5notification_channels\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5channel\fR on the command line.
.RE
.sp


.RE
.RE
.sp

.SH "FLAGS"

.RS 2m
.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-channel\-content\fR=\fICHANNEL_CONTENT\fR

The channel\-content as a string. In either JSON or YAML format.

.TP 2m
\fB\-\-channel\-content\-from\-file\fR=\fIPATH_TO_FILE\fR

The path to a JSON or YAML file containing the channel\-content. Use a full or
relative path to a local file containing the value of channel_content.

.RE
.sp
.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-fields\fR=[\fIfield\fR,...]

The list of fields to update. Must specify \f5\-\-channel\-content\fR or
\f5\-\-channel\-content\-from\-file\fR if using this flag.

.TP 2m

Notification channel settings


.RS 2m
.TP 2m
\fB\-\-description\fR=\fIDESCRIPTION\fR

An optional description for the channel.

.TP 2m
\fB\-\-display\-name\fR=\fIDISPLAY_NAME\fR

The display name for the channel.

.TP 2m
\fB\-\-[no\-]enabled\fR

Whether notifications are forwarded to the described channel. Use
\fB\-\-enabled\fR to enable and \fB\-\-no\-enabled\fR to disable.

.TP 2m
\fB\-\-type\fR=\fITYPE\fR

The type of the notification channel. This field matches the value of the
NotificationChannelDescriptor type field.

.TP 2m

Configuration Fields: Key\-Value pairs that define the channel and its behavior.


.RS 2m
.TP 2m
\fB\-\-update\-channel\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]

List of label KEY=VALUE pairs to update. If a label exists, its value is
modified. Otherwise, a new label is created.

Keys must start with a lowercase character and contain only hyphens (\f5\-\fR),
underscores (\f5_\fR), lowercase characters, and numbers.

.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-clear\-channel\-labels\fR

Remove all labels. If \f5\-\-update\-channel\-labels\fR is also specified then
\f5\-\-clear\-channel\-labels\fR is applied first.

For example, to remove all labels:

.RS 2m
$ gcloud alpha monitoring channels update \-\-clear\-channel\-labels
.RE

To remove all existing labels and create two new labels, \f5\fIfoo\fR\fR and
\f5\fIbaz\fR\fR:

.RS 2m
$ gcloud alpha monitoring channels update \-\-clear\-channel\-labels \e
  \-\-update\-channel\-labels foo=bar,baz=qux
.RE

.TP 2m
\fB\-\-remove\-channel\-labels\fR=[\fIKEY\fR,...]

List of label keys to remove. If a label does not exist it is silently ignored.
If \f5\-\-update\-channel\-labels\fR is also specified then
\f5\-\-update\-channel\-labels\fR is applied first.

.RE
.RE
.sp
.TP 2m

User Labels


.RS 2m
.TP 2m
\fB\-\-update\-user\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]

List of label KEY=VALUE pairs to update. If a label exists, its value is
modified. Otherwise, a new label is created.

Keys must start with a lowercase character and contain only hyphens (\f5\-\fR),
underscores (\f5_\fR), lowercase characters, and numbers. Values must contain
only hyphens (\f5\-\fR), underscores (\f5_\fR), lowercase characters, and
numbers.

.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-clear\-user\-labels\fR

Remove all labels. If \f5\-\-update\-user\-labels\fR is also specified then
\f5\-\-clear\-user\-labels\fR is applied first.

For example, to remove all labels:

.RS 2m
$ gcloud alpha monitoring channels update \-\-clear\-user\-labels
.RE

To remove all existing labels and create two new labels, \f5\fIfoo\fR\fR and
\f5\fIbaz\fR\fR:

.RS 2m
$ gcloud alpha monitoring channels update \-\-clear\-user\-labels \e
  \-\-update\-user\-labels foo=bar,baz=qux
.RE

.TP 2m
\fB\-\-remove\-user\-labels\fR=[\fIKEY\fR,...]

List of label keys to remove. If a label does not exist it is silently ignored.
If \f5\-\-update\-user\-labels\fR is also specified then
\f5\-\-update\-user\-labels\fR is applied first.


.RE
.RE
.RE
.RE
.RE
.sp

.SH "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 \fB$ gcloud help\fR for details.



.SH "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. This variant is also available:

.RS 2m
$ gcloud beta monitoring channels update
.RE