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_alpha_monitoring_policies_update.1
.TH "GCLOUD_ALPHA_MONITORING_POLICIES_UPDATE" 1



.SH "NAME"
.HP
gcloud alpha monitoring policies update \- updates an alerting policy



.SH "SYNOPSIS"
.HP
\f5gcloud alpha monitoring policies update\fR \fIALERT_POLICY\fR [\fB\-\-fields\fR=[\fIfield\fR,...]\ |\ \fB\-\-combiner\fR=\fICOMBINER\fR\ \fB\-\-display\-name\fR=\fIDISPLAY_NAME\fR\ \fB\-\-[no\-]enabled\fR\ \fB\-\-add\-notification\-channels\fR=[\fINOTIFICATION\-CHANNELS\fR,...]\ |\ \fB\-\-clear\-notification\-channels\fR\ |\ \fB\-\-remove\-notification\-channels\fR=[\fINOTIFICATION\-CHANNELS\fR,...]\ |\ \fB\-\-set\-notification\-channels\fR=[\fINOTIFICATION\-CHANNELS\fR,...]\ \fB\-\-documentation\-format\fR=\fIDOCUMENTATION_FORMAT\fR\ \fB\-\-documentation\fR=\fIDOCUMENTATION\fR\ |\ \fB\-\-documentation\-from\-file\fR=\fIPATH_TO_FILE\fR\ \fB\-\-update\-user\-labels\fR=[\fIKEY\fR=\fIVALUE\fR,...]\ \fB\-\-clear\-user\-labels\fR\ |\ \fB\-\-remove\-user\-labels\fR=[\fIKEY\fR,...]] [\fB\-\-policy\fR=\fIPOLICY\fR\ |\ \fB\-\-policy\-from\-file\fR=\fIPATH_TO_FILE\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]



.SH "DESCRIPTION"

\fB(ALPHA)\fR Updates an alerting policy.

If \f5\-\-policy\fR or \f5\-\-policy\-from\-file\fR are specified:

.RS 2m
.IP "\(bu" 2m
If \f5\-\-fields\fR is specified, the only the specified fields will be updated.
.IP "\(bu" 2m
Else, the policy will be replaced with the provided policy. The policy can be
modified further using the flags from the Policy Settings group below.
.RE
.sp

Otherwise, the policy will be updated with the values specified in the flags
from the Policy Settings group.

For information about the JSON/YAML format of an alerting policy:
https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.alertPolicies



.SH "POSITIONAL ARGUMENTS"

.RS 2m
.TP 2m

Alert Policy resource \- Name of the Alert Policy to be updated. 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 \f5alert_policy\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
\fIALERT_POLICY\fR

ID of the Alert Policy or fully qualified identifier for the Alert Policy.

To set the \f5policy\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5alert_policy\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\-\-fields\fR=[\fIfield\fR,...]

The list of fields to update. Must specify \f5\-\-policy\fR or
\f5\-\-policy\-from\-file\fR if using this flag. \fIfield\fR must be one of:
\fBdisabled\fR, \fBnotificationChannels\fR.

.TP 2m

Policy Settings. If any of these are specified, they will overwrite fields in
the \f5\-\-policy\fR or \f5\-\-policy\-from\-file\fR flags if specified.


.RS 2m
.TP 2m
\fB\-\-combiner\fR=\fICOMBINER\fR

The combiner for the Alert Policy. \fICOMBINER\fR must be one of:

.RS 2m
.TP 2m
\fBAND\fR
An incident is created only if all conditions are met simultaneously. This
combiner is satisfied if all conditions are met, even if they are met on
completely different resources.
.TP 2m
\fBAND_WITH_MATCHING_RESOURCE\fR
Combine conditions using logical AND operator, but unlike the regular AND
option, an incident is created only if all conditions are met simultaneously on
at least one resource.
.TP 2m
\fBCOMBINE_UNSPECIFIED\fR
An unspecified combiner
.TP 2m
\fBOR\fR
An incident is created if any of the listed conditions is met.
.RE
.sp


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

The display name for the Alert Policy.

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

If the policy is enabled. Use \fB\-\-enabled\fR to enable and
\fB\-\-no\-enabled\fR to disable.

.TP 2m

These flags modify the member Notification Channels of this Alert Policy.

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-add\-notification\-channels\fR=[\fINOTIFICATION\-CHANNELS\fR,...]

Append the given values to the current Notification Channels.

.TP 2m
\fB\-\-clear\-notification\-channels\fR

Empty the current Notification Channels.

.TP 2m
\fB\-\-remove\-notification\-channels\fR=[\fINOTIFICATION\-CHANNELS\fR,...]

Remove the given values from the current Notification Channels.

.TP 2m
\fB\-\-set\-notification\-channels\fR=[\fINOTIFICATION\-CHANNELS\fR,...]

Completely replace the current Notification Channels with the given values.

.RE
.sp
.TP 2m

Documentation


.RS 2m
.TP 2m
\fB\-\-documentation\-format\fR=\fIDOCUMENTATION_FORMAT\fR

The MIME type that should be used with \f5\-\-documentation\fR or
\f5\-\-documentation\-from\-file\fR. Currently, only "text/markdown" is
supported.

.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-documentation\fR=\fIDOCUMENTATION\fR

The documentation to be included with the policy.

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

The path to a file containing the documentation to be included with the policy.
Use a full or relative path to a local file containing the value of
documentation.

.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 policies 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 policies 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
.sp
.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-policy\fR=\fIPOLICY\fR

The policy as a string. In either JSON or YAML format.

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

The path to a JSON or YAML file containing the policy. Use a full or relative
path to a local file containing the value of policy.


.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.