All Products
Search
Document Center

ApsaraDB for OceanBase:CreateOmsMysqlDataSource

Last Updated:Apr 29, 2024

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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
NamestringYes

The name of the data source.
It must be 2 to 128 characters in length and can contain letters, digits, underscores (_), periods (.), and hyphens (-).

Note
Invalid characters, such as slashes (/), are not allowed.
oms-mysql
TypestringYes

The type of the MySQL data source.
Valid values: INTERNET, VPC, RDS, PolarDB, and DG.

INTERNET
VpcIdstringNo

The ID of the VPC to which the data source belongs.

Note
If Type is set to VPC, this parameter is required.
vpc-12345abcde*******
InstanceIdstringNo

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******
DgDatabaseIdstringNo

The ID of the database gateway instance.

Note
If Type is set to DG, this parameter is required.
dg-yhss6sdlaff****
IpstringNo

The IP address of the data source.

Note
If Type is set to INTERNET or VPC, this parameter is required.
10.0.****
PortstringNo

The port number of the data source.

Note
If Type is set to INTERNET or VPC, this parameter is required.
3306
SchemastringNo

The name of the database.

Note
If you specify this parameter, subsequent migration or synchronization operations will take effect on this database only.
test
UsernamestringYes

The username that is used to access the database.

omsTestUser
PasswordstringYes

The password of the username that is used to access the database. It must be Base64 encoded.
For example, for the password abcd123@!, the Base64-encoded value is YWJjZDEyM0Ah.

YWJjZDEyM0Ah
DescriptionstringNo

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

ParameterTypeDescriptionExample
object

The return result of the request.

RequestIdstring

The request ID.

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

The return result of the request.

EndpointIdstring

The ID of the data source record.

e_1234abcd*****

Examples

Sample success responses

JSONformat

{
  "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 timeSummary of changesOperation
No change history