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

Commit

Permalink
feat: BREAKING CHANGE: drop support for TimeSeriesQueryLanguageCondit…
Browse files Browse the repository at this point in the history
…ion as an alert condition type (#22)
  • Loading branch information
yoshi-automation committed May 13, 2020
1 parent 36a6539 commit e4bc568
Show file tree
Hide file tree
Showing 33 changed files with 1,807 additions and 1,933 deletions.
2 changes: 0 additions & 2 deletions .kokoro/publish-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

#!/bin/bash

set -eo pipefail

# Disable buffering, so that the logs stream through.
Expand Down
4 changes: 3 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.. include:: README.rst

.. include:: multiprocessing.rst

Api Reference
-------------
.. toctree::
Expand All @@ -17,4 +19,4 @@ For a list of all previous ``google-cloud-monitoring`` releases.
.. toctree::
:maxdepth: 2

changelog
changelog
7 changes: 7 additions & 0 deletions docs/multiprocessing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. note::

Because this client uses :mod:`grpcio` library, it is safe to
share instances across threads. In multiprocessing scenarios, the best
practice is to create client instances *after* the invocation of
:func:`os.fork` by :class:`multiprocessing.Pool` or
:class:`multiprocessing.Process`.
39 changes: 20 additions & 19 deletions google/cloud/monitoring_v3/gapic/alert_policy_service_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,22 +262,23 @@ def list_alert_policies(
... pass
Args:
name (str): Required. The project whose alert policies are to be listed. The format
is:
name (str): Required. The project whose alert policies are to be listed. The
format is:
projects/[PROJECT_ID_OR_NUMBER]
projects/[PROJECT_ID_OR_NUMBER]
Note that this field names the parent container in which the alerting
policies to be listed are stored. To retrieve a single alerting policy
by name, use the ``GetAlertPolicy`` operation, instead.
filter_ (str): If provided, this field specifies the criteria that must be met by alert
policies to be included in the response.
filter_ (str): If provided, this field specifies the criteria that must be met by
alert policies to be included in the response.
For more details, see `sorting and
filtering <https://cloud.google.com/monitoring/api/v3/sorting-and-filtering>`__.
order_by (str): A comma-separated list of fields by which to sort the result. Supports
the same set of field references as the ``filter`` field. Entries can be
prefixed with a minus sign to sort by the field in descending order.
order_by (str): A comma-separated list of fields by which to sort the result.
Supports the same set of field references as the ``filter`` field.
Entries can be prefixed with a minus sign to sort by the field in
descending order.
For more details, see `sorting and
filtering <https://cloud.google.com/monitoring/api/v3/sorting-and-filtering>`__.
Expand Down Expand Up @@ -375,7 +376,7 @@ def get_alert_policy(
Args:
name (str): Required. The alerting policy to retrieve. The format is:
projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]
projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]
retry (Optional[google.api_core.retry.Retry]): A retry object used
to retry requests. If ``None`` is specified, requests will
be retried using a default configuration.
Expand Down Expand Up @@ -451,20 +452,20 @@ def create_alert_policy(
>>> response = client.create_alert_policy(name, alert_policy)
Args:
name (str): Required. The project in which to create the alerting policy. The format
is:
name (str): Required. The project in which to create the alerting policy. The
format is:
projects/[PROJECT_ID_OR_NUMBER]
projects/[PROJECT_ID_OR_NUMBER]
Note that this field names the parent container in which the alerting
policy will be written, not the name of the created policy. The alerting
policy that is returned will have a name that contains a normalized
representation of this name as a prefix but adds a suffix of the form
``/alertPolicies/[ALERT_POLICY_ID]``, identifying the policy in the
container.
alert_policy (Union[dict, ~google.cloud.monitoring_v3.types.AlertPolicy]): Required. The requested alerting policy. You should omit the ``name``
field in this policy. The name will be returned in the new policy,
including a new ``[ALERT_POLICY_ID]`` value.
alert_policy (Union[dict, ~google.cloud.monitoring_v3.types.AlertPolicy]): Required. The requested alerting policy. You should omit the
``name`` field in this policy. The name will be returned in the new
policy, including a new ``[ALERT_POLICY_ID]`` value.
If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.monitoring_v3.types.AlertPolicy`
Expand Down Expand Up @@ -543,7 +544,7 @@ def delete_alert_policy(
Args:
name (str): Required. The alerting policy to delete. The format is:
projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]
projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]
For more information, see ``AlertPolicy``.
retry (Optional[google.api_core.retry.Retry]): A retry object used
Expand Down Expand Up @@ -625,9 +626,9 @@ def update_alert_policy(
If a dict is provided, it must be of the same form as the protobuf
message :class:`~google.cloud.monitoring_v3.types.AlertPolicy`
update_mask (Union[dict, ~google.cloud.monitoring_v3.types.FieldMask]): Optional. A list of alerting policy field names. If this field is not
empty, each listed field in the existing alerting policy is set to the
value of the corresponding field in the supplied policy
update_mask (Union[dict, ~google.cloud.monitoring_v3.types.FieldMask]): Optional. A list of alerting policy field names. If this field is
not empty, each listed field in the existing alerting policy is set to
the value of the corresponding field in the supplied policy
(``alert_policy``), or to the field's default value if the field is not
in the supplied alerting policy. Fields not listed retain their previous
value.
Expand Down

0 comments on commit e4bc568

Please sign in to comment.