CreateInstance

Updated at:

Call the CreateInstance operation to create an instance and automatically pay for it.

Debugging

You can run this operation in OpenAPI Explorer to avoid calculating signatures. If the call is successful, OpenAPI Explorer automatically generates software development kit (SDK) code examples.

Request parameters

Name

Type

Required

Sample value

Description

Action

String

Yes

CreateInstance

The operation to perform. Set the value to CreateInstance.

Parameter.0.Code

String

Yes

SeriesCode

The code of the first group of properties for DataBase Audit. Set the value to SeriesCode. This parameter specifies the model series of the DataBase Audit instance.

Parameter.0.Value

String

Yes

alpha

The value of the first group of properties for DataBase Audit. Set the value to alpha. This value indicates that the model series of the DataBase Audit instance is C100.

Parameter.1.Code

String

Yes

NetworkType

The code of the second group of properties for DataBase Audit. Set the value to NetworkType. This parameter specifies the network type of the DataBase Audit instance.

Parameter.1.Value

String

Yes

vpc

The value of the second group of properties for DataBase Audit. Set the value to vpc. This value indicates that the network type of the DataBase Audit instance is VPC.

Parameter.2.Code

String

Yes

PlanCode

The code of the third group of properties for DataBase Audit. Set the value to PlanCode. This parameter specifies the edition of the DataBase Audit instance.

Parameter.2.Value

String

Yes

alpha.basic

The value of the third group of properties for DataBase Audit. This parameter specifies the edition of the DataBase Audit instance. Valid values:

  • alpha.advance: Enterprise Edition, which supports 25 instances.

  • alpha.advanceplus: Enterprise Plus Edition, which supports 50 instances.

  • alpha.professional: Professional Edition, which supports 3 instances.

  • alpha.basic: Premium Edition, which supports 5 instances.

  • alpha.premium: Premium Plus Edition, which supports 10 instances.

  • alpha.ultimate: Ultimate Edition, which supports 80 instances.

Parameter.3.Code

String

Yes

LogStorage

The code of the fourth group of properties for DataBase Audit. Set the value to LogStorage. This parameter specifies the log storage capacity of the DataBase Audit instance.

Parameter.3.Value

String

Yes

5

The value of the fourth group of properties for DataBase Audit. This parameter specifies the log storage capacity of the DataBase Audit instance. The value can be an integer from 0 to 200. Unit: TB.

Parameter.4.Code

String

Yes

RegionId

The code of the fifth group of properties for DataBase Audit. Set the value to RegionId. This parameter specifies the region of the DataBase Audit instance.

Parameter.4.Value

String

Yes

cn-shanghai

The value of the fifth group of properties for DataBase Audit. This parameter specifies the region where DataBase Audit is available. Valid values:

  • Regions in China

    • cn-hangzhou: China (Hangzhou)

    • cn-shanghai: China (Shanghai)

    • cn-qingdao: China (Qingdao)

    • cn-beijing: China (Beijing)

    • cn-zhangjiakou: China (Zhangjiakou)

    • cn-shenzhen: China (Shenzhen)

    • cn-huhehaote: China (Hohhot)

    • cn-chengdu: China (Chengdu)

    • cn-hongkong: China (Hong Kong)

  • Regions outside China

    • ap-northeast-1: Japan (Tokyo)

    • ap-southeast-1: Singapore

    • ap-southeast-3: Malaysia (Kuala Lumpur)

    • ap-southeast-5: Indonesia (Jakarta)

    • us-east-1: US (Virginia)

    • us-west-1: US (Silicon Valley)

    • eu-central-1: Germany (Frankfurt)

ProductCode

String

Yes

dbaudit

The product code.

The product code for Database Audit is dbaudit.

SubscriptionType

String

Yes

Subscription

The billing method.

The billing method for Database Audit must be Subscription (prepaid).

ProductType

String

No

dbaudit

The product type. You do not need to specify this parameter.

RenewPeriod

Integer

No

12

The auto-renewal period. Unit: month. Valid values: 1, 6, 12, 24, and 36.

Note

This parameter is required only when you set RenewalStatus to AutoRenewal.

Period

Integer

Yes

12

The subscription duration. Unit: month. Valid values: 1, 3, 6, 9, 12, 24, and 36.

RenewalStatus

String

No

ManualRenewal

The auto-renewal status. Valid values:

  • AutoRenewal: Auto-renewal is enabled.

  • ManualRenewal (default): The resource is renewed manually.

Logistics

String

No

None

The shipping address for the order. You do not need to specify this parameter.

ClientToken

String

No

JASIOFKVNVI****

A client token that is used to ensure the idempotence of the request. The server checks for previous requests that have the same client token. If a match is found, the server returns the result of the previous request.

Returned Data

Name

Type

Example

Description

Code

String

Success

The status code of the request.

Data

Struct

The data returned.

InstanceId

String

dbaudit-cn-****

The ID of the instance.

OrderId

String

20240****

The ID of the created order.

Message

String

Successful!

The status message that corresponds to Code.

RequestId

String

6000EE23-274B-4E07-A697-FF2E999520A4

The ID of the request. Alibaba Cloud generates a unique ID for each request. You can use this ID to troubleshoot issues.

Success

Boolean

true

Indicates whether the request was successful. Valid values:

  • true: The request was successful.

  • false: The request failed.

Examples

Request example

http(s)://[Endpoint]/?Action=CreateInstance
&Parameter.1.Code=SeriesCode
&Parameter.1.Value=alpha
&Parameter.2.Code=NetworkType
&Parameter.2.Value=vpc
&Parameter.3.Code=PlanCode
&Parameter.3.Value=alpha.basic
&Parameter.4.Code=LogStorage
&Parameter.4.Value=5
&Parameter.5.Code=RegionId
&Parameter.5.Value=cn-shanghai
&ProductCode=dbaudit
&SubscriptionType=Subscription
&<Common request parameters>

Response examples

XML format

<CreateInstanceResponse>
      <Message>Successful!</Message>
      <RequestId>6000EE23-274B-4E07-A697-FF2E999520A4</RequestId>
      <Success>true</Success>
      <Code>Success</Code>
      <Data>
            <InstanceId>dbaudit-cn-****</InstanceId>
            <OrderId>20240****</OrderId>
      </Data>
</CreateInstanceResponse>

JSON format

{
    "Message": "Successful!",
    "RequestId": "6000EE23-274B-4E07-A697-FF2E999520A4",
    "Success": true,
    "Code": "Success",
    "Data": {
        "InstanceId": "dbaudit-cn-****",
        "OrderId": "20240****"
    }
}

Error codes

For a list of error codes, see the Error Center.