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/394/help/man/man1/gcloud_beta_monitoring_channels_create.1
.TH "GCLOUD_BETA_MONITORING_CHANNELS_CREATE" 1



.SH "NAME"
.HP
gcloud beta monitoring channels create \- create a new notification channel



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



.SH "DESCRIPTION"

\fB(BETA)\fR Creates a new notification channel. A channel can be specified as
JSON/YAML passed in as a string through the \f5\-\-channel\-content\fR flag or
as a file through the \f5\-\-channel\-content\-from\-file\fR flag. A basic
channel can also be specified through command line flags. If a channel is
specified through \f5\-\-channel\-content\fR or
\f5\-\-channel\-content\-from\-file\fR, and additional flags are supplied, the
flags will override the given channel's settings.

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

Additional documentation can for this operation can be found at:
https://cloud.google.com/monitoring/alerts/using\-channels\-api


.SH "EXAMPLES"
The following commands setup both email and SMS notification channels for the
team lead. Note that the display name and description focus on the
purpose/semantics of the channel rather than its destination. This is a
best\-practice that facilitates swapping/updating notification channels
in\-place (such as when users change teams, projects, roles, companies, etc.)
with minimal impact to the alerting policies that reference the existing
channels. It is also a best practice to supply at least two channels of
different types for a given person.

.RS 2m
$ gcloud beta monitoring channels create \e
    \-\-display\-name="Foo Team Lead (Primary)" \e
    \-\-description="Primary contact method for the Foo team lead" \e
    \-\-type=email \-\-user\-labels=team=foo,role=lead,ord=1 \e
    \-\-channel\-labels=email_address=user@somedomain.tld
.RE

.RS 2m
$ gcloud beta monitoring channels create \e
    \-\-display\-name="Foo Team Lead (Secondary)" \e
    \-\-description="Secondary contact method for the Foo team lead" \e
    \-\-type=sms \-\-user\-labels=team=foo,role=lead,ord=2 \e
    \-\-channel\-labels=number=123\-456\-7890
.RE



.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

Notification channel settings


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

List of label KEY=VALUE pairs to add.

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

These are configuration fields that define the channel and its behavior.If the
channel was given as a JSON/YAML object from a string or file, this flag will
replace the labels value in the given channel.

.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\-\-enabled\fR

Whether notifications are forwarded to the described channel. Enabled by
default, use \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
\fB\-\-user\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]

List of label KEY=VALUE pairs to add.

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.

If the channel was given as a JSON/YAML object from a string or file, this flag
will replace the labels value in the given channel.


.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 beta and might change without notice. This variant
is also available:

.RS 2m
$ gcloud alpha monitoring channels create
.RE