I’m looking for a way to automate config updates for Google API Gateway, i.e. change config for an existing instance of "API Gateway" in a single step.
What I’ve tried so far, assuming that new API config name is "my-new-config" and API Gateway name is "my-gateway":
> gcloud beta api-gateway gateways update my-gateway --api-config=my-new-config --location=us-central1
Output:
ERROR: (gcloud.beta.api-gateway.gateways.update) INVALID_ARGUMENT: update_mask does not contain any field paths
> gcloud beta api-gateway gateways update my-gateway --api-config=my-new-config --location=us-central1 --display-name random-string-for-display-name
Output:
Command executes successfully, but config change is not applied.
gcloud version: 333.0.0
OS: Debian linux
I’ve created 2 tickets in Google’s issue tracker (one, two), but there’s no activity for them after 3 weeks.
3
Answers
Try with
aplha
instead ofbeta
and specifying de API ID flag (--api
):gcloud alpha api-gateway gateways update my-gateway --api=api-id --api-config=my-new-config --location=us-central1
You’re missing the
--api
flag in step 2, which seems to be required. It looks like without that specified, it doesn’t make the right request.You try to update
api-config
ofapi-gateway
, hereapi
is a required flag:From the docs, when first is specified, second is mandatory:
After i’ve added
--api
, it was possible to update the gateway with the newapi-config