Am using python googleapi client library to get instance data for a project
Am getting instances like this:
from googleapiclient import discovery
from google.oauth2 import service_account
scopes = ['https://www.googleapis.com/auth/cloud-platform']
service_cred_file = 'service-credentials.json'
zone = 'us-central1-c'
project_id = 'my_project_id'
credentials = service_account.Credentials.from_service_account_file(service_cred_file, scopes=scopes)
service = discovery.build('compute', 'v1', credentials=credentials)
request = service.instances().list(project=project_id, zone=zone)
while request is not None:
response = request.execute()
for instance in response['items']:
print(instance)
Instance response does not contain uptime, user data (data of user that created instance) and current billing price
How can i get these attributes?