GCP API网关是否可以更新配置文件的代码,还是我每次都需要创建全新的配置?

发布于 2025-02-09 23:06:21 字数 914 浏览 2 评论 0 原文

我正在尝试设置API网关来使用我运行的GCP功能。

我以前使用以下代码在终端中创建了一个配置:

gcloud api-gateway api-configs create apigateway-gcpfunction-config \
  --api=my-api --openapi-spec=apigateway_gcpfunction_config.yaml \
  --project=my-project [email protected]

此功能正确,当我使用以下代码查看配置时,我会收到一个通知,即它是有效的:

gcloud api-gateway api-configs describe apigateway-gcpfunction-config --api=my-api --project=my-project

但是现在我尝试更新配置文件,因为我需要更改我的GCP功能的路径,但我在文档中找不到有关如何更新代码的任何内容。

我在可以更新配置的各种属性,但是我不知道如何更新代码本身?这是不可能的吗?我应该每次都会创建一个新的配置,并在每次对配置文件进行更新时使用新的配置重新启动新的网关?

I'm trying to set up API Gateway to work with a GCP Function that I have running.

I previously created a config using the following code in terminal:

gcloud api-gateway api-configs create apigateway-gcpfunction-config \
  --api=my-api --openapi-spec=apigateway_gcpfunction_config.yaml \
  --project=my-project [email protected]

This works correctly, and when I view my config using the following code I get a notification that it's active:

gcloud api-gateway api-configs describe apigateway-gcpfunction-config --api=my-api --project=my-project

However now I'm trying to update my config file because I needed to change the path for my GCP Function, but I can't find anything in the documentation for how to update the code.

I see in this article detailing updating api-configs that it's possible to update various attributes of a config, but I can't figure out how to update the code itself? Is this impossible? Should I just create a new config every time and relaunch a new gateway with a new config every time there's an update to the config file????

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

彩虹直至黑白 2025-02-16 23:06:21

根据此文档的 config

除了更新其标签和显示名称外,您无法修改现有的API配置。

它也在描述:

注意:只能在API配置上更新名称和标签。

到目前为止,我们只能创建一个新的api config 如果我们要更新我们的配置文件。

我们可以为a 功能请求。

According to this documentation on updating an API config:

You cannot modify an existing API config other than to update its labels and its display name.

It is also stated in the documentation that you provided under Description:

NOTE: Only the name and labels may be updated on an API config.

As of the moment, we could only create a new API config if we want to update our config file.

We could file for a feature request for this option to be available in the future.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文