Update in Google Cloud Storage library - google-cloud-storage

I am working on a project and it requires the latest version of Google Cloud Storage client in Google App Engine app. Where can I find the latest version?

You can find those versions in the official Google App Engine documentation. It is suggested to use the versions mentioned in the documentation as they are the one that works perfectly with the examples also provided in the documentation.
There are several programming languages that are supported with the Google Cloud Storage client. You can see them in App Engine > Using Cloud Storage documentation.
Google Cloud Storage client for Python (google-cloud-storage==1.13.2)
Google Cloud Storage client for Java (1.62.0)
Google Cloud Storage client for Node.js ("#google-cloud/storage": "1.6.0")
Google Cloud Storage client for Go (Version not specified)
Google Cloud Storage client for Ruby (Version not specified)
Google Cloud Storage client for PHP ("google/cloud-storage": "^1.0")
Google Cloud Storage client for .NET (Version not specified)

Related

Can I deploy an app built on SAP Cloud SDK to Kubernetes?

We build a SCP native java application based on SAP cloud SDK. if we later on migrate to SCP kubernete env., would the app runs without migration? if changes needed, how much effort would it be? thanks.
Applications using the Java libraries of the SAP Cloud SDK can also run on a local machine and, as a consequence, as part of an application running in a container in Kubernetes. Additionally, the SDK already today provides abstractions that allow to run the same code on Cloud Foundry and Neo when accessing services of SAP Cloud Platform.
I cannot yet say how the access to specific functionality of SAP Cloud Platform works in Cloud Foundry versus a future Kubernetes environment, but this should be the blueprint.

How to authenticate IOT devices to Google Cloud Services

I have a Raspberry Pi3 device which has Android Things dev preview 0.6.1 installed. On completing certain operations, the device needs to send data to Google Cloud Storage. To do so it must have an API key to authenticate itself.
In Android devices it could be done easily using by integrating Google Sign in Option but since my Android Thing device doesn't have any interface, Google Sign In could not be implemented in it.
I have gone through github project Android Things Weather Station Sample which is using Google Service Account to publish data to PubSub. To do so, it generates and imports a credential.json file into the project and somehow generates credentials from it.
So my question stands is, without user consent, can we use Google Service Accounts to authenticate with Google Cloud Storage? If yes, how can we generate access token from it ? If no, is there any other method to authenticate with GCS?
The simplest and most secure way to authenticate your IoT devices with Google Cloud is using Cloud IoT Core to publish data over MQTT or HTTP into Cloud Pub/Sub. Cloud IoT Core is a bridge designed to securely manage large fleets of devices and authenticate them with your cloud project.
Take a look at the SensorHub sample app on GitHub, which is similar to the weather station, but uses Cloud IoT Core to authenticate and publish instead.
As Shubham stated, using a service account is one way to authenticate devices. Otherwise you'd need to build a mobile companion app which you use to authenticate the user. Then you would have to transfer that token to the IoT device.
In case anyone faces the same issue, I found this document which has explained the way to authenticate devices with Google Cloud without the consent of a user.

How to check usage of Google Cloud Storage?

I have an Android app which uses Firebase storage which in turn uses Google cloud storage.
How do I check my usage limits in either Firebase / Google cloud console.
I'm not able to locate any options in either Firebase console or Google cloud storage.
How can I locate storage usage for my app?

how to access Google Cloud Datastore through JDO, JPA or Objectify?

I'm using Google Cloud Datastore and I'm ok with it, but I have faced with an issue: is it possible to access Google Cloud Datastore (not GAE) through JDO, JPA or Objectify?
If yes, how to authenticate and connect them?
The Cloud Datastore API does not currently provide client libraries that support JDO, JPA, or Objectify. However, we are working on porting the App Engine Java client library to work on the Cloud Datastore API, and that should enable JDO/JPA/Objectify as well.
https://github.com/GoogleCloudPlatform/google-cloud-datastore/issues/34

How to retrieve objects with space in key saved by "Google Cloud Storage Java API"?

After upgraded the API to "Google Cloud Storage Java Client Library" from the old "Google Cloud Storage Java API", I found the objects with spaces in key can't be retrieved now.
In the web storage browser, it seems the key used by "Google Cloud Storage Java Client Library" is like "john+smith.png". But the the key used by "Google Cloud Storage Java API" is like "john%20smith.png". I think this is why now the objects saved by "Google Cloud Storage Java API" can't be retrieved by "Google Cloud Storage Java Client Library".
I also tried use the key "john%20smith.png" to retrieve object by using "Google Cloud Storage Java Client Library", it also returns "object not found".
Is there a solution for this problem?
(Ok, I updated the Google Cloud Storage Java Client Library to latest version, with tons new dependency libs, now the problem is gone)