资源中心/云资源池/云主机相关接口
PUTVM Instance Operations起始版本 4.7.0同步需要认证
扁平合并云主机
扁平合并云主机
调试可用性
在线调试
使用当前认证信息和示例参数提交 Mock 请求。
路径参数
请求参数
路径参数
uuidString必填资源的UUID,唯一标示该资源
请求体字段
flattenvminstanceObject必填flattenvminstance 请求体结构
fullString扁平合并云主机上所有云盘
dryRunString试运行,可用于预测数据用量
systemTagsString系统标签
userTagsString用户标签
响应状态
请求地址
PUT/zstack/v1/vm-instances/{uuid}/actions
/zstack/v1/vm-instances/{uuid}/actions
请求示例
curl -X PUT 'http://{host}/zstack/v1/vm-instances/{uuid}/actions' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"flattenvminstance":{"full":"<full>","dryRun":"<dryRun>"},"systemTags":"<systemTags>","userTags":"<userTags>"}'
响应示例
200{ "inventory": { "uuid": "ce09028b684c3eb78219f5e20bddc3d5", "name": "Test-VM", "description": "web server VM", "zoneUuid": "195b75808f5e334da0c35051b798605c", "clusterUuid": "9b24facbfe7e38d4a7959e15cb49932e", "imageUuid": "8cc2d322e48031a685dd7cf69bf69614", "hostUuid": "01dd8eacdf0b3b809f420fad019b4359", "lastHostUuid": "3462e6ec5e333d5f958c029bc9678610", "instanceOfferingUuid": "9b45c2c9d9323793a012be186db3dd5b", "rootVolumeUuid": "7197e64d225232a8947765e00de9b58c", "platform": "Linux", "defaultL3NetworkUuid": "9f1d4713936036fa905da008dc91311f", "type": "UserVm", "hypervisorType": "KVM", "memorySize": 8589934592, "cpuNum": 1, "allocatorStrategy": "LastHostPreferredAllocatorStrategy", "createDate": "Nov 14, 2017 10:20:57 PM", "lastOpDate": "Nov 14, 2017 10:20:57 PM", "state": "Running", "vmNics": [ { "uuid": "12dadcafdbe2331fa1b5048a86f262c9", "vmInstanceUuid": "ce09028b684c3eb78219f5e20bddc3d5", "usedIpUuid": "592c4dc8c1c83a5185488e3aded371b4", "l3NetworkUuid": "9f1d4713936036fa905da008dc91311f", "ip": "192.168.1.10", "mac": "00:0c:29:bd:99:fc", "hypervisorType": "KVM", "netmask": "255.255.255.0", "gateway": "192.168.1.1", "deviceId": 0, "state": "enable", "createDate": "Nov 14, 2017 10:20:57 PM", "lastOpDate": "Nov 14, 2017 10:20:57 PM" } ], "allVolumes": [ { "uuid": "7197e64d225232a8947765e00de9b58c", "name": "Root-Volume-For-VM-ce09028b684c3eb78219f5e20bddc3d5", "primaryStorageUuid": "a8c0be2045ef3d5eacd48a201bccf5b8", "vmInstanceUuid": "ce09028b684c3eb78219f5e20bddc3d5", "diskOfferingUuid": "a6eb081851d531b29f771c672c194dbd", "rootImageUuid": "8cc2d322e48031a685dd7cf69bf69614", "installPath": "/zstack_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-7197e64d225232a8947765e00de9b58c/7197e64d225232a8947765e00de9b58c.qcow2", "type": "Root", "format": "qcow2", "size": 107374182400, "actualSize": 21474836480, "deviceId": 0, "state": "Enabled", "status": "Ready", "createDate": "Nov 14, 2017 10:20:57 PM", "lastOpDate": "Nov 14, 2017 10:20:57 PM" } ] } }变更历史
此 API 暂无变更历史记录。
