From 0541c7acc69465030077b5ce3b1d9c40cea7b634 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 16 Nov 2021 19:34:34 +0000 Subject: [PATCH] feat: Added support for auto-close configurations (#253) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 410253233 Source-Link: https://github.com/googleapis/googleapis/commit/11e309d19377d05fe354c97d9bd3def00fa9b5e4 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b4f3403a28cc99c9c7cf4cd2efca105f279a3b0f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjRmMzQwM2EyOGNjOTljOWM3Y2Y0Y2QyZWZjYTEwNWYyNzlhM2IwZiJ9 --- google/cloud/monitoring_v3/types/alert.py | 7 +++++++ google/cloud/monitoring_v3/types/common.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/google/cloud/monitoring_v3/types/alert.py b/google/cloud/monitoring_v3/types/alert.py index 4e16bf69..83120e2d 100644 --- a/google/cloud/monitoring_v3/types/alert.py +++ b/google/cloud/monitoring_v3/types/alert.py @@ -527,6 +527,10 @@ class AlertStrategy(proto.Message): This limit is not implemented for alert policies that are not log-based. + auto_close (google.protobuf.duration_pb2.Duration): + If an alert policy that was active has no + data for this long, any open incidents will + close """ class NotificationRateLimit(proto.Message): @@ -547,6 +551,9 @@ class NotificationRateLimit(proto.Message): number=1, message="AlertPolicy.AlertStrategy.NotificationRateLimit", ) + auto_close = proto.Field( + proto.MESSAGE, number=3, message=duration_pb2.Duration, + ) name = proto.Field(proto.STRING, number=1,) display_name = proto.Field(proto.STRING, number=2,) diff --git a/google/cloud/monitoring_v3/types/common.py b/google/cloud/monitoring_v3/types/common.py index 18b5c8bf..0c4b8c9c 100644 --- a/google/cloud/monitoring_v3/types/common.py +++ b/google/cloud/monitoring_v3/types/common.py @@ -128,7 +128,7 @@ class TimeInterval(proto.Message): the end time of the previous interval. - For ``CUMULATIVE`` metrics, the start time and end time must - specify a a non-zero interval, with subsequent points specifying + specify a non-zero interval, with subsequent points specifying the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points. The new start time must be at least a