Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Modify your program so that instead of printing the entire dictionary, response, it only prints the following, each on a separate line: user, operation type,

Modify your program so that instead of printing the entire dictionary, response, it only prints the following, each on a separate line: user, operation type, start date, start time

User name: instructor@.com Operation: stop Starting date: 2019-05-26 Starting time: 13:12:36.826-07:00

Since response is a dictionary, you access the elements like response['user']. Take a screenshot of the output of your program.

from pprint import pprint from googleapiclient import discovery from oauth2client.client import GoogleCredentials credentials = GoogleCredentials.get_application_default() service = discovery.build('compute', 'v1', credentials=credentials) # Project ID for this request. project = 'my-project' # TODO: Update placeholder value. # The name of the zone for this request. zone = 'my-zone' # TODO: Update placeholder value. # Name of the instance resource to stop. instance = 'my-instance' # TODO: Update placeholder value. request = service.instances().stop(project=project, zone=zone, instance=instance) response = request.execute() # TODO: Change code below to process the `response` dict: pprint(response)

I am not sure how to modify this above program using the instructions at the top of the page.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions

Question

Pal 14 What does it mean to you to be diligent for your client?

Answered: 1 week ago