CreateInstances
1. API Description
This API is used to create one or more instances with a specified configuration.
Prerequisites
Query stock: call
DescribeAvailableResources
to check available resources.Query instance model: call
DescribeInstanceTypes
to check specifications.Query image: call
DescribeImages
to check information on image.Cost estimation: know of bare metal cloud pricing. See Billing Method for more details.
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
orCREATING
during the creation. You can use DescribeInstances to query the status of the instance. If the status changes fromPENDING
orCreating
toRunning
, it means that the instance has been created successfully;CREATE_FAILED
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 M6C, 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