企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
## 云主机详情 获取云主机的详情 ~~~[api] get:http://www.tasiyun.com/api/virtual/云主机ID *id=1#云主机ID <<< success { "code": 0, "message": "获取云主机详情成功", "data": { "id": 26, //ID "users_id": 1, //插件用户ID "areas_id": 1, //数据中心ID "nodes_id": 2, //计算节点ID "plans_id": 0, "name": "ecs26", //名称 "core": 1, //核心数 "cpu_mode": 1, //处理器模式(0显示,1隐藏) "memory": 1024, //内存(MB) "sys_disk_mode": "writeback", //系统盘模式 "sys_disk_iops": 300, //系统盘IOPS "sys_disk_read": 200, //系统盘读取 "sys_disk_write": 200, //系统盘写入 "data_disk_mode": "writeback", //数据盘模式 "data_disk_size": 20, //数据盘大小(GB) "data_disk_iops": 300, //数据盘IOPS "data_disk_read": 200, //数据盘读取 "data_disk_write": 200, //数据盘写入 "net_out": 128, //上行带宽(KB) "net_in": 128, //下行带宽(KB) "snapshoot": 2, //快照数 "snapshots_switch":1 //是否开启自动快照(0否,1是) v2.0.6+ "backups": 2, //备份数 "ip_address_id": 10, //主IP的ID "private_ips_id": 43225, "vnc_ports_id": 25418, "templates_id": 2, //系统模版ID "cd_roms_id": 0, //挂载光驱媒介ID(0未挂载) "uuid": "16b74c0d-b324-f991-53cd-a3589c59669e", //UUID "mac": "00:F1:FA:F3:DA:1E", //MAC "sys_pwd": "123123", //系统密码 "vnc_pwd": "123123", //VNC密码 "expire_time": "2019-06-30 00:00:00", //到期时间 "reset_flow_time": "2019-08-15 10:03:00", //限制流量重置时间(可无视) "pause" :0, //是否停机锁定(0正常,1停机锁定) "nat": 1, //挂机宝(0否,1是) v2.0.6+ "nat_acl_limit": 3, //转发策略限制数(非挂机宝可无视该字段) v2.0.6+ "nat_web_limit": 3, //NAT建站限制数(非挂机宝可无视该字段) v2.0.6+ "flow_limit": 50, //流量限制GB(0不限制) v2.0.6+ "created_at": "2019-06-10 00:08:17", "updated_at": "2019-06-10 00:08:19", "deleted_at": null, "ip_list": [ //绑定IP信息 { "id": 10, "ip_pools_id": 2, //对应地址池ID "ip": "192.168.1.5", //IP地址 "virtuals_id": 26, //对应云主机ID "created_at": "2019-06-08 16:07:49", "updated_at": "2019-06-10 00:08:17", "deleted_at": null, "ip_pools": { //该IP的地址池信息 "id": 2, "gateway": "192.168.1.0", //网关 "mask": "255.255.255.0", //掩码 "type": "v4", "created_at": "2019-06-08 16:07:35", "updated_at": "2019-06-08 16:07:35", "deleted_at": null } } ], "private_ips": { //内网IP信息 "id": 43225, "ip": "10.0.170.45", //内网IP "virtuals_id": 26, //对应云主机ID "created_at": null, "updated_at": "2019-06-10 00:08:18", "deleted_at": null }, "vnc_ports": { //VNC端口信息 "id": 25418, "port": 35418, //端口号 "virtuals_id": 26, //对应云主机ID "created_at": null, "updated_at": "2019-06-10 00:08:19", "deleted_at": null }, "area_name": "香港", //数据中心名称 "node_name": "HK-98", //计算节点名称 "node_ip": "192.168.0.1", //计算节点IP "flow": { //月流量信息 "code": 0, //请先判断此状态码确保获取成功 (0成功,1失败) "message": "获取成功", "data": { "metric": "ecs28", "in": 75900, //下行(KB) "out": 2220 //上行(KB) } }, "status": { //云主机当前运行状态 "code": 0, //请先判断此状态码确保获取成功 (0成功,1失败) "message": "获取成功", "data": [ { "name": "ecs28", "code": 1 //状态码(1运行,2关机,3挂起,4关机中,5创建,8重装,11迁移,12迁移完成,13暂停) } ] }, "bind_security_group": { //云主机安全组 "id": 33, "virtuals_id": 28, "virtual_security_groups_id": 1, "created_at": null, "updated_at": null, "deleted_at": null, "bind_security_group": { //当前云主机应用的安全组信息 "id": 1, //组ID "users_id": 1, "name": "默认安全组", //安全组名称 "erasable": 1, //是否为系统安全组(1是,0否) "desc": "系统默认安全组", //描述 "created_at": "2019-06-08 13:57:25", "updated_at": "2019-06-08 13:57:25", "deleted_at": null, "security_group_acl": [ //当前安全组的策略 { "id": 1, //策略ID "orientation": 1, //规则方向(0出,1入) "tactics": 0, //授权策略(0拒绝,1允许) "type": "all", //协议类型(all,tcp,udp,icmp) "port_start": "-1", //起始端口(-1不限制) "port_end": "-1", //结束端口(-1不限制) "ip_start": "0.0.0.0", //起始IP(0.0.0.0不限制) "ip_end": "0.0.0.0", //结束IP(0.0.0.0不限制) "level": 10, //优先级 "virtual_security_groups_id": 1, //组ID "users_id": 1, "erasable": 1, //是否为系统策略(1是,0否) "desc": "允许所有", "created_at": null, "updated_at": null, "deleted_at": null }, { "id": 2, "orientation": 0, "tactics": 0, "type": "all", "port_start": "-1", "port_end": "-1", "ip_start": "0.0.0.0", "ip_end": "0.0.0.0", "level": 5, "virtual_security_groups_id": 1, "users_id": 1, "erasable": 1, "desc": "允许所有", "created_at": null, "updated_at": null, "deleted_at": null } ] } } } } <<< error { "code": 1, "message": "云主机不存在" } ~~~