InstanceMonitor: type: object required: - command properties: command: type: string example: block info description: qemu-monitor command InstanceSaveImage: type: object required: - name properties: name: type: string example: test-save-image description: 保存镜像的名称 auto_start: type: boolean default: false example: true description: 保存镜像后自动启动 notes: type: string example: save-image-info description: 镜像描述信息 InstanceMigrate: type: object properties: rescue_mode: type: boolean example: true description: 是否进入救援模式 prefer_host: type: string example: a53adc31-7601-4ddf-8874-93639f5626db description: 指定迁移的宿主机名称或ID auto_start: type: boolean example: true description: 迁移后是否自动启动 InstanceLiveMigrate: type: object properties: prefer_host: type: string example: a53adc31-7601-4ddf-8874-93639f5626db description: 指定迁移的宿主机名称或ID InstanceDeploy: type: object properties: keypair: type: string example: 3bce9607-2597-469f-8d9b-977345456739 description: 待绑定的秘钥名称或ID __delete_keypair__: type: boolean example: true description: 解绑秘钥 password: type: string example: jK9nPU&dSE9k8A^z description: 重设密码 reset_password: type: boolean example: true description: 若不指定password,会随机生成密码 restart: type: boolean example: true default: false description: 重置密码后是否重启, 此参数对于在线重置密码的实例无效 InstanceAttachDisk: type: object required: - disk_id properties: disk_id: type: string example: 3bce9607-2597-469f-8d9b-977345456739 description: 待挂载的磁盘名称或ID InstanceInsertIso: type: object required: - image_id properties: image_id: type: string example: 3bce9607-2597-469f-8d9b-977345456739 description: 光盘ID InstanceAddSecgroup: type: object required: - secgrp.0 properties: secgrp.0: type: string example: 3bce9607-2597-469f-8d9b-977345456739 description: 待绑定的安全组名称或ID secgrp.1: type: string example: 38dc8e80-14e5-4629-81c1-3847320ae821 description: 待绑定的安全组名称或ID InstanceIoThrottle: type: object properties: iops: type: integer example: 1000 description: 最高iops bps: type: integer example: 1000 description: 最高bps,单位MB InstanceRevokeSecgroup: type: object required: - secgrp.0 properties: secgrp.0: type: string example: 3bce9607-2597-469f-8d9b-977345456739 description: 待绑定的安全组名称或ID secgrp.1: type: string example: 38dc8e80-14e5-4629-81c1-3847320ae821 description: 待绑定的安全组名称或ID InstanceAssignSecgroup: type: object required: - secgrp properties: secgrp: type: string example: 3bce9607-2597-469f-8d9b-977345456739 description: 待替换的安全组名称或ID InstanceSetSecgroup: type: object required: - secgrp.0 properties: secgrp.0: type: string example: 3bce9607-2597-469f-8d9b-977345456739 description: 待绑定的安全组名称或ID secgrp.1: type: string example: 38dc8e80-14e5-4629-81c1-3847320ae821 description: 待绑定的安全组名称或ID InstanceCreateDisk: type: object required: - disks properties: disks: type: array items: $ref: '#/InstanceDisk' description: 待创建的磁盘列表 InstanceDetachDisk: type: object required: - disk_id properties: disk_id: type: string example: 38dc8e80-14e5-4629-81c1-3847320ae821 description: 待卸载的磁盘名称或ID keep_disk: type: boolean default: false example: true description: 卸载后的磁盘是否立即删除 InstanceDetachIsolateDevice: type: object required: - device properties: device: type: string example: 38dc8e80-14e5-4629-81c1-3847320ae821 description: 待卸载透传设备的名称或ID InstanceAttachIsolateDevice: type: object required: - device properties: device: type: string example: 38dc8e80-14e5-4629-81c1-3847320ae821 description: 待挂载透传设备的名称或ID InstanceChangeIpAddr: type: object required: - net_desc properties: reserve: type: boolean default: false example: true description: 是否是保留IP ip_addr: type: string example: 192.168.222.203 description: 待更换的ip地址 mac: type: string example: 98:90:96:a9:4a:10 description: 待更换网卡的MAC地址 index: type: integer example: 1 description: 待更换网卡的索引 net_desc: type: object $ref: '#/InstanceNetwork' InstanceNetwork: type: object properties: idx: type: integer example: 0 description: 网络索引 network: type: string example: dab5b874-755a-4223-89a5-4acf36305756 description: 网络名称或ID wire: type: string example: a53adc31-7601-4ddf-8874-93639f5626db description: 二层网络名称或ID exit: type: boolean default: false example: true description: 是否是外网ip address: type: string example: 192.168.222.203 description: 分配的IP地址 InstanceDetachNetwork: type: object required: - net_id properties: reserve: type: boolean default: false example: true description: 是否是保留IP net_id: type: string example: a53adc31-7601-4ddf-8874-93639f5626db description: 网络ID ip_addr: type: string example: 192.168.222.203 description: 解绑的网卡IP地址 mac: type: string example: 40:a8:f0:c9:64:91 description: 解绑的网卡MAC地址 InstanceAttachNetwork: type: object required: - net_desc properties: net_desc: type: object $ref: '#/InstanceNetwork' InstanceChangeBandwidth: type: object required: - bandwidth properties: bandwidth: type: integer example: 40 description: 更改后的带宽值 ip_addr: type: string example: 192.168.222.203 description: 待更换的ip地址 mac: type: string example: 98:90:96:a9:4a:10 description: 待更换网卡的MAC地址 index: type: integer example: 1 description: 待更改带宽的网卡索引 InstanceChangeConfig: type: object properties: instance_type: type: string example: ecs.c1.c1m1 description: 更换实例规格 vcpu_count: type: integer example: 6 description: 更改CPU大小 vmem_size: type: string example: 8G description: 更改内存大小 disks: type: array items: $ref: '#/InstanceDiskInfo' auth_start: type: boolean default: false example: true description: 更改配置后自动启动 InstanceReset: type: object properties: is_hard: type: boolean default: false example: true description: 是否硬重启 InstanceStatus: type: object properties: status: type: string example: ready description: 设置实例的状态 InstanceStop: type: object properties: is_force: type: boolean default: false example: true description: 是否强制关闭实例 InstanceRestart: type: object properties: is_force: type: boolean default: false example: true description: 是否强制关闭实例 InstanceSendKeys: type: object required: [keys] properties: keys: type: string example: delete description: 按键 InstanceAssociateEip: type: object required: [eip] properties: eip: type: string example: f0a7e768-8011-4d74-8844-a239eb061214 description: 弹性IP名称或ID InstanceDissociateEip: type: object properties: auto_delete: type: boolean default: false example: true description: 解绑的弹性IP是否立即删除 InstanceCreateEip: type: object properties: charge_type: type: string default: traffic example: bandwidth enum: [traffic,bandwidth] description: 弹性IP计费模式 bandwidth: type: integer example: 10 description: 弹性IP带宽 InstanceUserData: type: object required: [user_data] properties: user_data: type: string example: I2Nsb3VkLWNvbmZpZwpkaXNhYmxlX3Jvb3Q6IDAKcGhvbmVfaG9tZToKICB1cmw6IGh0dHA6Ly93d3cueXVuaW9uLmlvLyRJTlNUQU5DRV9JRApydW5jbWQ6CiAgLSBta2RpciAvdmFyL3J1bi9odHRwZApzc2hfcHdhdXRoOiAxCnVzZXJzOgogIC0gZGVmYXVsdAogIC0gbmFtZTogcm9vdAogICAgc3NoX2F1dGhvcml6ZWRfa2V5czoKICAgICAgLSBzc2gtcnNhIEFBQUFCM056YUMxeWMyRUFBQUFEQVFBQkFBQUJBUUNhNEU4d21JT2xtaDFHOFpSY1UyenBubDJmckQybExLZFhwYlRlVVVaRUtZRkZsWU04VE01VXJLcnFyTUNkM3JGamFZR1RLV2lRd09pV3JvWGxBWGF1c2JiVkVJMjlLWSsxVmQyNnFOeWVqaitDWk85TUNqMG5hSXJxYTFWMG9mM1RRWTVJMlUrVG9Ja3lMcVZGV2hXVmE1N3YvR1V4c1YyYU5UbVVTL3F6ME9QU0NGUGJHV1dCMzVyc2p3bkZ3cTJqRjZFOHlKZ1RHRFRZWmNzZ2hSaTNJV2Z5ZmVIYlN1V2R2bjZOOFhyUEJEbU5nN2grR1N2TzZGSmxwNk1VdzFoc2NFQ2kxM0d3cVhZZ0puTEc1Uk1pRkg2czB2aG96eUhrdWUxdk9UY3J5UEhSUUQwSnovSU5VU2FnZ0g4TDFIbllTVWF2T2Y0Q3cyNVc5SGZ6Z1VCZgogIC0gbG9ja19wYXNzd2Q6IGZhbHNlCiAgICBuYW1lOiB5dW5pb24KICAgIHBhc3N3ZDogJDYkTWh5ZEE4OXYkdGdqQVNyTVVTUC9UZmJaWVdCVnRZSUhJcy5yRkVtejYvdDZjOWJUMTk5aTkzWUpuNUtxcy9DNkVZSXBIRk9tZFZUZ0F5SGozSUlnVk5MWVN5VS5VVi4KICAgIHN1ZG86IEFMTD0oQUxMKSBOT1BBU1NXRDpBTEwKd3JpdGVfZmlsZXM6CiAgLSBjb250ZW50OiBaMjlpZFdsc1pBcGpiRzkxWkdWMkNnPT0KICAgIGVuY29kaW5nOiBiNjQKICAgIHBhdGg6IC9ldGMvYW5zaWJsZS9ob3N0cwogIC0gY29udGVudDogfAogICAgICAxMjcuMC4wLjEgbG9jYWxob3N0CiAgICAgIAogICAgcGF0aDogL2V0Yy9ob3N0cw== description: user-data数据 InstanceDeleteBackup: type: object properties: purge: type: boolean default: false example: true description: 是否清除数据 InstanceSetExtraOption: type: object required: [key] properties: key: type: string description: key value: type: string description: value InstanceDelExtraOption: type: object required: [key] properties: key: type: string description: key InstanceRenew: type: object required: [duration] properties: duration: type: string example: 1M description: 续费时长 InstanceRebuildRoot: type: object properties: image_id: type: string example: f0a7e768-8011-4d74-8844-a239eb061214 description: 镜像ID,若不传此参数,会默认使用原系统镜像 auto_start: type: boolean default: false example: true description: 重装系统后自动启动 reset_password: type: boolean default: true example: false description: 重置密码 password: type: string example: xoYG0Q08JgGqTQP8 description: 手动指定密码,若reset_password=true, password为空,会默认随机生成密码 keypair: type: string example: fc7544d0-d12b-439e-8d91-f77f3d54c06b description: 密码名称或密码 all_disks: type: boolean default: false example: true description: 重置数据盘 InstanceCreate: type: object properties: name: type: string example: test-instance description: 实例名称 generate_name: type: string example: test-instance-name-duplicate description: 实例名称(若遇见已存在同名的实例,会自动加上后缀) keypair: type: string example: ebb5abd3-8ffb-42ec-8bc6-38ba5b949885 description: 秘钥ID或秘钥名称 password: type: string example: Gohci0vo description: 实例密码 cdrom: type: string example: 70802da8-affe-4247-8ce8-610f205019ca description: 光盘ID或名称,仅kvm支持,实例启动后会从此光盘启动 vcpu_count: type: integer example: 3 description: 实例核数 vga: type: string example: std enum: [std,vmware,cirrus,qxl] vdi: type: string example: vnc description: VNC协议 enum: [vnc,spice] bios: type: string example: BIOS description: 操作系统bios类型 description: type: string example: test-create-instance description: 实例描述 boot: type: string example: cdrom description: 启动设备 enum: [disk,cdrom] enable_cloud_init: type: boolean default: false example: true description: 是否启用cloud-init no_account_init: type: boolean default: false example: true description: 为true,代表保留镜像设置,不会新设登录密码 allow_delete: type: boolean default: false example: true description: 删除保护开启关闭 shutdown_behavior: type: string default: stop example: terminate description: 实例关闭后的操作 enum: [stop, terminate] auto_start: type: boolean default: false example: true description: 实例创建后立即启动 is_system: type: boolean default: false example: true description: 是否成为系统资源 duration: type: string example: 1D enum: [1H, 1D, 1W, 1M, 1Y] description: 包年包月计费周期,仅管理员可用 eip_bw: type: integer example: 10 description: 新建弹性EIP带宽, 单位Mbps eip_charge_type: type: string example: traffic enum: [traffic,bandwidth] description: 新建弹性EIP计费类型 eip: type: string example: bdb1a67f-38b7-4cb0-8676-e56909deec56 description: 弹性EIP名称或ID,机器创建完成后会自动绑定此EIP prefer_region: type: string example: Default description: 区域名称或ID(指定调度区域,若此区域资源不足会导致实例创建失败) prefer_zone: type: string example: Zone-1 description: 可用区名称或ID(指定调度可用区,若此可用区资源不足会导致实例创建失败,此优先级高于prefer_region) prefer_host: type: string example: e621b7c6-cb38-48a3-81bd-1f3a9cc07161 description: 宿主机名称或ID(指定调度宿主机,若宿主机上资源不足会导致实例创建失败,此优先级高于prefer_zone) prefix_wire: type: string example: 572f250d-5a68-4471-8c1a-02568c7920fb description: 二层网络名称或ID(指定关联的二层网络,优先级高于prefer_zone) backup: type: boolean default: false description: 创建实例同时创建备份机, 仅适用于KVM平台 backup_host: type: string example: a44c54d8-9294-475e-8067-c333f3d2fd01 description: 指定备份机所在的宿主机 hypervisor: type: string example: qcloud enum: [kvm,esxi,baremetal,container,aliyun,azure,qcloud,aws,huawei,openstack,ucloud,zstack] description: 指定创建实例平台 resource_type: type: string example: shared enum: [shared,dedicated,prepaid] description: | 指定实例的宿主机资源共享类型 - shared,共享型实例 - dedicated,专属实例 - prepared,从预付费资源池创建 schedtag: type: array items: $ref: '#/Schetag' description: 调度标签列表 count: type: integer default: 1 description: 批量创建实例个数 disks: type: array items: $ref: '#/InstanceDisk' guest_image_id: type: string example: 如果使用主机镜像创建主机,需要额外指定主机镜像的 ID,来检验 disks 的 Image ID 是否正确 groups: type: array description: 主机组列表 items: type: string description: 主机组的ID或者Name secgroups: type: array description: 安全组列表 items: type: string example: default description: 安全组名称或ID,建议使用ID InstanceDisk: type: object properties: index: type: integer example: 0 description: 实例盘索引 disk_type: type: string example: data enum: [sys,data] description: 实例盘类型 backend: type: string default: "" example: local description: 实例盘后端存储类型 image_id: type: string example: e568a156-1228-4cca-8272-cc7447d0e0ec description: 系统盘镜像名称或ID snapshot_id: type: string example: 87b789e3-eb82-4b14-8513-c1a241e6f887 description: 快照名称或ID size: type: integer example: 10240 description: 实例盘大小,单位MB fs: type: string example: ext4 description: 磁盘文件系统 format: type: string example: qcow2 description: 磁盘存储格式 driver: type: string example: virtio description: 磁盘驱动 cache: type: string example: none description: 磁盘缓存模式 mountpoint: type: string example: /opt description: 挂载点 medium: type: string example: ssd description: 实例盘介质类型 storage_id: type: string example: 6cb2ad27-66a3-4823-83e1-42bcd3080d24 description: 指定存储 Schetag: type: object properties: id: type: string example: d75cfa62-6ab6-4154-893a-3142bcb167bc description: 调度标签ID strategy: type: string example: require enum: [require,exclude,prefer,avoid] description: 标签类型 InstanceUpdate: type: object properties: name: type: string example: other-name vmem_size: type: string example: 2G vcpu_count: type: integer example: 2 vga: type: string example: std enum: [std,vmware,cirrus,qxl] vdi: type: string example: spice enum: [vnc,spice] bios: type: string example: UEFI enum: [BIOS,UEFI] description: example: test type: string boot: type: string example: cdrom enum: [disk,cdrom] delete: type: string example: disable enum: [enable,disable] shutdown_behavior: type: string example: terminate enum: [stop,terminate] InstanceSecgroup: properties: id: type: string example: ea27c0ce-5870-49f3-8d57-f53e63f40361 description: 安全组ID name: type: string example: Default description: 安全组名称 InstanceDiskInfo: properties: aio_mode: type: string example: native description: aio模式 cache_mode: type: string example: none description: cache模式 disk_format: type: string example: qcow2 description: 磁盘存储格式 disk_type: type: string example: sys description: 磁盘类型 sys(系统盘), data(数据盘) driver: type: string example: scsi description: 磁盘驱动 image: type: string example: centos-6.9-20180414.qcow2 description: 镜像名称(磁盘根据此镜像创建) image_id: type: string example: 9aad22f9-829c-4d8d-8676-c81a5c7756f2 description: 镜像ID index: type: integer example: 0 description: 磁盘索引(实例的第几块盘) medium_type: type: string example: rotate description: 磁盘介质类型 size: type: integer example: 30720 description: 磁盘大小,单位Mb storage_type: type: string example: rbd description: 磁盘后端存储类型 Instance: type: object description: 实例 properties: id: type: string example: ea27c0ce-5870-49f3-8d57-f53e63f40361 description: 实例uuid readOnly: true name: type: string description: 实例名称 example: ins-r4hilqks readOnly: true billing_type: type: string description: 计费类型 example: postpaid readOnly: true account: type: string example: office-qcloud description: 所属云账号名称 account_id: type: string description: 所属云账号ID bios: type: string example: 8ebce595-1a37-473e-8ff8-f02f0b82773d description: BIOS信息 boot_order: type: string example: cdn description: 启动顺序 d(磁盘), c(光盘), n(网络) brand: type: string example: DStack description: 虚拟化品牌 can_delete: type: boolean description: 是否可删除 can_recycle: type: boolean description: 是否可回归资源池 can_update: type: boolean description: 是否可以更新资源属性 cdrom: type: string example: 536a05a9-0b4a-4464-8eaf-dd5eb3c7b553(inserting) description: 光盘信息 created_at: type: string example: 2019-05-30T02:25:38.000000Z description: 资源创建时间 disable_delete: type: boolean description: 是否开启删除保护 true(开启), false(关闭) disk: type: integer example: 51200 description: 磁盘大小(包含系统盘), 单位Mb external_id: type: string example: ins-r4hilqks description: 实例外部ID,对应的纳管云实例ID host: type: string example: office-qcloud-ap-guangzhou-3 description: 实例所在的宿主机名称 host_id: type: string example: c767afc9-9175-4ae6-893b-b990c5c128d6 description: 实例所在的宿主机ID hypervisor: type: string example: qcloud description: 虚拟化平台或技术 instance_type: type: string example: SN3ne.SMALL2 description: 实例规格 ips: type: string example: 10.0.42.4 description: 实例内网IP,若有多个ip, 以 `,` 分隔 is_emulated: type: boolean example: false description: 是否是虚拟出来的实例 is_gpu: type: boolean example: false description: GPU实例 is_system: type: boolean example: false description: 系统资源 pending_deleted: type: boolean example: false description: 是否在回收站 keypair_id: type: string example: None description: 实例绑定的秘钥ID networks: type: string example: "eth0:10.168.222.189/24/00:22:dc:df:15:00/1/vnet222/virtio/1000" description: 网络信息 (网卡/网络索引/ip/网络掩码/mac地址/vlanId/网络名称/网络驱动/网卡带宽), 多个网卡会以换行分隔 machine: type: string example: pc description: 机器 manager: type: string example: office-qcloud description: 归属订阅名称 manager_id: type: string example: 30960bb7-4e7b-4df9-8738-b8ceafc99045 description: 归属订阅ID manager_project: type: string example: system description: 订阅归属项目名称 manager_project_id: type: string example: 29541006ae9148b9bf002fc294218022 description: 订阅归属项目ID os_type: type: string example: Linux description: 实例系统类型 project_src: type: string example: cloud description: 归属项目同步来源 provider: type: string example: Qcloud description: 纳管云平台 region: type: string example: 腾讯云 华南地区(广州) description: 区域名称 region_ext_id: type: string example: ap-guangzhou description: 区域外部ID,对应纳管云区域ID region_id: type: string example: 13947bd8-569e-4094-8b03-4339c2a8e45b description: 区域ID secgroups: type: array items: $ref: '#/InstanceSecgroup' description: 关联安全组列表 shutdown_behavior: type: string example: stop description: 关机后操作类型 status: type: string example: running description: 资源状态 tenant: type: string example: system description: 归属项目名称 tenant_id: type: string example: 29541006ae9148b9bf002fc294218022 description: 归属项目ID update_version: type: integer example: 2 description: 资源被更新的次数 updated_at: type: string example: 2019-05-30T06:36:39.000000Z description: 资源最近一次更新时间 vcpu_count: type: integer example: 1 description: 实例CPU核数 vdi: type: string example: vnc description: vnc连接协议 vga: type: string example: std description: vga vmem_size: type: integer example: 2048 description: 实例内存大小, 单位MB vpc: type: string example: test-vpc description: 虚拟私有网络名称 vpc_id: type: string example: 7712297d-d0eb-4f6d-81e2-c9f768ca8bb6 description: 虚拟私有网络ID zone: type: string example: 腾讯云 广州三区 description: 可用区名称 zone_ext_id: type: string example: ap-guangzhou-3 description: 可用区外部ID,对应纳管云可用区ID zone_id: type: string example: a16d3e0b-3fd6-45ec-8b2d-e51a51fa0efc description: 可用区ID disks_info: type: array items: $ref: '#/InstanceDiskInfo' description: 实例盘列表 disk_count: type: integer example: 4 description: 磁盘数量 InstanceListResponse: type: object properties: limit: type: integer example: 20 servers: type: array items: $ref: '#/Instance' total: type: integer example: 124 InstanceResponse: type: object properties: server: type: object $ref: '#/Instance' InstanceVnc: type: object description: 实例VNC信息 properties: id: type: string example: ea27c0ce-5870-49f3-8d57-f53e63f40361 description: 实例uuid readOnly: true host: type: string description: VNC地址 example: 192.168.222.4 readOnly: true port: type: integer description: VNC端口 example: 5910 readOnly: true protocol: type: integer description: VNC协议 example: vnc InstanceVncResponse: type: object properties: server: type: object $ref: '#/InstanceVnc' InstanceBindGroups: type: object required: - group.0 - group.1 properties: group.0: type: string example: vv100455-79ef-43a3-8fc3-23adc74b8b87 description: 主机组的ID或者Name group.1: type: string example: dd100399-79ef-43a3-8fc3-23adc74b8b87 description: 主机组的ID或者Name