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

Commit

Permalink
feat: Added support for retriggering notifications in AlertPolicy (#560)
Browse files Browse the repository at this point in the history
* 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: googleapis/googleapis-gen@280264c
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: googleapis/googleapis-gen@b282e01
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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Sep 13, 2023
1 parent ee7d24c commit 218e678
Show file tree
Hide file tree
Showing 13 changed files with 431 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,11 @@ async def create_alert_policy(
) -> alert.AlertPolicy:
r"""Creates a new alerting policy.
Design your application to single-thread API calls that
modify the state of alerting policies in a single
project. This includes calls to CreateAlertPolicy,
DeleteAlertPolicy and UpdateAlertPolicy.
.. code-block:: python
# This snippet has been automatically generated and should be regarded as a
Expand Down Expand Up @@ -629,6 +634,11 @@ async def delete_alert_policy(
) -> None:
r"""Deletes an alerting policy.
Design your application to single-thread API calls that
modify the state of alerting policies in a single
project. This includes calls to CreateAlertPolicy,
DeleteAlertPolicy and UpdateAlertPolicy.
.. code-block:: python
# This snippet has been automatically generated and should be regarded as a
Expand Down Expand Up @@ -737,6 +747,11 @@ async def update_alert_policy(
current alerting policy by specifying the fields to be updated
via ``updateMask``. Returns the updated alerting policy.
Design your application to single-thread API calls that modify
the state of alerting policies in a single project. This
includes calls to CreateAlertPolicy, DeleteAlertPolicy and
UpdateAlertPolicy.
.. code-block:: python
# This snippet has been automatically generated and should be regarded as a
Expand Down
15 changes: 15 additions & 0 deletions google/cloud/monitoring_v3/services/alert_policy_service/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,11 @@ def create_alert_policy(
) -> alert.AlertPolicy:
r"""Creates a new alerting policy.
Design your application to single-thread API calls that
modify the state of alerting policies in a single
project. This includes calls to CreateAlertPolicy,
DeleteAlertPolicy and UpdateAlertPolicy.
.. code-block:: python
# This snippet has been automatically generated and should be regarded as a
Expand Down Expand Up @@ -848,6 +853,11 @@ def delete_alert_policy(
) -> None:
r"""Deletes an alerting policy.
Design your application to single-thread API calls that
modify the state of alerting policies in a single
project. This includes calls to CreateAlertPolicy,
DeleteAlertPolicy and UpdateAlertPolicy.
.. code-block:: python
# This snippet has been automatically generated and should be regarded as a
Expand Down Expand Up @@ -947,6 +957,11 @@ def update_alert_policy(
current alerting policy by specifying the fields to be updated
via ``updateMask``. Returns the updated alerting policy.
Design your application to single-thread API calls that modify
the state of alerting policies in a single project. This
includes calls to CreateAlertPolicy, DeleteAlertPolicy and
UpdateAlertPolicy.
.. code-block:: python
# This snippet has been automatically generated and should be regarded as a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,11 @@ def create_alert_policy(
Creates a new alerting policy.
Design your application to single-thread API calls that
modify the state of alerting policies in a single
project. This includes calls to CreateAlertPolicy,
DeleteAlertPolicy and UpdateAlertPolicy.
Returns:
Callable[[~.CreateAlertPolicyRequest],
~.AlertPolicy]:
Expand All @@ -329,6 +334,11 @@ def delete_alert_policy(
Deletes an alerting policy.
Design your application to single-thread API calls that
modify the state of alerting policies in a single
project. This includes calls to CreateAlertPolicy,
DeleteAlertPolicy and UpdateAlertPolicy.
Returns:
Callable[[~.DeleteAlertPolicyRequest],
~.Empty]:
Expand Down Expand Up @@ -358,6 +368,11 @@ def update_alert_policy(
current alerting policy by specifying the fields to be updated
via ``updateMask``. Returns the updated alerting policy.
Design your application to single-thread API calls that modify
the state of alerting policies in a single project. This
includes calls to CreateAlertPolicy, DeleteAlertPolicy and
UpdateAlertPolicy.
Returns:
Callable[[~.UpdateAlertPolicyRequest],
~.AlertPolicy]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,11 @@ def create_alert_policy(
Creates a new alerting policy.
Design your application to single-thread API calls that
modify the state of alerting policies in a single
project. This includes calls to CreateAlertPolicy,
DeleteAlertPolicy and UpdateAlertPolicy.
Returns:
Callable[[~.CreateAlertPolicyRequest],
Awaitable[~.AlertPolicy]]:
Expand All @@ -334,6 +339,11 @@ def delete_alert_policy(
Deletes an alerting policy.
Design your application to single-thread API calls that
modify the state of alerting policies in a single
project. This includes calls to CreateAlertPolicy,
DeleteAlertPolicy and UpdateAlertPolicy.
Returns:
Callable[[~.DeleteAlertPolicyRequest],
Awaitable[~.Empty]]:
Expand Down Expand Up @@ -365,6 +375,11 @@ def update_alert_policy(
current alerting policy by specifying the fields to be updated
via ``updateMask``. Returns the updated alerting policy.
Design your application to single-thread API calls that modify
the state of alerting policies in a single project. This
includes calls to CreateAlertPolicy, DeleteAlertPolicy and
UpdateAlertPolicy.
Returns:
Callable[[~.UpdateAlertPolicyRequest],
Awaitable[~.AlertPolicy]]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,10 @@ async def list_notification_channels(
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> pagers.ListNotificationChannelsAsyncPager:
r"""Lists the notification channels that have been
created for the project.
r"""Lists the notification channels that have been created for the
project. To list the types of notification channels that are
supported, use the ``ListNotificationChannelDescriptors``
method.
.. code-block:: python
Expand Down Expand Up @@ -782,6 +784,12 @@ async def create_notification_channel(
single notification endpoint such as an email address,
SMS number, or PagerDuty service.
Design your application to single-thread API calls that
modify the state of notification channels in a single
project. This includes calls to
CreateNotificationChannel, DeleteNotificationChannel and
UpdateNotificationChannel.
.. code-block:: python
# This snippet has been automatically generated and should be regarded as a
Expand Down Expand Up @@ -913,6 +921,12 @@ async def update_notification_channel(
r"""Updates a notification channel. Fields not specified
in the field mask remain unchanged.
Design your application to single-thread API calls that
modify the state of notification channels in a single
project. This includes calls to
CreateNotificationChannel, DeleteNotificationChannel and
UpdateNotificationChannel.
.. code-block:: python
# This snippet has been automatically generated and should be regarded as a
Expand Down Expand Up @@ -1033,6 +1047,12 @@ async def delete_notification_channel(
) -> None:
r"""Deletes a notification channel.
Design your application to single-thread API calls that
modify the state of notification channels in a single
project. This includes calls to
CreateNotificationChannel, DeleteNotificationChannel and
UpdateNotificationChannel.
.. code-block:: python
# This snippet has been automatically generated and should be regarded as a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -733,8 +733,10 @@ def list_notification_channels(
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = (),
) -> pagers.ListNotificationChannelsPager:
r"""Lists the notification channels that have been
created for the project.
r"""Lists the notification channels that have been created for the
project. To list the types of notification channels that are
supported, use the ``ListNotificationChannelDescriptors``
method.
.. code-block:: python
Expand Down Expand Up @@ -988,6 +990,12 @@ def create_notification_channel(
single notification endpoint such as an email address,
SMS number, or PagerDuty service.
Design your application to single-thread API calls that
modify the state of notification channels in a single
project. This includes calls to
CreateNotificationChannel, DeleteNotificationChannel and
UpdateNotificationChannel.
.. code-block:: python
# This snippet has been automatically generated and should be regarded as a
Expand Down Expand Up @@ -1123,6 +1131,12 @@ def update_notification_channel(
r"""Updates a notification channel. Fields not specified
in the field mask remain unchanged.
Design your application to single-thread API calls that
modify the state of notification channels in a single
project. This includes calls to
CreateNotificationChannel, DeleteNotificationChannel and
UpdateNotificationChannel.
.. code-block:: python
# This snippet has been automatically generated and should be regarded as a
Expand Down Expand Up @@ -1247,6 +1261,12 @@ def delete_notification_channel(
) -> None:
r"""Deletes a notification channel.
Design your application to single-thread API calls that
modify the state of notification channels in a single
project. This includes calls to
CreateNotificationChannel, DeleteNotificationChannel and
UpdateNotificationChannel.
.. code-block:: python
# This snippet has been automatically generated and should be regarded as a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,10 @@ def list_notification_channels(
]:
r"""Return a callable for the list notification channels method over gRPC.
Lists the notification channels that have been
created for the project.
Lists the notification channels that have been created for the
project. To list the types of notification channels that are
supported, use the ``ListNotificationChannelDescriptors``
method.
Returns:
Callable[[~.ListNotificationChannelsRequest],
Expand Down Expand Up @@ -378,6 +380,12 @@ def create_notification_channel(
single notification endpoint such as an email address,
SMS number, or PagerDuty service.
Design your application to single-thread API calls that
modify the state of notification channels in a single
project. This includes calls to
CreateNotificationChannel, DeleteNotificationChannel and
UpdateNotificationChannel.
Returns:
Callable[[~.CreateNotificationChannelRequest],
~.NotificationChannel]:
Expand Down Expand Up @@ -408,6 +416,12 @@ def update_notification_channel(
Updates a notification channel. Fields not specified
in the field mask remain unchanged.
Design your application to single-thread API calls that
modify the state of notification channels in a single
project. This includes calls to
CreateNotificationChannel, DeleteNotificationChannel and
UpdateNotificationChannel.
Returns:
Callable[[~.UpdateNotificationChannelRequest],
~.NotificationChannel]:
Expand Down Expand Up @@ -436,6 +450,12 @@ def delete_notification_channel(
Deletes a notification channel.
Design your application to single-thread API calls that
modify the state of notification channels in a single
project. This includes calls to
CreateNotificationChannel, DeleteNotificationChannel and
UpdateNotificationChannel.
Returns:
Callable[[~.DeleteNotificationChannelRequest],
~.Empty]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,10 @@ def list_notification_channels(
]:
r"""Return a callable for the list notification channels method over gRPC.
Lists the notification channels that have been
created for the project.
Lists the notification channels that have been created for the
project. To list the types of notification channels that are
supported, use the ``ListNotificationChannelDescriptors``
method.
Returns:
Callable[[~.ListNotificationChannelsRequest],
Expand Down Expand Up @@ -383,6 +385,12 @@ def create_notification_channel(
single notification endpoint such as an email address,
SMS number, or PagerDuty service.
Design your application to single-thread API calls that
modify the state of notification channels in a single
project. This includes calls to
CreateNotificationChannel, DeleteNotificationChannel and
UpdateNotificationChannel.
Returns:
Callable[[~.CreateNotificationChannelRequest],
Awaitable[~.NotificationChannel]]:
Expand Down Expand Up @@ -413,6 +421,12 @@ def update_notification_channel(
Updates a notification channel. Fields not specified
in the field mask remain unchanged.
Design your application to single-thread API calls that
modify the state of notification channels in a single
project. This includes calls to
CreateNotificationChannel, DeleteNotificationChannel and
UpdateNotificationChannel.
Returns:
Callable[[~.UpdateNotificationChannelRequest],
Awaitable[~.NotificationChannel]]:
Expand Down Expand Up @@ -442,6 +456,12 @@ def delete_notification_channel(
Deletes a notification channel.
Design your application to single-thread API calls that
modify the state of notification channels in a single
project. This includes calls to
CreateNotificationChannel, DeleteNotificationChannel and
UpdateNotificationChannel.
Returns:
Callable[[~.DeleteNotificationChannelRequest],
Awaitable[~.Empty]]:
Expand Down
Loading

0 comments on commit 218e678

Please sign in to comment.