All Products
Search
Document Center

Expenses and Costs:CreateInstance

Last Updated:Sep 01, 2026

Creates an instance resource. This operation creates an order for a new instance resource and completes automatic payment. ECS and RDS product series 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 product code. You can call the QueryProductList operation to query the product code.

Cdn

ProductType

string

No

The product type.

Cdn

SubscriptionType

string

Yes

The billing method. Valid values:

  • Subscription: subscription.

  • PayAsYouGo: pay-as-you-go.

Subscription

Period

integer

No

The subscription period. Unit: months. For yearly subscription products, specify a multiple of 12.

12

RenewalStatus

string

No

The auto-renewal status. Valid values:

  • AutoRenewal: auto-renewal is enabled.

  • ManualRenewal: manual renewal.

Default value: ManualRenewal.

ManualRenewal

RenewPeriod

integer

No

The auto-renewal epoch. Unit: months.

Note

This parameter is required when you set RenewalStatus to AutoRenewal in Settings.

12

ClientToken

string

No

The client idempotency token. The server checks whether a request with the same ClientToken has been made. If yes, the server returns the result of the previous call.

JASIOFKVNVIXXXXXX

Logistics

string

No

The logistics address for this order. This parameter is typically valid for orders of physical products.

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

Parameter

array<object>

No

The list of modules.

object

No

The module information.

Value

string

Yes

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

disk

Code

string

Yes

The code of the Nth module property. Valid values of N: 1 to 100. If multiple module properties exist, concatenate them in the format of N=1, 2, 3...N.

InstanceType

PricingCycle

integer

No

The unit of the subscription period.

  • PricingCycle=1: The unit of the subscription period is year.

  • PricingCycle=2: The unit of the subscription period is month.

  • PricingCycle=3: The unit of the subscription period is day.

Default value: PricingCycle=2.

This parameter is applicable only to specific product types (ProductType is ddos_originpre_public_cn, ddosDip, ddoscoo, ddos_originpre_public_intl, ddosDip_intl, or ddoscoo_intl).

2

For example, to create an application for the Real-Time Communication (RTC) product by using this operation, specify the following complete parameters:

Note

ProductCode=rtc&SubscriptionType=PayAsYouGo&ProductType=&Parameter.1.Code=ServiceType&Parameter.1.Value=universal&Parameter.2.Code=BillType&Parameter.2.Value=PayByCR&Parameter.3.Code=ServiceAreaCn&Parameter.3.Value=true&Parameter.4.Code=ServiceAreaUs&Parameter.4.Value=false

Response elements

Element

Type

Description

Example

object

Code

string

The status code.

Success

Message

string

The error message.

Successful!

RequestId

string

The request ID.

C880B065-A781-4F19-B6DD-3E0E3B715C64

Success

boolean

Indicates whether the request was successful.

true

Data

object

The response data.

OrderId

string

The ID of the order that was created.

20240xxxx21

InstanceId

string

The instance ID associated with the order.

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.