1. Instances
LightNode
en
  • cn
  • en
  • API Overview
  • API Authentication Guide
  • Instances
    • Create Instance
      POST
    • Delete Instance
      POST
    • Stop Instance
      POST
    • Start Instance
      POST
    • Restart Instance
      POST
    • Reset Password
      POST
    • Instance Details
      GET
    • Reinstall OS
      POST
    • Instance List
      GET
  • Security Groups
    • Security Group List
      GET
  • Images
    • Image List
      GET
  • Async Tasks
    • Get Async Task Result
      GET
  • SSH Keys
    • SSH Key List
      GET
  • Regions
    • Region List
      GET
  • Packages
    • Package List
      GET
  • Schemas
    • Instance Model
  1. Instances

Create Instance

POST
https://openapi.lightnode.com/instance/create

API Overview#

Creates one or more cloud servers.#

Once the user credentials are validated and the account status is normal, this API can directly provision instances.#

This is an asynchronous API. After a create request is accepted, it returns an asynchronous task ID asyncTaskUUID. At that point, instance creation is not yet complete. You must call the async task query API and check processResult. When processResult is SUCCESS, the cloud server has been created successfully.#

Elastic cloud servers support two login authentication methods: SSH key pair and password.#

To use an SSH key pair, provide the key file for instance login through the sshKeyUUID field.#

To use password-based authentication, set an initial password. You can then log in with a username and password. For Linux, this is the initial password for the root user. For Windows, this is the initial password for the Administrator user.#

Password rules:#

8 to 30 characters long
Must include letters and numbers
Must include at least one of the following special characters: ()~!@#$*-+={}[]:;,.?/

Hostname rules:#

Maximum length: 64 characters
Only letters, numbers, and hyphens (-) are allowed

Request

Header Params

Body Params application/json

Example
{
    "packageConfig": {
        "packageCode": "test",
        "regionCode": "cn-dev-2",
        "zoneCode": "cn-dev-2-a",
        "instanceName": "20250624153241944021",
        "imageResourceUUID": "img-bv00006yzubh",
        "sshKeyUUID": null,
        "firewallUUID": "fw-7100007a1u1s",
        "password": "Pass4422@"
    }
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://openapi.lightnode.com/instance/create' \
--header 'x-open-token: test-token' \
--header 'Content-Type: application/json' \
--data-raw '{
    "packageConfig": {
        "packageCode": "test",
        "regionCode": "cn-dev-2",
        "zoneCode": "cn-dev-2-a",
        "instanceName": "20250624153241944021",
        "imageResourceUUID": "img-bv00006yzubh",
        "sshKeyUUID": null,
        "firewallUUID": "fw-7100007a1u1s",
        "password": "Pass4422@"
    }
}'

Responses

🟢202Success
application/json
Bodyapplication/json

Examples
{
    "asyncTaskInfo": {
        "asyncTaskUUID": "cm00007dyzds",
        "ecsResourceUUID": "ecs-lg00007dyz7g"
    },
    "httpStatus": 202,
    "rowCount": 0
}
Modified at 2026-04-10 06:07:07
Previous
API Authentication Guide
Next
Delete Instance
Built with