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

Commit e4bc568

Browse files
feat: BREAKING CHANGE: drop support for TimeSeriesQueryLanguageCondition as an alert condition type (#22)
1 parent 36a6539 commit e4bc568

33 files changed

+1807
-1933
lines changed

.kokoro/publish-docs.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
#!/bin/bash
17-
1816
set -eo pipefail
1917

2018
# Disable buffering, so that the logs stream through.

docs/index.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.. include:: README.rst
22

3+
.. include:: multiprocessing.rst
4+
35
Api Reference
46
-------------
57
.. toctree::
@@ -17,4 +19,4 @@ For a list of all previous ``google-cloud-monitoring`` releases.
1719
.. toctree::
1820
:maxdepth: 2
1921

20-
changelog
22+
changelog

docs/multiprocessing.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.. note::
2+
3+
Because this client uses :mod:`grpcio` library, it is safe to
4+
share instances across threads. In multiprocessing scenarios, the best
5+
practice is to create client instances *after* the invocation of
6+
:func:`os.fork` by :class:`multiprocessing.Pool` or
7+
:class:`multiprocessing.Process`.

google/cloud/monitoring_v3/gapic/alert_policy_service_client.py

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -262,22 +262,23 @@ def list_alert_policies(
262262
... pass
263263
264264
Args:
265-
name (str): Required. The project whose alert policies are to be listed. The format
266-
is:
265+
name (str): Required. The project whose alert policies are to be listed. The
266+
format is:
267267
268-
projects/[PROJECT_ID_OR_NUMBER]
268+
projects/[PROJECT_ID_OR_NUMBER]
269269
270270
Note that this field names the parent container in which the alerting
271271
policies to be listed are stored. To retrieve a single alerting policy
272272
by name, use the ``GetAlertPolicy`` operation, instead.
273-
filter_ (str): If provided, this field specifies the criteria that must be met by alert
274-
policies to be included in the response.
273+
filter_ (str): If provided, this field specifies the criteria that must be met by
274+
alert policies to be included in the response.
275275
276276
For more details, see `sorting and
277277
filtering <https://cloud.google.com/monitoring/api/v3/sorting-and-filtering>`__.
278-
order_by (str): A comma-separated list of fields by which to sort the result. Supports
279-
the same set of field references as the ``filter`` field. Entries can be
280-
prefixed with a minus sign to sort by the field in descending order.
278+
order_by (str): A comma-separated list of fields by which to sort the result.
279+
Supports the same set of field references as the ``filter`` field.
280+
Entries can be prefixed with a minus sign to sort by the field in
281+
descending order.
281282
282283
For more details, see `sorting and
283284
filtering <https://cloud.google.com/monitoring/api/v3/sorting-and-filtering>`__.
@@ -375,7 +376,7 @@ def get_alert_policy(
375376
Args:
376377
name (str): Required. The alerting policy to retrieve. The format is:
377378
378-
projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]
379+
projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]
379380
retry (Optional[google.api_core.retry.Retry]): A retry object used
380381
to retry requests. If ``None`` is specified, requests will
381382
be retried using a default configuration.
@@ -451,20 +452,20 @@ def create_alert_policy(
451452
>>> response = client.create_alert_policy(name, alert_policy)
452453
453454
Args:
454-
name (str): Required. The project in which to create the alerting policy. The format
455-
is:
455+
name (str): Required. The project in which to create the alerting policy. The
456+
format is:
456457
457-
projects/[PROJECT_ID_OR_NUMBER]
458+
projects/[PROJECT_ID_OR_NUMBER]
458459
459460
Note that this field names the parent container in which the alerting
460461
policy will be written, not the name of the created policy. The alerting
461462
policy that is returned will have a name that contains a normalized
462463
representation of this name as a prefix but adds a suffix of the form
463464
``/alertPolicies/[ALERT_POLICY_ID]``, identifying the policy in the
464465
container.
465-
alert_policy (Union[dict, ~google.cloud.monitoring_v3.types.AlertPolicy]): Required. The requested alerting policy. You should omit the ``name``
466-
field in this policy. The name will be returned in the new policy,
467-
including a new ``[ALERT_POLICY_ID]`` value.
466+
alert_policy (Union[dict, ~google.cloud.monitoring_v3.types.AlertPolicy]): Required. The requested alerting policy. You should omit the
467+
``name`` field in this policy. The name will be returned in the new
468+
policy, including a new ``[ALERT_POLICY_ID]`` value.
468469
469470
If a dict is provided, it must be of the same form as the protobuf
470471
message :class:`~google.cloud.monitoring_v3.types.AlertPolicy`
@@ -543,7 +544,7 @@ def delete_alert_policy(
543544
Args:
544545
name (str): Required. The alerting policy to delete. The format is:
545546
546-
projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]
547+
projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]
547548
548549
For more information, see ``AlertPolicy``.
549550
retry (Optional[google.api_core.retry.Retry]): A retry object used
@@ -625,9 +626,9 @@ def update_alert_policy(
625626
626627
If a dict is provided, it must be of the same form as the protobuf
627628
message :class:`~google.cloud.monitoring_v3.types.AlertPolicy`
628-
update_mask (Union[dict, ~google.cloud.monitoring_v3.types.FieldMask]): Optional. A list of alerting policy field names. If this field is not
629-
empty, each listed field in the existing alerting policy is set to the
630-
value of the corresponding field in the supplied policy
629+
update_mask (Union[dict, ~google.cloud.monitoring_v3.types.FieldMask]): Optional. A list of alerting policy field names. If this field is
630+
not empty, each listed field in the existing alerting policy is set to
631+
the value of the corresponding field in the supplied policy
631632
(``alert_policy``), or to the field's default value if the field is not
632633
in the supplied alerting policy. Fields not listed retain their previous
633634
value.

0 commit comments

Comments
 (0)