これは開発版のドキュメントを表示しています。内容が不完全な場合があります。
このページには自動翻訳されたコンテンツが含まれています。 誤りを見つけた場合は、その箇所を選択して Ctrl+Enter を押し、編集者に報告してください。

hostinterface.update

説明

object hostinterface.update(object/array hostInterfaces)

このメソッドは、既存のホストインターフェースを更新することができます。

このメソッドは、AdminおよびSuper adminタイプのユーザーのみ利用可能です。メソッドを呼び出す権限は、ユーザーの役割の設定で取り消すことができます。詳細はユーザーの役割を参照してください。

パラメータ

(object/array) ホストインターフェースのプロパティが更新されます。

interfaceidプロパティは、ホストインターフェイスごとに定義する必要があり、他のすべてのプロパティはオプションです。 指定されたプロパティのみが更新され、他のプロパティは変更されません。

戻り値

(object) interfaceidsプロパティの下で更新されたホストインターフェイスのIDを含むオブジェクトを返します。

ホストインターフェースポートの変更

ホストインターフェースのポートを変更します。

リクエスト:

{
           "jsonrpc": "2.0",
           "method": "hostinterface.update",
           "params": {
               "interfaceid": "30048",
               "port": "30050"
           },
           "id": 1
       }

レスポンス:

{
           "jsonrpc": "2.0",
           "result": {
               "interfaceids": [
                   "30048"
               ]
           },
           "id": 1
       }

Changing multiple host interface ports

Change the port of multiple host interfaces.

Request:

{
           "jsonrpc": "2.0",
           "method": "hostinterface.update",
           "params": [
               {
                   "interfaceid": "30049",
                   "port": "10055"
               },
               {
                   "interfaceid": "30050",
                   "port": "10055"
               },
               {
                   "interfaceid": "30051",
                   "port": "10055"
               }
           ],
           "id": 1
       }

Response:

{
           "jsonrpc": "2.0",
           "result": {
               "interfaceids": [
                   "30049",
                   "30050",
                   "30051"
               ]
           },
           "id": 1
       }

ソース

CHostInterface::update() in ui/include/classes/api/services/CHostInterface.php.