Skip to content

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

License

Notifications You must be signed in to change notification settings

alfonsof/google-cloud-java-examples

Repository files navigation

Java examples on Google Cloud Platform (GCP)

This repo contains Java code examples on Google Cloud Platform (GCP).

These examples show how to use Java 8 and Google Cloud Client Library for Java in order to manage services on Google Cloud Platform.

Google Cloud Client Library for Java allows Java developers to write software that makes use of Google Cloud services like Compute Engine and Cloud Storage.

Quick start

You must have a Google Cloud Platform (GCP) account.

The code for the samples is contained in individual folders on this repository.

For instructions on running the code, please consult the README in each folder.

This is the list of examples:

Compute - Compute Engine:

  • gcloudcomputeengine - Google Cloud Compute Engine VM instances: Example of how to handle Compute Engine VM instances.

Storage - Cloud Storage:

  • gcloudstoragecreate - Google Cloud Storage Create: Example of how to handle Cloud Storage buckets and create a new Google Storage bucket in a Google Cloud Project.
  • gcloudstoragedelete - Google Cloud Storage Delete: Example of how to handle Cloud Storage buckets and delete a Google Storage bucket in a Google Cloud Project.
  • gcloudstoragelist - Google Cloud Storage List: Example of how to handle Cloud Storage buckets and list information about the objects in a Cloud Storage bucket in a Google Cloud Project.
  • gcloudstoragelistall - Google Cloud Storage List All: Example of how to handle Cloud Storage buckets and list information about all Cloud Storage buckets and the objects that they contain in a Google Cloud Project. The credentials are taken from GOOGLE_APPLICATION_CREDENTIALS environment variable.
  • gcloudstoragelistallparam - Google Cloud Storage List All Parameters: Example of how to handle Cloud Storage buckets and list all Cloud Storage buckets and the files they contain in a Google Cloud Project. The user must provide the credentials using the application parameters.
  • gcloudstorageupload - Google Cloud Storage Upload: Example of how to handle Cloud Storage buckets and upload a local file to a Cloud Storage bucket in a Google Cloud Project.
  • gcloudstoragedownload - Google Cloud Storage Download: Example of how to handle Cloud Storage buckets and download an object in a Cloud Storage bucket in a Google Cloud Project to a local file.
  • gcloudstoragedeleteobject - Google Cloud Storage Delete Object: Example of how to handle Cloud Storage buckets and delete an object in a Google Storage bucket in a Google Cloud Project.
  • gcloudstoragecopy - Google Cloud Storage Copy: Example of how to handle Cloud Storage buckets and copy an object from a Google Storage bucket to another Google Storage bucket in a Google Cloud Project.
  • gcloudstoragemove - Google Cloud Storage Move: Example of how to handle Cloud Storage buckets and move an object from a Google Storage bucket to another Google Storage bucket in a Google Cloud Project.

License

This code is released under the MIT License. See LICENSE file.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages