All Products
Search
Document Center

OpenSearch:CreateInstance

Last Updated:Jul 16, 2024

Creates a Havenask instance.

Operation description

Method

POST

URI

/api/instances?dryRun=false

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request syntax

POST /openapi/ha3/instances

Request parameters

ParameterTypeRequiredDescriptionExample
bodyobjectNo

The request body.

chargeTypestringNo

The billing method of the instance. Valid values: PREPAY: subscription. If you set this parameter to PREPAY, make sure that your Alibaba Cloud account supports balance payment or credit card payment. Otherwise, the system returns the InvalidPayMethod error message. If you set this parameter to PREPAY, you must also specify paymentInfo. POSTPAY: pay-as-you-go. This billing method is not supported.

""
componentsarray<object>No

The information about the instance specification.

objectNo
codestringNo

The code of the specification, which must be consistent with the value that you specify on the buy page.

""
valuestringNo

The value of the specification.

""
orderobjectNo

The billing information.

autoRenewbooleanNo

Specifies whether to enable auto-renewal. Valid values: true and false.

true
durationlongNo

The billing duration. Valid values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, and 12.

29
pricingCyclestringNo

The unit of the billing duration. Valid values: Month and Year.

""

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

requestIdstring

The ID of the request

D39EE0F1-D7EF-5F46-B781-6BF4185308B0
resultobject

The results returned.

instanceIdstring

The instance ID.

ha-cn-2r42ppr7901

Sample responses

Sample success responses

{
	"requestId": "90D6B8F5-FE97-4509-9AAB-367836C51818",
  "result": {
      "instanceId": "deeprec-cn-xxxxxx1"
    }
}

Sample error responses

{
	"requestId": "90D6B8F5-FE97-4509-9AAB-367836C51818",
  "code": "InternalServerError",
  "message":"internal server error"
}

For more information, see Response structure.

Examples

Sample success responses

JSONformat

{
  "requestId": "D39EE0F1-D7EF-5F46-B781-6BF4185308B0",
  "result": {
    "instanceId": "ha-cn-2r42ppr7901"
  }
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-06-28The internal configuration of the API is changed, but the call is not affectedView Change Details