All Products
Search
Document Center

Expenses and Costs:CreateInstance

Last Updated:Aug 27, 2026

Creates an instance. A purchase order is automatically created and paid. ECS and ApsaraDB RDS instances are not supported.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

bss:ModifyInstance

create

*All Resource

*

  • bssapi:ProductCode
  • bssapi:ProductType
None

Request parameters

Parameter

Type

Required

Description

Example

ProductCode

string

Yes

The service code of the instance. Query available codes by calling QueryProductList or viewing Codes of Alibaba Cloud Services.

rds

ProductType

string

No

The type of the service.

rds

SubscriptionType

string

Yes

The billing method. Valid values:

  • Subscription: the subscription billing method.

  • PayAsYouGo: the pay-as-you-go billing method.

Subscription

Period

integer

No

The subscription duration. Unit: month. The value must be an integral multiple of 12.

Note

This parameter is required if you create a subscription instance.

12

RenewalStatus

string

No

The renewal method. Valid values:

  • AutoRenewal: The instance is automatically renewed.

  • ManualRenewal: The instance is manually renewed.

Default value: ManualRenewal.

ManualRenewal

RenewPeriod

integer

No

The auto-renewal period. Unit: month.

Note

This parameter is required if the RenewalStatus parameter is set to AutoRenewal.

12

ClientToken

string

No

The client token that ensures idempotence. If the server receives a duplicate token, it returns the same result as the previous request.

JASIOFKVNVIXXXXXX

Logistics

string

No

The logistics address for this order. This parameter is generally valid for physical orders.

{"cityCode":"330100","cityName":"Hangzhou","contactName":"Test","countryCode":"","districtName":"Puyan Street","email":"\*\*@example.com","mobilePhone":"153564848844","phone":"1234567","provCode":"330000","provName":"Zhejiang","streetCode":"33010610","streetName":"Zhuantang","zipCode":"0000"}

Parameter

array<object>

No

The details of the modules.

object

No

The modules.

Value

string

Yes

The value property of the Nth module. Value of N: 1 to 100.

disk

Code

string

Yes

The code property of the Nth module (N: 1 to 100). If multiple module property parameters are involved, concatenate multiple parameters in sequence.

InstanceType

PricingCycle

integer

No

The billing cycle unit for the prepaid period.

  • 1: years.

  • 2: months.

  • 3: days.

  • Default: 2 (months).

Applies only to DDoS product types: ddos_originpre_public_cn, ddosDip, ddoscoo, ddos_originpre_public_intl, ddosDip_intl, ddoscoo_intl.

2

Response elements

Element

Type

Description

Example

object

Code

string

The status code.

Success

Message

string

The error message returned.

Successful!

RequestId

string

The ID of the request.

C880B065-A781-4F19-B6DD-3E0E3B715C64

Success

boolean

Indicates whether the request was successful.

true

Data

object

The data returned.

OrderId

string

The ID of the created order.

20240xxxx21

InstanceId

string

The ID of the instance for which the order was created.

OSSBAG-cn-v1hxxxxx23

Examples

Success response

JSON format

{
  "Code": "Success",
  "Message": "Successful!",
  "RequestId": "C880B065-A781-4F19-B6DD-3E0E3B715C64",
  "Success": true,
  "Data": {
    "OrderId": "20240xxxx21",
    "InstanceId": "OSSBAG-cn-v1hxxxxx23"
  }
}

Error codes

HTTP status code

Error code

Error message

Description

200 INSUFFICIENT.AVAILABLE.QUOTA The account balance is negative. Add funds to the account and try again. Your account balance drops below 0. Top up your account and try again.
400 InvalidOwner The specified owner doesn't belong to caller. Invalid user identity.
400 ORDER.ACCOUNT_STATUS_ILLEGAL Please complete your basic personal information first.
400 400 Failure to check order before create instance.
400 ORDER.ACCOUNT_INFORMATION_INCOMPLETE Your information is incomplete. Complete your information before ordering
500 InternalError The request processing has failed due to some unknown error.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.