gcloud_alpha_monitoring_channels_update (1)
NAME
- gcloud alpha monitoring channels update - update a notification channel
SYNOPSIS
-
gcloud alpha monitoring channels update CHANNEL [--channel-content=CHANNEL_CONTENT | --channel-content-from-file=CHANNEL_CONTENT_FROM_FILE] [--fields=[field,...] | --description=DESCRIPTION --display-name=DISPLAY_NAME --[no-]enabled --type=TYPE --update-channel-labels=[KEY=VALUE,...] --clear-channel-labels | --remove-channel-labels=[KEY,...] --update-user-labels=[KEY=VALUE,...] --clear-user-labels | --remove-user-labels=[KEY,...]] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) Updates a notification channel.
-
- *
- --fields can be specified; only the specified fields will be updated.
- *
- 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.
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:
cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.notificationChannels
Note: When specifying the Channel as a YAML/JSON, the use of
channelLabels as an alternative name for labels is supported.
POSITIONAL ARGUMENTS
-
-
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 [project] attribute: provide
the argument [channel] on the command line with a fully specified name; provide
the argument [--project] on the command line; set the property [core/project].
This must be specified.
-
- CHANNEL
-
ID of the Notification Channel or fully qualified identifier for the
Notification Channel.
-
-
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 [project] attribute: provide
the argument [channel] on the command line with a fully specified name; provide
the argument [--project] on the command line; set the property [core/project].
This must be specified.
FLAGS
-
-
At most one of these may be specified:
-
- --channel-content=CHANNEL_CONTENT
-
The channel-content as a string. In either JSON or YAML format.
- --channel-content-from-file=CHANNEL_CONTENT_FROM_FILE
-
The path to a JSON or YAML file containing the channel-content.
-
-
At most one of these may be specified:
-
- --fields=[field,...]
-
The list of fields to update. Must specify --channel-content or
--channel-content-from-file if using this flag.
-
Notification channel settings
-
- --description=DESCRIPTION
-
An optional description for the channel.
- --display-name=DISPLAY_NAME
-
The display name for the channel.
- --[no-]enabled
-
Whether notifications are forwarded to the described channel. Use
--enabled to enable and --no-enabled to disable.
- --type=TYPE
-
The type of the notification channel. This field matches the value of the
NotificationChannelDescriptor type field.
-
Configuration Fields: Key-Value pairs that define the channel and its behavior.
-
- --update-channel-labels=[KEY=VALUE,...]
-
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 (-), underscores (_), lowercase characters, and numbers.
-
At most one of these may be specified:
-
- --clear-channel-labels
-
Remove all labels. If --update-channel-labels is also specified then
--clear-channel-labels is applied first.
For example, to remove all labels:
- $ gcloud alpha monitoring channels update --clear-channel-labels
To set the labels to exactly "foo" and "baz":
-
$ gcloud alpha monitoring channels update --clear-channel-labels \
--update-channel-labels foo=bar,baz=qux
- --remove-channel-labels=[KEY,...]
-
List of label keys to remove. If a label does not exist it is silently ignored.
-
-
-
User Labels
-
- --update-user-labels=[KEY=VALUE,...]
-
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 (-), underscores (_), lowercase characters, and numbers. Values must contain only hyphens (-), underscores (_), lowercase characters, and numbers.
-
At most one of these may be specified:
-
- --clear-user-labels
-
Remove all labels. If --update-user-labels is also specified then
--clear-user-labels is applied first.
For example, to remove all labels:
- $ gcloud alpha monitoring channels update --clear-user-labels
To set the labels to exactly "foo" and "baz":
-
$ gcloud alpha monitoring channels update --clear-user-labels \
--update-user-labels foo=bar,baz=qux
- --remove-user-labels=[KEY,...]
-
List of label keys to remove. If a label does not exist it is silently ignored.
-
-
-
-
-
At most one of these may be specified:
GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --configuration, --flags-file, --flatten, --format, --help, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity. Run $ gcloud help for details.
NOTES
This command is currently in ALPHA and may change without notice. If this command fails with API permission errors despite specifying the right project, you will have to apply for early access and have your projects registered on the API whitelist to use it. To do so, contact Support at cloud.google.com/support