4.10. メソッドの作成
3scale toolbox を使用して、デベロッパーポータルのメソッドの作成、適用、一覧表示、および削除を行います。
4.10.1. メソッドの作成 リンクのコピーリンクがクリップボードにコピーされました!
メソッドを作成するには、以下の手順に従います。
- メソッド名を指定する必要があります。
-
system-nameを上書きするには、オプションのパラメーターを使用します。 - 同じ名前のメソッドがすでに存在する場合、エラーメッセージが表示されます。
--disabledフラグを使用して、無効なメソッドを作成します。-
デフォルトでは、
有効になります。
-
デフォルトでは、
service位置引数はサービスの参照で、サービスのidまたはサービスのsystem_nameのどちらかです。- toolbox は、どちらか一方を使用します。
以下のコマンドにより、メソッドが作成されます。
3scale method create [opts] <remote> <service> <method-name>
メソッドの作成時に、以下のオプションを使用します。
Options
--description=<value> Set a method description
--disabled Disable this method in all
application plans
-o --output=<value> Output format on stdout:
one of json|yaml
-t --system-name=<value> Set the method system name
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
4.10.2. メソッドの作成または更新 リンクのコピーリンクがクリップボードにコピーされました!
メソッドが存在しない場合に新しく作成する、または既存のメソッドを更新するには、以下の手順に従います。
- 同じ名前のメソッドがすでに存在する場合、コマンドはエラーメッセージを返します。
-
--disabledフラグを使用して、無効なメソッドに更新します。 -
--enabledフラグを使用して、有効なメソッドに更新します。
service位置引数はサービスの参照で、サービスのidまたはサービスのsystem_nameのどちらかです。- toolbox は、どちらか一方を使用します。
method位置引数はメソッド参照で、メソッドの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
4.10.3. メソッドの一覧表示 リンクのコピーリンクがクリップボードにコピーされました!
以下のコマンドにより、メソッドが一覧表示されます。
3scale method list [opts] <remote> <service>
メソッドの一覧表示時に、以下のオプションを使用します。
Options
-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
4.10.4. メソッドの削除 リンクのコピーリンクがクリップボードにコピーされました!
以下のコマンドにより、メソッドが削除されます。
3scale method delete [opts] <remote> <service> <metric>
メソッドの削除時に、以下のオプションを使用します。
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