Updated on 2026-01-13 GMT+08:00

Creating an Instance

Function

This API is used to create an instance. You need to provide the detailed instance configurations.

Calling Method

For details, see Calling APIs.

URI

POST /v1/{project_id}/instances

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

availability_zone

No

String

AZ.

charge_info

No

ChargeInfo object

Billing information.

deploy_mode

No

String

Deployment mode.

mode

No

String

Mode.

name

No

String

Instance name.

outside_ins_config

No

OutsideInsConfig object

On-premises instance configuration.

password

No

String

Password.

project_id

No

String

Project ID.

publicip_id

No

String

EIP ID.

region

No

String

Region.

security_group_id

No

String

Security group ID.

specification

No

String

Specifications.

subnet_id

No

String

Subnet ID.

type

No

String

Type.

vpc_id

No

String

VPC ID

Table 3 ChargeInfo

Parameter

Mandatory

Type

Description

charge_mode

No

String

Billing mode.

is_auto_pay

No

Boolean

Whether automatic payment is enabled.

is_auto_renew

No

Boolean

Whether auto-renewal is enabled.

period_num

No

Integer

Number of periods.

period_type

No

String

Period type.

promotion_info

No

String

Promotion information.

Table 4 OutsideInsConfig

Parameter

Mandatory

Type

Description

master_node_ip

No

String

IP address of the primary node.

slave_node_ip

No

String

IP address of the standby node.

virtual_ip

No

String

Virtual IP address.

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

job_id

String

Job ID.

order_id

String

Order ID.

Status code: 201

Created.

Example Requests

POST /v1/{project_id}/instances

{
  "availability_zone" : "string",
  "charge_info" : { },
  "deploy_mode" : "string",
  "mode" : "string",
  "name" : "string",
  "outside_ins_config" : { },
  "password" : "string",
  "project_id" : "string",
  "publicip_id" : "string",
  "region" : "string",
  "security_group_id" : "string",
  "specification" : "string",
  "subnet_id" : "string",
  "type" : "string",
  "vpc_id" : "string"
}

Example Responses

None

Status Codes

Status Code

Description

200

OK

201

Created.

401

Unauthorized.

403

Access denied.

404

Not found.

Error Codes

See Error Codes.