All Products
Search
Document Center

ApsaraDB for OceanBase (Deprecated):CreateInstance

Last Updated:Aug 28, 2026

Create 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: the subscription billing method. You must ensure that the remaining balance or credit balance of your account can cover the cost of the subscription. Otherwise, you will receive an InvalidPayMethod error.

  • PostPay: the pay-as-you-go billing method. This is the default value. By default, fees are charged on an hourly basis.

Valid values:

  • PrePay :

    PrePay

  • PostPay :

    PostPay

PrePay

Series

string

Yes

The series of the OceanBase cluster. Valid values:

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

  • normal_ssd: Standard Cluster Edition (Local Disk).

  • history: History Database Cluster Edition.

normal

Zones

string

Yes

The ID of the zone to which the instance belongs.
For more information about how to obtain the list of zones, see DescribeZones.

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

InstanceClass

string

Yes

The specifications of the cluster.
You can specify one of the following four plans:

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

  • 14C70GB: indicates 14 CPU cores and 70 GB of memory. This is the default value.

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

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

Valid values:

  • 64C380GB :

    64C380GB

  • 64C400GB :

    64C400GB

  • 32C70GB :

    32C70GB

  • 14C70GB :

    14C70GB

  • 16C32GB :

    16C32GB

  • 4C16GB :

    4C16GB

  • 32C160GB :

    32C160GB

  • 8C32GB :

    8C32GB

  • 16C70GB :

    16C70GB

  • 24C120GB :

    24C120GB

  • 32C180GB :

    32C180GB

  • 30C180GB :

    30C180GB

  • 40C64GB :

    40C64GB

  • 62C400GB :

    62C400GB

  • 20C32GB :

    20C32GB

  • 104C600GB :

    104C600GB

  • 64C180GB :

    64C180GB

14C70GB

DiskSize

integer

No

The size of the storage space,in GB.
The limits on the storage space vary with the cluster specifications:

  • 8C32GB: 100 GB to 10000 GB

  • 14C70GB: 200 GB to 10000 GB

  • 30C180GB: 400 GB to 10000 GB

  • 62C400GB: 800 GB to 10000 GB
    The preceding minimum storage space sizes are the default storage space sizes of the corresponding cluster specification plans.

200

Period

integer

No

The valid duration of the purchased resources. The unit is specified by the PeriodUnit parameter.
This parameter is valid and required only when the InstanceChargeType parameter is set to PrePaid.
Valid values:




  • When the PeriodUnit parameter is set to Month: "1", "2", "3", "4", "5", "6", "7", "8", "9".

  • When the PeriodUnit parameter is set to Year: "1", "2", "3".

1

PeriodUnit

string

No

The unit of the valid duration of the purchased resources.
Valid value for subscription: Month or Year. Default value: Month for subscription, and Hour for pay-as-you-go.

Month

AutoRenew

boolean

No

Specifies whether to enable automatic renewal.
This parameter is valid only when the ChargeType parameter is set to PrePaid. Valid values:

  • true: enables automatic renewal for the instance.

  • false: disables automatic renewal for the instance. This is the default value.

true

AutoRenewPeriod

integer

No

The automatic renewal period of the instance. This parameter is required when the AutoRenew parameter is set to true. Valid values:

  • If the PeriodUnit parameter is set to Year: "1", "2", and "3".

  • If the PeriodUnit parameter is set to Month: "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.
It must be 1 to 20 characters in length.
If this parameter is not specified, the value is the instance ID of the cluster by default.




amap_aos_tx_ob

ObVersion

string

No

OceanBase Server version number.

2.2.77

DiskType

string

No

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

  • cloud_essd_pl1: ESSD PL1.

  • cloud_essd_pl0: ESSD PL0. Default value: cloud_essd_pl1.

cloud_essd_pl1

DryRun

boolean

No

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

  • true: Only a dry-run request is sent and the instance is not created. If the dry run succeeds, DryRunResult=true is returned. If the dry run fails, an error code is returned.

  • false: The actual request is sent and no dry run is performed. The instance is created if the requirements are met. By default, the DryRunResult parameter returns false if you set DryRun to false.

false

ReplicaMode

string

No

The number of full-featured replicas.

  • 3F: three full-featured replicas.

  • 2F1L: two full-featured replicas and one log replica.

  • 2F1A: two full-featured replicas and one arbitration service.

  • ApsaraDB for OceanBase earlier than V4.1 supports 3F and 2F1L.

  • ApsaraDB for OceanBase V4.1 or later supports 3F and 2F1A.

  • An ApsaraDB for OceanBase instance deployed across three zones supports only 3F.

  • An ApsaraDB for OceanBase instance deployed across two zones supports 2F1A or 2F1L, depending on the version.

  • An ApsaraDB for OceanBase instance deployed in a single zone supports 3F, 2F1A, or 2F1L, depending on the version.

3

IsolationOptimization

string

No

Specifies whether to enable the control group feature. Valid values:

  • true

  • false

true

PrimaryInstance

string

No

Primary instance ID.

ob3h8ytroxxxxx

PrimaryRegion

string

No

Primary instance region.

cn-hangzhou

CpuArch

string

No

CPU architecture

x86

Response elements

Element

Type

Description

Example

object

The request ID.

RequestId

string

The request ID.

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

Data

object

The returned data.

InstanceId

string

Instance ID.

i-bp67acfmxazb4p****

OrderId

string

Order ID. The ID of the order that you have placed. This parameter returns a value after you create a pre-paid or post-paid cluster.

1234567890

ResourceGroupId

string

Resource group ID.

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

DryRunResult

boolean

The result of the dry-run request.

If the DryRun parameter is set to true and the dry run succeeds, the DryRunResult parameter returns true. Otherwise, an error code is returned. If the DryRun parameter is set to false, no dry run is performed and the DryRunResult parameter returns false.

false

Examples

Success response

JSON format

{
  "RequestId": "EE205C00-30E4-****-****-87E3A8A2AA0C",
  "Data": {
    "InstanceId": "i-bp67acfmxazb4p****",
    "OrderId": "1234567890",
    "ResourceGroupId": "rg-***************",
    "DryRunResult": false
  }
}

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.