All Products
Search
Document Center

ApsaraDB for OceanBase (Deprecated):CreateInstance

Last Updated:Oct 26, 2026

Creates an OceanBase database cluster.

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

oceanbase:CreateInstance

create

*Instance

acs:oceanbase:{#regionId}:{#accountId}:instance/*

None None

Request parameters

Parameter

Type

Required

Description

Example

ChargeType

string

Yes

The billing method of the instance. Valid values:

  • PrePay: subscription. If you select this billing method, make sure that your account supports balance payment or credit payment. Otherwise, an InvalidPayMethod error is returned.

  • PostPay: pay-as-you-go. This is the default value. By default, pay-as-you-go instances are billed on an hourly basis.

Valid values:

  • PrePay :

    PrePay

  • PostPay :

    PostPay

PrePay

Series

string

Yes

The edition of the instance. Valid values:

  • normal: Standard Cluster Edition (Cloud Disk). This is the default value.

  • normal_ssd: Standard Cluster Edition (Local Disk).

  • history: Archive Database Cluster Edition.

  • normal_kv: OBKV cluster.

  • normal_hg: Xinchuang cluster. You must add the cluster to a whitelist to enable this edition.

normal

Zones

string

Yes

The zone ID of the instance.
Separate multiple zone IDs with commas (,). For more information, see DescribeZones to obtain the zone list.

cn-hangzhou-h,cn-hangzhou-i,cn-hangzhou-j

InstanceClass

string

Yes

The specifications of the cluster.
The following specifications are supported:

  • 4C16GB: 4 cores and 16 GB of memory.

  • 8C32GB: 8 cores and 32 GB of memory.

  • 14C70GB: 14 cores and 70 GB of memory.

  • 24C120GB: 24 cores and 120 GB of memory.

  • 30C180GB: 30 cores and 180 GB of memory.

  • 62C400GB: 62 cores and 400 GB of memory.

  • 104C600GB: 104 cores and 600 GB of memory.

  • 16C70GB: 16 cores and 70 GB of memory.

  • 32C160GB: 32 cores and 160 GB of memory.

  • 64C380GB: 64 cores and 380 GB of memory.

  • 20C32GB: 20 cores and 32 GB of memory.

  • 40C64GB: 40 cores and 64 GB of memory.

  • 16C32GB: 16 cores and 32 GB of memory.

  • 32C70GB: 32 cores and 70 GB of memory.

  • 64C180GB: 64 cores and 180 GB of memory.

  • 32C180GB: 32 cores and 180 GB of memory.

  • 64C400GB: 64 cores and 400 GB of memory.

Valid values:

  • 64C380GB :

    64 cores and 380 GB of memory.

  • 64C400GB :

    64 cores and 400 GB of memory.

  • 32C70GB :

    32 cores and 70 GB of memory.

  • 14C70GB :

    14 cores and 70 GB of memory.

  • 16C32GB :

    16 cores and 32 GB of memory.

  • 4C16GB :

    4 cores and 16 GB of memory.

  • 32C160GB :

    32 cores and 160 GB of memory.

  • 8C32GB :

    8 cores and 32 GB of memory.

  • 16C70GB :

    16 cores and 70 GB of memory.

  • 24C120GB :

    24 cores and 120 GB of memory.

  • 32C180GB :

    32 cores and 180 GB of memory.

  • 30C180GB :

    30 cores and 180 GB of memory.

  • 40C64GB :

    40 cores and 64 GB of memory.

  • 62C400GB :

    62 cores and 400 GB of memory.

  • 20C32GB :

    20 cores and 32 GB of memory.

  • 104C600GB :

    104 cores and 600 GB of memory.

  • 64C180GB :

    64 cores and 180 GB of memory.

14C70GB

DiskSize

integer

No

The storage capacity of the cluster. Unit: GB. The storage capacity limits vary based on the cluster specifications:

  • 8C32GB: 100 GB to 10,000 GB.

  • 14C70GB: 200 GB to 10,000 GB.

  • 30C180GB: 400 GB to 10,000 GB.

  • 62C400G: 800 GB to 10,000 GB. The default storage capacity for each specification is its minimum value.

200

Period

integer

No

The subscription duration of the resource. The unit is specified by PeriodUnit. This parameter is required and takes effect only when InstanceChargeType is set to PrePaid. Valid values:

  • If PeriodUnit is set to Month, valid values are 1, 2, 3, 4, 5, 6, 7, 8, and 9.

  • If PeriodUnit is set to Year, valid values are 1, 2, and 3.

1

PeriodUnit

string

No

The unit of the subscription duration.
Valid values for subscription: Month and Year.
Default value: Month for subscription. For the pay-as-you-go billing method, the default epoch is Hour.




Month

AutoRenew

boolean

No

Specifies whether to enable auto-renewal. This parameter takes effect only when ChargeType is set to PrePaid. Valid values:

  • true: enables auto-renewal.

  • false: disables auto-renewal. This is the default value.

true

AutoRenewPeriod

integer

No

The duration for each auto-renewal cycle. This parameter is required when AutoRenew is set to true.

  • If PeriodUnit is set to Year, valid values are 1, 2, and 3.

  • If PeriodUnit is set to Month, valid values are 1, 2, 3, 6, and 12.

2

ResourceGroupId

string

No

The ID of the resource group to which the instance belongs.

rg-bp67acfmxazb4p****

InstanceName

string

No

The name of the OceanBase cluster. The name must be 1 to 20 characters in length and can contain letters and Chinese characters. If you do not specify this parameter, the default value is the InstanceId of the cluster.

amap_aos_tx_ob

ObVersion

string

No

The version of OceanBase Server.

2.2.77

DiskType

string

No

The storage type of the cluster. This parameter takes effect only for Standard Cluster Edition (Cloud Disk).
Valid values:

  • cloud_essd_pl1: ESSD PL1 cloud disk.

  • cloud_essd_pl0: ESSD PL0 cloud disk. Default value: cloud_essd_pl1.

cloud_essd_pl1

DryRun

boolean

No

Specifies whether to perform a dry run on the request. Default value: false. Valid values:

  • true: performs a dry run without creating the instance. If the dry run succeeds, DryRunResult=true is returned. If the dry run fails, the corresponding error code is returned.

  • false: performs a normal request and creates the instance directly after the check passes. This is the default value. If this parameter is set to false, no dry run is performed, and DryRunResult defaults to false.

false

ReplicaMode

string

No

The number of full-featured replicas. Valid values:

  • 3: three full-featured replicas.

  • 2: two full-featured replicas. For three-zone deployment, only 3 full-featured replicas are supported. For dual-zone deployment, only 2 full-featured replicas are supported. For single-zone deployment, 2 or 3 full-featured replicas are supported.

3

IsolationOptimization

string

No

Specifies whether to enable cgroups.

true

PrimaryInstance

string

No

The ID of the primary instance.

ob3h8ytroxxxxx

PrimaryRegion

string

No

The region of the primary instance.

cn-hangzhou

CpuArch

string

No

The CPU architecture.

x86

Response elements

Element

Type

Description

Example

object

The response result.

RequestId

string

The request ID.

EE205C00-30E4-****-****-87E3A8A2AA0C

Data

object

The response data.

InstanceId

string

The instance ID.

i-bp67acfmxazb4p****

OrderId

string

The order ID.
This parameter returns a value when you create a subscription or pay-as-you-go cluster.

1234567890

ResourceGroupId

string

The resource group ID.

rg-***************

DryRunResult

boolean

The result of the dry run.

  • If DryRun is set to true and the dry run succeeds, DryRunResult returns true. Otherwise, the corresponding error code is returned.

  • If DryRun is set to false, no dry run is performed, and DryRunResult defaults to false.

false

Examples

Success response

JSON format

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "Data": {
    "InstanceId": "i-bp67acfmxazb4p****",
    "OrderId": "1234567890",
    "ResourceGroupId": "rg-***************",
    "DryRunResult": true
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 Instance.Order.CreateFailed Instance.Order.CreateFailed
400 InstanceName.ModifyFailed InstanceName.ModifyFailed
400 InstanceClass.InvalidValue InstanceClass.InvalidValue
400 InstanceType.Unsupport InstanceType.Unsupport
400 ZoneList.Unsupport ZoneList.Unsupport
400 InstanceId.Invalid InstanceId.Invalid
400 InstanceId.Missing InstanceId.Missing
400 Instance.Name.Missing Instance.Name.Missing
400 ListCluster.Fail ListCluster.Fail
400 GetCluster.Fail GetCluster.Fail
400 ListClusterGroup.Fail ListClusterGroup.Fail
400 GetClusterGroup.Fail GetClusterGroup.Fail
400 ListInstance.Fail ListInstance.Fail
400 GetInstance.Fail GetInstance.Fail
400 ListTenant.Fail ListTenant.Fail
400 GetTenant.Fail GetTenant.Fail
400 Instance.ListAliyunInstance.Fail Instance.ListAliyunInstance.Fail
400 Instance.GetAliyunInstance.Fail Instance.GetAliyunInstance.Fail
400 ListZone.Fail ListZone.Fail
400 ListObServer.Fail ListObServer.Fail
400 GetObServer.Fail GetObServer.Fail
400 CreateInstanceParameters.Error CreateInstanceParameters.Error
400 CreateInstance.Fail CreateInstance.Fail
400 InstanceClassSpecification.Invalid InstanceClassSpecification.Invalid
400 InstanceOrder.NotAvailable InstanceOrder.NotAvailable
400 InstanceNodeNum.Invalid InstanceNodeNum.Invalid
400 InstanceLogSize.Invalid InstanceLogSize.Invalid
400 Instance.ExpandLogDisk.NotSupport Instance.ExpandLogDisk.NotSupport
400 InstanceStatus.Invalid InstanceStatus.Invalid
400 InstanceDataSize.Invalid InstanceDataSize.Invalid
400 StandbyInstance.StillOnline StandbyInstance.StillOnline
400 InstanceServiceName.Missing InstanceServiceName.Missing
400 PrimaryInstanceStatus.Invalid PrimaryInstanceStatus.Invalid
400 StandbyInstanceStatus.Invalid StandbyInstanceStatus.Invalid
400 StandbyInstance.NotSupport StandbyInstance.NotSupport
400 StandbyInstance.Disconnect.NotAllowed StandbyInstance.Disconnect.NotAllowed
400 InstanceDiskSize.Invalid InstanceDiskSize.Invalid
400 CreateInstance.Spec.NotSupport CreateInstance.Spec.NotSupport
400 MissingParameterDiskSize MissingParameterDiskSize
400 CreateInstance.ReplicaMode.InvalidValue CreateInstance.ReplicaMode.InvalidValue
400 CreateInstance.DeployType.InvalidValue CreateInstance.DeployType.InvalidValue
400 ConfigError ConfigError
500 Instance.Order.CreateFailed Instance.Order.CreateFailed
500 UnknownError UnknownError

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.