QingCloud 文档 – 云服务器 - kaiyun官方网站下载手机网页 /development_docs/api/command_list/instance/ Recent content in 云服务器 on QingCloud 文档 Hugo -- gohugo.io Development_docs: DescribeInstances /development_docs/api/command_list/instance/describe_instances/ Mon, 01 Jan 0001 00:00:00 +0000 /development_docs/api/command_list/instance/describe_instances/ <p>获取一个或多个云服务器</p> <p>可根据云服务器ID, 状态, 云服务器名称, 镜像ID 作过滤条件, 来获取云服务器列表。 如果不指定任何过滤条件, 默认返回你所拥有的所有云服务器。</p> <p><strong>Request Parameters</strong></p> <table> <thead> <tr> <th>Parameter name</th> <th>Type</th> <th>Description</th> <th>Required</th> </tr> </thead> <tbody> <tr> <td>instances.n</td> <td>String</td> <td>云服务器ID</td> <td>No</td> </tr> <tr> <td>image_id.n</td> <td>String</td> <td>一个或多个镜像ID</td> <td>No</td> </tr> <tr> <td>instance_type.n</td> <td>String</td> <td>云服务器配置类型</td> <td>No</td> </tr> <tr> <td>instance_class</td> <td>Integer</td> <td>云服务器性能类型: 性能型:0, 超高性能型:1, 基础型:101, 企业型:201</td> <td>No</td> </tr> <tr> <td>vcpus_current</td> <td>Integer</td> <td>云服务器CPU的核心数</td> <td>No</td> </tr> <tr> <td>memory_current</td> <td>Integer</td> <td>云服务器内存大小</td> <td>No</td> </tr> <tr> <td>os_disk_size</td> <td>Integer</td> <td>云服务器系统盘大小</td> <td>No</td> </tr> <tr> <td>exclude_reserved</td> <td>Integer</td> <td>是否过滤预留云服务器, 若为1, 则不返回预留云服务器信息</td> <td>No</td> </tr> <tr> <td>status.n</td> <td>String</td> <td>云服务器状态: pending, running, stopped, suspended, terminated, ceased</td> <td>No</td> </tr> <tr> <td>search_word</td> <td>String</td> <td>搜索关键词, 支持云服务器ID, 云服务器名称</td> <td>No</td> </tr> <tr> <td>tags.n</td> <td>String</td> <td>按照标签ID过滤, 只返回已绑定某标签的资源</td> <td>No</td> </tr> <tr> <td>dedicated_host_group_id</td> <td>String</td> <td>按照专属宿云服务器组过滤</td> <td>No</td> </tr> <tr> <td>dedicated_host_id</td> <td>String</td> <td>按照专属宿云服务器组中某个宿云服务器过滤</td> <td>No</td> </tr> <tr> <td>owner</td> <td>String</td> <td>按照用户账户过滤, 只返回指定账户的资源</td> <td>No</td> </tr> <tr> <td>verbose</td> <td>Integer</td> <td>是否返回冗长的信息, 若为1, 则返回云服务器相关其他资源的详细数据。</td> <td>No</td> </tr> <tr> <td>offset</td> <td>Integer</td> <td>数据偏移量, 默认为0</td> <td>No</td> </tr> <tr> <td>limit</td> <td>Integer</td> <td>返回数据长度,默认为20,最大100</td> <td>No</td> </tr> <tr> <td>zone</td> <td>String</td> <td>区域 ID,注意要小写</td> <td>Yes</td> </tr> </tbody> </table> <p><a href="../../../parameters/"><em>公共参数</em></a></p> <p><strong>Response Elements</strong></p> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>action</td> <td>String</td> <td>响应动作</td> </tr> <tr> <td>instance_set</td> <td>Array</td> <td>JSON 格式的云服务器数据列表, 每项参数可见下面 <a href="#response-item">Response Item</a></td> </tr> <tr> <td>total_count</td> <td>Integer</td> <td>根据过滤条件得到的云服务器总数</td> </tr> </tbody> </table> <p><strong>Response Item</strong></p> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>instance_id</td> <td>String</td> <td>云服务器ID</td> </tr> <tr> <td>instance_name</td> <td>String</td> <td>云服务器名称</td> </tr> <tr> <td>description</td> <td>String</td> <td>云服务器描述</td> </tr> <tr> <td>instance_type</td> <td>String</td> <td>云服务器类型, 配置列表请参考 <a href="../../../common/instance_type/"><em>Instance Types</em></a>。</td> </tr> <tr> <td>vcpus_current</td> <td>Integer</td> <td>云服务器CPU核心数目。</td> </tr> <tr> <td>memory_current</td> <td>Integer</td> <td>云服务器内存大小, 单位为MB。</td> </tr> <tr> <td>status</td> <td>String</td> <td>云服务器状态, 有效值为pending, running, stopped, suspended, terminated, ceased。<br/>pending: 等待被创建<br/>running: 运行中<br/>stopped: 已关机<br/>suspended: 由于欠费, 已被暂停使用<br/>terminated: 已被删除, 但处于此状态的云服务器在2小时之内仍可以被恢复为 running 状态<br/>ceased: 已被彻底删除, 处于此状态的云服务器无法恢复</td> </tr> <tr> <td>transition_status</td> <td>String</td> <td>云服务器过渡状态, 有效值为creating, starting, stopping, restarting, suspending, resuming, terminating, recovering, resetting。<br/>creating: 创建中, 由 pending 状态变成 running 状态<br/>starting: 启动中, 由 stopped 状态变成 running 状态<br/>stopping: 关闭中, 由 running 状态变成 stopped 状态<br/>restarting: 重启中<br/>suspending: 欠费暂停中, 由 running/stopped 状态变成 suspended 状态<br/>resuming: 恢复中, 由 suspended 状态变成 running 状态<br/>terminating: 删除中, 由 running/stopped/suspended 状态变成 terminated 状态<br/>recovering: 恢复中, 由 terminated 状态变成 running 状态<br/>resetting: 操作系统重置中</td> </tr> <tr> <td>create_time</td> <td>TimeStamp</td> <td>云服务器创建时间, 为UTC时间, 格式可参见 <a href="http://www.w3.org/TR/NOTE-datetime">ISO8601</a>.</td> </tr> <tr> <td>status_time</td> <td>TimeStamp</td> <td>云服务器最近一次状态变更时间, 为UTC时间, 格式可参见 <a href="http://www.w3.org/TR/NOTE-datetime">ISO8601</a>.</td> </tr> <tr> <td>image</td> <td>Dict</td> <td>云服务器的模板信息。<br/>processor_type: 支持的处理器类型, 有效值为 64bit 和 32bit<br/>platform: 模板平台, 有效值为 linux 和 windows<br/>os_family: 模板操作系统平台, 有效值为 windows, centos, ubuntu, debian, fedora等<br/>image_size: 模板大小<br/>image_name: 模板名称<br/>provider: 模板提供方, 有效值为 系统模板( system ), 自有模板 ( self )</td> </tr> <tr> <td>vxnets</td> <td>Array</td> <td>云服务器加入的私有网络信息。<br/>vxnet_id: 私有网络ID<br/>vxnet_name: 私有网络名称<br/>vxnet_type: 私有网络类型, 1 为受管私有网络, 0 为自管私有网络。<br/>nic_id: 云服务器加入私有网络的网卡ID<br/>private_ip: 云服务器位于私有网络中的私有地址</td> </tr> <tr> <td>eip</td> <td>Dict</td> <td>云服务器绑定的公网 IP 信息。<br/>eip_id: 公网 IP 的 ID<br/>eip_addr: IP 地址<br/>bandwidth: 带宽(Mbps)</td> </tr> <tr> <td>security_group</td> <td>Dict</td> <td>云服务器的防火墙信息。<br/>security_group_id: 防火墙ID<br/>is_default: 是否为默认防火墙, 1 为是, 0 为不是。<br/>只有在请求参数 verbose=1 时才会返回此信息。</td> </tr> <tr> <td>volume_ids</td> <td>Array</td> <td>云服务器上挂载的硬盘ID<br/>只有在请求参数 verbose=1 时才会返回此信息。</td> </tr> <tr> <td>keypair_ids</td> <td>Array</td> <td>云服务器上加载的SSH密钥ID<br/>只有在请求参数 verbose=1 时才会返回此信息。</td> </tr> <tr> <td>graphics_protocol</td> <td>String</td> <td>图形化访问支持协议</td> </tr> <tr> <td>graphics_passwd</td> <td>String</td> <td>图形化访问密码</td> </tr> </tbody> </table> <p><strong>Example</strong></p> <p><em>Example Request</em></p> <pre tabindex="0"><code>https://api.qingcloud.com/iaas/?action=DescribeInstances &amp;instances.1=i-ogbndull &amp;status.1=running &amp;verbose=1 &amp;COMMON_PARAMS </code></pre><p><em>Example Response</em>:</p> <pre tabindex="0"><code>{ &#34;action&#34;:&#34;DescribeInstancesResponse&#34;, &#34;instance_set&#34;:[ { &#34;vcpus_current&#34;:1, &#34;instance_id&#34;:&#34;i-ogbndull&#34;, &#34;volume_ids&#34;:[ &#34;vol-g7xy7d6g&#34;, &#34;vol-jg7326gy&#34; ], &#34;vxnets&#34;:[ { &#34;vxnet_name&#34;:&#34;primary vxnet&#34;, &#34;vxnet_type&#34;:1, &#34;vxnet_id&#34;:&#34;vxnet-0&#34;, &#34;nic_id&#34;:&#34;52:54:ef:0c:ed:66&#34;, &#34;private_ip&#34;:&#34;10.50.13.54&#34; } ], &#34;eip&#34;:{ &#34;eip_id&#34;:&#34;eip-1234abcd&#34;, &#34;eip_addr&#34;:&#34;121.201.5.5&#34;, &#34;bandwidth&#34;:&#34;50&#34; }, &#34;memory_current&#34;:1024, &#34;sub_code&#34;:0, &#34;transition_status&#34;:&#34;&#34;, &#34;instance_name&#34;:&#34;&#34;, &#34;instance_type&#34;:&#34;small_b&#34;, &#34;create_time&#34;:&#34;2013-08-28T14:26:03Z&#34;, &#34;status&#34;:&#34;running&#34;, &#34;description&#34;:null, &#34;security_group&#34;:{ &#34;is_default&#34;:1, &#34;security_group_id&#34;:&#34;sg-z13kokni&#34; }, &#34;status_time&#34;:&#34;2013-08-28T14:26:03Z&#34;, &#34;image&#34;:{ &#34;processor_type&#34;:&#34;64bit&#34;, &#34;platform&#34;:&#34;linux&#34;, &#34;image_size&#34;:20, &#34;image_name&#34;:&#34;CentOS 6.4 64bit&#34;, &#34;image_id&#34;:&#34;centos64x64&#34;, &#34;os_family&#34;:&#34;centos&#34;, &#34;provider&#34;:&#34;system&#34; }, &#34;keypair_ids&#34;:[ &#34;kp-bn2n77ow&#34;, &#34;kp-05vfs7zs&#34; ] } ], &#34;ret_code&#34;:0, &#34;total_count&#34;:1 } </code></pre> Development_docs: RunInstances /development_docs/api/command_list/instance/run_instances/ Mon, 01 Jan 0001 00:00:00 +0000 /development_docs/api/command_list/instance/run_instances/ <p>创建指定配置,指定数量的云服务器。</p> <p>当你创建云服务器时,云服务器会先进入 pending 状态,直到创建完成后,变为 running 状态。 你可以使用 <a href="../describe_instances/"><em>DescribeInstances</em></a> 检查云服务器状态。</p> <p>创建云服务器时,一旦参数 vxnets.n 包含基础网络(即: vxnet-0 ),则需要指定防火墙 security_group,如果没有指定,开·云app官方版下载会自动使用缺省防火墙。</p> <p>开·云app官方版下载给云服务器定义了几种经典配置,可通过参数 instance_type 指定,配置列表请参考 <a href="../../../common/instance_type/"><em>Instance Types</em></a> 。 如果经典配置不能满足你的需求,可通过参数 cpu, memory 自定义云服务器配置。</p> <p>如果参数中既指定 instance_type ,又指定了 cpu 和 memory , 则以指定的 cpu 和 memory 为准。</p> <p><strong>Request Parameters</strong></p> <table> <thead> <tr> <th>Parameter name</th> <th>Type</th> <th>Description</th> <th>Required</th> </tr> </thead> <tbody> <tr> <td>image_id</td> <td>String</td> <td>镜像ID,此镜像将作为云服务器的模板。可传开·云app官方版下载提供的镜像ID,或自己创建的镜像ID</td> <td>Yes</td> </tr> <tr> <td>instance_type</td> <td>String</td> <td>云服务器类型,有效值请参考 <a href="../../../common/instance_type/"><em>Instance Types</em></a><br/>如果使用弹性裸金属服务器, 该参数必填。<br/>如果请求中指定了 instance_type,cpu 和 memory 参数可略过。<br/>如果请求中没有 instance_type,则 cpu 和 memory 参数必须指定。<br/>如果请求参数中既有 instance_type,又有 cpu 和 memory,则以 cpu, memory 的值为准。</td> <td>No</td> </tr> <tr> <td>cpu</td> <td>Integer</td> <td>CPU core,有效值为: 1, 2, 4, 8, 16</td> <td>No</td> </tr> <tr> <td>memory</td> <td>Integer</td> <td>内存,有效值为: 1024, 2048, 4096, 6144, 8192, 12288, 16384, 24576, 32768</td> <td>No</td> </tr> <tr> <td>os_disk_size</td> <td>Integer</td> <td>系统盘大小,单位GB。<br>Linux操作系统的有效值为:20-100,默认值为:20<br>Windows操作系统的有效值为:50-100,默认值为:50</td> <td>No</td> </tr> <tr> <td>count</td> <td>Integer</td> <td>创建云服务器的数量,默认是1<br/>注解<br/>当同时创建多台云服务器时,这些云服务器的基本信息和配置都是相同的</td> <td>No</td> </tr> <tr> <td>instance_name</td> <td>String</td> <td>云服务器名称</td> <td>No</td> </tr> <tr> <td>login_mode</td> <td>String</td> <td>指定登录方式。当为 linux 云服务器时,有效值为 keypair 和 passwd; 当为 windows 云服务器时,只能选用 passwd 登录方式。<br/>当登录方式为 keypair 时,需要指定 login_keypair 参数;<br/>当登录方式为 passwd 时,需要指定 login_passwd 参数。</td> <td>Yes</td> </tr> <tr> <td>login_keypair</td> <td>String</td> <td>登录密钥ID。</td> <td>No</td> </tr> <tr> <td>login_passwd</td> <td>String</td> <td>登录密码。</td> <td>No</td> </tr> <tr> <td>vxnets.n</td> <td>String</td> <td>云服务器要加入的私有网络ID,如果不传此参数,则表示不加入到任何网络。<br/>如果是自建的受管私有网络(不包括基础网络 vxnet-0 ),则可以在创建云服务器时指定内网IP, 这时参数值要改为 ``` vxnet-id</td> <td>ip-address <code>,如</code>vxnet-abcd123</td> </tr> <tr> <td>security_group</td> <td>String</td> <td>云服务器加载的防火墙ID,只有在 vxnets.n 包含基础网络(即:vxnet-0)时才需要提供。 若未提供,则默认加载缺省防火墙</td> <td>No</td> </tr> <tr> <td>volumes.n</td> <td>String</td> <td>云服务器创建后自动加载的硬盘ID,如果传此参数,则参数 count 必须为1 。</td> <td>No</td> </tr> <tr> <td>hostname</td> <td>String</td> <td>可指定云服务器的 hostname 。</td> <td>No</td> </tr> <tr> <td>need_newsid</td> <td>Integer</td> <td>1: 生成新的SID,0: 不生成新的SID, 默认为0;只对Windows类型云服务器有效。</td> <td>No</td> </tr> <tr> <td>instance_class</td> <td>Integer</td> <td>云服务器性能类型: 性能型:0, 超高性能型:1, 基础型:101, 企业型:201</td> <td>No</td> </tr> <tr> <td>cpu_model</td> <td>String</td> <td>CPU 指令集, 有效值: Westmere, SandyBridge, IvyBridge, Haswell, Broadwell</td> <td>No</td> </tr> <tr> <td>cpu_topology</td> <td>String</td> <td>CPU 拓扑结构: 插槽数, 核心数, 线程数; 插槽数 * 核心数 * 线程数 应等于您应选择的CPU数量。</td> <td>No</td> </tr> <tr> <td>gpu</td> <td>Integer</td> <td>GPU 个数</td> <td>No</td> </tr> <tr> <td>gpu_class</td> <td>Integer</td> <td>GPU 类型,有效值有 0 和 1 。0 对应的是 NVIDIA P100,1 对应的是 AMD S7150</td> <td>No</td> </tr> <tr> <td>nic_mqueue</td> <td>Integer</td> <td>网卡多对列: 关闭(默认):0,开启:1</td> <td>No</td> </tr> <tr> <td>need_userdata</td> <td>Integer</td> <td>1: 使用 User Data 功能;0: 不使用 User Data 功能;默认为 0 。</td> <td>No</td> </tr> <tr> <td>userdata_type</td> <td>String</td> <td>User Data 类型,有效值:’plain’, ‘exec’ 或 ‘tar’。为 ‘plain’或’exec’ 时,使用一个 Base64 编码后的字符串;为 ‘tar’ 时,使用一个压缩包(种类为 zip,tar,tgz,tbz)。</td> <td>No</td> </tr> <tr> <td>userdata_value</td> <td>String</td> <td>User Data 值。当类型为 ‘plain’ 时,为字符串的 Base64 编码值,长度限制 4K;当类型为 ‘tar’,为调用 <a href="../../userdata/upload_userdata_attachment/"><em>UploadUserDataAttachment</em></a> 返回的 attachment_id。</td> <td>No</td> </tr> <tr> <td>userdata_path</td> <td>String</td> <td>User Data 和 MetaData 生成文件的存放路径。不输入或输入不合法时,为默认目录 /etc/qingcloud/userdata</td> <td>No</td> </tr> <tr> <td>userdata_file</td> <td>String</td> <td>userdata_type 为 ‘exec’ 时,指定生成可执行文件的路径,默认为/etc/rc.local</td> <td>No</td> </tr> <tr> <td>target_user</td> <td>String</td> <td>目标用户 ID ,可用于主账号为其子账号创建资源。</td> <td>No</td> </tr> <tr> <td>dedicated_host_group_id</td> <td>String</td> <td>虚机创建到指定的专属宿云服务器组中</td> <td>No</td> </tr> <tr> <td>dedicated_host_id</td> <td>String</td> <td>虚机创建到某专属宿云服务器组中指定的宿云服务器上</td> <td>No</td> </tr> <tr> <td>instance_group</td> <td>String</td> <td>虚机创建加入到指定的云服务器组中</td> <td>No</td> </tr> <tr> <td>hypervisor</td> <td>String</td> <td>hypervisor 类型,当前支持 kvm 和 bm, 默认是 kvm</td> <td>No</td> </tr> <tr> <td>os_disk_encryption</td> <td>Boolean</td> <td>创建加密云服务器</td> <td>No</td> </tr> <tr> <td>cipher_alg</td> <td>String</td> <td>加密使用的算法类型:<br/>目前仅支持 aes256,默认 aes256</td> <td>No</td> </tr> <tr> <td>months</td> <td>Integer</td> <td>如果购买合约模式的云服务器,需要传此参数,数值为购买的月份数。</td> <td>No</td> </tr> <tr> <td>auto_renew</td> <td>Integer</td> <td>如果购买合约模式的云服务器,可传此参数,数值为合约到期后自动续约的月份数。如果购买合约时不传此参数,合约到期则不会自动续约。</td> <td>No</td> </tr> <tr> <td>zone</td> <td>String</td> <td>区域 ID,注意要小写</td> <td>Yes</td> </tr> </tbody> </table> <p><strong>Response Elements</strong></p> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>action</td> <td>String</td> <td>响应动作</td> </tr> <tr> <td>instances</td> <td>Array</td> <td>创建的云服务器ID列表</td> </tr> <tr> <td>job_id</td> <td>String</td> <td>执行任务的 Job ID</td> </tr> <tr> <td>ret_code</td> <td>Integer</td> <td>执行成功与否,0 表示成功,其他值则为错误代码</td> </tr> </tbody> </table> <p><strong>Example</strong></p> <p><em>Example Request</em>:</p> <pre tabindex="0"><code>https://api.qingcloud.com/iaas/?action=RunInstances &amp;vxnets.1=vxnet-0 &amp;instance_type=small_a &amp;image_id=centos63x64 &amp;COMMON_PARAMS </code></pre><p><em>Example Response</em>:</p> <pre tabindex="0"><code>{ &#34;action&#34;:&#34;RunInstancesResponse&#34;, &#34;instances&#34;:[ &#34;i-rtyv0968&#34; ], &#34;job_id&#34;:&#34;j-bm6ym3r8&#34;, &#34;ret_code&#34;:0 } </code></pre> Development_docs: TerminateInstances /development_docs/api/command_list/instance/terminate_instances/ Mon, 01 Jan 0001 00:00:00 +0000 /development_docs/api/command_list/instance/terminate_instances/ <p>销毁一台或多台云服务器。</p> <p>销毁云服务器的前提,是此云服务器已建立租用信息(租用信息是在创建云服务器成功后, 几秒钟内系统自动建立的)。所以正在创建的云服务器(状态为 pending ), 以及刚刚创建成功但还没有建立租用信息的云服务器,是不能被销毁的。</p> <p>警告</p> <p>已销毁的云服务器开·云app官方版下载会为你保留2小时,如果误操作,请及时与我们联系。</p> <p><strong>Request Parameters</strong></p> <table> <thead> <tr> <th>Parameter name</th> <th>Type</th> <th>Description</th> <th>Required</th> </tr> </thead> <tbody> <tr> <td>instances.n</td> <td>String</td> <td>一个或多个云服务器ID</td> <td>Yes</td> </tr> <tr> <td>direct_cease</td> <td>Integer</td> <td>是否直接彻底销毁云服务器,如果指定 “1” 则不会进入回收站直接销毁,默认是 “0”</td> <td>No</td> </tr> <tr> <td>zone</td> <td>String</td> <td>区域 ID,注意要小写</td> <td>Yes</td> </tr> </tbody> </table> <p><a href="../../../parameters/"><em>公共参数</em></a></p> <p><strong>Response Elements</strong></p> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>action</td> <td>String</td> <td>响应动作</td> </tr> <tr> <td>job_id</td> <td>String</td> <td>执行任务的 Job ID</td> </tr> <tr> <td>ret_code</td> <td>Integer</td> <td>执行成功与否,0 表示成功,其他值则为错误代码</td> </tr> </tbody> </table> <p><strong>Example</strong></p> <p><em>Example Request</em>:</p> <pre tabindex="0"><code>https://api.qingcloud.com/iaas/?action=TerminateInstances &amp;instances.1=i-rtyv0968 &amp;zone=pek3a &amp;COMMON_PARAMS </code></pre><p><em>Example Response</em>:</p> <pre tabindex="0"><code>{ &#34;action&#34;:&#34;TerminateInstancesResponse&#34;, &#34;job_id&#34;:&#34;j-ybnoeitr&#34;, &#34;ret_code&#34;:0 } </code></pre> Development_docs: StartInstances /development_docs/api/command_list/instance/start_instances/ Mon, 01 Jan 0001 00:00:00 +0000 /development_docs/api/command_list/instance/start_instances/ <p>启动一台或多台关闭状态的云服务器。</p> <p>云服务器只有在关闭 stopped 状态才能被启动,如果处于非关闭状态,则返回错误信息。</p> <p>云服务器在关闭状态时,开·云app官方版下载只收取云服务器操作系统所占磁盘空间的费用,价格与硬盘相同, 即:每 10G 收费 0.02 元(注:Linux 系统为 20G,Windows 系统为 50G)。 当云服务器启动后,计费系统会继续对此云服务器的计算资源进行扣费。</p> <p>开·云app官方版下载会根据你实际使用的时长收费(精确到秒),所以你可以随时启动、关闭云服务器, 而不用考虑计费周期的限制。</p> <p><strong>Request Parameters</strong></p> <table> <thead> <tr> <th>Parameter name</th> <th>Type</th> <th>Description</th> <th>Required</th> </tr> </thead> <tbody> <tr> <td>instances.n</td> <td>String</td> <td>一个或多个云服务器ID</td> <td>Yes</td> </tr> <tr> <td>zone</td> <td>String</td> <td>区域 ID,注意要小写</td> <td>Yes</td> </tr> </tbody> </table> <p><a href="../../../parameters/"><em>公共参数</em></a></p> <p><strong>Response Elements</strong></p> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>action</td> <td>String</td> <td>响应动作</td> </tr> <tr> <td>job_id</td> <td>String</td> <td>执行任务的 Job ID</td> </tr> <tr> <td>ret_code</td> <td>Integer</td> <td>执行成功与否,0 表示成功,其他值则为错误代码</td> </tr> </tbody> </table> <p><strong>Example</strong></p> <p><em>Example Request</em>:</p> <pre tabindex="0"><code>https://api.qingcloud.com/iaas/?action=StartInstances &amp;instances.1=i-rtyv0968 &amp;zone=pek3a &amp;COMMON_PARAMS </code></pre><p><em>Example Response</em>:</p> <pre tabindex="0"><code>{ &#34;action&#34;:&#34;StartInstancesResponse&#34;, &#34;job_id&#34;:&#34;j-ybnoeitr&#34;, &#34;ret_code&#34;:0 } </code></pre> Development_docs: StopInstances /development_docs/api/command_list/instance/stop_instances/ Mon, 01 Jan 0001 00:00:00 +0000 /development_docs/api/command_list/instance/stop_instances/ <p>关闭一台或多台运行状态的云服务器。</p> <p>云服务器只有在运行 running 状态才能被关闭,如果处于非运行状态,则返回错误信息。</p> <p>云服务器在关闭状态时,开·云app官方版下载只收取云服务器操作系统所占磁盘空间的费用,价格与硬盘相同, 即:每 10G 收费 0.02 元(注:Linux 系统为 20G,Windows 系统为 50G)。 当云服务器启动后,计费系统会继续对此云服务器的计算资源进行扣费。</p> <p>开·云app官方版下载会根据你实际使用的时长收费(精确到秒),所以你可以随时启动、关闭云服务器, 而不用考虑计费周期的限制。</p> <p>警告</p> <p>关闭云服务器不会保存 RAM 中的数据。</p> <p><strong>Request Parameters</strong></p> <table> <thead> <tr> <th>Parameter name</th> <th>Type</th> <th>Description</th> <th>Required</th> </tr> </thead> <tbody> <tr> <td>instances.n</td> <td>String</td> <td>一个或多个云服务器ID</td> <td>Yes</td> </tr> <tr> <td>force</td> <td>Integer</td> <td>1: 强制关机,0: 非强制关机,默认为0</td> <td>No</td> </tr> <tr> <td>zone</td> <td>String</td> <td>区域 ID,注意要小写</td> <td>Yes</td> </tr> </tbody> </table> <p><a href="../../../parameters/"><em>公共参数</em></a></p> <p><strong>Response Elements</strong></p> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>action</td> <td>String</td> <td>响应动作</td> </tr> <tr> <td>job_id</td> <td>String</td> <td>执行任务的 Job ID</td> </tr> <tr> <td>ret_code</td> <td>Integer</td> <td>执行成功与否,0 表示成功,其他值则为错误代码</td> </tr> </tbody> </table> <p><strong>Example</strong></p> <p><em>Example Request</em>:</p> <pre tabindex="0"><code>https://api.qingcloud.com/iaas/?action=StopInstances &amp;instances.1=i-rtyv0968 &amp;zone=pek3a &amp;COMMON_PARAMS </code></pre><p><em>Example Response</em>:</p> <pre tabindex="0"><code>{ &#34;action&#34;:&#34;StopInstancesResponse&#34;, &#34;job_id&#34;:&#34;j-ybnoeitr&#34;, &#34;ret_code&#34;:0 } </code></pre> Development_docs: RestartInstances /development_docs/api/command_list/instance/restart_instances/ Mon, 01 Jan 0001 00:00:00 +0000 /development_docs/api/command_list/instance/restart_instances/ <p>重启一台或多台运行状态的云服务器。</p> <p>云服务器只有在运行 running 状态才能被重启,如果处于非运行状态,则返回错误信息。</p> <p><strong>Request Parameters</strong></p> <table> <thead> <tr> <th>Parameter name</th> <th>Type</th> <th>Description</th> <th>Required</th> </tr> </thead> <tbody> <tr> <td>instances.n</td> <td>String</td> <td>一个或多个云服务器ID</td> <td>Yes</td> </tr> <tr> <td>zone</td> <td>String</td> <td>区域 ID,注意要小写</td> <td>Yes</td> </tr> </tbody> </table> <p><a href="../../../parameters/"><em>公共参数</em></a></p> <p><strong>Response Elements</strong></p> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>action</td> <td>String</td> <td>响应动作</td> </tr> <tr> <td>job_id</td> <td>String</td> <td>执行任务的 Job ID</td> </tr> <tr> <td>ret_code</td> <td>Integer</td> <td>执行成功与否,0 表示成功,其他值则为错误代码</td> </tr> </tbody> </table> <p><strong>Example</strong></p> <p><em>Example Request</em>:</p> <pre tabindex="0"><code>https://api.qingcloud.com/iaas/?action=RestartInstances &amp;instances.1=i-rtyv0968 &amp;zone=pek3a &amp;COMMON_PARAMS </code></pre><p><em>Example Response</em>:</p> <pre tabindex="0"><code>{ &#34;action&#34;:&#34;RestartInstancesResponse&#34;, &#34;job_id&#34;:&#34;j-ybnoeitr&#34;, &#34;ret_code&#34;:0 } </code></pre> Development_docs: ResetInstances /development_docs/api/command_list/instance/reset_instances/ Mon, 01 Jan 0001 00:00:00 +0000 /development_docs/api/command_list/instance/reset_instances/ <p>将一台或多台云服务器的系统盘重置到初始状态。 被重置的云服务器必须处于运行( running )或关闭( stopped )状态。</p> <p>重置只涉及系统盘数据,不包含云服务器所加载的硬盘。</p> <p><strong>Request Parameters</strong></p> <table> <thead> <tr> <th>Parameter name</th> <th>Type</th> <th>Description</th> <th>Required</th> </tr> </thead> <tbody> <tr> <td>instances.n</td> <td>String</td> <td>一个或多个云服务器ID</td> <td>Yes</td> </tr> <tr> <td>login_mode</td> <td>String</td> <td>指定登录方式。当为 linux 云服务器时,有效值为 keypair 和 passwd; 当为 windows 云服务器时,只能选用 passwd 登录方式。<br/>当登录方式为 keypair 时,需要指定 login_keypair 参数;<br/>当登录方式为 passwd 时,需要指定 login_passwd 参数。</td> <td>Yes</td> </tr> <tr> <td>login_keypair</td> <td>String</td> <td>登录密钥ID。</td> <td>No</td> </tr> <tr> <td>login_passwd</td> <td>String</td> <td>登录密码。</td> <td>No</td> </tr> <tr> <td>need_newsid</td> <td>Integer</td> <td>1: 生成新的SID,0: 不生成新的SID, 默认为0;只对Windows类型云服务器有效。</td> <td>No</td> </tr> <tr> <td>zone</td> <td>String</td> <td>区域 ID,注意要小写</td> <td>Yes</td> </tr> </tbody> </table> <p><a href="../../../parameters/"><em>公共参数</em></a></p> <p><strong>Response Elements</strong></p> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>action</td> <td>String</td> <td>响应动作</td> </tr> <tr> <td>job_id</td> <td>String</td> <td>执行任务的 Job ID</td> </tr> <tr> <td>ret_code</td> <td>Integer</td> <td>执行成功与否,0 表示成功,其他值则为错误代码</td> </tr> </tbody> </table> <p><strong>Example</strong></p> <p><em>Example Request</em>:</p> <pre tabindex="0"><code>https://api.qingcloud.com/iaas/?action=ResetInstances &amp;instances.1=i-rtyv0968 &amp;zone=pek3a &amp;COMMON_PARAMS </code></pre><p><em>Example Response</em>:</p> <pre tabindex="0"><code>{ &#34;action&#34;:&#34;ResetInstancesResponse&#34;, &#34;job_id&#34;:&#34;j-ybnoeitr&#34;, &#34;ret_code&#34;:0 } </code></pre> Development_docs: ResizeInstances /development_docs/api/command_list/instance/resize_instances/ Mon, 01 Jan 0001 00:00:00 +0000 /development_docs/api/command_list/instance/resize_instances/ <p>修改云服务器配置,包括 CPU 和内存。云服务器状态必须是关闭的 stopped ,不然会返回错误。</p> <p>如果使用预设的 instance_type ,参数中就不需再指定 CPU 或内存,配置列表请参考 <a href="../../../common/instance_type/"><em>Instance Types</em></a> 。</p> <p>如果参数中没有指定 instance_type ,则必须指定 cpu 和 memory。</p> <p>如果参数中既指定 instance_type ,又指定了 cpu 和 memory , 则以指定的 cpu 和 memory 为准。</p> <p><strong>Request Parameters</strong></p> <table> <thead> <tr> <th>Parameter name</th> <th>Type</th> <th>Description</th> <th>Required</th> </tr> </thead> <tbody> <tr> <td>instances.n</td> <td>String</td> <td>云服务器ID</td> <td>Yes</td> </tr> <tr> <td>instance_type</td> <td>String</td> <td>云服务器类型,有效值请参考 <a href="../../../common/instance_type/"><em>Instance Types</em></a><br/>如果请求中指定了 instance_type,cpu 和 memory 参数可略过。<br/>如果请求中没有 instance_type,则 cpu 和 memory 参数必须指定。<br/>如果请求参数中既有 instance_type,又有 cpu 和 memory,则以 cpu, memory 的值为准。</td> <td>No</td> </tr> <tr> <td>cpu</td> <td>Integer</td> <td>CPU core,有效值为: 1, 2, 4, 8, 16</td> <td>No</td> </tr> <tr> <td>memory</td> <td>Integer</td> <td>内存,有效值为: 1024, 2048, 4096, 6144, 8192, 12288, 16384, 24576, 32768</td> <td>No</td> </tr> <tr> <td>os_disk_size</td> <td>Integer</td> <td>系统盘大小,单位GB。<br>Linux操作系统的有效值为:20-100,默认值为:20<br>Windows操作系统的有效值为:50-100,默认值为:50</td> <td>No</td> </tr> <tr> <td>cpu_model</td> <td>String</td> <td>CPU 指令集, 有效值: Westmere, SandyBridge, IvyBridge, Haswell, Broadwell</td> <td>No</td> </tr> <tr> <td>cpu_topology</td> <td>String</td> <td>CPU 拓扑结构: 插槽数, 核心数, 线程数; 插槽数 * 核心数 * 线程数 应等于您应选择的CPU数量。</td> <td>No</td> </tr> <tr> <td>gpu</td> <td>Integer</td> <td>GPU 个数</td> <td>No</td> </tr> <tr> <td>zone</td> <td>String</td> <td>区域 ID,注意要小写</td> <td>No</td> </tr> </tbody> </table> <p><a href="../../../parameters/"><em>公共参数</em></a></p> <p><strong>Response Elements</strong></p> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>action</td> <td>String</td> <td>响应动作</td> </tr> <tr> <td>job_id</td> <td>String</td> <td>执行任务的 Job ID</td> </tr> <tr> <td>ret_code</td> <td>Integer</td> <td>执行成功与否,0 表示成功,其他值则为错误代码</td> </tr> </tbody> </table> <p><strong>Example</strong></p> <p><em>Example Request</em>:</p> <pre tabindex="0"><code>https://api.qingcloud.com/iaas/?action=ResizeInstances &amp;instance_type=medium_a &amp;instances.1=i-r4jnbhui &amp;zone=pek3a &amp;COMMON_PARAMS </code></pre><p><em>Example Response</em>:</p> <pre tabindex="0"><code>{ &#34;action&#34;:&#34;ResizeInstancesResponse&#34;, &#34;job_id&#34;:&#34;j-cT9nUFvT&#34;, &#34;ret_code&#34;:0 } </code></pre> Development_docs: ModifyInstanceAttributes /development_docs/api/command_list/instance/modify_instance_attributes/ Mon, 01 Jan 0001 00:00:00 +0000 /development_docs/api/command_list/instance/modify_instance_attributes/ <p>修改一台云服务器的名称和描述。</p> <p>修改时不受云服务器状态限制。一次只能修改一台云服务器。</p> <p><strong>Request Parameters</strong></p> <table> <thead> <tr> <th>Parameter name</th> <th>Type</th> <th>Description</th> <th>Required</th> </tr> </thead> <tbody> <tr> <td>instance</td> <td>String</td> <td>云服务器ID</td> <td>Yes</td> </tr> <tr> <td>instance_name</td> <td>String</td> <td>云服务器名称</td> <td>No</td> </tr> <tr> <td>description</td> <td>String</td> <td>云服务器描述</td> <td>No</td> </tr> <tr> <td>zone</td> <td>String</td> <td>区域 ID,注意要小写</td> <td>Yes</td> </tr> <tr> <td>nic_mqueue</td> <td>Integer</td> <td>1: 启用网卡多队列功能,0: 禁用网卡多队列功能, 默认为0</td> <td>No</td> </tr> </tbody> </table> <p><a href="../../../parameters/"><em>公共参数</em></a></p> <p><strong>Response Elements</strong></p> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>action</td> <td>String</td> <td>响应动作</td> </tr> <tr> <td>ret_code</td> <td>Integer</td> <td>执行成功与否,0 表示成功,其他值则为错误代码</td> </tr> </tbody> </table> <p><strong>Example</strong></p> <p><em>Example Request</em>:</p> <pre tabindex="0"><code>https://api.qingcloud.com/iaas/?action=ModifyInstanceAttributes &amp;instance=i-rtyv0968 &amp;instance_name=sample &amp;zone=pek3a &amp;COMMON_PARAMS </code></pre><p><em>Example Response</em>:</p> <pre tabindex="0"><code>{ &#34;action&#34;:&#34;ModifyInstanceAttributesResponse&#34;, &#34;ret_code&#34;:0 } </code></pre> Development_docs: DescribeInstanceTypes /development_docs/api/command_list/instance/describe_instance_types/ Mon, 01 Jan 0001 00:00:00 +0000 /development_docs/api/command_list/instance/describe_instance_types/ <p>获取区域支持的云服务器类型</p> <p><strong>Request Parameters</strong></p> <table> <thead> <tr> <th>Parameter name</th> <th>Type</th> <th>Description</th> <th>Required</th> </tr> </thead> <tbody> <tr> <td>zone</td> <td>String</td> <td>区域 ID,注意要小写</td> <td>Yes</td> </tr> <tr> <td>instance_types</td> <td>Array</td> <td>指定查询的云服务器类型</td> <td>No</td> </tr> <tr> <td>baremetal</td> <td>Integer</td> <td>是否返回物理机的云服务器类型,”1” 则返回物理机支持的类型,默认 “0”</td> <td>No</td> </tr> </tbody> </table> <p><a href="../../../parameters/"><em>公共参数</em></a></p> <p><strong>Response Elements</strong></p> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>action</td> <td>String</td> <td>响应动作</td> </tr> <tr> <td>instance_type_set</td> <td>Array</td> <td>JSON 格式的云服务器类型列表, 每项参数可见下面 <a href="#response-item">Response Item</a></td> </tr> <tr> <td>total_count</td> <td>Integer</td> <td>根据过滤条件得到的云服务器类型总数</td> </tr> </tbody> </table> <p><strong>Response Item</strong></p> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>instance_type_id</td> <td>String</td> <td>云服务器类型ID</td> </tr> <tr> <td>instance_type_name</td> <td>String</td> <td>云服务器类型名称</td> </tr> <tr> <td>description</td> <td>String</td> <td>云服务器类型描述</td> </tr> <tr> <td>vcpus_current</td> <td>Integer</td> <td>云服务器类型CPU核心数目。</td> </tr> <tr> <td>memory_current</td> <td>Integer</td> <td>云服务器类型内存大小, 单位为MB。</td> </tr> <tr> <td>status</td> <td>String</td> <td>云服务器类型状态, 有效值为available, deprecated。<br/>available: 可用的云服务器类型<br/>deprecated: 已废弃的云服务器类型</td> </tr> </tbody> </table> <p><strong>Example</strong></p> <p><em>Example Request</em></p> <pre tabindex="0"><code>https://api.qingcloud.com/iaas/?action=DescribeInstanceTypes &amp;instance_types.1=c1m1 &amp;zone=pek3a &amp;COMMON_PARAMS </code></pre><p><em>Example Response</em>:</p> <pre tabindex="0"><code>{ &#34;action&#34;:&#34;DescribeInstanceTypesResponse&#34;, &#34;total_count&#34;:1, &#34;instance_type_set&#34;:[ { &#34;vcpus_current&#34;:1, &#34;status&#34;:&#34;available&#34;, &#34;description&#34;:&#34;&#34;, &#34;instance_type_name&#34;:&#34;1核1G&#34;, &#34;instance_type_id&#34;:&#34;c1m1&#34;, &#34;zone_id&#34;:&#34;pek3a&#34;, &#34;memory_current&#34;:1024 } ], &#34;ret_code&#34;:0 } </code></pre> Development_docs: CreateBrokers /development_docs/api/command_list/instance/create_brokers/ Mon, 01 Jan 0001 00:00:00 +0000 /development_docs/api/command_list/instance/create_brokers/ <p>为指定的云服务器创建远程桌面代理。</p> <p><strong>Request Parameters</strong></p> <table> <thead> <tr> <th>Parameter name</th> <th>Type</th> <th>Description</th> <th>Required</th> </tr> </thead> <tbody> <tr> <td>instances.n</td> <td>String</td> <td>云服务器 ID 列表</td> <td>Yes</td> </tr> <tr> <td>zone</td> <td>String</td> <td>区域 ID</td> <td>Yes</td> </tr> </tbody> </table> <p><a href="../../../parameters/"><em>公共参数</em></a></p> <p><strong>Response Elements</strong></p> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>action</td> <td>String</td> <td>响应动作</td> </tr> <tr> <td>brokers</td> <td>Array</td> <td>新创建的远程桌面代理列表,每项参数可见下面 <a href="#response-item">Response Item</a></td> </tr> <tr> <td>ret_code</td> <td>Integer</td> <td>执行成功与否,0 表示成功,其他值则为错误代码</td> </tr> </tbody> </table> <p><strong>Response Item</strong></p> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>instance_id</td> <td>String</td> <td>云服务器 ID</td> </tr> <tr> <td>broker_host</td> <td>String</td> <td>远程桌面代理域名</td> </tr> <tr> <td>broker_port</td> <td>Integer</td> <td>远程桌面代理端口</td> </tr> </tbody> </table> <p><strong>Example</strong></p> <p><em>Example Request</em></p> <pre tabindex="0"><code>https://api.qingcloud.com/iaas/?action=CreateBrokers &amp;instances.1=i-1tv6ffcy &amp;zone=gd2 &amp;COMMON_PARAMS </code></pre><p><em>Example Response</em>:</p> <pre tabindex="0"><code>{ &#34;action&#34;:&#34;CreateBrokersResponse&#34;, &#34;brokers&#34;:[ { &#34;instance_id&#34;:&#34;i-1tv6ffcy&#34;, &#34;broker_port&#34;:23239, &#34;broker_host&#34;:&#34;broker.qingcloud.com&#34; } ], &#34;ret_code&#34;:0 } </code></pre> Development_docs: DeleteBrokers /development_docs/api/command_list/instance/delete_brokers/ Mon, 01 Jan 0001 00:00:00 +0000 /development_docs/api/command_list/instance/delete_brokers/ <p>删除指定云服务器的远程桌面代理。</p> <p><strong>Request Parameters</strong></p> <table> <thead> <tr> <th>Parameter name</th> <th>Type</th> <th>Description</th> <th>Required</th> </tr> </thead> <tbody> <tr> <td>instances.n</td> <td>String</td> <td>云服务器 ID 列表</td> <td>Yes</td> </tr> <tr> <td>zone</td> <td>String</td> <td>区域 ID</td> <td>Yes</td> </tr> </tbody> </table> <p><a href="../../../parameters/"><em>公共参数</em></a></p> <p><strong>Response Elements</strong></p> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>action</td> <td>String</td> <td>响应动作</td> </tr> <tr> <td>brokers</td> <td>Array</td> <td>被删除的远程桌面代理列表</td> </tr> <tr> <td>ret_code</td> <td>Integer</td> <td>执行成功与否,0 表示成功,其他值则为错误代码</td> </tr> </tbody> </table> <p><strong>Example</strong></p> <p><em>Example Request</em></p> <pre tabindex="0"><code>https://api.qingcloud.com/iaas/?action=DeleteBrokers &amp;instances.1=i-1tv6ffcy &amp;zone=gd2 &amp;COMMON_PARAMS </code></pre><p><em>Example Response</em>:</p> <pre tabindex="0"><code>{ &#34;action&#34;:&#34;DeleteBrokersResponse&#34;, &#34;brokers&#34;:[ { &#34;instance_id&#34;:&#34;i-1tv6ffcy&#34; } ], &#34;ret_code&#34;:0 } </code></pre> Development_docs: CreateInstanceGroups /development_docs/api/command_list/instance/create_instance_groups/ Mon, 01 Jan 0001 00:00:00 +0000 /development_docs/api/command_list/instance/create_instance_groups/ <p>创建云服务器组。</p> <p><strong>Request Parameters</strong></p> <table> <thead> <tr> <th>Parameter name</th> <th>Type</th> <th>Description</th> <th>Required</th> </tr> </thead> <tbody> <tr> <td>relation</td> <td>String</td> <td>云服务器组关系</td> <td>Yes</td> </tr> <tr> <td>zone</td> <td>String</td> <td>区域 ID,注意要小写</td> <td>Yes</td> </tr> </tbody> </table> <p><a href="../../../parameters/"><em>公共参数</em></a></p> <p><strong>Response Elements</strong></p> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>action</td> <td>String</td> <td>响应动作</td> </tr> <tr> <td>instance_groups</td> <td>Array</td> <td>新创建的云服务器组列表</td> </tr> <tr> <td>ret_code</td> <td>Integer</td> <td>执行成功与否,0 表示成功,其他值则为错误代码</td> </tr> </tbody> </table> <p><strong>Example</strong></p> <p><em>Example Request</em></p> <pre tabindex="0"><code>https://api.qingcloud.com/iaas/?action=CreateInstanceGroups &amp;relation=repel &amp;zone=gd2 &amp;COMMON_PARAMS </code></pre><p><em>Example Response</em>:</p> <pre tabindex="0"><code>{ &#34;action&#34;:&#34;CreateInstanceGroupsResponse&#34;, &#34;instance_groups&#34;:[ &#34;ig-c7v8lro1&#34; ], &#34;ret_code&#34;:0 } </code></pre> Development_docs: DeleteInstanceGroups /development_docs/api/command_list/instance/delete_instance_groups/ Mon, 01 Jan 0001 00:00:00 +0000 /development_docs/api/command_list/instance/delete_instance_groups/ <p>删除指定云服务器组。</p> <p><strong>Request Parameters</strong></p> <table> <thead> <tr> <th>Parameter name</th> <th>Type</th> <th>Description</th> <th>Required</th> </tr> </thead> <tbody> <tr> <td>instance_groups.n</td> <td>String</td> <td>云服务器分组 ID 列表</td> <td>Yes</td> </tr> <tr> <td>zone</td> <td>String</td> <td>区域 ID</td> <td>Yes</td> </tr> </tbody> </table> <p><a href="../../../parameters/"><em>公共参数</em></a></p> <p><strong>Response Elements</strong></p> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>action</td> <td>String</td> <td>响应动作</td> </tr> <tr> <td>instance_groups</td> <td>Array</td> <td>被删除的云服务器组列表</td> </tr> <tr> <td>ret_code</td> <td>Integer</td> <td>执行成功与否,0 表示成功,其他值则为错误代码</td> </tr> </tbody> </table> <p><strong>Example</strong></p> <p><em>Example Request</em></p> <pre tabindex="0"><code>https://api.qingcloud.com/iaas/?action=DeleteInstanceGroups &amp;instance_groups.1=ig-c7v8lro1 &amp;zone=gd2 &amp;COMMON_PARAMS </code></pre><p><em>Example Response</em>:</p> <pre tabindex="0"><code>{ &#34;action&#34;:&#34;DeleteInstanceGroupsResponse&#34;, &#34;instance_groups&#34;:[ &#34;ig-c7v8lro1&#34; ], &#34;ret_code&#34;:0 } </code></pre> Development_docs: JoinInstanceGroup /development_docs/api/command_list/instance/join_instance_group/ Mon, 01 Jan 0001 00:00:00 +0000 /development_docs/api/command_list/instance/join_instance_group/ <p>云服务器加入指定的云服务器组。</p> <p><strong>Request Parameters</strong></p> <table> <thead> <tr> <th>Parameter name</th> <th>Type</th> <th>Description</th> <th>Required</th> </tr> </thead> <tbody> <tr> <td>instances.n</td> <td>String</td> <td>一个或多个云服务器ID</td> <td>Yes</td> </tr> <tr> <td>instance_group</td> <td>String</td> <td>云服务器组 ID</td> <td>Yes</td> </tr> <tr> <td>zone</td> <td>String</td> <td>区域 ID,注意要小写</td> <td>Yes</td> </tr> </tbody> </table> <p><a href="../../../parameters/"><em>公共参数</em></a></p> <p><strong>Response Elements</strong></p> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>action</td> <td>String</td> <td>响应动作</td> </tr> <tr> <td>job_id</td> <td>String</td> <td>执行任务的 Job ID</td> </tr> <tr> <td>ret_code</td> <td>Integer</td> <td>执行成功与否,0 表示成功,其他值则为错误代码</td> </tr> </tbody> </table> <p><strong>Example</strong></p> <p><em>Example Request</em></p> <pre tabindex="0"><code>https://api.qingcloud.com/iaas/?action=JoinInstanceGroup &amp;instances.1=i-ipot8lz8 &amp;instance_group=ig-st962mj0 &amp;zone=gd2 &amp;COMMON_PARAMS </code></pre><p><em>Example Response</em>:</p> <pre tabindex="0"><code>{ &#34;action&#34;:&#34;JoinInstanceGroupResponse&#34;, &#34;job_id&#34;:&#34;j-fuundcqh&#34; &#34;ret_code&#34;:0 } </code></pre> Development_docs: LeaveInstanceGroup /development_docs/api/command_list/instance/leave_instance_group/ Mon, 01 Jan 0001 00:00:00 +0000 /development_docs/api/command_list/instance/leave_instance_group/ <p>云服务器离开指定的云服务器组。</p> <p><strong>Request Parameters</strong></p> <table> <thead> <tr> <th>Parameter name</th> <th>Type</th> <th>Description</th> <th>Required</th> </tr> </thead> <tbody> <tr> <td>instances.n</td> <td>String</td> <td>一个或多个云服务器ID</td> <td>Yes</td> </tr> <tr> <td>instance_group</td> <td>String</td> <td>云服务器组 ID</td> <td>Yes</td> </tr> <tr> <td>zone</td> <td>String</td> <td>区域 ID,注意要小写</td> <td>Yes</td> </tr> </tbody> </table> <p><a href="../../../parameters/"><em>公共参数</em></a></p> <p><strong>Response Elements</strong></p> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>action</td> <td>String</td> <td>响应动作</td> </tr> <tr> <td>job_id</td> <td>String</td> <td>执行任务的 Job ID</td> </tr> <tr> <td>ret_code</td> <td>Integer</td> <td>执行成功与否,0 表示成功,其他值则为错误代码</td> </tr> </tbody> </table> <p><strong>Example</strong></p> <p><em>Example Request</em></p> <pre tabindex="0"><code>https://api.qingcloud.com/iaas/?action=LeaveInstanceGroup &amp;instances.1=i-ipot8lz8 &amp;instance_group=ig-st962mj0 &amp;zone=gd2 &amp;COMMON_PARAMS </code></pre><p><em>Example Response</em>:</p> <pre tabindex="0"><code>{ &#34;action&#34;:&#34;LeaveInstanceGroupResponse&#34;, &#34;job_id&#34;:&#34;j-mcacahmw&#34;, &#34;ret_code&#34;:0 } </code></pre> Development_docs: DescribeInstanceGroups /development_docs/api/command_list/instance/describe_instance_groups/ Mon, 01 Jan 0001 00:00:00 +0000 /development_docs/api/command_list/instance/describe_instance_groups/ <p>获取一个或多个云服务器组</p> <p>可根据云服务器组ID, 分组名称, 分组关系 作为过滤条件, 来获取云服务器组列表。 如果不指定任何过滤条件, 默认返回你所拥有的所有云服务器组。</p> <p><strong>Request Parameters</strong></p> <table> <thead> <tr> <th>Parameter name</th> <th>Type</th> <th>Description</th> <th>Required</th> </tr> </thead> <tbody> <tr> <td>instance_groups.n</td> <td>String</td> <td>云服务器组ID</td> <td>No</td> </tr> <tr> <td>relation</td> <td>String</td> <td>云服务器分组关系</td> <td>No</td> </tr> <tr> <td>tags.n</td> <td>String</td> <td>按照标签ID过滤, 只返回已绑定某标签的资源</td> <td>No</td> </tr> <tr> <td>owner</td> <td>String</td> <td>按照用户账户过滤, 只返回指定账户的资源</td> <td>No</td> </tr> <tr> <td>verbose</td> <td>Integer</td> <td>是否返回冗长的信息, 若为1, 则返回云服务器组相关其他资源的详细数据。</td> <td>No</td> </tr> <tr> <td>offset</td> <td>Integer</td> <td>数据偏移量, 默认为0</td> <td>No</td> </tr> <tr> <td>limit</td> <td>Integer</td> <td>返回数据长度,默认为20,最大100</td> <td>No</td> </tr> <tr> <td>zone</td> <td>String</td> <td>区域 ID,注意要小写</td> <td>Yes</td> </tr> </tbody> </table> <p><a href="../../../parameters/"><em>公共参数</em></a></p> <p><strong>Response Elements</strong></p> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>action</td> <td>String</td> <td>响应动作</td> </tr> <tr> <td>instance_group_set</td> <td>Array</td> <td>JSON 格式的云服务器组数据列表, 每项参数可见下面 <a href="#response-item">Response Item</a></td> </tr> <tr> <td>total_count</td> <td>Integer</td> <td>根据过滤条件得到的云服务器组总数</td> </tr> </tbody> </table> <p><strong>Response Item</strong></p> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>instance_group_id</td> <td>String</td> <td>云服务器组ID</td> </tr> <tr> <td>instance_group_name</td> <td>String</td> <td>云服务器组名称</td> </tr> <tr> <td>description</td> <td>String</td> <td>云服务器组描述</td> </tr> <tr> <td>relation</td> <td>String</td> <td>云服务器组关系</td> </tr> <tr> <td>create_time</td> <td>TimeStamp</td> <td>云服务器组创建时间, 为UTC时间, 格式可参见 <a href="http://www.w3.org/TR/NOTE-datetime">ISO8601</a>.</td> </tr> </tbody> </table> <p><strong>Example</strong></p> <p><em>Example Request</em></p> <pre tabindex="0"><code>https://api.qingcloud.com/iaas/?action=DescribeInstanceGroups &amp;instance_groups.1=ig-8qstg3wi &amp;verbose=1 &amp;zone=gd2 &amp;COMMON_PARAMS </code></pre><p><em>Example Response</em>:</p> <pre tabindex="0"><code>{ &#34;action&#34;:&#34;DescribeInstanceGroupsResponse&#34;, &#34;total_count&#34;:1, &#34;instance_group_set&#34;:[ { &#34;instance_group_name&#34;:&#34;attract&#34;, &#34;description&#34;:&#34;&#34;, &#34;tags&#34;:[], &#34;controller&#34;:&#34;self&#34;, &#34;console_id&#34;:&#34;alphacloud&#34;, &#34;root_user_id&#34;:&#34;usr-97aasaOZ&#34;, &#34;create_time&#34;:&#34;2017-10-27T03:46:06Z&#34;, &#34;relation&#34;:&#34;attract&#34;, &#34;owner&#34;:&#34;usr-97aasaOZ&#34;, &#34;instance_group_id&#34;:&#34;ig-8qstg3wi&#34; } ], &#34;ret_code&#34;:0 } </code></pre> Development_docs: CloneInstances /development_docs/api/command_list/instance/clone_instances/ Mon, 01 Jan 0001 00:00:00 +0000 /development_docs/api/command_list/instance/clone_instances/ <p>拷贝一台或多台机器。</p> <p>拷贝云服务器的前提,是此云服务器对应的镜像可用、没有被删除掉。云服务器处于运行或关机状态。</p> <p>提醒</p> <p>拷贝后的云服务器处于运行状态。原云服务器的硬盘等也会拷贝并挂载到目标云服务器。</p> <p><strong>Request Parameters</strong></p> <table> <thead> <tr> <th>Parameter name</th> <th>Type</th> <th>Description</th> <th>Required</th> </tr> </thead> <tbody> <tr> <td>instances.n</td> <td>String</td> <td>一个或多个云服务器ID</td> <td>Yes</td> </tr> <tr> <td>vxnets.n</td> <td>String</td> <td>一个或多个云服务器克隆生成的新云服务器的vxnet或ip地址<br/>格式是: &lsquo;instance_id|vxnet_id|ip_addr&rsquo;</td> <td>No</td> </tr> <tr> <td>zone</td> <td>String</td> <td>区域 ID,注意要小写</td> <td>Yes</td> </tr> </tbody> </table> <p><a href="../../../parameters/"><em>公共参数</em></a></p> <p><strong>Response Elements</strong></p> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>action</td> <td>String</td> <td>响应动作</td> </tr> <tr> <td>job_id</td> <td>String</td> <td>执行任务的 Job ID</td> </tr> <tr> <td>ret_code</td> <td>Integer</td> <td>执行成功与否,0 表示成功,其他值则为错误代码</td> </tr> </tbody> </table> <p><strong>Example</strong></p> <p><em>Example Request</em>:</p> <pre tabindex="0"><code>https://api.qingcloud.com/iaas/?action=CloneInstances &amp;instances.1=i-xrvfi3jx &amp;instances.2=i-w2kcs8vb &amp;vxnets.1=&#39;i-xrvfi3jx|vxnet-q57edqv|172.30.10.21&#39; &amp;vxnets.2=&#39;i-w2kcs8vb|vxnet-3m9hetp&#39; &amp;zone=pek3a &amp;COMMON_PARAMS </code></pre><p><em>Example Response</em>:</p> <pre tabindex="0"><code>recv: { &#34;action&#34;:&#34;CloneInstancesResponse&#34;, &#34;instance_set&#34;:{ &#34;i-w2kcs8vb&#34;:{ &#34;instance_map&#34;:{ &#34;i-w2kcs8vb&#34;:&#34;i-fckrkm13&#34; } }, &#34;i-xrvfi3jx&#34;:{ &#34;instance_map&#34;:{ &#34;i-xrvfi3jx&#34;:&#34;i-ebnp872h&#34; }, &#34;volumes_map&#34;:{ &#34;vol-hl83huq8&#34;:&#34;vol-635nsvoh&#34;, &#34;vol-ttgud6t1&#34;:&#34;vol-tl0y9w2f&#34; } } }, &#34;ret_code&#34;:0, &#34;job_id&#34;:&#34;j-nlxw1url8uw&#34;, &#34;instances&#34;:[ &#34;i-ebnp872h&#34;, &#34;i-fckrkm13&#34; ] } </code></pre> Development_docs: CeaseInstances /development_docs/api/command_list/instance/cease_instances/ Mon, 01 Jan 0001 00:00:00 +0000 /development_docs/api/command_list/instance/cease_instances/ <p>从回收站销毁一台或多台云服务器。</p> <p>销毁云服务器的前提,是此云服务器已被删除并进入回收站。</p> <p>警告</p> <p>已销毁的云服务器会直接从回收站销毁,无法再恢复,如果误操作,请及时与我们联系。</p> <p><strong>Request Parameters</strong></p> <table> <thead> <tr> <th>Parameter name</th> <th>Type</th> <th>Description</th> <th>Required</th> </tr> </thead> <tbody> <tr> <td>instances.n</td> <td>String</td> <td>一个或多个云服务器ID</td> <td>Yes</td> </tr> <tr> <td>zone</td> <td>String</td> <td>区域 ID,注意要小写</td> <td>Yes</td> </tr> </tbody> </table> <p><a href="../../../parameters/"><em>公共参数</em></a></p> <p><strong>Response Elements</strong></p> <table> <thead> <tr> <th>Name</th> <th>Type</th> <th>Description</th> </tr> </thead> <tbody> <tr> <td>action</td> <td>String</td> <td>响应动作</td> </tr> <tr> <td>job_id</td> <td>String</td> <td>执行任务的 Job ID</td> </tr> <tr> <td>ret_code</td> <td>Integer</td> <td>执行成功与否,0 表示成功,其他值则为错误代码</td> </tr> </tbody> </table> <p><strong>Example</strong></p> <p><em>Example Request</em>:</p> <pre tabindex="0"><code>https://api.qingcloud.com/iaas/?action=CeaseInstances &amp;instances.1=i-rtyv0968 &amp;zone=pek3a &amp;COMMON_PARAMS </code></pre><p><em>Example Response</em>:</p> <pre tabindex="0"><code>{ &#34;action&#34;:&#34;CeaseInstancesResponse&#34;, &#34;job_id&#34;:&#34;j-ybnoeitr&#34;, &#34;ret_code&#34;:0 } </code></pre>