From bc160cb81c75df344e4bc73fcd75d367a59f8126 Mon Sep 17 00:00:00 2001 From: Ling Huang Date: Wed, 19 Aug 2020 21:02:54 -0400 Subject: [PATCH] feat: add "not equal" support to the query filter (#11) * feat(monitoring): Add "not equal" support to the query filter * chore: blacken Co-authored-by: Bu Sun Kim --- .../google/cloud/monitoring_v3/query.py | 24 ++++++++++++++++--- .../tests/unit/test_query.py | 5 ++++ 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-monitoring/google/cloud/monitoring_v3/query.py b/packages/google-cloud-monitoring/google/cloud/monitoring_v3/query.py index 18ea0573515d..da7d74dbd060 100644 --- a/packages/google-cloud-monitoring/google/cloud/monitoring_v3/query.py +++ b/packages/google-cloud-monitoring/google/cloud/monitoring_v3/query.py @@ -206,6 +206,8 @@ def select_projects(self, *args): def select_resources(self, *args, **kwargs): """Copy the query and add filtering by resource labels. + See more documentation at: https://cloud.google.com/monitoring/api/v3/filters#comparisons. + Examples:: query = query.select_resources(zone='us-central1-a') @@ -273,8 +275,14 @@ def select_metrics(self, *args, **kwargs): metric.label.