skip to Main Content

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.

3

Answers


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

    Login or Signup to reply.
  2. 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.

    Login or Signup to reply.
  3. 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search