[comment]: # ({59b410c0-59b410c0})
# hostinterface.update

[comment]: # ({/59b410c0-59b410c0})

[comment]: # ({ff3d5f77-253ed57f})
### 説明

`object hostinterface.update(object/array hostInterfaces)`

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

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

[comment]: # ({/ff3d5f77-253ed57f})

[comment]: # ({a99ac0ad-a99ac0ad})
### パラメータ

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

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

[comment]: # ({/a99ac0ad-a99ac0ad})

[comment]: # ({d3be3202-d3be3202})
### 戻り値

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

[comment]: # ({/d3be3202-d3be3202})

[comment]: # ({b41637d2-b41637d2})
### 例

[comment]: # ({/b41637d2-b41637d2})

[comment]: # ({d6135bbd-eb8b35e8})
#### ホストインターフェースポートの変更

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

[リクエスト](/manual/api#performing-requests):

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

レスポンス:

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

[comment]: # ({/d6135bbd-eb8b35e8})

[comment]: # ({97e4c8d0-97e4c8d0})
### ソース

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

[comment]: # ({/97e4c8d0-97e4c8d0})
