Ir al contenido principal

Entradas

Mostrando entradas de julio, 2020

gcloud: Run cloud functions from command line

Tired of that slow web interface that Google Cloud Console offers to those lazy programmers out there? Then gcloud comes to your help. Among other miriad of functions, gcloud allows calling GC functions from the command line of your computer. For instance, this command calls the helloWorld function, deployed on the cloud region "europe-west1": gcloud functions call helloWorld --region="europe-west1" Calling  gcloud functions list  is the way to get all the available GC functions, together with their state, trigger and cloud region. Functions input data Most of the times your functions will require some data input to work. Depending on the function triggering method, data can arrive in different ways (in the body of an HTTP request, in a PubSub message...), but they way of sending that data from the gcloud command is always the same: gcloud functions call helloWorld \ --region "europe-west1&q