Updated on 2026-09-10 GMT+08:00

Creating Instances

Function

This API is used to create the instance. The account must have the payment permission. If the payment permission is not granted, an order can be generated but not automatically paid.

Calling Method

For details, see Calling APIs.

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

    aad:instance:create

    Write

    instance *

    g:EnterpriseProjectId

    -

    -

URI

POST /v2/aad/instance

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

token

Content-Type

Yes

String

Content-Type

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

ip_type

Yes

Integer

IP address type. 0: IPv4; 1: IPv6 When resource_region is set to asia_pacific, ip_type can only be set to 0 (IPv4).

resource_region

Yes

String

Resource region. north_china: North China; east_china: East China; asia_pacific: Asia Pacific.

basic_bandwidth

No

Integer

Baseline bandwidth. If resource_region is set to north_china or east_china, basic_bandwidth cannot be left blank. If resource_region is set to asia_pacific, basic_bandwidth must be left blank.

elastic_bandwidth

No

Integer

Elastic bandwidth If resource_region is set to north_china or east_china, elastic_bandwidth cannot be left blank. If resource_region is set to asia_pacific, elastic_bandwidth must be left blank.

protection_package

No

String

Protection package. basic: basic protection; unlimited: unlimited protection. If resource_region is set to asia_pacific, protection_package cannot be left blank. If resource_region is not set to asia_pacific, protection_package must be left blank.

instance_access_type

Yes

String

Instance access type. 0: website; 1: IP address.

protected_domain

No

Integer

Number of protected domain names. The step is 5. When instance_access_type is set to 1 (IP access), protected_domain must be left blank. When instance_access_type is set to 0 (website), protected_domain cannot be left blank. When resource_region is set to north_china or east_china, the value range of protected_domain is [50,500]. When resource_region is set to asia_pacific, the value range of protected_domain is [10,200].

forwarding_rule

No

Integer

Number of forwarding rules. The step is 5. When instance_access_type is set to 1 (IP address access), forwarding_rule cannot be left blank. When instance_access_type is set to 0 (website access), forwarding_rule must be left blank. When resource_region is set to north_china or east_china, the value range of forwarding_rule is [50,500]. When resource_region is set to asia_pacific, the value range of forwarding_rule is [5,200].

basic_qps

No

Integer

Service QPS. If instance_access_type is set to 1 (IP address access), basic_qps must be left blank. If instance_access_type is set to 0 (website access), basic_qps cannot be left blank. If resource_region is set to north_china or east_china, the value range of basic_qps is [3000,100000]. If resource_region is set to asia_pacific, the value range of basic_qps is [1000,100000].

duration

Yes

Integer

Subscription duration. Month: 1, 2, 3, 4, 5, 6, 7, 8, or 9 months. Year: 1 year.

amount

Yes

Integer

Purchase quantity.

instance_name

Yes

String

Instance name. When you create multiple instances simultaneously, the system automatically assigns a suffix to each instance name, such as CAD-0001.

service_bandwidth

Yes

Integer

Service bandwidth.

period_type

Yes

Integer

Subscription period type. The options are as follows: 2: month; 3: year.

enterprise_project_id

No

String

Enterprise project ID

elastic_service_bandwidth_type

No

Integer

Elastic service bandwidth type. If this parameter is left blank, the function is disabled. 2: daily 95th percentile bandwidth. 3: monthly 95th percentile bandwidth. When resource_region is set to north_china or east_china, only the monthly 95th percentile bandwidth is supported.

elastic_service_bandwidth

No

Integer

Increased elastic service bandwidth.

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

order_id

String

Order ID.

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_description

String

Error description.

Example Requests

POST https://{endpoint}/v2/aad/instance

{
  "ip_type" : 0,
  "resource_region" : "north_china",
  "basic_bandwidth" : 10,
  "forwarding_rule" : 50,
  "duration" : 1,
  "amount" : 1,
  "elastic_bandwidth" : 100,
  "service_bandwidth" : 100,
  "instance_access_type" : "1",
  "period_type" : 2,
  "instance_name" : "Instance",
  "enterprise_project_id" : "0"
}

Example Responses

Status code: 200

{
  "order_id" : "CS26030216302XMM0"
}

Status Codes

Status Code

Description

200

Result of creating an instance

400

Error response

Error Codes

See Error Codes.