diff --git a/samples/snippets/v3/api-client/custom_metric.py b/samples/snippets/v3/api-client/custom_metric.py index 20f7722c..6cf83980 100644 --- a/samples/snippets/v3/api-client/custom_metric.py +++ b/samples/snippets/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