This topic describes the CreateOceanBaseDataSource API provided by OceanBase Migration Service (OMS) Community Edition.
Purpose
You can call this operation to create an OceanBase data source.
Call description
Limitations
This operation is applicable to OMS Community Edition V4.1.1 and later versions.
Request path
POST /api/v2?Action=CreateOceanBaseDataSource
Request parameters
| Parameter | Type | Description |
|---|---|---|
| name | string | The data source ID. |
| tenant | string | The name of the OceanBase Database tenant. |
| cluster | string | The name of the cluster to which the OceanBase Database tenant belongs. |
| schema | string | The name of the database for which data migration or synchronization is to be performed. |
| ip | string | The IP address of the host where the database is located. |
| port | integer | The port number of the host where the database is located. |
| username | string | The name of the database user for data migration or synchronization. |
| password | string | The password of the database user. |
| region | string | The region where the data source resides. |
| description | string | The description of the data source. The value must not exceed 128 characters in length. |
| ocpName | string | The name of the associated OceanBase Cloud Platform (OCP) instance. |
| configUrl | string | The actual URL of the server that runs OceanBase Database. |
| drcUserName | string | The user that reads the incremental logs of OceanBase Database and obtains database schemas. You must create the user in the sys tenant. |
| drcPassword | string | The password of the drc_user user. |
| innerDrcPassword | string | The password of the __oceanbase_inner_drc_user user. The user is used to migrate tables without unique keys in OceanBase Database. |
Return result
| Parameter | Type | Description |
|---|---|---|
| success | boolean | Indicates whether the call is successful. |
| errorDetail | object | The error details. |
| code | string | The error code. |
| message | string | The error description. |
| advice | string | The suggestions about how to resolve the error. |
| requestId | string | The request ID. |
| pageNumber | integer | The number of the page to return. |
| pageSize | integer | The number of entries to return on each page. |
| totalCount | integer | The total number of entries returned. |
| cost | string | The time spent in processing the request, in seconds. |
| data | string | The ID of the OceanBase data source. |
Examples
Sample request
{
"name":"OceanBase data source test",
"tenant":"tenant_name",
"cluster":"cluster_name",
"schema":"test",
"ip":"string",
"port":2883,
"userName":"use***",
"password":"pas***",
"region":"cn-anhui",
"description":"test",
"ocpName":"cn-anhui-212-xxx.xxx.xxx.1",
"configUrl":"http://xxx.xxx.xxx.2:8080/services?Action=ObRootServiceInfo&User_ID=alibaba&UID=ocpmaster&ObRegion=ob_1***29.admin",
"drcUserName":"user_na***",
"drcPassword":"pas***",
"innerDrcPassword":"in***"
}
Sample response
{
"success":true,
"errorDetail":null,
"code":null,
"message":null,
"advice":null,
"requestId":"a7b57****",
"pageNumber":null,
"pageSize":null,
"totalCount":null,
"cost":"27 ms",
"data":"e_edz****"
}