lightnode
en
  • cn
  • en
  1. Instance
lightnode
en
  • cn
  • en
  • API Introduction
  • Authentication Overview
  • Instance
    • Create
      POST
    • Release
      POST
    • Stop
      POST
    • Start
      POST
    • Restart
      POST
    • Modify Password
      POST
    • Instance Details
      GET
    • Reinstall
      POST
  • Security Group
    • Security Group Query
      GET
  • Image
    • Image Query
      GET
  • Asynchronous Task
    • Query Async Task
      GET
  • SSH key
    • Key Pair Query
      GET
  1. Instance

Create

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

API Introduction#

Create one or more cloud servers.#

The cloud server creation API can directly deploy instances after verifying user credentials and ensuring the account status is normal.#

This is an asynchronous API. After a cloud server creation request is successfully submitted, it returns an asyncTaskUUID. The cloud server creation is not immediately completed. You need to query the processResult status through the asynchronous task query API. When the processResult status is SUCCESS, it indicates that the cloud server has been successfully created.#

This API supports setting the x-open-token request header in HTTP request messages.#

Elastic cloud server authentication methods include two types: key pairs and passwords. Key pairs are used as the authentication method for elastic cloud servers.#

API calling method: Use the sshKeyUUID field to specify the key file used when logging into the elastic cloud server.#

Password authentication uses an initial password as the authentication method for elastic cloud servers. You can log into the elastic cloud server using username and password. For Linux operating systems, this is the initial password for the root user; for Windows operating systems, this is the initial password for the Administrator user.#

Password Rules:#

Length must be 8-30 characters
Must include [A-Z], [a-z], [0-9]
Must contain exactly one of the following special characters: ()~!@#$*-+={}[]:;,.?/

Instance Name Requirements:#

Maximum length: 64 characters
Can only contain characters from [A-Z], [a-z], [0-9], and hyphen (-)

Note: Please contact official support to obtain allowed packageCode values.#

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 --request POST '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

🟢202成功
application/json
Body

Examples
{
    "asyncTaskInfo": {
        "asyncTaskUUID": "cm00007dyzds",
        "ecsResourceUUID": "ecs-lg00007dyz7g"
    },
    "httpStatus": 202,
    "rowCount": 0
}
Modified at 2025-09-24 07:38:26
Previous
Authentication Overview
Next
Release
Built with