CreateOceanBaseDataSource - 创建 OceanBase 数据源
本接口用于创建 OceanBase 数据源。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| Name |
string |
是 |
数据源的名称。 |
source_name |
| Type |
string |
是 |
数据源的类型。 枚举值:
|
OB_MYSQL_VPC |
| Tenant |
string |
是 |
OceanBase 数据库租户的名称。 |
tenant_name |
| Cluster |
string |
否 |
OceanBase 数据库租户所在集群的名称。 |
cluster_name |
| VpcId |
string |
否 |
用户申请公有云 VPC 的唯一 ID。 |
vpc-bp1d2q3mhg9i23ofi**** |
| Ip |
string |
否 |
数据库宿主机的 IP。 |
xxx.xxx.xxx.1 |
| Port |
integer |
否 |
数据库宿主机 IP 的端口号。 |
2883 |
| LogProxyIp |
string |
否 |
LogProxy IP。 |
null |
| LogProxyPort |
string |
否 |
LogProxy 端口。 |
null |
| UserName |
string |
是 |
数据库用户名。 |
user_name |
| Password |
string |
是 |
数据库用户的密码,需要使用 Base64 编码。 |
cGFzc193b3JK |
| Description |
string |
否 |
数据源的描述信息。 |
test |
| ConfigUrl |
string |
否 |
用于获取 OceanBase 数据库底层服务器的真实地址。 |
http://xxx.xxx.xxx.2:2883/services?Action=ObRootServiceInfo&User_ID=alibaba&UID=ocpmaster&ObRegion=ob_1***29.admin |
| DrcUserName |
string |
否 |
该用户主要用于读取 OceanBase 数据库增量日志和数据库对象结构信息,请在业务集群 sys 租户下创建该用户。 |
user_na*** |
| DrcPassword |
string |
否 |
sys 租户下用户名的密码,需要使用 Base64 编码。 |
pas*** |
| InnerDrcPassword |
string |
否 |
__oceanbase_inner_drc_user 的密码,需要使用 Base64 编码。 |
in*** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回结果。 |
||
| Success |
boolean |
是否调用成功。 |
true |
| ErrorDetail |
object |
错误详情。 |
|
| Code |
string |
错误码(新)。 |
CM-RESOAT1111 |
| Level |
string |
错误等级,包括 FATAL、ERROR、WARNING 和 CRITICAL。 |
ERROR |
| Message |
string |
错误描述(新)。 |
A system error occurred. |
| ExtraContext |
object |
用于填充 Message 中的占位符。 |
|
|
any |
用于填充 Message 中的占位符。 |
null |
|
| MessageMcmsKey |
string |
错误信息的 Key。 |
null |
| MessageMcmsContext |
object |
用于填充 MessageMcmsKey 中的占位符。 |
|
|
string |
用于填充 MessageMcmsKey 中的占位符。 |
null |
|
| Reason |
string |
错误原因。 |
null |
| ReasonMcmsKey |
string |
错误原因的 Key。 |
null |
| ReasonMcmsContext |
object |
错误原因的上下文。 |
|
|
string |
错误原因的上下文。 |
null |
|
| Proposal |
string |
建议(新)。 |
null |
| ProposalMcmsKey |
string |
建议内容的 Key。 |
null |
| ProposalMcmsContext |
object |
建议内容的上下文。 |
|
|
string |
建议内容的上下文。 |
null |
|
| UpstreamErrorDetail |
any |
上游错误详情,用于处理 HTTP 请求。 |
null |
| Code |
string |
错误码(旧)。 |
null |
| Message |
string |
错误描述(旧)。 |
A system error occurred. |
| Advice |
string |
建议(旧)。 |
Contact the administrator. |
| RequestId |
string |
请求 ID。 |
EE205C00-30E4-XXXX-XXXX-87E3A8A2AA0C |
| PageNumber |
integer |
页序号,分页查询时生效。 |
1 |
| PageSize |
integer |
页大小,分页查询时生效。 |
10 |
| TotalCount |
integer |
总数,分页查询时生效。 |
30 |
| Cost |
string |
请求耗时,单位为秒。 |
1 |
| Data |
string |
OceanBase 数据源的 ID。 |
e_edz**** |
示例
正常返回示例
JSON格式
{
"Success": true,
"ErrorDetail": {
"Code": "CM-RESOAT1111\n",
"Level": "ERROR",
"Message": "A system error occurred.\n",
"ExtraContext": {
"key": "null"
},
"MessageMcmsKey": "null",
"MessageMcmsContext": {
"key": "null"
},
"Reason": "null",
"ReasonMcmsKey": "null",
"ReasonMcmsContext": {
"key": "null"
},
"Proposal": "null",
"ProposalMcmsKey": "null",
"ProposalMcmsContext": {
"key": "null"
},
"UpstreamErrorDetail": "null"
},
"Code": "null",
"Message": "A system error occurred.\n",
"Advice": "Contact the administrator. ",
"RequestId": "EE205C00-30E4-XXXX-XXXX-87E3A8A2AA0C",
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 30,
"Cost": "1",
"Data": "e_edz****"
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。