Help Center/ ModelArts/ API Reference/ Lite Server/ Creating a Lite Server
Updated on 2026-07-24 GMT+08:00

Creating a Lite Server

Function

This API is used to create Lite Server ECSs, BMSs, and supernode servers. It is used when you need to quickly deploy and configure different types of server resources based on service requirements. Before calling this API, ensure that you have logged in to the system and have the permission to create Lite Servers. In addition, you need to provide required parameters, such as the server type, specifications, and network configuration. After the creation, the system returns the information about the created Lite Server instance, including the instance ID and status. If you do not have the required permission, the parameter settings are incorrect, or system resources are insufficient, the API returns an error message.

Constraints

No constraints

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    modelarts:devserver:create

    Write

    devserver *

    -

    -

    -

    -

    g:EnterpriseProjectId

URI

POST /v1/{project_id}/dev-servers

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition: Project ID

Constraints: Mandatory

Range: The value can contain 1 to 64 characters. Letters, digits, and hyphens (-) are allowed.

Default Value: N/A

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

admin_pass

No

String

Definition: Password used for logging in to the server. Select either admin_pass or key_pair_name. The password must:

  • Contain 8 to 26 characters.

  • Contain at least three of the following types: uppercase letters, lowercase letters, digits, and special characters (!@%-_=+[{}]:,./?).

  • Cannot be the username or the username spelled backwards.

  • Cannot contain root, administrator, or their reverse.

Constraints: admin_pass and key_pair_name cannot exist at the same time.

Range: The value must contain 8 to 26 characters and meet the preceding password rules.

Default Value: N/A

arch

No

String

Definition: Architecture type of a server flavor.

Constraints: N/A

Range:

  • X86: The CPU architecture is x86.

  • ARM: The CPU architecture is Arm.

Default Value: N/A

availability_zone

No

String

Definition: AZ where the server is located.

Constraints: N/A

Range: The value can contain 1 to 256 characters. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed.

Default Value: N/A

charging_info

No

ChargingInfo object

Definition: Billing mode of a server.

count

No

Integer

Definition: Number of servers purchased at a time.

Constraints: Supernodes are not supported.

Range: 1 to 10.

Default Value: N/A.

enterprise_project_id

No

String

Definition: Enterprise ID.

Constraints: N/A

Range: The value can contain 1 to 36 characters. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed.

Default Value: N/A

flavor

No

String

Definition: Server flavor name.

Constraints: Select either flavor or resource_flavor.

Range: 1 to 128 characters.

Default Value: N/A.

resource_flavor

No

String

Definition: Server resource flavor name.

Constraints: Select either flavor or resource_flavor.

Range: The value can contain 1 to 256 characters. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed.

Default Value: N/A.

image_id

Yes

String

Definition: Server image ID.

Constraints: N/A

Range: The value must be a string of 36 characters in UUID format.

Default Value: N/A

key_pair_name

No

String

Definition: Key pair name used for logging in to the server. Select either admin_pass or key_pair_name. Note that supernodes can be created only using key pairs.

Constraints: admin_pass and key_pair_name cannot exist at the same time.

Range: The value can contain 1 to 64 characters. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed.

Default Value: N/A

name

Yes

String

Definition: Server name.

Constraints: N/A

Range: The value can contain 1 to 64 characters. Only letters, digits, hyphens (-), underscores (_), and periods (.) are allowed.

Default Value: N/A

network

Yes

ServerNetwork object

Definition: Server network information.

Constraints: N/A

Range: See #/definitions/ServerNetwork.

Default Value: N/A

root_volume

No

EvsVolume object

Definition: System disk information of a server.

Constraints: This parameter is mandatory for all ECS and HPS flavors and some BMS flavors, such as Ant8, Ant1, and Snt9b.

Range: See #/definitions/EvsVolume.

Default Value: N/A

data_volume

No

ServerDataVolume object

Definition: Data disk information of a server.

Constraints: N/A

Range: See #/definitions/ServerDataVolume.

Default Value: N/A

server_type

No

String

Definition: Server type.

Constraints: N/A

Range

  • BMS: Bare Metal Server

  • ECS: Elastic Cloud Server

  • HPS: Supernode server

Default Value: N/A

user_data

No

String

Definition

Custom data to be injected into the instance during cloud server creation. Texts and text files can be injected.

Example:

Before Base64 encoding:

  • Linux server:

#!/bin/bash
echo user_test > /home/user.txt

After Base64 encoding:

  • Linux server:

IyEvYmluL2Jhc2gKZWNobyB1c2VyX3Rlc3QgPiAvaG9tZS91c2VyLnR4dA==

For more information about user data injection, see Injecting User Data.

You must be aware of the effects of user_data. You are responsible for the impact and risks.

Constraints

  • The content of user_data must be encoded with Base64.

  • The maximum size of the content to be injected (before encoding) is 32 KB.

Range: N/A

Default Value: N/A

hps_cluster_id

No

String

Definition: Network information of the supernode cluster. This parameter is required only when a supernode is created.

Constraints: This parameter is used only for creating HPS servers.

Range: The value must be a string of 36 characters in UUID format.

Default Value: N/A

Table 3 ChargingInfo

Parameter

Mandatory

Type

Description

charging_mode

Yes

String

Definition: Payment type, which is the billing mode of the server.

Constraints: N/A

Range:

  • COMMON: Both yearly/monthly and pay-per-use are supported.

  • POST_PAID: postpaid charging mode

  • PRE_PAID: prepaid charging mode

Default Value: N/A

is_auto_pay

No

Boolean

Definition: Specifies whether to enable automatic payment.

Constraints: N/A

Range:

  • true: The order will be automatically paid.

  • false: The order will not be automatically paid.

Default Value: N/A

is_auto_renew

No

Boolean

Definition: Specifies whether to enable auto renewal.

Constraints: N/A

Range:

  • true: Auto renewal is enabled.

  • false: Auto renewal is not enabled.

Default Value: N/A

period_num

Yes

Integer

Definition: Number of subscription periods.

Constraints: N/A

Range: 1 to 11

Default Value: N/A

period_type

Yes

String

Definition: Subscription period type, which defines the time unit for the subscription period.

Constraints: N/A

Range:

  • ABSOLUTE

  • DAY

  • HOUR

  • MONTH

  • WEEK

  • YEAR

Default Value: N/A

Table 4 ServerNetwork

Parameter

Mandatory

Type

Description

ipv6_enable

No

Boolean

Definition: Whether IPv6 is enabled when a server is created.

Constraints: N/A

Range:

  • true: IPv6 is enabled.

  • false: IPv6 is disabled.

Default Value: N/A

roce_id

No

String

Definition: RoCE network ID of the server.

Constraints: N/A

Range: The value must be a string in UUID format.

Default Value: N/A

security_group_id

Yes

String

Definition: ID of the security group to which the server belongs.

Constraints: N/A

Range: The value must be a string in UUID format.

Default Value: N/A

subnet_id

Yes

String

Definition: ID of the subnet where the server is located.

Constraints: N/A

Range: The value must be a string in UUID format.

Default Value: N/A

vpc_id

Yes

String

Definition: ID of the VPC where the server is located.

Constraints: N/A

Range: The value must be a string in UUID format.

Default Value: N/A

hyper_cluster

No

hyper_cluster object

Definition: Network information of the parameter plane of the server.

Constraints: N/A.

Range: N/A.

Default Value: N/A.

allowed_address_pairs

No

Array of AllowedAddressPairs objects

Definition

IP/MAC address pairs.

Constraints

  • The IP address cannot be 0.0.0.0/0.

  • Configure a dedicated security group for the port if allowed_address_pairs has a CIDR block with a netmask length less than 24.

  • If the value of allowed_address_pairs is 1.1.1.1/0, the source/target check is disabled.

  • If a virtual IP address is bound to an ECS:

Leave mac_address blank or set it to the MAC address of the NIC bound to the ECS.

Set allowed_address_pairs of the cloud server NIC to 1.1.1.1/0.

Range

N/A

Default Value

N/A

Table 5 hyper_cluster

Parameter

Mandatory

Type

Description

id

No

String

Definition: ID of the HyperCluster.

Constraints: N/A

Range: N/A

Default Value: N/A

hyper_cluster_subnet_id

No

String

Definition: Subnet ID of the HyperCluster.

Constraints: N/A

Range: N/A

Default Value: N/A

Table 6 AllowedAddressPairs

Parameter

Mandatory

Type

Description

ip_address

No

String

Definition

IP address.

Constraints

  • The value cannot be 0.0.0.0/0.

  • Configure a dedicated security group for the port if allowed_address_pairs has a CIDR block with a netmask length less than 24.

Range

N/A

Default Value

N/A

mac_address

No

String

Definition

MAC address.

Constraints

N/A

Range

N/A

Default Value

N/A

Table 7 EvsVolume

Parameter

Mandatory

Type

Description

size

No

Integer

Definition: System disk size, which is the storage space allocated to the system disk.

Constraints: N/A

Range: 100 to 1,024 GB

Default Value: N/A

type

No

String

Definition: System disk type, which indicates the storage type of the system disk.

Constraints: N/A

Range:

  • ESSD: extreme SSD

  • GPSSD: General-purpose SSD

  • SAS: high I/O EVS disk

  • SATA: common I/O EVS disk

  • SSD: ultra-high I/O EVS disk

Default Value: N/A

Table 8 ServerDataVolume

Parameter

Mandatory

Type

Description

size

Yes

Integer

Definition: Data disk size. Storage space allocated to a data disk.

Constraints: N/A

Range: 100 to 32,768 GB

Default Value: N/A

type

Yes

String

Definition: System disk type, which indicates the storage type of the data disk.

Constraints: N/A

Range:

  • ESSD: extreme SSD

  • GPSSD: General-purpose SSD

  • SAS: high I/O EVS disk

  • SATA: common I/O EVS disk

  • SSD: ultra-high I/O EVS disk

Default Value: N/A

count

Yes

Integer

Definition: Number of data disks. Number of data disks allocated to an instance.

Constraints: N/A

Range: 1 to 8

Default Value: N/A

Response Parameters

Status code: 200

Table 9 Response body parameters

Parameter

Type

Description

create_at

Long

Definition: Creation time, which is a Unix timestamp in milliseconds.

Range: N/A

update_at

Long

Definition: Update time, which is a Unix timestamp in milliseconds.

Range: N/A

charging_mode

String

Definition: Billing mode.

Range

  • COMMON: Both yearly/monthly and pay-per-use billing modes are supported.

  • POST_PAID: pay-per-use

  • PRE_PAID: yearly/monthly

cloud_server

CloudServer object

Definition: Cloud service information.

endpoints_response

Array of Endpoints objects

Definition: Private IP address of the instance. Each element in the list is an Endpoints object, containing information such as the supported service type and access method.

flavor

String

Definition: Instance flavor name.

Range: 1 to 128 characters

id

String

Definition: Instance ID.

Range: a UUID in the format of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, where x is a hexadecimal number.

key_pair_name

String

Definition: Key pair name.

Range: The value is a string of 1 to 64 characters, including letters, digits, hyphens (-), underscores (_), and periods (.).

name

String

Definition: Instance name.

Range: The value is a string of 1 to 64 characters, including letters, digits, hyphens (-), underscores (_), and periods (.).

order_id

String

Definition: Order ID.

Range: The value is a string of 1 to 64 characters, including letters and digits.

status

String

Definition: Instance status. Current running status of the instance, which is used to monitor the lifecycle and health status of the instance.

Range:

  • CREATE_FAILED: Creating the instance failed.

  • CREATING: The instance is being created.

  • DELETED: The instance has been deleted.

  • DELETE_FAILED: Deleting the instance failed.

  • DELETING: The instance is being deleted.

  • ERROR: An error occurred.

  • RUNNING: The instance is running.

  • STARTING: The instance is being started.

  • START_FAILED: Starting the instance failed.

  • STOPPED: The instance has been stopped.

  • STOPPING: The instance is being stopped.

  • STOP_FAILED: Stopping the instance failed.

  • REBOOTING: The instance is being restarted.

  • REBOOT_FAILED: Restarting the instance failed.

  • CHANGINGOS: The OS is being changed.

  • CHANGINGOS_FAILED: Changing the OS failed.

  • REINSTALLINGOS: The OS is being reinstalled.

  • REINSTALLINGOS_FAILED: Reinstalling the OS failed.

vpc_id

String

Definition: ID of the VPC where the instance is located.

Range: a UUID in the format of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, where x is a hexadecimal number.

endpoints

Array of EndpointsRes objects

Definition: Private IP address of the server. Each element in the list is an EndpointsRes object, containing information such as the access method and private IP address.

volumes

Array of ServerVolume objects

Definition: Information about the attached disk. Each element in the list is a ServerVolume object, containing information such as the disk size, type, and EVS disk information.

image

ServerImageResponse object

Definition: Server image information.

category

String

Definition: Server type.

Range:

  • HPS: supernode server

  • SPOD: full-cabinet server

  • SERVER: single server

server_hps

ServerHpsInfo object

Definition: Information about the supernode to which the server belongs.

subnet_id

String

Description: ID of the subnet where the instance is located.

Range: a UUID in the format of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, where x is a hexadecimal number.

Table 10 CloudServer

Parameter

Type

Description

id

String

Definition: Server resource ID or supernode's child node ID.

Range: a UUID in the format of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, where x is a hexadecimal number.

type

String

Definition: Lite Server server type.

Range:

  • BMS: Bare Metal Server

  • ECS: Elastic Cloud Server

  • HPS: Supernode server

hps_id

String

Definition: Server resource ID of the supernode's child node.

Range: a UUID in the format of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, where x is a hexadecimal number.

hps_ecs_id

String

Definition: Server resource ID of the supernode's child node.

Range: a UUID in the format of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, where x is a hexadecimal number.

Table 11 Endpoints

Parameter

Type

Description

dev_service

String

Definition: Supported services. The difference between dev_service here and dev_service in EndpointsRes is as follows: dev_service here is used to specify the service type in the request, and dev_service in EndpointsRes is used to identify the access mode in the response.

Range

  • NOTEBOOK: You can access notebook instances using HTTPS.

  • SSH: You can remotely access notebook instances through SSH.

extensions

Map<String,String>

Definition: App-specific URL for accessing the remote development mode of the app. It includes extended configurations of the application. key indicates the name of the extended configuration, and value indicates the value of the extended configuration.

ssh_keys

Array of strings

Definition: List of SSH key pair names. A maximum of 1,024 key pairs are supported. You can set multiple key pairs to access an SSH instance at the same time.

Table 12 EndpointsRes

Parameter

Type

Description

dev_service

String

Definition: Method for accessing the notebook instance.

Range:

  • NOTEBOOK: You can access notebook instances using HTTPS.

  • SSH: You can remotely access notebook instances through SSH.

service

String

Definition: Method for accessing the notebook instance. The difference between service and dev_service is that service is used to identify the access mode in the response, while dev_service is used to specify the service type in the request.

Range

  • NOTEBOOK: You can access notebook instances using HTTPS.

  • SSH: You can remotely access notebook instances through SSH.

uri

String

Definition: URI for accessing the instance. The format is private IP address.

Range: N/A

key_pair_names

Array of strings

Definition: List of SSH key pairs. You can set multiple key pairs to access an SSH instance at the same time.

Range: N/A

Table 13 ServerVolume

Parameter

Type

Description

size

Integer

Definition: Size of the EVS disk, in GB. It specifies the storage space allocated to the system disk.

Range: 100 to 1024

type

String

Definition: Storage type, which can be a system disk or data disk.

Range

  • ROOT: System disk

  • DATA: Data disk

evs_type

String

Definition: EVS disk type. Storage type of the EVS disk.

Range

  • ESSD: Extreme SSD

  • GPSSD: General-purpose SSD

  • SAS: High I/O EVS disk

  • SATA: Common I/O EVS disk

  • SSD: Ultra-high I/O EVS disk

evs_id

String

Definition: ID of the EVS disk.

Range: a UUID in the format of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, where x is a hexadecimal number.

Table 14 ServerImageResponse

Parameter

Type

Description

arch

String

Definition: Architecture type of a server image.

Range

  • ARM: Arm architecture, which is applicable to mobile and embedded scenarios.

  • X86: x86 architecture, which is applicable to general computing scenarios.

image_id

String

Definition: Server image ID.

Range: a UUID in the format of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, where x is a hexadecimal number.

name

String

Definition: Server image name.

Range: 1 to 256 characters

server_type

String

Definition: Server type.

Range:

  • BMS: BMS

  • ECS: ECS

  • HPS: supernode server

status

String

Definition: Server image status.

Range

  • ACTIVE: The image is available.

  • INACTIVE: The image is unavailable.

Table 15 ServerHpsInfo

Parameter

Type

Description

id

String

Definition: Lite Server supernode instance ID.

Range: a UUID in the format of xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, where x is a hexadecimal number.

name

String

Definition: Lite Server supernode name.

Range: The value is a string of 1 to 64 characters, including letters, digits, hyphens (-), underscores (_), and periods (.).

Example Requests

POST https://{endpoint}/v1/{project_id}/dev-servers

{
  "name" : "EI-evs-1107",
  "flavor" : "Si2.large.4",
  "image_id" : "c90fb553-2cdb-4b81-b56a-ef68812c6cf7",
  "network" : {
    "security_group_id" : "150a2c76-1334-45f6-b28f-419f9b1d1742",
    "subnet_id" : "38cf274a-98f9-4f6f-b622-5ed0e4a3db54",
    "vpc_id" : "05982b48-a70f-43a1-a2b0-1fe36a236172"
  },
  "admin_pass" : "@LiteServer"
}

Example Responses

Status code: 200

OK

{
  "charging_mode" : "PRE_PAID",
  "cloud_server" : {
    "type" : "ECS"
  },
  "create_at" : 1699348284990,
  "flavor" : "Si2.large.4",
  "id" : "62383738-e52a-450a-9f84-f9e705402be8",
  "image" : {
    "arch" : "X86",
    "image_id" : "c90fb553-2cdb-4b81-b56a-ef68812c6cf7",
    "name" : "Ubuntu18.04_x86_64_CPU",
    "server_type" : "ECS"
  },
  "name" : "EI-evs-1107",
  "status" : "CREATING",
  "update_at" : 1699348285077
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.