object hostinterface.replacehostinterfaces(object parameters)
Ez a módszer lehetővé teszi az összes gazdagép interfész cseréjét egy adott gazdagépen.
Ez a módszer csak az Admin és a Kiemelt rendszergazda számára érhető el felhasználói típusok. A metódus meghívására vonatkozó engedélyek felhasználói szerepkörben visszavonhatók beállítások. Lásd: User roles további információért.
(object) Parameters containing the ID of the host to be updated and the new host interfaces.
| Parameter | Type | Description |
|---|---|---|
| hostid (required) | string | ID of the host to be updated. |
| interfaces (required) | object/array | Host interfaces to replace the current host interfaces with. |
(object) Egy objektumot ad vissza, amely tartalmazza a létrehozott gazdagép azonosítóit interfészeket az interfaceids tulajdonság alatt.
Replace all host interfaces with a single agent interface.
Request:
{ "jsonrpc": "2.0", "method": "hostinterface.replacehostinterfaces", "params": { "hostid": "30052", "interfaces": { "dns": "", "ip": "127.0.0.1", "main": 1, "port": "10050", "type": 1, "useip": 1 } }, "auth": "038e1d7b1735c6a5436ee9eae095879e", "id": 1 }Response:
CHostInterface::replaceHostInterfaces() in ui/include/classes/api/services/CHostInterface.php.