All Products
Search
Document Center

ApsaraDB for OceanBase:CreateInstance

Last Updated:Oct 23, 2024

You can call this operation to create an OceanBase cluster.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
oceanbase:CreateInstancecreate
  • Instance
    acs:oceanbase:{#regionId}:{#accountId}:instance/*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ChargeTypestringYes

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.
PrePay
SeriesstringYes

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
ZonesstringYes

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
InstanceClassstringYes

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.
Enumeration Value:
  • 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
DiskSizelongYes

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
PeriodlongNo

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
PeriodUnitstringNo

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
AutoRenewbooleanNo

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
AutoRenewPeriodlongNo

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
ResourceGroupIdstringNo

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

rg-bp67acfmxazb4p****
InstanceNamestringNo

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
ObVersionstringNo

OceanBase Server version number.

2.2.77
DiskTypestringNo

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
DryRunbooleanNo

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
ReplicaModestringNo

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.
3F
IsolationOptimizationstringNo

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

  • true
  • false
true
PrimaryInstancestringNo

Primary instance ID.

ob3h8ytroxxxxx
PrimaryRegionstringNo

Primary instance region.

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object

The request ID.

RequestIdstring

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
Dataobject

The returned data.

InstanceIdstring

Instance ID.

i-bp67acfmxazb4p****
OrderIdstring

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
ResourceGroupIdstring

Resource group ID.

rg-***************
DryRunResultboolean

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.

true

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError message
400Instance.Order.CreateFailedInstance.Order.CreateFailed
400InstanceName.ModifyFailedInstanceName.ModifyFailed
400InstanceClass.InvalidValueInstanceClass.InvalidValue
400InstanceType.UnsupportInstanceType.Unsupport
400ZoneList.UnsupportZoneList.Unsupport
400InstanceId.InvalidInstanceId.Invalid
400InstanceId.MissingInstanceId.Missing
400Instance.Name.MissingInstance.Name.Missing
400ListCluster.FailListCluster.Fail
400GetCluster.FailGetCluster.Fail
400ListClusterGroup.FailListClusterGroup.Fail
400GetClusterGroup.FailGetClusterGroup.Fail
400ListInstance.FailListInstance.Fail
400GetInstance.FailGetInstance.Fail
400ListTenant.FailListTenant.Fail
400GetTenant.FailGetTenant.Fail
400Instance.ListAliyunInstance.FailInstance.ListAliyunInstance.Fail
400Instance.GetAliyunInstance.FailInstance.GetAliyunInstance.Fail
400ListZone.FailListZone.Fail
400ListObServer.FailListObServer.Fail
400GetObServer.FailGetObServer.Fail
400CreateInstanceParameters.ErrorCreateInstanceParameters.Error
400CreateInstance.FailCreateInstance.Fail
400InstanceClassSpecification.InvalidInstanceClassSpecification.Invalid
400InstanceOrder.NotAvailableInstanceOrder.NotAvailable
400InstanceNodeNum.InvalidInstanceNodeNum.Invalid
400InstanceLogSize.InvalidInstanceLogSize.Invalid
400Instance.ExpandLogDisk.NotSupportInstance.ExpandLogDisk.NotSupport
400InstanceStatus.InvalidInstanceStatus.Invalid
400InstanceDataSize.InvalidInstanceDataSize.Invalid
400StandbyInstance.StillOnlineStandbyInstance.StillOnline
400InstanceServiceName.MissingInstanceServiceName.Missing
400PrimaryInstanceStatus.InvalidPrimaryInstanceStatus.Invalid
400StandbyInstanceStatus.InvalidStandbyInstanceStatus.Invalid
400StandbyInstance.NotSupportStandbyInstance.NotSupport
400StandbyInstance.Disconnect.NotAllowedStandbyInstance.Disconnect.NotAllowed
400InstanceDiskSize.InvalidInstanceDiskSize.Invalid
400CreateInstance.Spec.NotSupportCreateInstance.Spec.NotSupport
400MissingParameterDiskSizeMissingParameterDiskSize
400CreateInstance.ReplicaMode.InvalidValueCreateInstance.ReplicaMode.InvalidValue
400CreateInstance.DeployType.InvalidValueCreateInstance.DeployType.InvalidValue
400ConfigErrorConfigError
500UnknownErrorUnknownError

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

Change history

Change timeSummary of changesOperation
2024-08-15The Error code has changedView Change Details
2024-07-16The Error code has changedView Change Details
2024-06-06The Error code has changedView Change Details
2024-04-15The Error code has changed. The request parameters of the API has changedView Change Details
2024-02-02The Error code has changedView Change Details
2023-12-26The Error code has changed. The request parameters of the API has changedView Change Details
2023-12-07The Error code has changedView Change Details
2023-11-20The Error code has changedView Change Details
2023-10-30The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedView Change Details
2023-08-22The Error code has changed. The request parameters of the API has changedView Change Details
2023-07-13The Error code has changedView Change Details
2023-07-04The Error code has changed. The request parameters of the API has changedView Change Details
2023-05-09The internal configuration of the API is changed, but the call is not affectedView Change Details
2023-04-11The internal configuration of the API is changed, but the call is not affectedView Change Details
2023-04-06The internal configuration of the API is changed, but the call is not affectedView Change Details
2023-03-08The internal configuration of the API is changed, but the call is not affectedView Change Details
2022-09-28The request parameters of the API has changedView Change Details
2022-02-10The request parameters of the API has changed. The response structure of the API has changedView Change Details