创建一个 OceanBase 数据库集群。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
oceanbase:CreateInstance |
create |
*Instance
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| ChargeType |
string |
是 |
实例的付费方式。取值范围:
枚举值:
|
PrePay |
| Series |
string |
是 |
实例的系列。
|
normal |
| Zones |
string |
是 |
实例所属的可用区 ID。 |
cn-hangzhou-h,cn-hangzhou-i,cn-hangzhou-j |
| InstanceClass |
string |
是 |
集群规格信息。
枚举值:
|
14C70GB |
| DiskSize |
integer |
否 |
存储空间大小,单位 GB。 存储空间的限制根据集群规格不同而不同,具体如下:
|
200 |
| Period |
integer |
否 |
购买资源的时长,单位由 PeriodUnit 指定。
|
1 |
| PeriodUnit |
string |
否 |
购买资源的时长。 |
Month |
| AutoRenew |
boolean |
否 |
是否要自动续费。 当参数 ChargeType 取值 PrePaid 时生效。取值范围:
|
true |
| AutoRenewPeriod |
integer |
否 |
每次自动续费的时长,当参数 AutoRenew 取值 True 时,该参数为必填参数。
|
2 |
| ResourceGroupId |
string |
否 |
实例所在的企业资源组 ID。 |
rg-bp67acfmxazb4p**** |
| InstanceName |
string |
否 |
OceanBase 集群名称。 长度为 1~20 个英文或中文字符。 如未指定该参数,默认值为集群的 InstanceId。 |
amap_aos_tx_ob |
| ObVersion |
string |
否 |
OceanBase Server 版本号。 |
2.2.77 |
| DiskType |
string |
否 |
集群的存储类型。仅在标准集群版(云盘)下生效。
|
cloud_essd_pl1 |
| DryRun |
boolean |
否 |
是否只预检此次请求, 默认为 false。取值范围:
|
false |
| ReplicaMode |
string |
否 |
全功能型副本数。返回值仅包含 3 和 2。
|
3 |
| IsolationOptimization |
string |
否 |
是否开启 Cgroup。 |
true |
| PrimaryInstance |
string |
否 |
主实例 ID。 |
ob3h8ytroxxxxx |
| PrimaryRegion |
string |
否 |
主实例 Region。 |
cn-hangzhou |
| CpuArch |
string |
否 |
cpu 架构 |
x86 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
请求结果。 |
||
| RequestId |
string |
请求 ID。 |
EE205C00-30E4-****-****-87E3A8A2AA0C |
| Data |
object |
返回数据。 |
|
| InstanceId |
string |
实例 ID。 |
i-bp67acfmxazb4p**** |
| OrderId |
string |
订单 ID。 |
1234567890 |
| ResourceGroupId |
string |
资源组 ID。 |
rg-*************** |
| DryRunResult |
boolean |
预检查请求的结果。
|
false |
示例
正常返回示例
JSON格式
{
"RequestId": "EE205C00-30E4-****-****-87E3A8A2AA0C",
"Data": {
"InstanceId": "i-bp67acfmxazb4p****",
"OrderId": "1234567890",
"ResourceGroupId": "rg-***************",
"DryRunResult": false
}
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 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 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。