-
Notifications
You must be signed in to change notification settings - Fork 0
/
projects.get.py
27 lines (20 loc) · 843 Bytes
/
projects.get.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from pprint import pprint
from googleapiclient import discovery
from oauth2client.client import GoogleCredentials
credentials = GoogleCredentials.get_application_default()
service = discovery.build('cloudresourcemanager', 'v1', credentials=credentials)
# The Project ID (for example, `my-project-123`).
# Required.
project_id = 'oxford-iiit-pets-183103' # TODO: Update placeholder value.
request = service.projects().get(projectId=project_id)
response = request.execute()
# TODO: Change code below to process the `response` dict:
pprint(response)
#==============================================
# Results:
#{'createTime': '2017-10-16T03:05:27.884Z',
# 'lifecycleState': 'ACTIVE',
# 'name': 'Oxford-IIIT Pets',
# 'projectId': 'oxford-iiit-pets-183103',
# 'projectNumber': '493151018659'}
#==============================================