alfonsof / google-cloud-python-examples Goto Github PK
View Code? Open in Web Editor NEWPython examples on Google Cloud Platform (GCP). How to manage Compute Engine VM instances, Cloud Storage buckets, etc.
License: MIT License
Python examples on Google Cloud Platform (GCP). How to manage Compute Engine VM instances, Cloud Storage buckets, etc.
License: MIT License
Hi GCP Support Team,
I am referring to https://github.com/alfonsof/google-cloud-python-examples and I am encountering the below issue
#python3 computeengineinstances.py
MENU
0 = Quit
1 = List all VM instances
2 = Create VM instance
3 = List VM instance
4 = Start instance
5 = Stop instance
6 = Reset instance
7 = Delete instance
Enter an option? 1
Listing VM instances ...
Traceback (most recent call last):
File "/root/google-cloud-python-examples/gcloudcomputeengine/computeengineinstances.py", line 56, in <module>
main()
File "/root/google-cloud-python-examples/gcloudcomputeengine/computeengineinstances.py", line 33, in main
computeenginehelper.list_instances()
File "/root/google-cloud-python-examples/gcloudcomputeengine/computeenginehelper.py", line 27, in list_instances
response = compute.instances().list(project=PROJECT_NAME, zone=ZONE_NAME).execute()
File "/usr/local/lib/python3.9/site-packages/googleapiclient/_helpers.py", line 131, in positional_wrapper
return wrapped(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/googleapiclient/http.py", line 937, in execute
raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 404 when requesting https://compute.googleapis.com/compute/v1/projects/gcloud-java-examples/zones/us-east1-b/instances?alt=json returned "The resource 'projects/gcloud-java-examples' was not found". Details: "[{'message': "The resource 'projects/gcloud-java-examples' was not found", 'domain': 'global', 'reason': 'notFound'}]">
When i run gcloud command it works.
gcloud compute instances list
NAME ZONE MACHINE_TYPE PREEMPTIBLE INTERNAL_IP EXTERNAL_IP STATUS
docker-drupal-krishnamohan europe-west2-a e2-medium 10.0.0.30 34.142.12.199 RUNNING
gke-dac-drupal-gke-clust-default-pool-92350ba9-390b europe-west2-a n2-standard-2 10.0.0.27 35.189.124.212 RUNNING
gke-dac-drupal-gke-clust-default-pool-b42e3504-sss9 europe-west2-b n2-standard-2 10.0.0.25 35.197.228.58 RUNNING
apache-cassandra-servicetest-jineesh europe-west2-c e2-medium 10.0.0.18 TERMINATED
apache-servicetest-jineesh europe-west2-c e2-medium 10.0.0.13 35.197.224.90 TERMINATED
apigee-1node-test-instance europe-west2-c n2-standard-2 10.0.0.20 TERMINATED
apigee-servicetest-jineesh europe-west2-c e2-standard-2 10.0.0.22 TERMINATED
gke-dac-drupal-gke-clust-default-pool-ee4376e8-lx9g europe-west2-c n2-standard-2 10.0.0.26 35.246.48.65 RUNNING
hsbctest-instance-1 europe-west2-c e2-medium 10.0.0.9 35.234.154.248 TERMINATED
jenkins-sreejith europe-west2-c e2-medium 10.0.0.23 TERMINATED
nginx-servicetest-jineesh europe-west2-c e2-medium 10.0.0.10 TERMINATED
pgql-servicetest-jineesh europe-west2-c e2-medium 10.0.0.19 TERMINATED
Any clue regarding the below issue?
googleapiclient.errors.HttpError: <HttpError 404 when requesting https://compute.googleapis.com/compute/v1/projects/gcloud-java-examples/zones/us-east1-b/instances?alt=json returned "The resource 'projects/gcloud-java-examples' was not found". Details: "[{'message': "The resource 'projects/gcloud-java-examples' was not found", 'domain': 'global', 'reason': 'notFound'}]">
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.