google-cloud-platform

How to get list of published docker images from GCP registry programmatically

与世无争的帅哥 提交于 2021-02-05 05:51:28
问题 I'm trying to find some API (for example java, but could be some other) how to get published docker image names / tags from google cloud platform registry. I found how to do this using gcloud console commands: gcloud container images list-tags gcr.io/[GCP_REPOSITORY_NAME] And it basically gave what I want, but it is console and I need this data get programmatically on back-end side. Any ideas guys? Thanks in advance. 回答1: Currently there is no REST API for the Google Container Registry

How to return with a specific status in a Python Google Cloud Function

≡放荡痞女 提交于 2021-02-05 05:24:25
问题 I notice that I can raise or return, producing 500 or 200 responses. for example: def random(request): coin = [true, false] if random.choice(coin): succeed() else: fail() def succeed(): return '{ "status": "success!"}' def fail(): raise Exception("failure") something roughly like that will produce either a 500 or a 200 response. But it doesn't, for example, let me raise a 422 error with a body. Can I do that? 回答1: Under the hood, Cloud Functions is just using Flask, so you can return anything

AppEngine load balancing across multiple regions

牧云@^-^@ 提交于 2021-02-04 16:09:00
问题 I understand that AppEngine project is defined to only one region and Google automatically handles the load balancing for you. But if I have apps in different regions across the world (In different projects as it seems to be a requirement) then how can I use the HTTPS load balancer in Google Cloud to automatically route the traffic based on the location where the request is coming from? (Consider both Standard and Flexible) 回答1: The Load Balancer in GCP can balance the traffic to different

AppEngine load balancing across multiple regions

女生的网名这么多〃 提交于 2021-02-04 16:08:39
问题 I understand that AppEngine project is defined to only one region and Google automatically handles the load balancing for you. But if I have apps in different regions across the world (In different projects as it seems to be a requirement) then how can I use the HTTPS load balancer in Google Cloud to automatically route the traffic based on the location where the request is coming from? (Consider both Standard and Flexible) 回答1: The Load Balancer in GCP can balance the traffic to different

AppEngine load balancing across multiple regions

青春壹個敷衍的年華 提交于 2021-02-04 16:08:35
问题 I understand that AppEngine project is defined to only one region and Google automatically handles the load balancing for you. But if I have apps in different regions across the world (In different projects as it seems to be a requirement) then how can I use the HTTPS load balancer in Google Cloud to automatically route the traffic based on the location where the request is coming from? (Consider both Standard and Flexible) 回答1: The Load Balancer in GCP can balance the traffic to different

AppEngine load balancing across multiple regions

若如初见. 提交于 2021-02-04 16:08:18
问题 I understand that AppEngine project is defined to only one region and Google automatically handles the load balancing for you. But if I have apps in different regions across the world (In different projects as it seems to be a requirement) then how can I use the HTTPS load balancer in Google Cloud to automatically route the traffic based on the location where the request is coming from? (Consider both Standard and Flexible) 回答1: The Load Balancer in GCP can balance the traffic to different

AppEngine load balancing across multiple regions

只愿长相守 提交于 2021-02-04 16:08:16
问题 I understand that AppEngine project is defined to only one region and Google automatically handles the load balancing for you. But if I have apps in different regions across the world (In different projects as it seems to be a requirement) then how can I use the HTTPS load balancer in Google Cloud to automatically route the traffic based on the location where the request is coming from? (Consider both Standard and Flexible) 回答1: The Load Balancer in GCP can balance the traffic to different

Unable to deploy google cloud functions

老子叫甜甜 提交于 2021-02-04 07:25:06
问题 I tried to deploy a cloud function on the google cloud platform using the my console. The command I used was, gcloud functions deploy function_name --runtime=python37 --memory=1024MB --region=asia-northeast1 --allow-unauthenticated --trigger-http But I am getting this error, ERROR: (gcloud.functions.deploy) OperationError: code=3, message=Build failed: could not resolve storage source: googleapi: Error 404: Not Found, notFound I tried googling around but it seems like no one had faced this

How can I write to Big Query using a runtime value provider in Apache Beam?

末鹿安然 提交于 2021-02-04 06:14:37
问题 EDIT: I got this to work using beam.io.WriteToBigQuery with the sink experimental option turned on. I actually had it on but my issue was I was trying to "build" the full table reference from two variables (dataset + table) wrapped in str(). This was taking the whole value provider arguments data as a string instead of calling the get() method to get just the value. OP I am trying to generate a Dataflow template to then call from a GCP Cloud Function.(For reference, my dataflow job is

Google Cloud Function Authorization Failing

微笑、不失礼 提交于 2021-02-04 06:01:32
问题 I have a Private Google Cloud Function. So I want to Authenticate to the Cloud Function with Authorization: Bearer token Header. But I'm getting 401 Unauthorized as the response. I created the private Cloud Function using: gcloud beta functions deploy MyFunction --runtime go111 --trigger-http --memory 128 --region us-central1 --source gs://bucketname/code.zip I created a service account and assigned it permission to access the cloud function: gcloud beta functions add-iam-policy-binding