0

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":

  1. > 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
  2. > 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.

Slava Medvediev
  • 1,431
  • 19
  • 35

3 Answers3

1

You try to update api-config of api-gateway, here api is a required flag:

From the docs, when first is specified, second is mandatory:

[--api-config=API_CONFIG : --api=API]

api-config: This flag must be specified if any of the other arguments in this group are specified.

After i've added --api, it was possible to update the gateway with the new api-config

Michael B.
  • 899
  • 10
  • 16
0

Try with aplha instead of beta 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

Jordi
  • 127
  • 1
  • 4
0

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.

aebrahim
  • 36
  • 3