All Products
Search
Document Center

:RunInstances

Last Updated:Mar 01, 2024

Creates and starts multiple Elastic Cloud Phone (ECP) instances at a time.

Operation description

Preparations:

Precautions:

  • You can create up to 100 ECP instances at a time.
  • You can call this operation to create and start ECP instances.
  • If an ECP instance fails to be created due to force majeure factors, such as insufficient inventory, the ECP instance is automatically rolled back and released.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region.

cn-hangzhou
InstanceNamestringNo

The name of the ECP instance. The name must be 2 to 128 characters in length. It must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-). The default value of this parameter is the value of the InstanceId parameter.

instance
DescriptionstringNo

The description of the ECP instance. The description must be 2 to 256 characters in length and cannot start with http:// or https://.

cloudphone instance
InstanceTypestringYes

The specifications of the ECP instance.

ecp.ce.large
ImageIdstringYes

The ID of the image.

cpm-xxxx
SecurityGroupIdstringYes

The ID of the security group that the ECP instance uses. The security group is the same as that of the Elastic Compute Service (ECS) instance that you use.

sg-xxxxx
VSwitchIdstringYes

The ID of the vSwitch.

vsw-xxxx
EipBandwidthintegerNo

The bandwidth of the elastic IP address (EIP). Valid values: 1 to 200. If you specify this parameter, an ECP instance that uses an EIP with specified bandwidth is automatically created and associated with the ECP instance. If the ECP instance is released, the EIP is also released.

2
ResolutionstringNo

The resolution that you want to select for the ECP instance. You can query the resolutions that are supported by the current instance by calling the DescribeInstanceTypes operation and select an appropriate resolution.

1920*1080
AmountintegerNo

The number of ECS instances that you want to create. Valid values: 1 to 100.

Default value: 1.

10
KeyPairNamestringNo

The name of the key pair that you want to use to connect to the instance. You can call the ImportKeyPair operation to import a key pair for cloud phones.

keypair
ClientTokenstringNo

The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
ChargeTypestringNo

The billing method of the ECP instance. Valid values:

  • PrePaid: subscription
  • PostPaid (default): pay-as-you-go
PostPaid
PeriodUnitstringNo

The unit of the subscription duration. Valid values:

  • Year
  • Month (default)
Month
AutoRenewbooleanNo

Specifies whether to enable the auto-renewal feature. This parameter takes effect only if you set InstanceChargeType to PrePaid. Valid values:

  • true
  • false (default)
true
AutoPaybooleanNo

Specifies whether to enable the auto-payment feature. Default value: true.

true
PeriodlongNo

The subscription duration. Default value: 1.

  • Valid values if you set PeriodUnit to Month: 1, 2, 3, and 6.
  • Valid values if you set PeriodUnit to Year: 1, 2, 3, 4, and 5.
1
Tagobject []No

The tags of the ECP instance.

KeystringNo

The tag key of the ECP instance. Valid values of N: 1 to 20.

TestKey
ValuestringNo

The tag value of the ECP instance. Valid values of N: 1 to 20.

TestValue
PrivateIpAddressstringNo

The private IP address of the cloud phone. When you configure a private IP address for an ECP instance, you must select an idle CIDR block from the CIDR blocks of the vSwitch (VSwitchId). When you specify this parameter, take note of the following items: After you specify the PrivateIpAddress parameter, you must set Amount to 1, which indicates that a cloud phone with a specific private IP address is created.

192.168.157.224

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
OrderIdstring

The ID of the order.

9611111323245
TradePricefloat

The price of the ECP resource.

133.32
InstanceIdsarray

The IDs of the ECP instances.

string

The IDs of the ECP instances.

cp-xxxxx

Examples

Sample success responses

JSONformat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "OrderId": "9611111323245",
  "TradePrice": 133.32,
  "InstanceIds": {
    "InstanceId": [
      "cp-xxxxx"
    ]
  }
}

Error codes

HTTP status codeError codeError message
403QuotaExceedInstance quota exceed.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2022-06-10The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 403
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: PrivateIpAddress