CreateInstances
1. API Description
This API is used to create one or more virtual machine instances with a specified configuration.
Prerequisites
Query instance model: call
DescribeZoneInstanceConfigInfos
to check specifications.Query image: call
DescribeImages
to check information on image.
Note
After an instance is created successfully, it will start up automatically, and the instance status will become "
RUNNING
".If you create a subscription instance, the amount required will be pre-deducted. If the balance is insufficient, the request will fail. If you create a pay-as-you-go instance, please ensure your account balance is sufficient before calling this API.
Vouchers can be used for fee deduction in instance creation. See Vouchers for more details.
This API is an async API. An instance ID list is returned after the creation request is sent. However, it does not mean the creation has been completed. The status of the instance will be
PENDING
orDEPLOYING
during the creation. You can useDescribeInstances
to query the status of the instance. If the status (instanceStatus
) changes fromPENDING
orDEPLOYING
toRunning
, it means that the instance has been created successfully; if no instance has been queried, it means the instance has been created failed. Any operations on the instances are not allowed while creating.A maximum of 100 instances can be created in one request.
2. Input Parameters
The following request parameter list only provides API request parameters.
3. Output Parameters
4. Code Example
Create a pay-as-you-go instance with the simplest parameters Assuming to create a pay-as-you-go instance in Seoul A with the model of 1c2g, 1 Mbps flat rate bandwidth billing method, random system-generated password, and no images installed.
5. Developer Resources
Zenlayer Cloud API 2.0 integrates SDKs to make it easier for you to call APIs. More programming languages will be supported.
6. Error Codes
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Last updated