You can call this operation to create a MySQL data source.
Operation description
To call this operation, you must add the IP address of the OceanBase Migration Service (OMS) server to the whitelist of the Alibaba Cloud database instance, the security rules of the ECS instance, or the security settings of your self-managed database (usually the firewall of your self-managed database) to ensure that OMS can successfully access your database instance. To obtain the IP address of the OMS server, go to the OMS data source management page in the OMS console.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Name | string | Yes | The name of the data source. Note
Invalid characters, such as slashes (/), are not allowed. | oms-mysql |
Type | string | Yes | The type of the MySQL data source. | INTERNET |
VpcId | string | No | The ID of the VPC to which the data source belongs. Note
If Type is set to VPC, this parameter is required. | vpc-12345abcde******* |
InstanceId | string | No | The ID of the ECS instance of the data source. Note
If Type is set to RDS, PolarDB, or DG, this parameter is required. | pc-12ab34cd56****** |
DgDatabaseId | string | No | The ID of the database gateway instance. Note
If Type is set to DG, this parameter is required. | dg-yhss6sdlaff**** |
Ip | string | No | The IP address of the data source. Note
If Type is set to INTERNET or VPC, this parameter is required. | 10.0.**** |
Port | string | No | The port number of the data source. Note
If Type is set to INTERNET or VPC, this parameter is required. | 3306 |
Schema | string | No | The name of the database. Note
If you specify this parameter, subsequent migration or synchronization operations will take effect on this database only. | test |
Username | string | Yes | The username that is used to access the database. | omsTestUser |
Password | string | Yes | The password of the username that is used to access the database. It must be Base64 encoded. | YWJjZDEyM0Ah |
Description | string | No | The description of the data source. It must be 2 to 256 characters in length. The default value is null. | MySQL data source for OMS testing |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"Data": {
"EndpointId": "e_1234abcd*****"
}
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|