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

Commit a737469

Browse files
campionfellinJon Wayne Parrott
authored and
Jon Wayne Parrott
committed
Fix client instantiation [(#1396)](GoogleCloudPlatform/python-docs-samples#1396)
1 parent 389bba1 commit a737469

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

samples/snippets/v3/api-client/custom_metric.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
import random
3535
import time
3636

37-
import list_resources
37+
import googleapiclient.discovery
3838

3939

4040
def format_rfc3339(datetime_instance=None):
@@ -173,7 +173,7 @@ def main(project_id):
173173
METRIC_KIND = "GAUGE"
174174

175175
project_resource = "projects/{0}".format(project_id)
176-
client = list_resources.get_client()
176+
client = googleapiclient.discovery.build('monitoring', 'v3')
177177
create_custom_metric(client, project_resource,
178178
CUSTOM_METRIC_TYPE, METRIC_KIND)
179179
custom_metric = None

0 commit comments

Comments
 (0)