From d0573d78ff15bf007f0efc6608d0a897f79cb8f1 Mon Sep 17 00:00:00 2001 From: Campion Fellin Date: Mon, 12 Mar 2018 15:04:13 -0700 Subject: [PATCH] Fix client instantiation (#1396) --- monitoring/api/v3/api-client/custom_metric.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monitoring/api/v3/api-client/custom_metric.py b/monitoring/api/v3/api-client/custom_metric.py index 20f7722c909b..6cf839803579 100644 --- a/monitoring/api/v3/api-client/custom_metric.py +++ b/monitoring/api/v3/api-client/custom_metric.py @@ -34,7 +34,7 @@ import random import time -import list_resources +import googleapiclient.discovery def format_rfc3339(datetime_instance=None): @@ -173,7 +173,7 @@ def main(project_id): METRIC_KIND = "GAUGE" project_resource = "projects/{0}".format(project_id) - client = list_resources.get_client() + client = googleapiclient.discovery.build('monitoring', 'v3') create_custom_metric(client, project_resource, CUSTOM_METRIC_TYPE, METRIC_KIND) custom_metric = None