5.15. 列出应用

使用 3scale toolbox 列出、创建、显示、应用或删除应用程序开发人员门户。

以下命令列出应用程序:

3scale application list [opts] <remote>

在列出应用程序时使用以下选项:

OPTIONS
       --account=<value>          Filter by account
    -o --output=<value>           Output format on stdout:
                                  one of json|yaml
       --plan=<value>             Filter by application plan. Service
                                  option required.
       --service=<value>          Filter by service

OPTIONS FOR APPLICATION
    -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. 创建应用程序

使用 create 命令创建与给定 3scale 帐户和应用计划相关联的一个应用。

所需的位置参数如下:

  • <service> 参考。它可以是服务 ID,也可以是 service system_name
  • <account> 参考。它可以是以下之一:

    • 帐户 ID
    • 帐户管理员用户的用户名电子邮件user_id
    • provider_key
  • <application plan> 参考。它可以是计划 ID,也可以是计划 system_name
  • <name> 应用程序名称。

以下命令创建应用程序:

3scale application create [opts] <remote> <account> <service> <application-plan> <name>

在创建应用程序时使用以下选项:

OPTIONS
       --application-id=<value>     App ID or Client ID (for OAuth and
                                    OpenID Connect authentication modes)
                                    of the application to be created.
       --application-key=<value>    App Key(s) or Client Secret (for OAuth
                                    and OpenID Connect authentication
                                    modes) of the application created.
       --description=<value>        Application description
    -o --output=<value>             Output format on stdout:
                                    one of json|yaml
       --redirect-url=<value>       OpenID Connect redirect url
       --user-key=<value>           User Key (API Key) of the application
                                    to be created.

OPTIONS FOR APPLICATION
    -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 application show [opts] <remote> <application>

应用程序参数允许:

  • user_key - API 密钥
  • App_id - 来自 app_id/app_key 对或 OAuthOpenID Connect (OIDC)验证模式的客户端 ID
  • 应用程序内部 ID
OPTIONS
    -o --output=<value>           Output format on stdout:
                                  one of json|yaml

OPTIONS FOR APPLICATION
    -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. 创建或更新应用程序

如果新应用程序不存在,或更新现有应用程序,使用以下命令创建新应用程序:

3scale application apply [opts] <remote> <application>

应用程序参数允许:

  • user_key - API 密钥
  • App_id - 来自 app_id/app_key 对或 OAuthOIDC 验证模式的客户端 ID
  • 应用程序内部 ID
  • 如果未找到应用程序且需要创建应用程序,则需要 account 可选参数。它可以是以下之一:

    • 帐户 ID
    • 3scale 帐户管理员用户的用户名电子邮件user_id
    • provider_key
  • 名称 不能用作唯一标识符,因为应用名称在 3scale 中不唯一。
  • 使用 --resume 标志恢复暂停的应用。
  • 暂停应用 - 将状态更改为通过 --suspend 标志暂停。

在更新应用程序时使用以下选项:

OPTIONS
       --account=<value>           Application's account. Required when
                                   creating
       --application-key=<value>   App Key(s) or Client Secret (for OAuth
                                   and OpenID Connect authentication
                                   modes) of the application to be
                                   created. Only used when application
                                   does not exist.
       --description=<value>       Application description
       --name=<value>              Application name
    -o --output=<value>            Output format on stdout:
                                   one of json|yaml
       --plan=<value>              Application's plan. Required when
                                   creating.
       --redirect-url=<value>      OpenID Connect redirect url
       --resume                    Resume a suspended application
       --service=<value>           Application's service. Required when
                                   creating.
       --suspend                   Suspends an application (changes the
                                   state to suspended)
       --user-key=<value>          User Key (API Key) of the application
                                   to be created.

OPTIONS FOR APPLICATION
    -c --config-file=<value>      3scale toolbox configuration file:
                                  defaults to $HOME/.3scalerc.yaml
    -h --help                     Show 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.4. 取消应用程序

以下命令删除应用程序:

3scale application delete [opts] <remote> <application>

应用程序参数允许:

  • user_key - API 密钥
  • App_id - 来自 app_id/app_key 对或 OAuthOIDC 验证模式的客户端 ID
  • 应用程序内部 ID