snoozes
Creates, updates, deletes, gets or lists a snoozes
resource.
Overview
Name | snoozes |
Type | Resource |
Id | google.monitoring.snoozes |
Fields
The following fields are returned by SELECT
queries:
- projects_snoozes_get
- projects_snoozes_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Required. Identifier. The name of the Snooze. The format is: projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] The ID of the Snooze will be generated by the system. |
criteria | object | Required. This defines the criteria for applying the Snooze. See Criteria for more information. (id: Criteria) |
displayName | string | Required. A display name for the Snooze. This can be, at most, 512 unicode characters. |
interval | object | Required. The Snooze will be active from interval.start_time through interval.end_time. interval.start_time cannot be in the past. There is a 15 second clock skew to account for the time it takes for a request to reach the API from the UI. (id: TimeInterval) |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Required. Identifier. The name of the Snooze. The format is: projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] The ID of the Snooze will be generated by the system. |
criteria | object | Required. This defines the criteria for applying the Snooze. See Criteria for more information. (id: Criteria) |
displayName | string | Required. A display name for the Snooze. This can be, at most, 512 unicode characters. |
interval | object | Required. The Snooze will be active from interval.start_time through interval.end_time. interval.start_time cannot be in the past. There is a 15 second clock skew to account for the time it takes for a request to reach the API from the UI. (id: TimeInterval) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_snoozes_get | select | projectsId , snoozesId | Retrieves a Snooze by name. | |
projects_snoozes_list | select | projectsId | filter , pageSize , pageToken | Lists the Snoozes associated with a project. Can optionally pass in filter, which specifies predicates to match Snoozes. |
projects_snoozes_create | insert | projectsId | Creates a Snooze that will prevent alerts, which match the provided criteria, from being opened. The Snooze applies for a specific time interval. | |
projects_snoozes_patch | update | projectsId , snoozesId | updateMask | Updates a Snooze, identified by its name, with the parameters in the given Snooze object. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
projectsId | string | |
snoozesId | string | |
filter | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- projects_snoozes_get
- projects_snoozes_list
Retrieves a Snooze by name.
SELECT
name,
criteria,
displayName,
interval
FROM google.monitoring.snoozes
WHERE projectsId = '{{ projectsId }}' -- required
AND snoozesId = '{{ snoozesId }}' -- required;
Lists the Snoozes associated with a project. Can optionally pass in filter, which specifies predicates to match Snoozes.
SELECT
name,
criteria,
displayName,
interval
FROM google.monitoring.snoozes
WHERE projectsId = '{{ projectsId }}' -- required
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- projects_snoozes_create
- Manifest
Creates a Snooze that will prevent alerts, which match the provided criteria, from being opened. The Snooze applies for a specific time interval.
INSERT INTO google.monitoring.snoozes (
data__name,
data__criteria,
data__interval,
data__displayName,
projectsId
)
SELECT
'{{ name }}',
'{{ criteria }}',
'{{ interval }}',
'{{ displayName }}',
'{{ projectsId }}'
RETURNING
name,
criteria,
displayName,
interval
;
# Description fields are for documentation purposes
- name: snoozes
props:
- name: projectsId
value: string
description: Required parameter for the snoozes resource.
- name: name
value: string
description: >
Required. Identifier. The name of the Snooze. The format is: projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] The ID of the Snooze will be generated by the system.
- name: criteria
value: object
description: >
Required. This defines the criteria for applying the Snooze. See Criteria for more information.
- name: interval
value: object
description: >
Required. The Snooze will be active from interval.start_time through interval.end_time. interval.start_time cannot be in the past. There is a 15 second clock skew to account for the time it takes for a request to reach the API from the UI.
- name: displayName
value: string
description: >
Required. A display name for the Snooze. This can be, at most, 512 unicode characters.
UPDATE
examples
- projects_snoozes_patch
Updates a Snooze, identified by its name, with the parameters in the given Snooze object.
UPDATE google.monitoring.snoozes
SET
data__name = '{{ name }}',
data__criteria = '{{ criteria }}',
data__interval = '{{ interval }}',
data__displayName = '{{ displayName }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND snoozesId = '{{ snoozesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
criteria,
displayName,
interval;