2.10. メソッド
3scale toolbox を使用して、デベロッパーポータルのメソッドの作成、適用、一覧表示、および削除を行います。
2.10.1. メソッドの作成
- メソッド名を指定する必要があります。
-
system-nameを上書きするには、オプションのパラメーターを使用します。 - 同じ名前のメソッドがすでに存在する場合、エラーメッセージが表示されます。
--disabledフラグを使用して、無効なメソッドを作成します。-
デフォルトでは、
有効になります。
-
デフォルトでは、
注記
service位置引数はサービスの参照で、サービスのidまたはサービスのsystem_nameのどちらかです。- toolbox は、どちらか一方を使用します。
以下のコマンドにより、メソッドが作成されます。
3scale method create [opts] <remote> <service> <method-name>
メソッドの作成時に、以下のオプションを使用します。
Option
--description=<value> This will set a method description
--disabled This will disable this method in all
application plans
-t --system-name=<value> This will set the method system name
Options for method
-c --config-file=<value> 3scale toolbox configuration file (default:
$HOME/.3scalerc.yaml)
-h --help show help for this command
-k --insecure Proceed and operate even for server
connections otherwise considered insecure
-v --version This will print the version of this command
--verbose Verbose mode2.10.2. メソッドの作成または更新
メソッドが存在しない場合に新しく作成する、または既存のメソッドを更新するには、以下の手順に従います。
- 同じ名前のメソッドがすでに存在する場合、コマンドは失敗します。
-
--disabledフラグを使用して、無効なメソッドに更新します。 -
--enabledフラグを使用して、有効なメソッドに更新します。
注記
service位置引数はサービスの参照で、サービスのidまたはサービスのsystem_nameのどちらかです。- toolbox は、どちらか一方を使用します。
method位置引数はメソッド参照で、メソッドのidまたはメソッドのsystem_nameのどちらかです。- toolbox は、どちらか一方を使用します。
以下のコマンドにより、メソッドが更新されます。
3scale method apply [opts] <remote> <service> <method>
メソッドの更新時に、以下のオプションを使用します。
Options
--description=<value> This will set a method description
--disabled This will disable this method in all
application plans
--enabled This will enable this method in all
application plans
-n --name=<value> This will set the method name
Options for method
-c --config-file=<value> 3scale toolbox configuration file
(default: $HOME/.3scalerc.yaml)
-h --help This will show help for this command
-k --insecure Proceed and operate even for server
connections otherwise considered insecure
-v --version This will print the version of this command
--verbose Verbose mode2.10.3. メソッドの一覧表示
以下のコマンドにより、メソッドが一覧表示されます。
3scale method list [opts] <remote> <service>
メソッドの一覧表示時に、以下のオプションを使用します。
Options for method
-c --config-file=<value> 3scale toolbox configuration file
(default: $HOME/.3scalerc.yaml)
-h --help show help for this command
-k --insecure Proceed and operate even for server
connections otherwise considered insecure
-v --version This will print the version of this command
--verbose Verbose mode2.10.4. メソッドの削除
以下のコマンドにより、メソッドが削除されます。
3scale method delete [opts] <remote> <service> <metric>
メソッドの削除時に、以下のオプションを使用します。
Options for method
-c --config-file=<value> 3scale toolbox configuration file
(default: $HOME/.3scalerc.yaml)
-h --help show help for this command
-k --insecure Proceed and operate even for server
connections otherwise considered insecure
-v --version This will print the version of this command
--verbose Verbose mode