Menu Close
3.10.2. 创建或更新方法
如果方法不存在,请使用以下步骤创建新方法,或更新现有的方法:
- 如果存在具有相同名称的方法,命令将返回错误消息。
-
使用
--disabled 标志
更新为禁用
的方法。 -
使用
--enabled 标志
将 更新为启用
的方法。
注意
服务
位置参数是服务引用,可以是服务ID
或 servicesystem_name
。- toolbox 使用其中任一个。
方法
位置参数是方法引用,可以是方法id
或方法system_name
。- toolbox 使用其中任一个。
以下命令更新方法:
3scale method apply [opts] <remote> <service> <method>
在更新方法时使用以下选项:
Options --description=<value> Set a method description --disabled Disable this method in all application plans --enabled Enable this method in all application plans -n --name=<value> Set the method name -o --output=<value> Output format on stdout: one of json|yaml Options for method -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