搜索

5.15. 列出代理配置

download PDF

使用 3scale toolbox 列出、显示并在 Developer Portal 中提升所有定义的代理配置。

以下命令列出代理配置:

$ 3scale proxy-config list <remote> <service> <environment>

在列出代理配置时请使用以下选项:

Options
    -o --output=<value>           Output format on stdout:
                                  one of json|yaml

Options for proxy-config
    -c --config-file=<value>      3scale toolbox configuration file:
                                  defaults to $HOME/.3scalerc.yaml
    -h --help                     Print help for this command
    -k --insecure                 Proceed and operate even for server
                                  connections otherwise considered insecure
    -v --version                  Print the version of this command
       --verbose                  Verbose mode

5.15.1. 显示代理配置

以下命令显示代理配置:

$ 3scale proxy-config show <remote> <service> <environment>

在显示代理配置时请使用以下选项:

Options
       --config-version=<value>   Specify the proxy configuration version.
                                  If not specified, defaults to latest
    -o --output=<value>           Output format on stdout:
                                  one of json|yaml

Options for proxy-config
    -c --config-file=<value>      3scale toolbox configuration file:
                                  defaults to $HOME/.3scalerc.yaml
    -h --help                     Print help for this command
    -k --insecure                 Proceed and operate even for server
                                  connections otherwise considered
                                  insecure
    -v --version                  Print the version of this command
       --verbose                  Verbose mode

5.15.2. 提升代理配置

以下命令将最新的暂存代理配置提升到生产环境:

$ 3scale proxy-config promote <remote> <service>

在将最新的暂存代理配置提升到生产环境时,请使用以下选项:

Options for proxy-config
    -c --config-file=<value>      3scale toolbox configuration file:
                                  defaults to $HOME/.3scalerc.yaml
    -h --help                     Print help for this command
    -k --insecure                 Proceed and operate even for server
                                  connections otherwise considered insecure
    -v --version                  Print the version of this command
       --verbose                  Verbose mode

5.15.3. 导出代理配置

例如,如果您有一个自我管理的 APIcast 网关没有连接到 3scale 实例,请使用 proxy-config export 命令。在这种情况下,手动注入 3scale 配置,或使用 APICast 部署和配置选项注入 3scale 配置。在这两种情况下,您必须提供 3scale 配置。

以下命令导出可注入 APIcast 网关的配置:

$ 3scale proxy-config export <remote>

您可以在导出用作 3scale 配置文件 的供应商帐户的代理配置时指定以下选项:

Options for proxy-config
--environment=<value>      Gateway environment. Must be 'sandbox' or
                           'production' (default: sandbox)
-o --output=<value>        Output format. One of: json|yaml

5.15.4. 部署代理配置

以下 deploy 命令将您的 APIcast 配置提升到 3scale 中的暂存环境,或提升到生产环境(如果使用 Service Mesh)。

$ 3scale proxy deploy <remote> <service>

当使用 deploy 命令将 APIcast 配置提升到 stage 环境时,您可以指定以下选项:

-o --output=<value>        Output format. One of: json|yaml

5.15.5. 更新代理配置

以下 update 命令更新您的 APIcast 配置。

$ 3scale proxy update <remote> <service>

您可以使用 update 命令更新 APIcast 配置时指定以下选项:

-o --output=<value>           Output format. One of: json|yaml
-p --param=<value>            APIcast configuration parameters. Format:
                              [--param key=value]. Multiple options allowed.

5.15.6. 显示代理配置

以下 show 命令获取您的 HTPasswded APIcast 配置。

$ 3scale proxy show <remote> <service>

在使用 show 命令时,您可以指定以下选项,以获取取消部署 APIcast 配置:

$ -o --output=<value>           Output format. One of: json|yaml

5.15.7. 部署代理配置(已弃用)

注意

在 3scale 2.12 中,对 proxy-config deploy 命令的支持已被弃用。

使用以下命令:

  • 代理部署
  • 代理更新
  • 代理显示

如需更多信息,请参阅部署代理配置

以下 deploy 命令将您的 APIcast 配置提升到 3scale 中的暂存环境,或提升到生产环境(如果使用 Service Mesh)。

$ 3scale proxy-config deploy <remote> <service>

当使用 deploy 命令将 APIcast 配置提升到 stage 环境时,您可以指定以下选项:

$ -o --output=<value>        Output format. One of: json|yaml

其他资源

Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.