Direction
runInstances is used to produce one or more than one VMs.
If the parameters include parameters instanceId, imageId, instanceType, monitoringEnabled will be ignored.
Request Parameter
Parameter | Directions | Note |
---|---|---|
imageId (Not a necessary parameter) |
VM Template Number Type : String Default Value : No Occasion : To choose VM template number according to different needs. Whether it is plural : No |
Software varies in different VM templates. |
instanceType (Not a necessary parameter) |
Computing Specification Type : String Default Value : No Occasion : Different computing specification (including: cpu, memory, os). The valuation and computing capability are different. Whether it is plural : No |
|
monitoringEnabled (Not a necessary parameter) |
Whether a monitoring device should be installed Type : Boolean Default Value : false Whether it is plural : No |
|
instanceName (Not a necessary parameter) |
VM Name Type : String Default Value : No Whether it is plural : No |
Assign a easily identifiable name for your VM. |
count (Not a necessary parameter) |
Quantity Type : Integer Default Value : 1 Whether it is plural : No |
Maximum value is 10. Minimal value is 1. |
instanceId (Not a necessary parameter) |
Source VM Instance ID Type : String Default Value : No Whether it is plural : No |
|
regionId (Not a necessary parameter) |
region id Type : String Default Value : No Whether it is plural : No |
Deprecated Refer to List of Product and Computing Specification "region-tw-1": region one"region-tw-2": region two "region-hgr-1": HGR region one "region-hgr-2": HGR region two |
vpcBusinessServiceId (Not a necessary parameter) |
vpc business service id Type : String Default Value : No Whether it is plural : No |
|
vnic1SubnetBusinessServiceId (Not a necessary parameter) |
vnic 1 subnet business service id Type : String Default Value : No Whether it is plural : No |
|
vnic2SubnetBusinessServiceId (Not a necessary parameter) |
vnic 2 subnet business service id Type : String Default Value : No Whether it is plural : No |
|
vnic3SubnetBusinessServiceId (Not a necessary parameter) |
vnic 3 subnet business service id Type : String Default Value : No Whether it is plural : No |
|
vnic1UserAssignIp (Not a necessary parameter) |
vnic 1 user assign ip Type : String Default Value : No Whether it is plural : No |
|
vnic1AdapterStatus (Not a necessary parameter) |
vnic 1 adapter status, 1: enable, 2: disable Type : String Default Value : No Whether it is plural : No |
|
vnic2AdapterStatus (Not a necessary parameter) |
vnic 2 adapter status, 1: enable, 2: disable Type : String Default Value : No Whether it is plural : No |
|
vnic3AdapterStatus (Not a necessary parameter) |
vnic 3 adapter status, 1: enable, 2: disable Type : String Default Value : No Whether it is plural : No |
Response Parameter
Parameter | Directions | Note |
---|---|---|
requestId (Not a necessary parameter) |
Request ID Type : JSON value : string Whether it is plural : No |
Automatically produced by the system |
orderUuidList | List of Order Number Type : JSON value : array Occasion : For order enquiries Whether it is plural : Yes |
string List |
Request Example
ex 1 (public image): https://hws.hicloud.hinet.net/cloud_hws/api/hws/?action=runInstances &imageId=hi-cuium8up &instanceType=HC1.S.WIN &monitoringEnabled=false &instanceName=myInstance &count=1 &regionId=${regionId} &chtAuthType=hwspass &version=${version} &expires=${expires} &accessKey=${accessKey} &signature=${signature} ex 2 (clone vm from vm): https://hws.hicloud.hinet.net/cloud_hws/api/hws/?action=runInstances &instanceId=BV550100010001 &monitoringEnabled=false &instanceName=myInstance &count=1 &chtAuthType=hwspass &version=${version} &expires=${expires} &accessKey=${accessKey} &signature=${signature} ex 3 (create vm from template): https://hws.hicloud.hinet.net/cloud_hws/api/hws/?action=runInstances &imageId=BT550100010001 &instanceType=HC1.S.WIN &instanceName=myInstance &chtAuthType=hwspass &version=${version} &expires=${expires} &accessKey=${accessKey} &signature=${signature}
Response Example
{ "requestId": "xxxEXAMPLE", "orderUuidList": ["b8b5a2c9-760a-4106-b1c7-c7963d5d7e84"] }