智简魔方文档

同步信息

方法概览

项目内容
文档类型PHP 类方法
方法标识app\common\logic\ModuleLogic::syncAccount
所属业务用户管理
来源模块/系统模块逻辑

功能说明

同步信息,返回了对应的键才会同步修改

调用示例

$HostModel = 'string';
$result = (new \app\common\logic\ModuleLogic())->syncAccount($HostModel);

参数

参数类型必填默认值校验规则说明
HostModelHostModelrequire产品模型

返回值

返回项类型说明
statusint状态(200=成功,400=失败)
msgstring信息
data.dedicate_ipstring主IP
data.assign_ipstring附加IP
data.country_idint国家ID
data.citystring城市
data.areastring区域
data.power_statusstring电源状态(on=开机,off=关机,suspend=暂停,operating=操作中,fault=故障)
data.image_iconstring操作系统图标(Windows,CentOS,Ubuntu,Debian,ESXi,XenServer,FreeBSD,Fedora,ArchLinux,Rocky,AlmaLinux,OpenEuler,RedHat,其他)
data.image_namestring操作系统名称

正常返回

{
  "status": 1,
  "msg": "string",
  "data": {
    "dedicate_ip": "192.0.2.1",
    "assign_ip": "example-token",
    "country_id": 1,
    "city": "string",
    "area": "string",
    "power_status": "Active",
    "image_icon": "string",
    "image_name": "示例名称"
  }
}

异常情况

异常类型说明
Throwable调用失败时由具体实现抛出异常,异常信息以运行时结果为准。