Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d0573d7

Browse filesBrowse files
campionfellinJon Wayne Parrott
authored andcommitted
Fix client instantiation (GoogleCloudPlatform#1396)
1 parent ee774fc commit d0573d7
Copy full SHA for d0573d7

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎monitoring/api/v3/api-client/custom_metric.py

Copy file name to clipboardExpand all lines: monitoring/api/v3/api-client/custom_metric.py
+2-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.