Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ ModelArts/ API Reference/ DevServer Management/ Creating a DevServer Instance

Creating a DevServer Instance

Updated on 2024-05-30 GMT+08:00

Function

This API is used to create a DevServer instance.

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.

URI

POST /v1/{project_id}/dev-servers

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details, see Obtaining a Project ID and Name.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

admin_pass

No

String

Password for logging in to the server. Note that either admin_pass or key_pair_name must be specified. The password must meet the following requirements:

  • Must contain 8 to 26 characters.

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

  • Cannot be the username or the username backwards.

  • Cannot contain root, administrator, or their reverse.

arch

No

String

Server architecture. The options are as follows:

  • ARM

  • X86

availability_zone

No

String

AZ

charging_info

No

ChargingInfo object

Charging information of the server

count

No

Integer

Number of servers purchased at a time

enterprise_project_id

No

String

Project ID

flavor

Yes

String

Server flavor name

image_id

Yes

String

Server image ID

key_pair_name

No

String

Name of the key pair for logging in to the server. Note that either admin_pass or key_pair_name must be specified.

name

Yes

String

Server name

network

Yes

ServerNetwork object

Server network information

root_volume

No

EvsVolume object

System disk information of the server

server_type

No

String

Server type. Enums:

  • BMS

  • ECS

userdata

No

String

Data defined by users during server creation

Table 3 ChargingInfo

Parameter

Mandatory

Type

Description

charging_mode

Yes

String

Charging mode. Enums:

  • COMMON: prepaid and postpaid charging modes

  • POST_PAID: postpaid charging mode

  • PRE_PAID: prepaid charging mode

is_auto_pay

No

Boolean

is auto pay

is_auto_renew

No

Boolean

is auto renew

period_num

Yes

Integer

period num

period_type

Yes

String

Period type.

  • ABSOLUTE

  • DAY

  • HOUR

  • MONTH

  • WEEK

  • YEAR

Table 4 ServerNetwork

Parameter

Mandatory

Type

Description

ipv6_enable

No

Boolean

Whether to enable IPv6 for the server to be created

roce_id

No

String

RoCE network ID of the server

security_group_id

Yes

String

ID of security group to which the server belongs

subnet_id

Yes

String

ID of the subnet where the server is located

vpc_id

Yes

String

ID of the VPC to which the server belongs

Table 5 EvsVolume

Parameter

Mandatory

Type

Description

size

No

Integer

System disk size

type

No

String

System disk type. The options are:

  • ESSD;

  • GPSSD;

  • SAS;

  • SATA;

  • SSD

Response Parameters

Status code: 200

Table 6 Response body parameters

Parameter

Type

Description

create_at

Long

Creation time

update_at

Long

Update time

charging_mode

String

Billing mode.

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

  • POST_PAID: pay-per-use

  • PRE_PAID: yearly/monthly

cloud_server

CloudServer object

Cloud service information

endpoints_response

Array of Endpoints objects

Private IP address of the instance

flavor

String

Instance flavor name

id

String

Instance ID

key_pair_name

String

Key pair name

name

String

Instance name

order_id

String

Order ID

server_image_response

ServerImageResponse object

Instance image

status

String

Instance status.

  • 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 starting.

  • START_FAILED: Starting the instance failed.

  • STOPPED: The instance has been stopped.

  • STOPPING: The instance is being stopped.

  • STOP_FAILED: Stopping the instance failed.

vpc_id

String

ID of the VPC to which the instance belongs

endpoints

Array of EndpointsRes objects

Private IP address of the server

image

ServerImageResponse object

Server image information

Table 7 CloudServer

Parameter

Type

Description

id

String

Server resource ID

type

String

DevServer type. Enums:

  • BMS

  • ECS

Table 8 Endpoints

Parameter

Type

Description

allowed_access_ips

Array of strings

Whitelisted public IP addresses that are allowed to access notebook instances through SSH. By default, all public IP addresses can access the notebook instances. If this parameter is specified, only the clients at the specified IP addresses can access the notebook instances.

dev_service

String

Supported service. Enums:

  • NOTEBOOK: You can access notebook instances using HTTPS.

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

  • AI_FLOW

  • MA_STUDIO

  • TENSOR_BOARD

  • WEB_IDE

extensions

Map<String,String>

App-specific URL for accessing the remote development mode of the App.

ssh_keys

Array of strings

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

Table 9 EndpointsRes

Parameter

Type

Description

allowed_access_ips

Array of strings

Whitelist of public IP addresses that are allowed to access the notebook instance through SSH. By default, all public IP addresses can access the notebook instance. If this parameter is specified, only the clients with the specified IP addresses can access the notebook instance.

dev_service

String

Supported service. Options:

  • NOTEBOOK: You can access notebook instances using HTTPS.

  • SSH: You can remotely access the notebook instance through SSH.

ssh_keys

Array of strings

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

service

String

Supported service. The options are:

  • NOTEBOOK: You can access notebook instances using HTTPS.

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

uri

String

Private IP address of the instance

Table 10 ServerImageResponse

Parameter

Type

Description

arch

String

Architecture of the server image. The options are as follows:

  • ARM

  • X86

image_id

String

Server image ID

name

String

Server image name

server_type

String

Server type. Enums:

  • BMS

  • ECS

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" : "@DevServer"
}

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.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback