GithubHelp home page GithubHelp logo

alfonsof / google-cloud-python-examples Goto Github PK

View Code? Open in Web Editor NEW
26.0 2.0 28.0 54 KB

Python examples on Google Cloud Platform (GCP). How to manage Compute Engine VM instances, Cloud Storage buckets, etc.

License: MIT License

Python 100.00%
python gcp compute-engine google-cloud-storage google-storage-bucket google-cloud google-cloud-platform cloud-storage

google-cloud-python-examples's People

Contributors

alfonsof avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

google-cloud-python-examples's Issues

The resource 'projects/gcloud-java-examples' was not found

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'}]">

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.