Creating a DRS Synchronization Task
Function
This API is used to create a DRS synchronization task.
- Before calling this API, learn how to authenticate it.
- Before calling this API, learn about the request header parameters.
Authorization Information
- If you are using role/policy-based authorization, see Permissions and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
| Action | Access Level | Resource Type (*: required) | Condition Key | Alias | Dependencies |
|---|---|---|---|---|---|
| rds:instance:createDrsJob | write | instance | - | - | drs:migrationJob:batchCreateJob, drs:migrationJob:listJobStatus, drs:migrationJob:batchTestConnection, drs:migrationJob:selectDatabaseObject, drs:migrationJob:batchPreCheckJob, drs:migrationJob:listPrecheckResult, and drs:migrationJob:batchStartJob |
URI
- URI format
POST /v3/{project_id}/instances/{instance_id}/drs-job/create
- Parameter description
Table 1 Parameters Parameter
Mandatory
Description
project_id
Yes
Definition
Project ID of a tenant in a region.
To obtain the value, see Obtaining a Project ID.
Constraints
N/A
Range
N/A
Default Value
N/A
instance_id
Yes
Definition
Instance ID.
You can obtain the value of this parameter from id in Table 4 by calling the API for querying DB instances.
Constraints
N/A
Range
N/A
Default Value
N/A
Request
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| target_instance_id | Yes | String | Definition Destination instance ID. You can obtain the value of this parameter from id in Table 4 by calling the API for querying DB instances. Constraints N/A Range N/A Default Value N/A |
| target_user_name | Yes | String | Definition Destination instance username. You can obtain the value of this parameter from name in Table 3 by calling the API for querying database users. Constraints The user must have the CREATEDB permission. Range N/A Default Value N/A |
| target_user_password | Yes | String | Definition Password for the destination instance username. Constraints N/A Range N/A Default Value N/A |
| source_user_name | Yes | String | Definition Source instance username. You can obtain the value of this parameter from name in Table 3 by calling the API for querying database users. Constraints The user must have the REPLICATION permission. If the selected databases contain tables without primary keys, the CREATEDB permission is required. Range N/A Default Value N/A |
| source_user_password | Yes | String | Definition Password for the source instance username. Constraints N/A Range N/A Default Value N/A |
| database_list | Yes | List<String> | Definition Database names of the source instance. The number of databases depends on the instance specifications. You can obtain the value of this parameter from name in Table 3 by calling the API for querying databases. Constraints N/A Range Use commas (,) to separate multiple database names, for example, ["test001","test002"]. Default Value N/A |
| drs_node_type | Yes | String | Definition DRS instance specifications. Constraints N/A Range
Different specifications have different performance upper limits. For details, see Real-Time Synchronization. Default Value N/A |
| enterprise_project_id | No | String | Definition Enterprise project ID. You can obtain the value of this parameter from enterprise_project_id in Table 4 by calling the API for querying DB instances. Constraints N/A Range N/A Default Value N/A |
Example Request
POST https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/42d4b4fc17d144bbb3ba64a306e68c72in03/drs-job/create
{
"target_instance_id": "2318c01884da47d08070d2d74a2378efin03",
"database_list": [
"test001"
],
"source_user_name": "root",
"source_user_password": "Test123456",
"drs_node_type": "medium",
"target_user_name": "root",
"target_user_password": "Test123456",
"enterprise_project_id": "0"
} Response
- Normal response
Table 3 Parameters Parameter
Type
Description
job_id
String
Definition
Task ID.
Range
N/A
- Example normal response
{ "job_id": "87620726-6802-46c0-9028-a8785e1f1921" } - Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot