gcloud monitoring snoozes update Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud monitoring snoozes update - updates a snooze
- SYNOPSIS
gcloud monitoring snoozes updateSNOOZE[--snooze-from-file=PATH_TO_FILE][--fields=[field,…] |--display-name=DISPLAY_NAME--end-time=END_TIME--start-time=START_TIME][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
- Update a snooze.
If
--snooze-from-fileis specified, then the update rules depend onthe value of the (optional)--fieldsflag:- If
--fieldsis specified, then only the specified fields of thesnooze are updated. - Else, all fields of the snooze are replaced. The updated snooze can be modifiedfurther using the flags from the Snooze Settings group below.
Otherwise, the snooze will be updated with the values specified in the flagsfrom the Snooze Settings group.
For information about the JSON/YAML format of a snooze:https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.snoozes
- If
- EXAMPLES
- To update a snooze time interval with command-line options, run:
gcloudmonitoringsnoozesupdateMY-SNOOZE--start-time=START_TIME--end-time=END_TIMETo update a snooze display name with a file, run:
gcloudmonitoringsnoozesupdate--snooze-from-file=MY-FILE--fields=display_nameSample contents of MY-FILE:
criteria:policies:-projects/MY-PROJECT/alertPolicies/MY-POLICYinterval:startTime:'2024-03-01T08:00:00Z'endTime:'2024-03-08T04:59:59.500Z'displayName:NewSnoozewithNewDisplayName
- POSITIONAL ARGUMENTS
- Snooze resource - Name of the Snooze to be updated. This represents a Cloudresource. (NOTE) Some attributes are not given arguments in this group but canbe set in other ways.
To set the
projectattribute:- provide the argument
snoozeon the command line with a fullyspecified name; - provide the argument
--projecton the command line; - set the property
core/project.
This must be specified.
SNOOZE- ID of the Snooze or fully qualified identifier for the Snooze.
To set the
snoozeattribute:- provide the argument
snoozeon the command line.
- provide the argument
- provide the argument
- Snooze resource - Name of the Snooze to be updated. This represents a Cloudresource. (NOTE) Some attributes are not given arguments in this group but canbe set in other ways.
- FLAGS
--snooze-from-file=PATH_TO_FILE- The path to a JSON or YAML file containing the snooze. Use a full or relativepath to a local file containing the value of snooze.
- At most one of these can be specified:
--fields=[field,…]- The list of fields to update. Must specify
--snooze-from-fileifusing this flag. - Snooze Settings. If any of these are specified, they will overwrite fields inthe
--snooze-from-fileflags if specified.--display-name=DISPLAY_NAME- The display name for the Snooze.
--end-time=END_TIME- The end time for the Snooze.
--start-time=START_TIME- The start time for the Snooze.
- 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 helpfor details. - NOTES
- These variants are also available:
gcloudalphamonitoringsnoozesupdategcloudbetamonitoringsnoozesupdate
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-11-18 UTC.