Skip to content
This repository was archived by the owner on Dec 31, 2023. It is now read-only.

Commit 218e678

Browse files
feat: Added support for retriggering notifications in AlertPolicy (#560)
* docs: Minor formatting chore: Update gapic-generator-python to v1.11.5 build: Update rules_python to 0.24.0 PiperOrigin-RevId: 563436317 Source-Link: googleapis/googleapis@42fd37b Source-Link: https://github.com/googleapis/googleapis-gen/commit/280264ca02fb9316b4237a96d0af1a2343a81a56 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjgwMjY0Y2EwMmZiOTMxNmI0MjM3YTk2ZDBhZjFhMjM0M2E4MWE1NiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Added support for retriggering notifications in AlertPolicy feat: Added support for forecast options in AlertPolicy feat: Added support for promQL condition type in AlertPolicy PiperOrigin-RevId: 564411592 Source-Link: googleapis/googleapis@babab51 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b282e012db0f0036bff22300d3fc101d258baca7 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjI4MmUwMTJkYjBmMDAzNmJmZjIyMzAwZDNmYzEwMWQyNThiYWNhNyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent ee7d24c commit 218e678

File tree

13 files changed

+431
-47
lines changed

13 files changed

+431
-47
lines changed

google/cloud/monitoring_v3/services/alert_policy_service/async_client.py

+15
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,11 @@ async def create_alert_policy(
499499
) -> alert.AlertPolicy:
500500
r"""Creates a new alerting policy.
501501
502+
Design your application to single-thread API calls that
503+
modify the state of alerting policies in a single
504+
project. This includes calls to CreateAlertPolicy,
505+
DeleteAlertPolicy and UpdateAlertPolicy.
506+
502507
.. code-block:: python
503508
504509
# This snippet has been automatically generated and should be regarded as a
@@ -629,6 +634,11 @@ async def delete_alert_policy(
629634
) -> None:
630635
r"""Deletes an alerting policy.
631636
637+
Design your application to single-thread API calls that
638+
modify the state of alerting policies in a single
639+
project. This includes calls to CreateAlertPolicy,
640+
DeleteAlertPolicy and UpdateAlertPolicy.
641+
632642
.. code-block:: python
633643
634644
# This snippet has been automatically generated and should be regarded as a
@@ -737,6 +747,11 @@ async def update_alert_policy(
737747
current alerting policy by specifying the fields to be updated
738748
via ``updateMask``. Returns the updated alerting policy.
739749
750+
Design your application to single-thread API calls that modify
751+
the state of alerting policies in a single project. This
752+
includes calls to CreateAlertPolicy, DeleteAlertPolicy and
753+
UpdateAlertPolicy.
754+
740755
.. code-block:: python
741756
742757
# This snippet has been automatically generated and should be regarded as a

google/cloud/monitoring_v3/services/alert_policy_service/client.py

+15
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,11 @@ def create_alert_policy(
718718
) -> alert.AlertPolicy:
719719
r"""Creates a new alerting policy.
720720
721+
Design your application to single-thread API calls that
722+
modify the state of alerting policies in a single
723+
project. This includes calls to CreateAlertPolicy,
724+
DeleteAlertPolicy and UpdateAlertPolicy.
725+
721726
.. code-block:: python
722727
723728
# This snippet has been automatically generated and should be regarded as a
@@ -848,6 +853,11 @@ def delete_alert_policy(
848853
) -> None:
849854
r"""Deletes an alerting policy.
850855
856+
Design your application to single-thread API calls that
857+
modify the state of alerting policies in a single
858+
project. This includes calls to CreateAlertPolicy,
859+
DeleteAlertPolicy and UpdateAlertPolicy.
860+
851861
.. code-block:: python
852862
853863
# This snippet has been automatically generated and should be regarded as a
@@ -947,6 +957,11 @@ def update_alert_policy(
947957
current alerting policy by specifying the fields to be updated
948958
via ``updateMask``. Returns the updated alerting policy.
949959
960+
Design your application to single-thread API calls that modify
961+
the state of alerting policies in a single project. This
962+
includes calls to CreateAlertPolicy, DeleteAlertPolicy and
963+
UpdateAlertPolicy.
964+
950965
.. code-block:: python
951966
952967
# This snippet has been automatically generated and should be regarded as a

google/cloud/monitoring_v3/services/alert_policy_service/transports/grpc.py

+15
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,11 @@ def create_alert_policy(
303303
304304
Creates a new alerting policy.
305305
306+
Design your application to single-thread API calls that
307+
modify the state of alerting policies in a single
308+
project. This includes calls to CreateAlertPolicy,
309+
DeleteAlertPolicy and UpdateAlertPolicy.
310+
306311
Returns:
307312
Callable[[~.CreateAlertPolicyRequest],
308313
~.AlertPolicy]:
@@ -329,6 +334,11 @@ def delete_alert_policy(
329334
330335
Deletes an alerting policy.
331336
337+
Design your application to single-thread API calls that
338+
modify the state of alerting policies in a single
339+
project. This includes calls to CreateAlertPolicy,
340+
DeleteAlertPolicy and UpdateAlertPolicy.
341+
332342
Returns:
333343
Callable[[~.DeleteAlertPolicyRequest],
334344
~.Empty]:
@@ -358,6 +368,11 @@ def update_alert_policy(
358368
current alerting policy by specifying the fields to be updated
359369
via ``updateMask``. Returns the updated alerting policy.
360370
371+
Design your application to single-thread API calls that modify
372+
the state of alerting policies in a single project. This
373+
includes calls to CreateAlertPolicy, DeleteAlertPolicy and
374+
UpdateAlertPolicy.
375+
361376
Returns:
362377
Callable[[~.UpdateAlertPolicyRequest],
363378
~.AlertPolicy]:

google/cloud/monitoring_v3/services/alert_policy_service/transports/grpc_asyncio.py

+15
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,11 @@ def create_alert_policy(
308308
309309
Creates a new alerting policy.
310310
311+
Design your application to single-thread API calls that
312+
modify the state of alerting policies in a single
313+
project. This includes calls to CreateAlertPolicy,
314+
DeleteAlertPolicy and UpdateAlertPolicy.
315+
311316
Returns:
312317
Callable[[~.CreateAlertPolicyRequest],
313318
Awaitable[~.AlertPolicy]]:
@@ -334,6 +339,11 @@ def delete_alert_policy(
334339
335340
Deletes an alerting policy.
336341
342+
Design your application to single-thread API calls that
343+
modify the state of alerting policies in a single
344+
project. This includes calls to CreateAlertPolicy,
345+
DeleteAlertPolicy and UpdateAlertPolicy.
346+
337347
Returns:
338348
Callable[[~.DeleteAlertPolicyRequest],
339349
Awaitable[~.Empty]]:
@@ -365,6 +375,11 @@ def update_alert_policy(
365375
current alerting policy by specifying the fields to be updated
366376
via ``updateMask``. Returns the updated alerting policy.
367377
378+
Design your application to single-thread API calls that modify
379+
the state of alerting policies in a single project. This
380+
includes calls to CreateAlertPolicy, DeleteAlertPolicy and
381+
UpdateAlertPolicy.
382+
368383
Returns:
369384
Callable[[~.UpdateAlertPolicyRequest],
370385
Awaitable[~.AlertPolicy]]:

google/cloud/monitoring_v3/services/notification_channel_service/async_client.py

+22-2
Original file line numberDiff line numberDiff line change
@@ -513,8 +513,10 @@ async def list_notification_channels(
513513
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
514514
metadata: Sequence[Tuple[str, str]] = (),
515515
) -> pagers.ListNotificationChannelsAsyncPager:
516-
r"""Lists the notification channels that have been
517-
created for the project.
516+
r"""Lists the notification channels that have been created for the
517+
project. To list the types of notification channels that are
518+
supported, use the ``ListNotificationChannelDescriptors``
519+
method.
518520
519521
.. code-block:: python
520522
@@ -782,6 +784,12 @@ async def create_notification_channel(
782784
single notification endpoint such as an email address,
783785
SMS number, or PagerDuty service.
784786
787+
Design your application to single-thread API calls that
788+
modify the state of notification channels in a single
789+
project. This includes calls to
790+
CreateNotificationChannel, DeleteNotificationChannel and
791+
UpdateNotificationChannel.
792+
785793
.. code-block:: python
786794
787795
# This snippet has been automatically generated and should be regarded as a
@@ -913,6 +921,12 @@ async def update_notification_channel(
913921
r"""Updates a notification channel. Fields not specified
914922
in the field mask remain unchanged.
915923
924+
Design your application to single-thread API calls that
925+
modify the state of notification channels in a single
926+
project. This includes calls to
927+
CreateNotificationChannel, DeleteNotificationChannel and
928+
UpdateNotificationChannel.
929+
916930
.. code-block:: python
917931
918932
# This snippet has been automatically generated and should be regarded as a
@@ -1033,6 +1047,12 @@ async def delete_notification_channel(
10331047
) -> None:
10341048
r"""Deletes a notification channel.
10351049
1050+
Design your application to single-thread API calls that
1051+
modify the state of notification channels in a single
1052+
project. This includes calls to
1053+
CreateNotificationChannel, DeleteNotificationChannel and
1054+
UpdateNotificationChannel.
1055+
10361056
.. code-block:: python
10371057
10381058
# This snippet has been automatically generated and should be regarded as a

google/cloud/monitoring_v3/services/notification_channel_service/client.py

+22-2
Original file line numberDiff line numberDiff line change
@@ -733,8 +733,10 @@ def list_notification_channels(
733733
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
734734
metadata: Sequence[Tuple[str, str]] = (),
735735
) -> pagers.ListNotificationChannelsPager:
736-
r"""Lists the notification channels that have been
737-
created for the project.
736+
r"""Lists the notification channels that have been created for the
737+
project. To list the types of notification channels that are
738+
supported, use the ``ListNotificationChannelDescriptors``
739+
method.
738740
739741
.. code-block:: python
740742
@@ -988,6 +990,12 @@ def create_notification_channel(
988990
single notification endpoint such as an email address,
989991
SMS number, or PagerDuty service.
990992
993+
Design your application to single-thread API calls that
994+
modify the state of notification channels in a single
995+
project. This includes calls to
996+
CreateNotificationChannel, DeleteNotificationChannel and
997+
UpdateNotificationChannel.
998+
991999
.. code-block:: python
9921000
9931001
# This snippet has been automatically generated and should be regarded as a
@@ -1123,6 +1131,12 @@ def update_notification_channel(
11231131
r"""Updates a notification channel. Fields not specified
11241132
in the field mask remain unchanged.
11251133
1134+
Design your application to single-thread API calls that
1135+
modify the state of notification channels in a single
1136+
project. This includes calls to
1137+
CreateNotificationChannel, DeleteNotificationChannel and
1138+
UpdateNotificationChannel.
1139+
11261140
.. code-block:: python
11271141
11281142
# This snippet has been automatically generated and should be regarded as a
@@ -1247,6 +1261,12 @@ def delete_notification_channel(
12471261
) -> None:
12481262
r"""Deletes a notification channel.
12491263
1264+
Design your application to single-thread API calls that
1265+
modify the state of notification channels in a single
1266+
project. This includes calls to
1267+
CreateNotificationChannel, DeleteNotificationChannel and
1268+
UpdateNotificationChannel.
1269+
12501270
.. code-block:: python
12511271
12521272
# This snippet has been automatically generated and should be regarded as a

google/cloud/monitoring_v3/services/notification_channel_service/transports/grpc.py

+22-2
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,10 @@ def list_notification_channels(
309309
]:
310310
r"""Return a callable for the list notification channels method over gRPC.
311311
312-
Lists the notification channels that have been
313-
created for the project.
312+
Lists the notification channels that have been created for the
313+
project. To list the types of notification channels that are
314+
supported, use the ``ListNotificationChannelDescriptors``
315+
method.
314316
315317
Returns:
316318
Callable[[~.ListNotificationChannelsRequest],
@@ -378,6 +380,12 @@ def create_notification_channel(
378380
single notification endpoint such as an email address,
379381
SMS number, or PagerDuty service.
380382
383+
Design your application to single-thread API calls that
384+
modify the state of notification channels in a single
385+
project. This includes calls to
386+
CreateNotificationChannel, DeleteNotificationChannel and
387+
UpdateNotificationChannel.
388+
381389
Returns:
382390
Callable[[~.CreateNotificationChannelRequest],
383391
~.NotificationChannel]:
@@ -408,6 +416,12 @@ def update_notification_channel(
408416
Updates a notification channel. Fields not specified
409417
in the field mask remain unchanged.
410418
419+
Design your application to single-thread API calls that
420+
modify the state of notification channels in a single
421+
project. This includes calls to
422+
CreateNotificationChannel, DeleteNotificationChannel and
423+
UpdateNotificationChannel.
424+
411425
Returns:
412426
Callable[[~.UpdateNotificationChannelRequest],
413427
~.NotificationChannel]:
@@ -436,6 +450,12 @@ def delete_notification_channel(
436450
437451
Deletes a notification channel.
438452
453+
Design your application to single-thread API calls that
454+
modify the state of notification channels in a single
455+
project. This includes calls to
456+
CreateNotificationChannel, DeleteNotificationChannel and
457+
UpdateNotificationChannel.
458+
439459
Returns:
440460
Callable[[~.DeleteNotificationChannelRequest],
441461
~.Empty]:

google/cloud/monitoring_v3/services/notification_channel_service/transports/grpc_asyncio.py

+22-2
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,10 @@ def list_notification_channels(
314314
]:
315315
r"""Return a callable for the list notification channels method over gRPC.
316316
317-
Lists the notification channels that have been
318-
created for the project.
317+
Lists the notification channels that have been created for the
318+
project. To list the types of notification channels that are
319+
supported, use the ``ListNotificationChannelDescriptors``
320+
method.
319321
320322
Returns:
321323
Callable[[~.ListNotificationChannelsRequest],
@@ -383,6 +385,12 @@ def create_notification_channel(
383385
single notification endpoint such as an email address,
384386
SMS number, or PagerDuty service.
385387
388+
Design your application to single-thread API calls that
389+
modify the state of notification channels in a single
390+
project. This includes calls to
391+
CreateNotificationChannel, DeleteNotificationChannel and
392+
UpdateNotificationChannel.
393+
386394
Returns:
387395
Callable[[~.CreateNotificationChannelRequest],
388396
Awaitable[~.NotificationChannel]]:
@@ -413,6 +421,12 @@ def update_notification_channel(
413421
Updates a notification channel. Fields not specified
414422
in the field mask remain unchanged.
415423
424+
Design your application to single-thread API calls that
425+
modify the state of notification channels in a single
426+
project. This includes calls to
427+
CreateNotificationChannel, DeleteNotificationChannel and
428+
UpdateNotificationChannel.
429+
416430
Returns:
417431
Callable[[~.UpdateNotificationChannelRequest],
418432
Awaitable[~.NotificationChannel]]:
@@ -442,6 +456,12 @@ def delete_notification_channel(
442456
443457
Deletes a notification channel.
444458
459+
Design your application to single-thread API calls that
460+
modify the state of notification channels in a single
461+
project. This includes calls to
462+
CreateNotificationChannel, DeleteNotificationChannel and
463+
UpdateNotificationChannel.
464+
445465
Returns:
446466
Callable[[~.DeleteNotificationChannelRequest],
447467
Awaitable[~.Empty]]:

0 commit comments

Comments
 (0)