- NAME
-
- gcloud monitoring snoozes create - create a new snooze
- SYNOPSIS
-
-
gcloud monitoring snoozes create
[--snooze-from-file
=PATH_TO_FILE
] [--criteria-policies
=CRITERIA_POLICIES
,[…]--display-name
=DISPLAY_NAME
--end-time
=END_TIME
--start-time
=START_TIME
] [GCLOUD_WIDE_FLAG …
]
-
- DESCRIPTION
-
Creates a new snooze. A snooze can be specified as a JSON/YAML value passed in
as a file through the
--snooze-from-file
flag. A snooze can also be specified through command line flags. If a snooze is specified through--snooze-from-file
, and additional flags are supplied, the flags will override the snooze's settings.For information about the JSON/YAML format of a snooze: https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.snoozes
- EXAMPLES
-
To create a snooze with command-line options, run:
gcloud monitoring snoozes create --criteria-policies=LIST_OF_POLICIES --display-name=DISPLAY_NAME --start-time=START_TIME --end-time=END_TIME
To create a snooze with a file, run:
gcloud monitoring snoozes create --snooze-from-file=MY-FILE
Sample contents of MY-FILE:
criteria: policies: - projects/MY-PROJECT/alertPolicies/MY-POLICY interval: startTime: '2024-03-01T08:00:00Z' endTime: '2024-03-08T04:59:59.500Z' displayName: New Snooze
- FLAGS
-
--snooze-from-file
=PATH_TO_FILE
- The path to a JSON or YAML file containing the snooze. Use a full or relative path to a local file containing the value of snooze.
-
Snooze Settings. If any of these are specified, they will overwrite fields in
the
--snooze-from-file
flags if specified.--criteria-policies
=CRITERIA_POLICIES
,[…]- The policies that the Snooze applies to.
--display-name
=DISPLAY_NAME
- The display name for the Snooze.
--end-time
=END_TIME
- The start 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 help
for details. - NOTES
-
These variants are also available:
gcloud alpha monitoring snoozes create
gcloud beta monitoring snoozes create
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-30 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{
"last_modified": "Last updated 2024-07-30 UTC.",
"state": ""
}