diff --git a/docs/drs/api-ref/.placeholder b/docs/drs/api-ref/.placeholder deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/drs/api-ref/ALL_META.TXT.json b/docs/drs/api-ref/ALL_META.TXT.json new file mode 100644 index 00000000..8d5cc9b1 --- /dev/null +++ b/docs/drs/api-ref/ALL_META.TXT.json @@ -0,0 +1,572 @@ +[ + { + "uri":"drs_01_0006.html", + "product_code":"drs", + "code":"1", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Before You Start", + "title":"Before You Start", + "githuburl":"" + }, + { + "uri":"drs_api_0109.html", + "product_code":"drs", + "code":"2", + "des":"Welcome to Data Replication Service (DRS). DRS is a stable, secure, and efficient cloud service for online database migration and real-time database synchronization. You ", + "doc_type":"api", + "kw":"DRS,Overview,Before You Start,API Reference", + "title":"Overview", + "githuburl":"" + }, + { + "uri":"drs_api_0110.html", + "product_code":"drs", + "code":"3", + "des":"DRS supports Representational State Transfer (REST) APIs, allowing you to call APIs using HTTPS. For details about API calling, see Calling APIs.", + "doc_type":"api", + "kw":"API Calling,Before You Start,API Reference", + "title":"API Calling", + "githuburl":"" + }, + { + "uri":"drs_api_0111.html", + "product_code":"drs", + "code":"4", + "des":"An endpoint is the request address for calling an API. Endpoints vary depending on services and regions. For the endpoints of all services, see Regions and Endpoints.", + "doc_type":"api", + "kw":"Endpoints,Before You Start,API Reference", + "title":"Endpoints", + "githuburl":"" + }, + { + "uri":"drs_api_0112.html", + "product_code":"drs", + "code":"5", + "des":"The number of DRS tasks that you can create cannot exceed your quota.APIs can be called only in migration and synchronization of MySQL databases, synchronization from MyS", + "doc_type":"api", + "kw":"Constraints,Before You Start,API Reference", + "title":"Constraints", + "githuburl":"" + }, + { + "uri":"drs_api_0113.html", + "product_code":"drs", + "code":"6", + "des":"A domain is created after your registration. The domain has full access permissions for all of its cloud services and resources. It can be used to reset user passwords an", + "doc_type":"api", + "kw":"Basic Concepts,Before You Start,API Reference", + "title":"Basic Concepts", + "githuburl":"" + }, + { + "uri":"drs_02_0004.html", + "product_code":"drs", + "code":"7", + "des":"DRS provides REST APIs. With DRS APIs, you can use all the functions of DRS, including creating migration tasks, obtaining task details, obtaining the migration task list", + "doc_type":"api", + "kw":"API Overview,API Reference", + "title":"API Overview", + "githuburl":"" + }, + { + "uri":"drs_01_0004.html", + "product_code":"drs", + "code":"8", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Calling APIs", + "title":"Calling APIs", + "githuburl":"" + }, + { + "uri":"drs_01_0008.html", + "product_code":"drs", + "code":"9", + "des":"This section describes the structure of a REST API request, and uses the IAM API for obtaining a user token as an example to demonstrate how to call an API. The obtained ", + "doc_type":"api", + "kw":"Making an API Request,Calling APIs,API Reference", + "title":"Making an API Request", + "githuburl":"" + }, + { + "uri":"drs_01_0005.html", + "product_code":"drs", + "code":"10", + "des":"You can use the following authentication method:Token authentication: Requests are authenticated using tokens.The validity period of a token is 24 hours. When using a tok", + "doc_type":"api", + "kw":"Authentication,Calling APIs,API Reference", + "title":"Authentication", + "githuburl":"" + }, + { + "uri":"drs_01_0007.html", + "product_code":"drs", + "code":"11", + "des":"After sending a request, you will receive a response, including a status code, response header, and response body.A status code is a group of digits, ranging from 1xx to ", + "doc_type":"api", + "kw":"Returned Values,Calling APIs,API Reference", + "title":"Returned Values", + "githuburl":"" + }, + { + "uri":"drs_03_0126.html", + "product_code":"drs", + "code":"12", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Getting Started", + "title":"Getting Started", + "githuburl":"" + }, + { + "uri":"drs_03_0127.html", + "product_code":"drs", + "code":"13", + "des":"Call an IAM API to obtain a user token by referring to Obtaining a User Token.Creating Tasks in BatchesQuerying Task Statuses in BatchesTesting Connections in BatchesModi", + "doc_type":"api", + "kw":"Task Creation Process,Getting Started,API Reference", + "title":"Task Creation Process", + "githuburl":"" + }, + { + "uri":"drs_03_0128.html", + "product_code":"drs", + "code":"14", + "des":"This section describes how to create a real-time migration task by calling an API.API for obtaining tokens from IAMObtain a token and add X-Auth-Token to the request head", + "doc_type":"api", + "kw":"Task Creation Example,Getting Started,API Reference", + "title":"Task Creation Example", + "githuburl":"" + }, + { + "uri":"drs_03_0129.html", + "product_code":"drs", + "code":"15", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"API", + "title":"API", + "githuburl":"" + }, + { + "uri":"drs_03_0101.html", + "product_code":"drs", + "code":"16", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Public API Management", + "title":"Public API Management", + "githuburl":"" + }, + { + "uri":"drs_03_0104.html", + "product_code":"drs", + "code":"17", + "des":"This API is used to create real-time migration, real-time synchronization, and real-time DR tasks in batches based on different request parameters.POST /v3/{project_id}/j", + "doc_type":"api", + "kw":"Creating Tasks in Batches,Public API Management,API Reference", + "title":"Creating Tasks in Batches", + "githuburl":"" + }, + { + "uri":"drs_03_0105.html", + "product_code":"drs", + "code":"18", + "des":"This API is used to test the connections to the source and destination ends in batches.After the task is created, you can test the connection only when the task status is", + "doc_type":"api", + "kw":"Testing Connections in Batches,Public API Management,API Reference", + "title":"Testing Connections in Batches", + "githuburl":"" + }, + { + "uri":"drs_03_0106.html", + "product_code":"drs", + "code":"19", + "des":"This API is used to test connections in cluster mode.After the task is created, you can test the connection only when the task status is CONFIGURATION.POST /v3/{project_i", + "doc_type":"api", + "kw":"Testing Connections in Batches (Cluster Mode),Public API Management,API Reference", + "title":"Testing Connections in Batches (Cluster Mode)", + "githuburl":"" + }, + { + "uri":"drs_03_0107.html", + "product_code":"drs", + "code":"20", + "des":"This API is used to modify task names or descriptions in batches and set exception notification.After the test of connections to the source and destination databases is s", + "doc_type":"api", + "kw":"Modifying Tasks in Batches,Public API Management,API Reference", + "title":"Modifying Tasks in Batches", + "githuburl":"" + }, + { + "uri":"drs_03_0109.html", + "product_code":"drs", + "code":"21", + "des":"This API is used to select the databases or tables to be migrated.Only real-time migration and real-time synchronization support object selection.After a task is created,", + "doc_type":"api", + "kw":"Selecting Database Objects in Batches,Public API Management,API Reference", + "title":"Selecting Database Objects in Batches", + "githuburl":"" + }, + { + "uri":"drs_03_0110.html", + "product_code":"drs", + "code":"22", + "des":"This API is used to perform batch pre-check to check whether the migration, synchronization, DR can be performed.After a task is created, the task status is CONFIGURATION", + "doc_type":"api", + "kw":"Performing a Batch Pre-Check,Public API Management,API Reference", + "title":"Performing a Batch Pre-Check", + "githuburl":"" + }, + { + "uri":"drs_03_0111.html", + "product_code":"drs", + "code":"23", + "des":"This API is used to query the pre-check results of tasks in batches.This API can be called only when the task status is CONFIGURATION and the pre-check API is invoked.POS", + "doc_type":"api", + "kw":"Querying Pre-check Results in Batches,Public API Management,API Reference", + "title":"Querying Pre-check Results in Batches", + "githuburl":"" + }, + { + "uri":"drs_03_0130.html", + "product_code":"drs", + "code":"24", + "des":"This API is used to enable or disable flow control for tasks. By default, the migration speed is not limited after a task is created.You can customize the maximum migrati", + "doc_type":"api", + "kw":"Setting Flow Control for Tasks,Public API Management,API Reference", + "title":"Setting Flow Control for Tasks", + "githuburl":"" + }, + { + "uri":"drs_03_0141.html", + "product_code":"drs", + "code":"25", + "des":"To ensure that service applications are not affected after the migration, DRS provides parameter comparison to help you compare parameters between the source and destinat", + "doc_type":"api", + "kw":"Obtaining Database Parameters in Batches,Public API Management,API Reference", + "title":"Obtaining Database Parameters in Batches", + "githuburl":"" + }, + { + "uri":"drs_03_0131.html", + "product_code":"drs", + "code":"26", + "des":"This API is to modify database parameters.You need to call the API for obtaining database parameters for MySQL migration and MySQL DR tasks. This API can be called only ", + "doc_type":"api", + "kw":"Modifying Database Parameters,Public API Management,API Reference", + "title":"Modifying Database Parameters", + "githuburl":"" + }, + { + "uri":"drs_03_0112.html", + "product_code":"drs", + "code":"27", + "des":"This API is used to start real-time migration, synchronization, and disaster recovery tasks in batches.This API can be called only after all tasks are configured.In the d", + "doc_type":"api", + "kw":"Starting Tasks in Batches,Public API Management,API Reference", + "title":"Starting Tasks in Batches", + "githuburl":"" + }, + { + "uri":"drs_03_0132.html", + "product_code":"drs", + "code":"28", + "des":"This API is used to retry failed tasks.In the dual-active DR scenario, the parent task cannot call the API.POST /v3/{project_id}/jobs/batch-retry-taskStatus code: 200Exam", + "doc_type":"api", + "kw":"Resuming or Retrying Tasks in Batches,Public API Management,API Reference", + "title":"Resuming or Retrying Tasks in Batches", + "githuburl":"" + }, + { + "uri":"drs_03_0133.html", + "product_code":"drs", + "code":"29", + "des":"This API is used to pause tasks in batches.Migration and synchronization tasks can be paused.Only tasks in the FULL_TRANSFER_STARTED, FULL_TRANSFER_FAILED, FULL_TRANSFER_", + "doc_type":"api", + "kw":"Pausing Tasks in Batches,Public API Management,API Reference", + "title":"Pausing Tasks in Batches", + "githuburl":"" + }, + { + "uri":"drs_03_0113.html", + "product_code":"drs", + "code":"30", + "des":"This API is used to stop tasks in batches or delete real-time migration, real-time synchronization, and real-time DR tasks.Only tasks in the CREATE_FAILED, RELEASE_RESOUR", + "doc_type":"api", + "kw":"Stopping or Deleting Tasks in Batches,Public API Management,API Reference", + "title":"Stopping or Deleting Tasks in Batches", + "githuburl":"" + }, + { + "uri":"drs_03_0134.html", + "product_code":"drs", + "code":"31", + "des":"This API is used to change the passwords of the sources and destinations after a task is started.This API can be called only when the task is in the STARTJOBING, STARTJOB", + "doc_type":"api", + "kw":"Changing the Passwords of the Sources and Destinations,Public API Management,API Reference", + "title":"Changing the Passwords of the Sources and Destinations", + "githuburl":"" + }, + { + "uri":"drs_03_0135.html", + "product_code":"drs", + "code":"32", + "des":"The API is used to set whether to migrate Definers to the user in batches.If you select Yes, the Definers of all source database objects will be migrated to the user. Oth", + "doc_type":"api", + "kw":"Setting Definers in Batches,Public API Management,API Reference", + "title":"Setting Definers in Batches", + "githuburl":"" + }, + { + "uri":"drs_03_0136.html", + "product_code":"drs", + "code":"33", + "des":"This API is used to create a comparison taskIn the current version, a comparison task can be created only when the MySQL DR task is in the DR progress. The parent task ca", + "doc_type":"api", + "kw":"Creating a Comparison Task,Public API Management,API Reference", + "title":"Creating a Comparison Task", + "githuburl":"" + }, + { + "uri":"drs_03_0137.html", + "product_code":"drs", + "code":"34", + "des":"This API is used to query the comparion result after creating a comparison task.POST /v3/{project_id}/jobs/query-compare-resultStatus code: 200Request for querying the co", + "doc_type":"api", + "kw":"Querying Comparison Results,Public API Management,API Reference", + "title":"Querying Comparison Results", + "githuburl":"" + }, + { + "uri":"drs_03_0114.html", + "product_code":"drs", + "code":"35", + "des":"This API is used to query the full progress and incremental delay information in batches based on the task ID.POST /v3/{project_id}/jobs/batch-progressStatus code: 202Exa", + "doc_type":"api", + "kw":"Querying Task Progress in Batches,Public API Management,API Reference", + "title":"Querying Task Progress in Batches", + "githuburl":"" + }, + { + "uri":"drs_api_0151.html", + "product_code":"drs", + "code":"36", + "des":"This API is used to query task details in batches by task ID.POST /v3/{project_id}/jobs/batch-detailStatus code: 200Request for querying task details:Status code: 200OKFo", + "doc_type":"api", + "kw":"Querying Task Details in Batches,Public API Management,API Reference", + "title":"Querying Task Details in Batches", + "githuburl":"" + }, + { + "uri":"drs_03_0138.html", + "product_code":"drs", + "code":"37", + "des":"This API is used to query tenant tasks by engine type, network type, task status, task name, or task ID.POST /v3/{project_id}/jobsStatus code: 200Example of querying the ", + "doc_type":"api", + "kw":"Querying Tasks of a Tenant,Public API Management,API Reference", + "title":"Querying Tasks of a Tenant", + "githuburl":"" + }, + { + "uri":"drs_api_0150.html", + "product_code":"drs", + "code":"38", + "des":"This API is used to query task statuses in batches by task ID.POST /v3/{project_id}/jobs/batch-statusStatus code: 200Example of querying task statuses in batches:Status c", + "doc_type":"api", + "kw":"Querying Task Statuses in Batches,Public API Management,API Reference", + "title":"Querying Task Statuses in Batches", + "githuburl":"" + }, + { + "uri":"drs_api_0100.html", + "product_code":"drs", + "code":"39", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Real-Time Synchronization Management", + "title":"Real-Time Synchronization Management", + "githuburl":"" + }, + { + "uri":"drs_api_0103.html", + "product_code":"drs", + "code":"40", + "des":"This API is used to add rules for data processing.Each table has only one verification rule.MySQL source database supports a maximum of 10,000 tables at a time.The filter", + "doc_type":"api", + "kw":"Processing Data in Batches,Real-Time Synchronization Management,API Reference", + "title":"Processing Data in Batches", + "githuburl":"" + }, + { + "uri":"drs_03_0147.html", + "product_code":"drs", + "code":"41", + "des":"This API is used to switch over virtual IP addresses.Only synchronization between self-built databases supports the dual virtual IP address switchover.POST /v3/{project_", + "doc_type":"api", + "kw":"Performing a Switchover,Real-Time Synchronization Management,API Reference", + "title":"Performing a Switchover", + "githuburl":"" + }, + { + "uri":"drs_03_0148.html", + "product_code":"drs", + "code":"42", + "des":"This API is used to query the dual-virtual IP address switchover result.Only synchronization between self-built databases supports querying the results of dual virtual IP", + "doc_type":"api", + "kw":"Querying the Switchover Result,Real-Time Synchronization Management,API Reference", + "title":"Querying the Switchover Result", + "githuburl":"" + }, + { + "uri":"drs_03_0149.html", + "product_code":"drs", + "code":"43", + "des":"This API is used to configure synchronization policies in batches, including conflict policies, DROP DATASE filtering, and object synchronization scope.This API supports ", + "doc_type":"api", + "kw":"Configuring Synchronization Policies in Batches,Real-Time Synchronization Management,API Reference", + "title":"Configuring Synchronization Policies in Batches", + "githuburl":"" + }, + { + "uri":"drs_03_0121.html", + "product_code":"drs", + "code":"44", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Application Examples", + "title":"Application Examples", + "githuburl":"" + }, + { + "uri":"drs_03_0122.html", + "product_code":"drs", + "code":"45", + "des":"This section describes how to query the status of all tasks of a tenant by calling the API described in Querying Task Statuses in Batches.Example request:POST: https://{e", + "doc_type":"api", + "kw":"Scenario 1: Querying Task Statuses in Batches,Application Examples,API Reference", + "title":"Scenario 1: Querying Task Statuses in Batches", + "githuburl":"" + }, + { + "uri":"drs_03_0123.html", + "product_code":"drs", + "code":"46", + "des":"This section describes how to query task details of a tenant by calling the API described in Querying Task Details in Batches.Example request:POST: https://{EndPoint}/v3/", + "doc_type":"api", + "kw":"Scenario 2: Querying Task Details in Batches,Application Examples,API Reference", + "title":"Scenario 2: Querying Task Details in Batches", + "githuburl":"" + }, + { + "uri":"drs_03_0124.html", + "product_code":"drs", + "code":"47", + "des":"This section describes how to start multiple configuration tasks by calling an API.Example request:POST: https://{endpoint}/ /v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/bat", + "doc_type":"api", + "kw":"Scenario 3: Starting Tasks in Batches,Application Examples,API Reference", + "title":"Scenario 3: Starting Tasks in Batches", + "githuburl":"" + }, + { + "uri":"drs_03_0125.html", + "product_code":"drs", + "code":"48", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Appendix", + "title":"Appendix", + "githuburl":"" + }, + { + "uri":"drs_05_0002.html", + "product_code":"drs", + "code":"49", + "des":"Abnormal response descriptionAbnormal response descriptionNameTypeDescriptionerror_codeStringSpecifies the error code returned when the API response is abnormal. For deta", + "doc_type":"api", + "kw":"Abnormal Request Results,Appendix,API Reference", + "title":"Abnormal Request Results", + "githuburl":"" + }, + { + "uri":"drs_05_0003.html", + "product_code":"drs", + "code":"50", + "des":"NormalReturn codes for successful requestsStatus CodeDescription200Request succeeded.202Asynchronous requests (such as performing a task) are submitted successfully.Abnor", + "doc_type":"api", + "kw":"HTTP Status Codes for General Requests,Appendix,API Reference", + "title":"HTTP Status Codes for General Requests", + "githuburl":"" + }, + { + "uri":"drs_05_0004.html", + "product_code":"drs", + "code":"51", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Error Code,Appendix,API Reference", + "title":"Error Code", + "githuburl":"" + }, + { + "uri":"drs_05_0005.html", + "product_code":"drs", + "code":"52", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Task Statuses,Appendix,API Reference", + "title":"Task Statuses", + "githuburl":"" + }, + { + "uri":"drs_api_0106.html", + "product_code":"drs", + "code":"53", + "des":"A project ID needs to be specified in the URLs of some APIs. Therefore, you need to obtain a project ID before calling such APIs. To do so, perform the following operatio", + "doc_type":"api", + "kw":"Obtaining a Project ID,Appendix,API Reference", + "title":"Obtaining a Project ID", + "githuburl":"" + }, + { + "uri":"drs_api_0107.html", + "product_code":"drs", + "code":"54", + "des":"An account ID is required for some URLs when an API is called. To obtain an account ID, perform the following operations:On the API Credentials page, view Account ID.", + "doc_type":"api", + "kw":"Obtaining an Account ID,Appendix,API Reference", + "title":"Obtaining an Account ID", + "githuburl":"" + }, + { + "uri":"drs_api_0115.html", + "product_code":"drs", + "code":"55", + "des":"A task ID is required for some URLs when an API is called. This section describes how to obtain a task ID.Alternatively, click the task name and view the task ID on the B", + "doc_type":"api", + "kw":"Obtaining a Task ID,Appendix,API Reference", + "title":"Obtaining a Task ID", + "githuburl":"" + }, + { + "uri":"drs_api_0108.html", + "product_code":"drs", + "code":"56", + "des":"Table 1 describes status codes.", + "doc_type":"api", + "kw":"Status Code,Appendix,API Reference", + "title":"Status Code", + "githuburl":"" + }, + { + "uri":"drs_change_history.html", + "product_code":"drs", + "code":"57", + "des":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "doc_type":"api", + "kw":"Change History,API Reference", + "title":"Change History", + "githuburl":"" + } +] \ No newline at end of file diff --git a/docs/drs/api-ref/CLASS.TXT.json b/docs/drs/api-ref/CLASS.TXT.json new file mode 100644 index 00000000..85111c7d --- /dev/null +++ b/docs/drs/api-ref/CLASS.TXT.json @@ -0,0 +1,515 @@ +[ + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"drs", + "title":"Before You Start", + "uri":"drs_01_0006.html", + "doc_type":"api", + "p_code":"", + "code":"1" + }, + { + "desc":"Welcome to Data Replication Service (DRS). DRS is a stable, secure, and efficient cloud service for online database migration and real-time database synchronization. You ", + "product_code":"drs", + "title":"Overview", + "uri":"drs_api_0109.html", + "doc_type":"api", + "p_code":"1", + "code":"2" + }, + { + "desc":"DRS supports Representational State Transfer (REST) APIs, allowing you to call APIs using HTTPS. For details about API calling, see Calling APIs.", + "product_code":"drs", + "title":"API Calling", + "uri":"drs_api_0110.html", + "doc_type":"api", + "p_code":"1", + "code":"3" + }, + { + "desc":"An endpoint is the request address for calling an API. Endpoints vary depending on services and regions. For the endpoints of all services, see Regions and Endpoints.", + "product_code":"drs", + "title":"Endpoints", + "uri":"drs_api_0111.html", + "doc_type":"api", + "p_code":"1", + "code":"4" + }, + { + "desc":"The number of DRS tasks that you can create cannot exceed your quota.APIs can be called only in migration and synchronization of MySQL databases, synchronization from MyS", + "product_code":"drs", + "title":"Constraints", + "uri":"drs_api_0112.html", + "doc_type":"api", + "p_code":"1", + "code":"5" + }, + { + "desc":"A domain is created after your registration. The domain has full access permissions for all of its cloud services and resources. It can be used to reset user passwords an", + "product_code":"drs", + "title":"Basic Concepts", + "uri":"drs_api_0113.html", + "doc_type":"api", + "p_code":"1", + "code":"6" + }, + { + "desc":"DRS provides REST APIs. With DRS APIs, you can use all the functions of DRS, including creating migration tasks, obtaining task details, obtaining the migration task list", + "product_code":"drs", + "title":"API Overview", + "uri":"drs_02_0004.html", + "doc_type":"api", + "p_code":"", + "code":"7" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"drs", + "title":"Calling APIs", + "uri":"drs_01_0004.html", + "doc_type":"api", + "p_code":"", + "code":"8" + }, + { + "desc":"This section describes the structure of a REST API request, and uses the IAM API for obtaining a user token as an example to demonstrate how to call an API. The obtained ", + "product_code":"drs", + "title":"Making an API Request", + "uri":"drs_01_0008.html", + "doc_type":"api", + "p_code":"8", + "code":"9" + }, + { + "desc":"You can use the following authentication method:Token authentication: Requests are authenticated using tokens.The validity period of a token is 24 hours. When using a tok", + "product_code":"drs", + "title":"Authentication", + "uri":"drs_01_0005.html", + "doc_type":"api", + "p_code":"8", + "code":"10" + }, + { + "desc":"After sending a request, you will receive a response, including a status code, response header, and response body.A status code is a group of digits, ranging from 1xx to ", + "product_code":"drs", + "title":"Returned Values", + "uri":"drs_01_0007.html", + "doc_type":"api", + "p_code":"8", + "code":"11" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"drs", + "title":"Getting Started", + "uri":"drs_03_0126.html", + "doc_type":"api", + "p_code":"", + "code":"12" + }, + { + "desc":"Call an IAM API to obtain a user token by referring to Obtaining a User Token.Creating Tasks in BatchesQuerying Task Statuses in BatchesTesting Connections in BatchesModi", + "product_code":"drs", + "title":"Task Creation Process", + "uri":"drs_03_0127.html", + "doc_type":"api", + "p_code":"12", + "code":"13" + }, + { + "desc":"This section describes how to create a real-time migration task by calling an API.API for obtaining tokens from IAMObtain a token and add X-Auth-Token to the request head", + "product_code":"drs", + "title":"Task Creation Example", + "uri":"drs_03_0128.html", + "doc_type":"api", + "p_code":"12", + "code":"14" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"drs", + "title":"API", + "uri":"drs_03_0129.html", + "doc_type":"api", + "p_code":"", + "code":"15" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"drs", + "title":"Public API Management", + "uri":"drs_03_0101.html", + "doc_type":"api", + "p_code":"15", + "code":"16" + }, + { + "desc":"This API is used to create real-time migration, real-time synchronization, and real-time DR tasks in batches based on different request parameters.POST /v3/{project_id}/j", + "product_code":"drs", + "title":"Creating Tasks in Batches", + "uri":"drs_03_0104.html", + "doc_type":"api", + "p_code":"16", + "code":"17" + }, + { + "desc":"This API is used to test the connections to the source and destination ends in batches.After the task is created, you can test the connection only when the task status is", + "product_code":"drs", + "title":"Testing Connections in Batches", + "uri":"drs_03_0105.html", + "doc_type":"api", + "p_code":"16", + "code":"18" + }, + { + "desc":"This API is used to test connections in cluster mode.After the task is created, you can test the connection only when the task status is CONFIGURATION.POST /v3/{project_i", + "product_code":"drs", + "title":"Testing Connections in Batches (Cluster Mode)", + "uri":"drs_03_0106.html", + "doc_type":"api", + "p_code":"16", + "code":"19" + }, + { + "desc":"This API is used to modify task names or descriptions in batches and set exception notification.After the test of connections to the source and destination databases is s", + "product_code":"drs", + "title":"Modifying Tasks in Batches", + "uri":"drs_03_0107.html", + "doc_type":"api", + "p_code":"16", + "code":"20" + }, + { + "desc":"This API is used to select the databases or tables to be migrated.Only real-time migration and real-time synchronization support object selection.After a task is created,", + "product_code":"drs", + "title":"Selecting Database Objects in Batches", + "uri":"drs_03_0109.html", + "doc_type":"api", + "p_code":"16", + "code":"21" + }, + { + "desc":"This API is used to perform batch pre-check to check whether the migration, synchronization, DR can be performed.After a task is created, the task status is CONFIGURATION", + "product_code":"drs", + "title":"Performing a Batch Pre-Check", + "uri":"drs_03_0110.html", + "doc_type":"api", + "p_code":"16", + "code":"22" + }, + { + "desc":"This API is used to query the pre-check results of tasks in batches.This API can be called only when the task status is CONFIGURATION and the pre-check API is invoked.POS", + "product_code":"drs", + "title":"Querying Pre-check Results in Batches", + "uri":"drs_03_0111.html", + "doc_type":"api", + "p_code":"16", + "code":"23" + }, + { + "desc":"This API is used to enable or disable flow control for tasks. By default, the migration speed is not limited after a task is created.You can customize the maximum migrati", + "product_code":"drs", + "title":"Setting Flow Control for Tasks", + "uri":"drs_03_0130.html", + "doc_type":"api", + "p_code":"16", + "code":"24" + }, + { + "desc":"To ensure that service applications are not affected after the migration, DRS provides parameter comparison to help you compare parameters between the source and destinat", + "product_code":"drs", + "title":"Obtaining Database Parameters in Batches", + "uri":"drs_03_0141.html", + "doc_type":"api", + "p_code":"16", + "code":"25" + }, + { + "desc":"This API is to modify database parameters.You need to call the API for obtaining database parameters for MySQL migration and MySQL DR tasks. This API can be called only ", + "product_code":"drs", + "title":"Modifying Database Parameters", + "uri":"drs_03_0131.html", + "doc_type":"api", + "p_code":"16", + "code":"26" + }, + { + "desc":"This API is used to start real-time migration, synchronization, and disaster recovery tasks in batches.This API can be called only after all tasks are configured.In the d", + "product_code":"drs", + "title":"Starting Tasks in Batches", + "uri":"drs_03_0112.html", + "doc_type":"api", + "p_code":"16", + "code":"27" + }, + { + "desc":"This API is used to retry failed tasks.In the dual-active DR scenario, the parent task cannot call the API.POST /v3/{project_id}/jobs/batch-retry-taskStatus code: 200Exam", + "product_code":"drs", + "title":"Resuming or Retrying Tasks in Batches", + "uri":"drs_03_0132.html", + "doc_type":"api", + "p_code":"16", + "code":"28" + }, + { + "desc":"This API is used to pause tasks in batches.Migration and synchronization tasks can be paused.Only tasks in the FULL_TRANSFER_STARTED, FULL_TRANSFER_FAILED, FULL_TRANSFER_", + "product_code":"drs", + "title":"Pausing Tasks in Batches", + "uri":"drs_03_0133.html", + "doc_type":"api", + "p_code":"16", + "code":"29" + }, + { + "desc":"This API is used to stop tasks in batches or delete real-time migration, real-time synchronization, and real-time DR tasks.Only tasks in the CREATE_FAILED, RELEASE_RESOUR", + "product_code":"drs", + "title":"Stopping or Deleting Tasks in Batches", + "uri":"drs_03_0113.html", + "doc_type":"api", + "p_code":"16", + "code":"30" + }, + { + "desc":"This API is used to change the passwords of the sources and destinations after a task is started.This API can be called only when the task is in the STARTJOBING, STARTJOB", + "product_code":"drs", + "title":"Changing the Passwords of the Sources and Destinations", + "uri":"drs_03_0134.html", + "doc_type":"api", + "p_code":"16", + "code":"31" + }, + { + "desc":"The API is used to set whether to migrate Definers to the user in batches.If you select Yes, the Definers of all source database objects will be migrated to the user. Oth", + "product_code":"drs", + "title":"Setting Definers in Batches", + "uri":"drs_03_0135.html", + "doc_type":"api", + "p_code":"16", + "code":"32" + }, + { + "desc":"This API is used to create a comparison taskIn the current version, a comparison task can be created only when the MySQL DR task is in the DR progress. The parent task ca", + "product_code":"drs", + "title":"Creating a Comparison Task", + "uri":"drs_03_0136.html", + "doc_type":"api", + "p_code":"16", + "code":"33" + }, + { + "desc":"This API is used to query the comparion result after creating a comparison task.POST /v3/{project_id}/jobs/query-compare-resultStatus code: 200Request for querying the co", + "product_code":"drs", + "title":"Querying Comparison Results", + "uri":"drs_03_0137.html", + "doc_type":"api", + "p_code":"16", + "code":"34" + }, + { + "desc":"This API is used to query the full progress and incremental delay information in batches based on the task ID.POST /v3/{project_id}/jobs/batch-progressStatus code: 202Exa", + "product_code":"drs", + "title":"Querying Task Progress in Batches", + "uri":"drs_03_0114.html", + "doc_type":"api", + "p_code":"16", + "code":"35" + }, + { + "desc":"This API is used to query task details in batches by task ID.POST /v3/{project_id}/jobs/batch-detailStatus code: 200Request for querying task details:Status code: 200OKFo", + "product_code":"drs", + "title":"Querying Task Details in Batches", + "uri":"drs_api_0151.html", + "doc_type":"api", + "p_code":"16", + "code":"36" + }, + { + "desc":"This API is used to query tenant tasks by engine type, network type, task status, task name, or task ID.POST /v3/{project_id}/jobsStatus code: 200Example of querying the ", + "product_code":"drs", + "title":"Querying Tasks of a Tenant", + "uri":"drs_03_0138.html", + "doc_type":"api", + "p_code":"16", + "code":"37" + }, + { + "desc":"This API is used to query task statuses in batches by task ID.POST /v3/{project_id}/jobs/batch-statusStatus code: 200Example of querying task statuses in batches:Status c", + "product_code":"drs", + "title":"Querying Task Statuses in Batches", + "uri":"drs_api_0150.html", + "doc_type":"api", + "p_code":"16", + "code":"38" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"drs", + "title":"Real-Time Synchronization Management", + "uri":"drs_api_0100.html", + "doc_type":"api", + "p_code":"15", + "code":"39" + }, + { + "desc":"This API is used to add rules for data processing.Each table has only one verification rule.MySQL source database supports a maximum of 10,000 tables at a time.The filter", + "product_code":"drs", + "title":"Processing Data in Batches", + "uri":"drs_api_0103.html", + "doc_type":"api", + "p_code":"39", + "code":"40" + }, + { + "desc":"This API is used to switch over virtual IP addresses.Only synchronization between self-built databases supports the dual virtual IP address switchover.POST /v3/{project_", + "product_code":"drs", + "title":"Performing a Switchover", + "uri":"drs_03_0147.html", + "doc_type":"api", + "p_code":"39", + "code":"41" + }, + { + "desc":"This API is used to query the dual-virtual IP address switchover result.Only synchronization between self-built databases supports querying the results of dual virtual IP", + "product_code":"drs", + "title":"Querying the Switchover Result", + "uri":"drs_03_0148.html", + "doc_type":"api", + "p_code":"39", + "code":"42" + }, + { + "desc":"This API is used to configure synchronization policies in batches, including conflict policies, DROP DATASE filtering, and object synchronization scope.This API supports ", + "product_code":"drs", + "title":"Configuring Synchronization Policies in Batches", + "uri":"drs_03_0149.html", + "doc_type":"api", + "p_code":"39", + "code":"43" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"drs", + "title":"Application Examples", + "uri":"drs_03_0121.html", + "doc_type":"api", + "p_code":"", + "code":"44" + }, + { + "desc":"This section describes how to query the status of all tasks of a tenant by calling the API described in Querying Task Statuses in Batches.Example request:POST: https://{e", + "product_code":"drs", + "title":"Scenario 1: Querying Task Statuses in Batches", + "uri":"drs_03_0122.html", + "doc_type":"api", + "p_code":"44", + "code":"45" + }, + { + "desc":"This section describes how to query task details of a tenant by calling the API described in Querying Task Details in Batches.Example request:POST: https://{EndPoint}/v3/", + "product_code":"drs", + "title":"Scenario 2: Querying Task Details in Batches", + "uri":"drs_03_0123.html", + "doc_type":"api", + "p_code":"44", + "code":"46" + }, + { + "desc":"This section describes how to start multiple configuration tasks by calling an API.Example request:POST: https://{endpoint}/ /v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/bat", + "product_code":"drs", + "title":"Scenario 3: Starting Tasks in Batches", + "uri":"drs_03_0124.html", + "doc_type":"api", + "p_code":"44", + "code":"47" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"drs", + "title":"Appendix", + "uri":"drs_03_0125.html", + "doc_type":"api", + "p_code":"", + "code":"48" + }, + { + "desc":"Abnormal response descriptionAbnormal response descriptionNameTypeDescriptionerror_codeStringSpecifies the error code returned when the API response is abnormal. For deta", + "product_code":"drs", + "title":"Abnormal Request Results", + "uri":"drs_05_0002.html", + "doc_type":"api", + "p_code":"48", + "code":"49" + }, + { + "desc":"NormalReturn codes for successful requestsStatus CodeDescription200Request succeeded.202Asynchronous requests (such as performing a task) are submitted successfully.Abnor", + "product_code":"drs", + "title":"HTTP Status Codes for General Requests", + "uri":"drs_05_0003.html", + "doc_type":"api", + "p_code":"48", + "code":"50" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"drs", + "title":"Error Code", + "uri":"drs_05_0004.html", + "doc_type":"api", + "p_code":"48", + "code":"51" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"drs", + "title":"Task Statuses", + "uri":"drs_05_0005.html", + "doc_type":"api", + "p_code":"48", + "code":"52" + }, + { + "desc":"A project ID needs to be specified in the URLs of some APIs. Therefore, you need to obtain a project ID before calling such APIs. To do so, perform the following operatio", + "product_code":"drs", + "title":"Obtaining a Project ID", + "uri":"drs_api_0106.html", + "doc_type":"api", + "p_code":"48", + "code":"53" + }, + { + "desc":"An account ID is required for some URLs when an API is called. To obtain an account ID, perform the following operations:On the API Credentials page, view Account ID.", + "product_code":"drs", + "title":"Obtaining an Account ID", + "uri":"drs_api_0107.html", + "doc_type":"api", + "p_code":"48", + "code":"54" + }, + { + "desc":"A task ID is required for some URLs when an API is called. This section describes how to obtain a task ID.Alternatively, click the task name and view the task ID on the B", + "product_code":"drs", + "title":"Obtaining a Task ID", + "uri":"drs_api_0115.html", + "doc_type":"api", + "p_code":"48", + "code":"55" + }, + { + "desc":"Table 1 describes status codes.", + "product_code":"drs", + "title":"Status Code", + "uri":"drs_api_0108.html", + "doc_type":"api", + "p_code":"48", + "code":"56" + }, + { + "desc":"HUAWEI CLOUD Help Center presents technical documents to help you quickly get started with HUAWEI CLOUD services. The technical documents include Service Overview, Price Details, Purchase Guide, User Guide, API Reference, Best Practices, FAQs, and Videos.", + "product_code":"drs", + "title":"Change History", + "uri":"drs_change_history.html", + "doc_type":"api", + "p_code":"", + "code":"57" + } +] \ No newline at end of file diff --git a/docs/drs/api-ref/PARAMETERS.txt b/docs/drs/api-ref/PARAMETERS.txt new file mode 100644 index 00000000..6da8d5f0 --- /dev/null +++ b/docs/drs/api-ref/PARAMETERS.txt @@ -0,0 +1,3 @@ +version="" +language="en-us" +type="" \ No newline at end of file diff --git a/docs/drs/api-ref/drs_01_0004.html b/docs/drs/api-ref/drs_01_0004.html new file mode 100644 index 00000000..52cf6533 --- /dev/null +++ b/docs/drs/api-ref/drs_01_0004.html @@ -0,0 +1,18 @@ + + + +
You can use the following authentication method:
+Token authentication: Requests are authenticated using tokens.
+The validity period of a token is 24 hours. When using a token for authentication, cache it to prevent frequently calling the IAM API used to obtain a user token.
+A token specifies temporary permissions in a computer system. During API authentication using a token, the token is added to requests to get permissions for calling the API.
+In section 3.1 Making an API Request, the process of calling the API used to obtain a user token is described. After a token is obtained, add the X-Auth-Token header field must be added to requests to specify the token when calling other APIs. For example, if the token is ABCDEFJ...., X-Auth-Token: ABCDEFJ.... can be added to a request as follows:
+GET https://iam.eu-de.otc.t-systems.com/v3/auth/projects +Content-Type: application/json +X-Auth-Token: ABCDEFJ....+
After sending a request, you will receive a response, including a status code, response header, and response body.
+A status code is a group of digits, ranging from 1xx to 5xx. It indicates the status of a request. For more information, see Status Code.
+For example, if status code 201 is returned for calling the API used to obtain a user token, the request is successful.
+Similar to a request, a response also has a header, for example, Content-Type.
+Figure 1 shows the response header fields for the API used to obtain a user token is called. The x-subject-token header field is the desired user token. This token can then be used to authenticate the calling of other APIs.
+ +The body of a response is often returned in structured format as specified in the Content-type header field. The response body transfers content except the response header.
+The following is part of the response body for the API used to obtain a user token. The following shows part of the response body for the API to obtain a user token.
+{ + "token": { + "expires_at": "2019-02-13T06:52:13.855000Z", + "methods": [ + "password" + ], + "catalog": [ + { + "endpoints": [ + { + + "region_id": "eu-de", + + + +......+
If an error occurs during API calling, the system returns an error code and message to you. The following shows the format of an error response body:
+{ + "error_msg": "The format of message is error", + "error_code": "AS.0001" +}+
In the response body, error_code is an error code, and error_msg provides information about the error.
+This section describes the structure of a REST API request, and uses the IAM API for obtaining a user token as an example to demonstrate how to call an API. The obtained token can then be used to authenticate requests for calling other APIs.
+A request URI consists of the following parts:
+{URI-scheme}://{Endpoint}/{resource-path}?{query-string}
+ +Parameter + |
+Description + |
+
---|---|
URI-scheme + |
+Protocol used to transmit requests. All APIs use HTTPS. + |
+
Endpoint + |
+Domain name or IP address of the server bearing the REST service endpoint. Obtain the value from Regions and Endpoints. + |
+
resource-path + |
+API access path for performing a specified operation. Obtain the path from the URI of an API. For example, the resource-path of the API used to obtain a user token is /v3/auth/tokens. + |
+
query-string + |
+Query parameter, which is optional. Ensure that a question mark (?) is included before each query parameter that is in the format of "Parameter name=Parameter value". For example, ? limit=10 indicates that a maximum of 10 data records will be displayed. + |
+
The HTTP protocol defines the following request methods that can be used to send a request to the server.
+ +Method + |
+Description + |
+
---|---|
GET + |
+Requests a server to return specified resources. + |
+
PUT + |
+Requests a server to update specified resources. + |
+
POST + |
+Requests a server to add a resource or perform special operations. + |
+
DELETE + |
+Requests a server to delete specified resources, for example, an object. + |
+
HEAD + |
+Same as GET except that the server must return only the response header. + |
+
PATCH + |
+Requests a server to update partial content of a specified resource. If the resource does not exist, the PATCH method creates a resource. + |
+
For example, in the case of the API used to obtain a user token, the request method is POST. The request is as follows:
+1 | POST https://iam.eu-de.otc.t-systems.com/v3/auth/tokens + |
You can also add additional header fields to a request, such as the fields required by a specified URI or HTTP method. For example, to request for the authentication information, add Content-Type, which specifies the request body type.
+Table 3 describes common request headers need to be added to requests.
+ +Name + |
+Description + |
+Mandatory + |
+Example + |
+
---|---|---|---|
Content-Type + |
+Specifies the MIME type of the request body. + |
+Yes + |
+The default value is application/json. Other values will be described in the specific APIs. + |
+
Content-Length + |
+Length of the request body. The unit is byte. + |
+
|
+3495 + |
+
X-Auth-Token + |
+Specifies a user token. This field is mandatory when token authentication is used. User token is a response to the API for obtaining a user token (only this API does not require authentication). + |
+Yes + |
+- + |
+
X-Language + |
+Request language type. + |
+No + |
+en-us + |
+
For details about other headers, see the HTTP protocol.
+The API used to obtain a user token does not require authentication. Therefore, only the Content-Type field needs to be added to requests for calling the API. An example of such requests is as follows:
+POST https://iam.eu-de.otc.t-systems.com/v3/auth/tokens +Content-Type: application/json+
The body of a request is often sent in a structured format as specified in the Content-Type header field. If the request body contains full-width characters, these characters must be coded in UTF-8.
+The request body varies between APIs. Some APIs do not require the request body, such as the APIs requested using the GET and DELETE methods.
+In the case of the API used to obtain a user token, the request parameters and parameter description can be obtained from the API request. The following provides an example request with a body included. Replace username, domainname, ******** (login password), and xxxxxxxxxx (project ID, for example, eu-de) with the actual values. To learn how to obtain a project ID, see Regions and Endpoints.
+The scope parameter specifies where a token takes effect. You can set scope to an account or a project under an account. You can set scope to an account or a project under an account. For details, see Obtaining a User Token Through Password Authentication.
++POST https://iam.eu-de.otc.t-systems.com/v3/auth/tokens +Content-Type: application/json + +{ + "auth": { + "identity": { + "methods": [ + "password" + ], + "password": { + "user": { + "name": "username", + "password": "********", + "domain": { + "name": "domainname" + } + } + } + }, + "scope": { + "project": { + "name": "xxxxxxxxxxxxxxxxxx" + } + } + } +}+
If all data required for the API request is available, you can send the request to call the API through curl, Postman, or coding. In the response to the API used to obtain a user token, x-subject-token is the desired user token. You can use the token to authenticate other API calls.
+DRS provides REST APIs. With DRS APIs, you can use all the functions of DRS, including creating migration tasks, obtaining task details, obtaining the migration task list, and deleting migration tasks.
+ +Type + |
+Subtype + |
+Description + |
+
---|---|---|
DRS APIs (v3) + |
+Public API management + |
+The APIs are used to create a task, test the connection, perform a pre-check, query task details and progress, create a comparison task, delete a task, retry a task, and stop a task. + |
+
DRS APIs (v3) + |
+Real-time synchronization management + |
+The APIs are used to process data, perform dual-VIP switchover, and query dual-VIP switchover result. + |
+
This API is used to create real-time migration, real-time synchronization, and real-time DR tasks in batches based on different request parameters.
+POST /v3/{project_id}/jobs/batch-creation
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID of a tenant in a region + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+The content type. +The default value is application/json. + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token obtained from IAM. + |
+
X-Language + |
+No + |
+String + |
+Request language type. The default value is en-us. +Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
jobs + |
+Yes + |
+Array of CreateJobReq objects + |
+Request body for creating tasks. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
name + |
+Yes + |
+String + |
+The task name. The task name can be 4 to 50 characters in length. It is case-insensitive and can contain only letters, digits, hyphens (-), and underscores (_). +
|
+
db_use_type + |
+Yes + |
+String + |
+Migration scenario. +Values: +
|
+
engine_type + |
+Yes + |
+String + |
+Engine type of a DRS task. +Values: +
|
+
job_direction + |
+Yes + |
+String + |
+Task direction. +Values: +
|
+
bind_eip + |
+No + |
+Boolean + |
+Whether to bind an EIP. This parameter is mandatory and set to true when the network type is EIP. + |
+
customize_sutnet_id + |
+Yes + |
+String + |
+The ID of the subnet where the DRS instance resides, which corresponds to the network ID of the subnet created in the VPC of the destination database. The value is in UUID format. + |
+
is_target_readonly + |
+No + |
+Boolean + |
+Whether the destination DB instance can be read-only. This parameter is valid only when the destination DB instance is a MySQL DB instance and the job_direction value is up. In the DR scenario, this parameter is mandatory and set to true if the current cloud is a standby cloud. If this parameter is not specified, the default value is true. + |
+
net_type + |
+Yes + |
+String + |
+Network type. Value: +
The VPC network cannot be selected in the DR scenario. + |
+
node_type + |
+Yes + |
+String + |
+The flavor type. Value: +
|
+
node_num + |
+No + |
+Integer + |
+The number of nodes. +For a MongoDB database, this parameter indicates the number of source shards. This parameter is mandatory when the source database is a cluster. The value ranges from 1 to 32. The default value is 2 for MySQL dual-active DR. + |
+
source_endpoint + |
+Yes + |
+Endpoint object + |
+The source database information. + |
+
target_endpoint + |
+Yes + |
+Endpoint object + |
+The destination database information. + |
+
task_type + |
+Yes + |
+String + |
+Task mode. The default value is FULL_INCR_TRANS. +Values: +
In the single-active DR scenario, only FULL_INCR_TRANS is available. + |
+
tags + |
+No + |
+Array of ResourceTag object + |
+Tag information. Up to 20 tags can be added. + |
+
description + |
+No + |
+String + |
+Task description. The task description can contain a maximum of 256 characters and cannot contain the following special characters: !<>'&"\ + |
+
multi_write + |
+No + |
+Boolean + |
+
Default value: false + |
+
sys_tags + |
+No + |
+Array of ResourceTag object + |
+Enterprise project. If this parameter is not specified, the value is default. The key must be _sys_enterprise_project_id, and the value is the enterprise project ID. Only one enterprise project can be selected. + |
+
expired_days + |
+No + |
+String + |
+After a task is in the abnormal status for a period of time, the task is automatically stopped. The unit is day. The value ranges from 14 to 100. If this parameter is not transferred, the default value is 14. + |
+
master_az + |
+No + |
+String + |
+AZ where the primary task is located. You can obtain the value by calling the API for querying AZs where flavors are not sold out. +
|
+
slave_az + |
+No + |
+String + |
+AZ where the standby task is located. You can obtain the value by calling the API for querying AZs where flavors are not sold out. +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
db_type + |
+No + |
+String + |
+Database type. Values: +
|
+
az_code + |
+No + |
+String + |
+azCode of the AZ where the database is located. + |
+
region + |
+No + |
+String + |
+Region where the DB instance is located. This parameter is mandatory when the database is a cloud instance, for example, an RDS or GaussDB(for MySQL) instance. In DR scenarios, if job_direction is set to down, this parameter is mandatory in source_endpoint. If job_direction is set to up, this parameter is mandatory in target_endpoint. + |
+
inst_id + |
+No + |
+String + |
+DB instance ID. This parameter is mandatory when the database is a cloud instance, for example, an RDS or GaussDB(for MySQL) instance. In DR scenarios, if job_direction is set to down, this parameter is mandatory in source_endpoint. If job_direction is set to up, this parameter is mandatory in target_endpoint. + |
+
vpc_id + |
+No + |
+String + |
+ID of the VPC where the database is located. + |
+
subnet_id + |
+No + |
+String + |
+ID of the subnet where the database is located. + |
+
security_group_id + |
+No + |
+String + |
+ID of the security group to which the database belongs. + |
+
project_id + |
+No + |
+String + |
+The project ID of an RDS or GaussDB(for MySQL) instance. + |
+
db_password + |
+No + |
+String + |
+Database password. + |
+
db_port + |
+No + |
+Integer + |
+Database port. The value is an integer ranging from 1 to 65535. + |
+
db_user + |
+No + |
+String + |
+Database user. + |
+
inst_name + |
+No + |
+String + |
+The name of an RDS or GaussDB(for MySQL) instance. + |
+
ip + |
+No + |
+String + |
+Database IP address. + |
+
mongo_ha_mode + |
+No + |
+String + |
+Mongo HA mode. + |
+
ssl_cert_password + |
+No + |
+String + |
+SSL certificate password. The certificate file name extension is .p12. + |
+
ssl_cert_check_sum + |
+No + |
+String + |
+The checksum value of the SSL certificate, which is used for backend verification. This parameter is mandatory for secure connection to the source database. + |
+
ssl_cert_key + |
+No + |
+String + |
+SSL certificate content, which is encrypted using Base64. + |
+
ssl_cert_name + |
+No + |
+String + |
+SSL certificate name. + |
+
ssl_link + |
+No + |
+Boolean + |
+Whether SSL is enabled. + |
+
cluster_mode + |
+No + |
+String + |
+For MongoDB 4.0 or later, if the cluster instance cannot obtain the IP address of the sharded node, set source_endpoint to Sharding4.0+. +Default value: Sharding4.0+ +Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
key + |
+No + |
+String + |
+Tag key. The value can contain a maximum of 36 characters, including letters, digits, underscores (_), and hyphens (-). + |
+
value + |
+No + |
+String + |
+Tag value. The value can contain a maximum of 43 characters, including letters, digits, underscores (_), and hyphens (-). + |
+
Status code: 202
+ +Parameter + |
+Type + |
+Description + |
+
---|---|---|
results + |
+Array of CreateJobResp objects + |
+The response body for creating tasks in batches. + |
+
count + |
+Integer + |
+Total number of records. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
id + |
+String + |
+Task ID. + |
+
child_ids + |
+Array of strings + |
+Subtask ID set. This parameter is returned when there are subtasks. + |
+
name + |
+String + |
+Task name. + |
+
status + |
+String + |
+Task status. + |
+
create_time + |
+String + |
+Creation time (timestamp). + |
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
error_msg + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
https://{Endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-creation+
{ + "jobs" : [ { + "name" : "DRS-9228", + "node_type" : "high", + "engine_type" : "mysql", + "net_type" : "eip", + "job_direction" : "up", + "db_use_type" : "migration", + "task_type" : "FULL_INCR_TRANS", + "customize_sutnet_id" : "352ad828-3467-4f03-987a-c55a5a9dd417", + "source_endpoint" : { + "db_type" : "mysql" + }, + "target_endpoint" : { + "region" : "eu-de", + "db_type" : "mysql", + "inst_id" : "e05a3679efe241d8b5dee80b17c1a863in01" + }, + "is_target_readonly" : false, + "bind_eip" : true + } ] +}+
https://{Endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-creation+
{ + "jobs" : [ { + "name" : "DRS-api-test", + "engine_type" : "cloudDataGuard-mysql", + "net_type" : "eip", + "node_type" : "high", + "job_direction" : "up", + "source_endpoint" : { + "db_type" : "mysql" + }, + "target_endpoint" : { + "region" : "eu-de", + "db_type" : "mysql", + "inst_id" : "e05a3679efe241d8b5dee80b17c1a863in01", + "project_id" : "054ba152d480d55b2f5dc0069e7ddef0" + }, + "is_target_readonly" : true, + "bind_eip" : true, + "db_use_type" : "cloudDataGuard", + "task_type" : "FULL_INCR_TRANS", + "customize_sutnet_id" : "352ad828-3467-4f03-987a-c55a5a9dd417", + "multi_write" : false + } ] +}+
https://{Endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-creation+
{ + "jobs" : [ { + "name" : "DRS-3371-linxiaolu", + "node_type" : "high", + "engine_type" : "mongodb", + "net_type" : "eip", + "job_direction" : "up", + "db_use_type" : "migration", + "task_type" : "FULL_INCR_TRANS", + "customize_sutnet_id" : "faf513f3-7a88-4a5c-bec7-238699c29c17", + "source_endpoint" : { + "db_type" : "mongodb" + }, + "target_endpoint" : { + "region" : "eu-de", + "db_type" : "mongodb", + "inst_id" : "3cadd5a0ef724f55ac7fa5bcb5f4fc5fin02" + }, + "bind_eip" : true + } ] +}+
https://192.107.54.184:10011/drs/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-creation+
{ + "jobs" : [ { + "name" : "DRS-linxiaolu-test3", + "engine_type" : "mysql", + "net_type" : "eip", + "node_type" : "high", + "job_direction" : "up", + "source_endpoint" : { + "db_type" : "mysql" + }, + "target_endpoint" : { + "region" : "eu-de", + "db_type" : "mysql", + "inst_id" : "64e8d7a31afa476ca85609a17af83765in01", + "project_id" : "054ba152d480d55b2f5dc0069e7ddef0" + }, + "bind_eip" : true, + "db_use_type" : "sync", + "task_type" : "FULL_INCR_TRANS", + "customize_sutnet_id" : "0cf77cfb-3785-4065-a9c4-74b7bb2df071", + "master_az" : "az2xahz", + "slave_az" : "az3xahz" + } ] +}+
Status code: 202
+Accepted
+{ + "results" : [ { + "id" : "e11eaf8f-71ef-4fad-8890-aed7572ajb11", + "name" : "DRS-9228", + "status" : "CREATING", + "create_time" : "1599188556112" + } ], + "count" : 1 +}+
Status Code + |
+Description + |
+
---|---|
202 + |
+Accepted + |
+
400 + |
+Bad Request + |
+
For details, see Error Code.
+This API is used to test the connections to the source and destination ends in batches.
+POST /v3/{project_id}/jobs/batch-connection
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID of a tenant in a region + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+The content type. +The default value is application/json. + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token obtained from IAM. + |
+
X-Language + |
+No + |
+String + |
+Request language type +Default value: en-us +Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
jobs + |
+Yes + |
+Array of TestEndPoint objects + |
+List of requests for testing connections in batches. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
id + |
+Yes + |
+String + |
+DRS task ID, which can be obtained from the task list or task details page. + |
+
net_type + |
+Yes + |
+String + |
+Network type. Value: +
|
+
db_type + |
+Yes + |
+String + |
+Database type. Value: +
|
+
ip + |
+Yes + |
+String + |
+Database IP address. + |
+
db_port + |
+No + |
+Integer + |
+Database port number. This parameter must be set to 0 for the Mongo and DDS databases. + |
+
inst_id + |
+No + |
+String + |
+DB instance ID. This parameter is mandatory when the database is a cloud instance, for example, an RDS or GaussDB(for MySQL) instance. + |
+
db_user + |
+Yes + |
+String + |
+Database account. + |
+
db_password + |
+Yes + |
+String + |
+Database password. + |
+
ssl_link + |
+No + |
+Boolean + |
+Whether SSL is enabled. If this parameter is set to true, you need to set parameters related to the SSL certificate. + |
+
ssl_cert_key + |
+No + |
+String + |
+SSL certificate content, which is a character string encrypted using BASE64 after the SSL certificate is obtained. This parameter is mandatory when ssl_link is set to true. + |
+
ssl_cert_name + |
+No + |
+String + |
+SSL certificate name. This parameter is mandatory when ssl_link is set to true. + |
+
ssl_cert_check_sum + |
+No + |
+String + |
+The checksum value of the SSL certificate content encrypted using SHA256 after the SSL certificate is obtained, which is used for backend verification. This parameter is mandatory when ssl_link is set to true. + |
+
ssl_cert_password + |
+No + |
+String + |
+The SSL certificate password. The certificate file name extension is .p12 and requires a password. + |
+
vpc_id + |
+No + |
+String + |
+ID of the VPC where the instance resides. This parameter is mandatory when the database is a cloud instance, for example, an RDS or GaussDB(for MySQL) instance. + |
+
subnet_id + |
+No + |
+String + |
+ID of the subnet where the instance resides. This parameter is mandatory when the database is a cloud instance, for example, an RDS or GaussDB(for MySQL) instance. + |
+
end_point_type + |
+Yes + |
+String + |
+Source database: so. Destination database: ta. +Default value: so +Values: +
|
+
region + |
+No + |
+String + |
+Region where the DB instance is located. This parameter is mandatory when the database is a cloud instance, for example, an RDS or GaussDB(for MySQL) instance. + |
+
project_id + |
+No + |
+String + |
+Project ID of the region where the user is located. + |
+
db_name + |
+No + |
+String + |
+Database user name, which is the DDS authentication database. + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
---|---|---|
results + |
+Array of CheckJobResp objects + |
+Response body set for the batch test connection. + |
+
count + |
+Integer + |
+Total number of records. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
id + |
+String + |
+Task ID. + |
+
status + |
+String + |
+Test result. Value: +
|
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
error_msg + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
success + |
+Boolean + |
+Whether the request is successful. + |
+
https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-connection+
{ + "jobs" : [ { + "id" : "140b5236-88ad-43c8-811c-1268453jb101", + "ip" : "192.168.4.66:8635,192.168.4.83:8635", + "net_type" : "eip", + "db_type" : "mongodb", + "db_port" : 0, + "db_user" : "root", + "db_password" : "********", + "inst_id" : "3cadd5a0ef724f55ac7fa5bcb5f4fc5fin02", + "project_id" : "0549a6a31000d4e82fd1c00c3d6f2d76", + "region" : "eu-de", + "end_point_type" : "ta" + } ] +}+
https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-connection+
{ + "jobs" : [ { + "id" : "140b5236-88ad-43c8-811c-1268453jb101", + "ip" : "192.168.0.131", + "net_type" : "eip", + "db_type" : "mysql", + "db_port" : 3306, + "db_user" : "root", + "db_password" : "********", + "inst_id" : "e05a3679efe241d8b5dee80b17c1a863in01", + "project_id" : "054ba152d480d55b2f5dc0069e7ddef0", + "region" : "eu-de", + "end_point_type" : "ta" + } ] +}+
https://{Endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-connection+
{ + "jobs" : [ { + "id" : "140b5236-88ad-43c8-811c-1268453jb101", + "ip" : "192.168.0.27", + "net_type" : "eip", + "db_type" : "mysql", + "db_port" : 3306, + "db_user" : "root", + "db_password" : "********", + "ssl_link" : false, + "end_point_type" : "so" + } ] +}+
Status code: 200
+OK
+{ + "results" : [ { + "success" : true, + "id" : "140b5236-88ad-43c8-811c-1268453jb101", + "status" : "success" + } ], + "count" : 1 +}+
Status Code + |
+Description + |
+
---|---|
200 + |
+OK + |
+
400 + |
+Bad Request + |
+
For details, see Error Code.
+After the task is created, you can test the connection only when the task status is CONFIGURATION.
+POST /v3/{project_id}/jobs/cluster/batch-connection
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID of a tenant in a region + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+The content type. +The default value is application/json. + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token obtained from IAM. + |
+
X-Language + |
+No + |
+String + |
+Request language type +Default value: en-us +Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
jobs + |
+Yes + |
+Array of BatchJobActionReq objects + |
+Requests for testing cluster connections in batches. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
action + |
+Yes + |
+String + |
+Specific operation to be performed. + |
+
job_id + |
+Yes + |
+String + |
+Task ID. (In cluster mode, the value is the ID of the parent task.). + |
+
property + |
+Yes + |
+String + |
+The parameter that corresponds to the operation. + |
+
Name + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
dbtype + |
+Yes + |
+String + |
+Database type. + |
+
dbport + |
+Yes + |
+Integer + |
+Database port. The value is 0 for the MongoDB engine. + |
+
ssllink + |
+Yes + |
+boolean + |
+Whether the connection is an SSL connection. Valid values: +
|
+
nettype + |
+Yes + |
+String + |
+Network type. Valid values: +
|
+
endpointtype + |
+Yes + |
+String + |
+Endpoint type. Valid values: +
|
+
ip + |
+Yes + |
+String + |
+Database IP address. + |
+
dbName + |
+Yes + |
+String + |
+Database name. + |
+
dbuser + |
+Yes + |
+String + |
+Database username. + |
+
dbpassword + |
+Yes + |
+String + |
+Database password. + |
+
sslcertkey + |
+No + |
+String + |
+Content of the SSL certificate. This parameter is required for SSL connection. + |
+
sslcertname + |
+No + |
+String + |
+Name of the SSL certificate. This parameter is required for SSL connection. + |
+
sslcertchecksum + |
+No + |
+String + |
+Checksum value of the SSL certificate content, which is required for SSL connections. + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
---|---|---|
results + |
+Array of CheckJobResp objects + |
+Response body set for the batch test connection. + |
+
count + |
+Integer + |
+Total number of records. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
id + |
+String + |
+Task ID. + |
+
status + |
+String + |
+Test result. Value: +
|
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
error_msg + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
success + |
+Boolean + |
+Whether the request is successful. + |
+
https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/cluster/batch-connection+
{ + "jobs" : [ { + "action" : "testConnection", + "job_id" : "35d0d60b-4605-4686-b35d-3a3d059fjb15", + "property" : "[{\"dbtype\":\"mongodb\",\"dbport\":0,\"ssllink\":false,\"nettype\":\"eip\",\"endpointtype\":\"so\",\"encrypt\":{\"elementId\":\"encrypt_switch\",\"offLabel\":\"OFF\",\"onLabel\":\"ON\",\"disable\":false,\"ip\":\"192.168.7.217:8635\",\"dbName\":\"admin\",\"dbuser\":\"rwuser\",\"dbpassword\":\"xxxx\"},{\"dbtype\":\"mongodb\",\"dbport\":0,\"ssllink\":false,\"nettype\":\"eip\",\"endpointtype\":\"so\",\"encrypt\":{\"elementId\":\"encrypt_switch\",\"offLabel\":\"OFF\",\"onLabel\":\"ON\",\"disable\":false,\"ip\":\"192.168.7.72:8635\",\"dbName\":\"admin\",\"dbuser\":\"rwuser\",\"dbpassword\":\"xxxx\"},{\"ip\":\"192.168.7.37:8635\",\"nettype\":\"eip\",\"dbtype\":\"mongodb\",\"dbport\":0,\"dbuser\":\"rwuser\",\"dbpassword\":\"xxxx\",\"ssllink\":false,\"sslcertkey\":\"\",\"sslcertname\":\"\",\"sslcertchecksum\":\"\",\"endpointtype\":\"ls\",\"dbName\":\"admin\"}]" + } ] +}+
Status code: 200
+OK
+{ + "results" : [ { + "id" : "0eb704d0-5a1c-4cbd-b675-91152f06jb11", + "status" : "true" + } ], + "count" : 1 +}+
Status Code + |
+Description + |
+
---|---|
200 + |
+OK + |
+
400 + |
+Bad Request + |
+
For details, see Error Code.
+This API is used to modify task names or descriptions in batches and set exception notification.
+PUT /v3/{project_id}/jobs/batch-modification
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID of a tenant in a region + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+The content type. +The default value is application/json. + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token obtained from IAM. + |
+
X-Language + |
+No + |
+String + |
+Request language type +Default value: en-us +Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
jobs + |
+Yes + |
+Array of ModifyJobReq objects + |
+Request body for modifying tasks. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
job_id + |
+Yes + |
+String + |
+Task ID. + |
+
description + |
+No + |
+String + |
+Task description. This parameter is mandatory when you modify the task description. +Minimum length: 0 character +Maximum length: 256 + |
+
name + |
+No + |
+String + |
+Task name. Set this parameter when you need to change the task name. + |
+
alarm_notify + |
+No + |
+AlarmNotifyInfo object + |
+Set exception notification. + |
+
task_type + |
+No + |
+String + |
+Task mode. Values: +
|
+
source_endpoint + |
+No + |
+Endpoint object + |
+Source database information. This parameter is mandatory for calling the API after the connection test. + |
+
target_endpoint + |
+No + |
+Endpoint object + |
+Destination database information. This parameter is mandatory for calling the API after the connection test. + |
+
node_type + |
+No + |
+String + |
+Node specification type. This parameter is mandatory when this API is invoked to modify a task after the connection test. +Default value: high +Values: +
|
+
engine_type + |
+No + |
+String + |
+Engine type of a DRS task. This parameter is mandatory when this API is invoked to modify a task after the connection test. +Values: +
|
+
net_type + |
+No + |
+String + |
+Network type. This parameter is mandatory after the connection test. Values: +
|
+
store_db_info + |
+No + |
+Boolean + |
+Whether to save the database information. This parameter is mandatory when the API is called after the connection test. + |
+
is_recreate + |
+No + |
+Boolean + |
+Whether the task is a rebuilding task. + |
+
job_direction + |
+No + |
+String + |
+Task direction. +Values: +
|
+
is_target_readonly + |
+No + |
+Boolean + |
+Whether the destination DB instance can be read-only. + |
+
replace_definer + |
+No + |
+Boolean + |
+Whether to migrate all Definers to the user. MySQL databases support this setting. This parameter is mandatory when this API is invoked to modify a task after the connection test. Values: +
|
+
tags + |
+No + |
+Array of ResourceTag object + |
+Specifies the tag information. + |
+
db_use_type + |
+No + |
+String + |
+Migration type. +Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
delay_time + |
+No + |
+Long + |
+Subscription delay, in seconds. +
|
+
rto_delay + |
+No + |
+Long + |
+Recovery Time Objective (RTO) delay, in seconds. +
|
+
rpo_delay + |
+No + |
+Long + |
+Recovery Point Objective (RPO) delay, in seconds. +
|
+
alarm_to_user + |
+No + |
+Boolean + |
+Whether to notify users of alarms. The default value is false. + |
+
subscriptions + |
+No + |
+Array of SubscriptionInfo objects + |
+Receiving method and message body. Up to two receiving modes and message bodies are supported. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
endpoints + |
+No + |
+Array of strings + |
+List of mobile numbers or email addresses. Use commas (,) to separate multiple mobile numbers or email addresses. Up to 10 mobile numbers or email addresses are supported. + |
+
protocol + |
+No + |
+String + |
+Receiving method. Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
db_type + |
+No + |
+String + |
+Database type. This parameter is mandatory when this API is invoked to modify a task after the connection test. Values: +
|
+
az_code + |
+No + |
+String + |
+Code of the AZ where the database is located. + |
+
region + |
+No + |
+String + |
+Region where the DB instance is located. This parameter is mandatory when the database is a cloud instance, for example, an RDS or GaussDB(for MySQL) instance. In DR scenarios, if job_direction is set to down, this parameter is mandatory in source_endpoint. If job_direction is set to up, this parameter is mandatory in target_endpoint. + |
+
inst_id + |
+No + |
+String + |
+ID of the DB instance. This parameter is mandatory when the database is a cloud instance, for example, an RDS or GaussDB(for MySQL) instance. In DR scenarios, if job_direction is set to down, this parameter is mandatory in source_endpoint. If job_direction is set to up, this parameter is mandatory in target_endpoint. + |
+
vpc_id + |
+No + |
+String + |
+ID of the VPC where the database is located. + |
+
subnet_id + |
+No + |
+String + |
+ID of the subnet where the database is located. + |
+
security_group_id + |
+No + |
+String + |
+ID of the security group to which the database belongs. + |
+
project_id + |
+No + |
+String + |
+The project ID of an RDS or GaussDB(for MySQL) instance. + |
+
db_password + |
+No + |
+String + |
+Database password. + |
+
db_port + |
+No + |
+Integer + |
+Database port. The value is an integer ranging from 1 to 65535. + |
+
db_user + |
+No + |
+String + |
+Database user. + |
+
inst_name + |
+No + |
+String + |
+The name of an RDS or GaussDB(for MySQL) instance. + |
+
ip + |
+No + |
+String + |
+Database IP address. + |
+
mongo_ha_mode + |
+No + |
+String + |
+Mongo HA mode. + |
+
ssl_cert_password + |
+No + |
+String + |
+SSL certificate password. The certificate file name extension is .p12. + |
+
ssl_cert_check_sum + |
+No + |
+String + |
+The checksum value of the SSL certificate, which is used for backend verification. This parameter is mandatory for secure connection to the source database. + |
+
ssl_cert_key + |
+No + |
+String + |
+SSL certificate content, which is encrypted using Base64. + |
+
ssl_cert_name + |
+No + |
+String + |
+SSL certificate name. + |
+
ssl_link + |
+No + |
+Boolean + |
+Whether SSL is enabled. + |
+
cluster_mode + |
+No + |
+String + |
+For MongoDB 4.0 or later, if the cluster instance cannot obtain the IP address of the sharded node, set cluster_mode in source_endpoint to Sharding4.0+. +Default value: Sharding4.0+ +Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
key + |
+No + |
+String + |
+Tag key. The value can contain a maximum of 36 characters, including letters, digits, underscores (_), and hyphens (-). Set this parameter when you need to modify a tag. + |
+
value + |
+No + |
+String + |
+Tag value. The value can contain a maximum of 43 characters, including letters, digits, underscores (_), and hyphens (-). Set this parameter when you need to modify a tag. + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
---|---|---|
count + |
+Integer + |
+Total number. + |
+
results + |
+Array of ModifyJobResp objects + |
+List of tasks that are modified in batches. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
id + |
+String + |
+Task ID. + |
+
status + |
+String + |
+Status Values: +
|
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
error_msg + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-modification+
{ + "jobs" : [ { + "job_id" : "140b5236-88ad-43c8-811c-1268453jb101", + "name" : "testName" + } ] +}+
https://{Endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-modification+
{ + "jobs" : [ { + "job_id" : "8d0e8e36-a618-490d-8a46-8c61ac9jb502", + "alarm_notify" : { + "delay_time" : 0, + "rto_delay" : 0, + "rpo_delay" : 0, + "alarm_to_user" : false, + "subscriptions" : [ { + "protocol" : "sms", + "endpoints" : [ "150xxxxxxxx" ] + }, { + "protocol" : "email", + "endpoints" : [ "abc@xxx.com" ] + } ] + } + } ] +}+
https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-modification+
{ + "jobs" : [ { + "job_id" : "140b5236-88ad-43c8-811c-1268453jb101", + "name" : "testName", + "description" : "test description" + } ] +}+
https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-modification+
{ + "jobs": [{ + "job_id": "1fded2ab-ce99-4b0e-9cc9-9ce7e17jb101", + "name": "DRS-5646-linxiaolu", + "source_endpoint": { + "region": "eu-de", + "ip": "192.168.0.27", + "db_port": "3306", + "db_user": "root", + "db_password": "********", + "ssl_link": false, + "db_type": "mysql", + "project_id": "054ba152d480d55b2f5dc0069e7ddef0" + }, + "target_endpoint": { + "region": "eu-de", + "db_type": "mysql", + "db_user": "root", + "db_password": "********", + "project_id": "054ba152d480d55b2f5dc0069e7ddef0", + "inst_id": "3def1ac7f8ab4ae48d7c025339f80414in01" + }, + "node_type": "high", + "engine_type": "mysql", + "store_db_info": true, + "net_type": "eip", + "replace_definer": true + }] +}+
https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-modification+
{ + "jobs": [{ + "job_id": "741d91cf-67e8-4126-ad0f-32f6cccjb105", + "name": "DRS-4513", + "source_endpoint": { + "region": "eu-de", + "ip": "192.168.11.231:8635,192.168.10.12:8635", + "db_port": 0, + "db_user": "rwuser", + "db_password": "********", + "ssl_link": false, + "db_type": "mongodb", + "project_id": "0549a6a31000d4e82fd1c00c3d6f2d76", + "db_name": "admin" + }, + "target_endpoint": { + "region": "eu-de", + "db_type": "mongodb", + "db_user": "rwuser", + "db_password": "********", + "project_id": "0549a6a31000d4e82fd1c00c3d6f2d76", + "inst_id": "3cadd5a0ef724f55ac7fa5bcb5f4fc5fin02" + }, + "node_type": "high", + "engine_type": "mongodb", + "net_type": "eip", + "store_db_info": true + + }] +}+
Status code: 200
+OK
+{ + "results" : [ { + "id" : "efa2bd29-8780-494f-a2ee-188b003ejb11", + "status" : "success" + } ], + "count" : 1 +}+
Status Code + |
+Description + |
+
---|---|
200 + |
+OK + |
+
400 + |
+Bad Request + |
+
For details, see Error Code.
+This API is used to select the databases or tables to be migrated.
+PUT /v3/{project_id}/jobs/batch-select-objects
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID of a tenant in a region + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+The content type. +The default value is application/json. + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token obtained from IAM. + |
+
X-Language + |
+No + |
+String + |
+Request language type +Default value: en-us +Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
jobs + |
+Yes + |
+Array of UpdateDatabaseObjectReq objects + |
+Request task ID list for updating database objects in batches. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
job_id + |
+Yes + |
+String + |
+Task ID. + |
+
selected + |
+No + |
+Boolean + |
+Whether to select an object. If this parameter is not set, the default value is No. +Yes: Customize the objects to be migrated. +No: Migrate all VMs. + |
+
sync_database + |
+No + |
+Boolean + |
+Whether to perform database-level synchronization. + |
+
job + |
+No + |
+Array of DatabaseInfo objects + |
+Data object selection information. This parameter is mandatory when selected is set to true. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
id + |
+No + |
+String + |
+When object_type is set to database, this parameter indicates the database name. If object_type is set to table or view, set the field value by referring to the example. + |
+
parent_id + |
+No + |
+String + |
+Database name. This parameter is mandatory when object_type is set to table or view. + |
+
object_type + |
+No + |
+String + |
+Type. Values: +
|
+
object_name + |
+No + |
+String + |
+Database object name, database name, table name, and view name. + |
+
select + |
+No + |
+String + |
+Whether to migrate the database objects. true indicates that the database objects will be migrated. false indicates that the database objects will not be migrated. partial indicates some tables in the database will be migrated. If this parameter is not specified, the default value is false. + |
+
object_alias_name + |
+No + |
+String + |
+Alias, which is the new mapped name. + |
+
Status code: 202
+ +Parameter + |
+Type + |
+Description + |
+
---|---|---|
all_counts + |
+Long + |
+Total number. + |
+
results + |
+Array of DatabaseObjectResp objects + |
+Response list for selecting objects in batches. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
job_id + |
+String + |
+Task ID. + |
+
status + |
+Boolean + |
+The status that indicates that objects are selected. + |
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
error_msg + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-select-objects+
{ + "jobs" : [ { + "job" : [ { + "id" : "fastunit", + "parent_id" : null, + "object_name" : "fastunit", + "object_type" : "database", + "select" : "partial", + "object_alias_name" : null + }, { + "id" : "fastunit-*-*-coll", + "parent_id" : "fastunit", + "object_name" : "coll", + "object_type" : "table", + "select" : "true", + "object_alias_name" : null + }, { + "id" : "ycy1", + "parent_id" : null, + "object_name" : "ycy1", + "object_type" : "database", + "select" : "partial", + "object_alias_name" : null + }, { + "id" : "ycy1-*-*-coll", + "parent_id" : "ycy1", + "object_name" : "coll", + "object_type" : "table", + "select" : "true", + "object_alias_name" : null + }, { + "id" : "ycy1-*-*-collcount", + "parent_id" : "ycy1", + "object_name" : "collcount", + "object_type" : "table", + "select" : "true", + "object_alias_name" : null + } ], + "job_id" : "57fd2692-0ebe-4714-9b59-fe7aa65djb15", + "selected" : true + } ] +}+
https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-select-objects+
{ + "jobs" : [ { + "job" : [ ], + "job_id" : "e59f5eef-2bcc-4461-b9ac-10aded44jb15", + "selected" : false + } ] +}+
Status code: 202
+Accepted
+{ + "all_counts": 1, + "results": [{ + "job_id": "4d700f6f-9a17-47e0-a7d6-1bc2155jb101", + "status": true + }] +}+
Status Code + |
+Description + |
+
---|---|
202 + |
+Accepted + |
+
400 + |
+Bad Request + |
+
For details, see Error Code.
+This API is used to perform batch pre-check to check whether the migration, synchronization, DR can be performed.
+POST /v3/{project_id}/jobs/batch-precheck
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID of a tenant in a region + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+The content type. +The default value is application/json. + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token obtained from IAM. + |
+
X-Language + |
+No + |
+String + |
+Request language type +Default value: en-us +Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
jobs + |
+Yes + |
+Array of PreCheckInfo objects + |
+The list of batch pre-check requests. + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
---|---|---|
results + |
+Array of PostPreCheckResp objects + |
+Pre-check response body. + |
+
count + |
+Integer + |
+Total number. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
id + |
+String + |
+Task ID. + |
+
precheck_id + |
+String + |
+Pre-check ID. + |
+
status + |
+String + |
+Success or failure status. Values: +
|
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
error_msg + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
Example of MySQL pre-check for real-time migration:
+https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-precheck+
{ + "jobs" : [ { + "job_id" : "140b5236-88ad-43c8-811c-1268453jb101", + "precheck_mode" : "forStartJob" + } ] +}+
Status code: 200
+OK
+{ + "results" : [ { + "id" : "140b5236-88ad-43c8-811c-1268453jb101", + "status" : "success", + "precheck_id" : "140b5236-88ad-43c8-811c-1268453jb101" + } ], + "count" : 1 +}+
Status Code + |
+Description + |
+
---|---|
200 + |
+OK + |
+
400 + |
+Bad Request + |
+
For details, see Error Code.
+This API is used to query the pre-check results of tasks in batches.
+POST /v3/{project_id}/jobs/batch-precheck-result
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID of a tenant in a region + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+The content type. +The default value is application/json. + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token obtained from IAM. + |
+
X-Language + |
+No + |
+String + |
+Request language type +Default value: en-us +Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
jobs + |
+Yes + |
+Array of strings + |
+Request for querying pre-check results in batches. The value cannot be empty. The values must comply with the UUID rule. The task ID must be unique. + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
---|---|---|
results + |
+Array of QueryPreCheckResp objects + |
+Response body set for querying pre-check results in batches. + |
+
count + |
+Integer + |
+Total number of records. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
precheck_id + |
+String + |
+ID of the task for querying the pre-check result. + |
+
result + |
+Boolean + |
+Whether the pre-check items are passed. true: indicates that the pre-check is passed. The task can be started only after the pre-check is passed. + |
+
process + |
+String + |
+Pre-check progress, in percentage. + |
+
total_passed_rate + |
+String + |
+Percentage of passed pre-checks. + |
+
rds_instance_id + |
+String + |
+RDS DB instance ID. + |
+
job_direction + |
+String + |
+Task direction. Values: +
|
+
precheck_result + |
+Array of PrecheckResult object + |
+Pre-check results. + |
+
error_msg + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
item + |
+String + |
+Check item. + |
+
result + |
+String + |
+Check results. Values: +
|
+
failed_reason + |
+String + |
+Failure cause. + |
+
data + |
+String + |
+Encrypted data. + |
+
raw_error_msg + |
+String + |
+Row error message. + |
+
group + |
+String + |
+Check item group. + |
+
failed_sub_jobs + |
+Array of PrecheckFailSubJobVO objects + |
+Information about failed subtasks. + |
+
https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-precheck-result+
{ + "jobs" : [ "a281f62f-4631-45d6-a2d3-679a9f4jb105" ] +}+
https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-precheck-result+
{ + "jobs" : [ "140b5236-88ad-43c8-811c-1268453jb101" ] +}+
Status code: 200
+OK
+{ + "count" : 1, + "results" : [ { + "result" : true, + "process" : "100%", + "precheck_id" : "140b5236-88ad-43c8-811c-1268453jb101", + "total_passed_rate" : "100%", + "rds_instance_id" : "e05a3679efe241d8b5dee80b17c1a863in01", + "job_direction" : "up", + "precheck_result" : [ { + "item" : "dstDbDiskSize", + "result" : "PASSED", + "data" : "{\"diskSizeTimes\":\"1.5\",\"dstVolumeSize\":\"37660000000\",\"srcIndexSize\":0,\"size\":\"0\",\"srcIndexAmount\":0}", + "group" : "db_disk_size" + }, { + "item" : "checkIncreSrcDbExistedInDstDb", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "dbCharacterSetConsistency", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "dbClockConsistency", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "dbCollationServerConsistency", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "dbIsolationLevelConsistency", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "dbParamConsistency", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "dbServerUuidConsistency", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "dstMaxAllowedPacketCheck", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "hasForeignKeyOnUnselectedTable", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "innodbStrictModeConsistency", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "isUserRequireSslLink", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "sqlModeConsistency", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "sqlModeNoEngine", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "srcBinlogFormatCheck", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "srcBinlogRowImageCheck", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "srcDbBinlogExpireLogsDays", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "srcDbBinlogIsOff", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "srcDbExistUnsupportEngineTable", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "srcDbIndexKeyLength", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "srcDbNameContainsUnsupportedSymbols", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "srcDbServerIdCheck", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "srcDstTableNameCaseSensitiveCheck", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "srcHasNoPkTableWhenTgtHasInvisiblePk", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "srcRoutinesWithoutPrivilegeCheck", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "srcTableNameContainsNonAscii", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "srcTriggerAndEventCheck", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "srcViewNameContainsNonAscii", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "srclogSlaveUpdatesCheck", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "userRequirementIsEnoughForDefiner", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "userSelectObjectsCheck", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "dstStatusCheck", + "result" : "PASSED", + "data" : "", + "group" : "db_target_status", + "failed_reason" : "" + }, { + "item" : "dstDbPrivilegesIsEnough", + "result" : "PASSED", + "group" : "db_user_privilege" + }, { + "item" : "srcDbPrivilegesIsEnoughForIncre", + "result" : "PASSED", + "group" : "db_user_privilege" + }, { + "item" : "dbVersionMeetRequirement", + "result" : "PASSED", + "group" : "db_version" + }, { + "item" : "dstDbVersionSupport", + "result" : "PASSED", + "group" : "db_version" + }, { + "item" : "srcDbVersionSupport", + "result" : "PASSED", + "group" : "db_version" + }, { + "item" : "dstDbConnection", + "result" : "PASSED", + "group" : "network" + }, { + "item" : "srcDbConnection", + "result" : "PASSED", + "group" : "network" + } ] + } ] +}+
{ + "count" : 1, + "results" : [ { + "result" : true, + "process" : "100%", + "precheck_id" : "a281f62f-4631-45d6-a2d3-679a9f4jb105", + "total_passed_rate" : "100%", + "rds_instance_id" : "3cadd5a0ef724f55ac7fa5bcb5f4fc5fin02", + "job_direction" : "up", + "precheck_result" : [ { + "item" : "dstDbDiskSize", + "result" : "PASSED", + "data" : "{'size': '5263360', 'dstVolumeSize':'19089431762', 'diskSizeTimes':'1.5'}", + "group" : "db_disk_size" + }, { + "item" : "srcAndDstCappedCollConsistency", + "result" : "PASSED", + "group" : "db_object_conflict_check" + }, { + "item" : "srcCollAlreadyExistedInDstColl", + "result" : "PASSED", + "group" : "db_object_conflict_check" + }, { + "item" : "srcViewAlreadyExistedInDstView", + "result" : "PASSED", + "group" : "db_object_conflict_check" + }, { + "item" : "rolesDependentCheck", + "result" : "PASSED", + "group" : "db_object_dependency_check" + }, { + "item" : "usersDependentCheck", + "result" : "PASSED", + "group" : "db_object_dependency_check" + }, { + "item" : "srcCollHasTtlIndex", + "result" : "ALARM", + "data" : "{\"srcHasTtlIndexColls\":\"fastunit.ttlsuoyin\"}", + "group" : "db_params", + "failed_reason" : "SRC_HAS_TTL_INDEXES" + }, { + "item" : "dbSslConsistency", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "dstChunkNumCheck", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "mongoTypeFitTransferMode", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "srcCollIndexNumCheck", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "srcCollNameContainsUnsupportedSymbols", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "srcDbInstanceIsEmpty", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "srcDbNameContainsUnsupportedSymbols", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "srcIdIndexCheck", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "userSelectObjectsCheck", + "result" : "PASSED", + "group" : "db_params" + }, { + "item" : "dstStatusCheck", + "result" : "PASSED", + "data" : "", + "group" : "db_target_status", + "failed_reason" : "" + }, { + "item" : "dstDbPrivilegesIsEnough", + "result" : "PASSED", + "group" : "db_user_privilege" + }, { + "item" : "srcDbPrivilegesIsEnough", + "result" : "PASSED", + "group" : "db_user_privilege" + }, { + "item" : "dbVersionMeetRequirement", + "result" : "PASSED", + "group" : "db_version" + }, { + "item" : "dstDbVersionSupport", + "result" : "PASSED", + "group" : "db_version" + }, { + "item" : "srcDbVersionSupport", + "result" : "PASSED", + "group" : "db_version" + }, { + "item" : "dstDbConnection", + "result" : "PASSED", + "group" : "network" + }, { + "item" : "srcDbConnection", + "result" : "PASSED", + "group" : "network" + }, { + "item" : "srcShardKeyConfiguration", + "result" : "ALARM", + "data" : "{\"notConfigShardIndexColls\":\"ycsb.usertable,mgo.mycollection7,mgo.mycollection9,mgo.mycollection5,mgo.mycollection4,mgo.mycollection3,mgo.mycollection,mgo.mycollection8,mgo.mycollection2,mgo.mycollection6,testdb3.testuk,testdb3.coll2,testdb3.coll6,testdb3.coll1,testdb3.Coll1,testdb3.testuk2,testdb3.coll5,testdb3.coll4,testdb1.coll6,testdb1.coll1,testdb1.testuk2,testdb1.coll2,testdb1.testuk,testdb1.coll5,testdb1.coll4,testdb1.Coll1,Testdb5.coll1,Testdb5.collx,Testdb5.Coll1,fastunit.gudingjihe,fastunit.geohaystack,fastunit.coll,fastunit.weiyisuoyin,fastunit.testSpecial\\\\u4E2D\\\\u6587~!@#%^&*()_+=-[]{};:?,`,fastunit.log,fastunit.twoD,fastunit.lianhesuoyin,fastunit.xishusuoyin,fastunit.quanwensuoyin,fastunit.ttlsuoyin,fastunit.putongsuoyin,fastunit.collcount,fastunit.shuzusuoyin,fastunit.twodsphere,fastunit.qiantaowendangsuoyin,fastunit.indexpartial\"}", + "group" : "src_info_check", + "failed_reason" : "SRC_INSTANCE_TYPE_IS_REPLICA_SET" + }, { + "item" : "checkBalanceStatus", + "result" : "PASSED", + "group" : "src_info_check" + }, { + "item" : "srcMongoInstanceType", + "result" : "PASSED", + "group" : "src_info_check" + } ] + } ] +}+
Status Code + |
+Description + |
+
---|---|
200 + |
+OK + |
+
400 + |
+Bad Request + |
+
For details, see Error Code.
+This API is used to start real-time migration, synchronization, and disaster recovery tasks in batches.
+POST /v3/{project_id}/jobs/batch-starting
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID of a tenant in a region + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+The content type. +The default value is application/json. + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token obtained from IAM. + |
+
X-Language + |
+No + |
+String + |
+Request language type +Default value: en-us +Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
jobs + |
+Yes + |
+Array of StartInfo objects + |
+Request list for starting tasks in batches. + |
+
Status code: 202
+ +Parameter + |
+Type + |
+Description + |
+
---|---|---|
results + |
+Array of StartJobResp objects + |
+List of real-time disaster recovery tasks that are started in batches. + |
+
count + |
+Integer + |
+Total number. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
id + |
+String + |
+Task ID. + |
+
status + |
+String + |
+Status Values: +
|
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
error_msg + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
Example of starting real-time DR tasks in batches:
+https://{Endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-starting+
{ + "jobs" : [ { + "job_id" : "140b5236-88ad-43c8-811c-1268453jb101" + } ] +}+
Status code: 202
+Accepted
+{ + "count" : 1, + "results" : [ { + "id" : "140b5236-88ad-43c8-811c-1268453jb101", + "status" : "success" + } ] +}+
Status Code + |
+Description + |
+
---|---|
202 + |
+Accepted + |
+
400 + |
+Bad Request + |
+
For details, see Error Code.
+This API is used to stop tasks in batches or delete real-time migration, real-time synchronization, and real-time DR tasks.
+DELETE /v3/{project_id}/jobs/batch-jobs
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID of a tenant in a region + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+The content type. +The default value is application/json. + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token obtained from IAM. + |
+
X-Language + |
+No + |
+String + |
+Request language type +Default value: en-us +Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
jobs + |
+Yes + |
+Array of DeleteJobReq objects + |
+List of requests for stopping or deleting tasks in batches. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
delete_type + |
+Yes + |
+String + |
+The value can be terminate, force_terminate, or delete. terminate indicates that the migration task is stopped, force_terminate indicates that the migration task is forcibly stopped, and delete indicates that the migration task is deleted. +Values: +
|
+
job_id + |
+Yes + |
+String + |
+Task ID. + |
+
Status code: 202
+ +Parameter + |
+Type + |
+Description + |
+
---|---|---|
results + |
+Array of DeleteJobResp objects + |
+Response body set for stopping or deleting tasks in batches. + |
+
count + |
+Integer + |
+Total number. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
id + |
+String + |
+Task ID. + |
+
status + |
+String + |
+Status Values: +
|
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
error_msg + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-jobs+
{ + "jobs" : [ { + "delete_type" : "terminate", + "job_id" : "4c6ac8c0-2f51-426a-97b2-cb2c668jb201" + }, { + "delete_type" : "terminate", + "job_id" : "6211d20d-0006-41da-836e-db3301ajb20b" + } ] +}+
https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-jobs+
{ + "jobs" : [ { + "delete_type" : "delete", + "job_id" : "140b5236-88ad-43c8-811c-1268453jb101" + } ] +}+
Status code: 202
+Accepted
+{ + "count" : 2, + "results" : [ { + "id" : "4c6ac8c0-2f51-426a-97b2-cb2c668jb201", + "status" : "success" + }, { + "id" : "6211d20d-0006-41da-836e-db3301ajb20b", + "status" : "failed", + "error_code" : "DRS.M01504", + "error_msg" : "Another operation is being performed on the migration task or the migration task is abnormal. Try again later." + } ] +}+
{ + "count" : 1, + "results" : [ { + "id" : "140b5236-88ad-43c8-811c-1268453jb101", + "status" : "success" + } ] +}+
Status Code + |
+Description + |
+
---|---|
202 + |
+Accepted + |
+
400 + |
+Bad Request + |
+
For details, see Error Code.
+This API is used to query the full progress and incremental delay information in batches based on the task ID.
+POST /v3/{project_id}/jobs/batch-progress
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID of a tenant in a region + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+The content type. +The default value is application/json. + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token obtained from IAM. + |
+
X-Language + |
+No + |
+String + |
+Request language type +Default value: en-us +Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
jobs + |
+Yes + |
+Array of strings + |
+Request for querying task progress in batches. + |
+
Status code: 202
+ +Parameter + |
+Type + |
+Description + |
+
---|---|---|
count + |
+Integer + |
+Total number. + |
+
results + |
+Array of QueryProgressResp objects + |
+Response body for querying the migration progress in batches. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
job_id + |
+String + |
+Task ID. + |
+
progress + |
+String + |
+Migration percentage. + |
+
incre_trans_delay + |
+String + |
+Incremental migration delay. + |
+
task_mode + |
+String + |
+Task mode. Values: +
|
+
transfer_status + |
+String + |
+Task status. + |
+
process_time + |
+String + |
+Migration time in timestamp format. + |
+
remaining_time + |
+String + |
+Estimated remaining time. + |
+
progress_map + |
+Array of ProgressInfo objects + |
+Data, structure, and index migration progress information body. + |
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
error_msg + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
Example of querying the DR progress:
+https://{EndPoint}/drs/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-progress+
{ + "jobs" : [ "8d0e8e36-a618-490d-8a46-8c61ac9jb502" ] +}+
Status code: 202
+OK
+{ + "count" : 1, + "results" : [ { + "progress" : "100", + "job_id" : "8d0e8e36-a618-490d-8a46-8c61ac9jb502", + "incre_trans_delay" : "0", + "task_mode" : "FULL_INCR_TRANS", + "transfer_status" : "INCRE_TRANSFER_STARTED", + "process_time" : "1608274919000", + "remaining_time" : "0" + } ] +}+
{ + "count" : 2, + "results" : [ { + "progress" : "100", + "job_id" : "edae91cb-5892-49b6-a529-4921fb26jb21", + "incre_trans_delay" : "0", + "task_mode" : "FULL_INCR_TRANS", + "transfer_status" : "INCRE_TRANSFER_STARTED", + "process_time" : "1594864576000", + "remaining_time" : "10" + }, { + "progress" : "0", + "job_id" : "f95c5d83-d0c9-42bd-b295-38c31cd1jb15", + "incre_trans_delay" : "-1", + "task_mode" : "FULL_INCR_TRANS", + "transfer_status" : "FULL_TRANSFER_COMPLETE", + "process_time" : "0", + "remaining_time" : "0", + "progress_map" : { + "struct" : { + "completed" : "94%", + "remaining_time" : null + }, + "data" : { + "completed" : "100%", + "remaining_time" : null + }, + "index" : { + "completed" : "100%", + "remaining_time" : null + } + } + } ] +}+
Status Code + |
+Description + |
+
---|---|
202 + |
+Accepted + |
+
400 + |
+Bad Request + |
+
For details, see Error Code.
+This section describes how to query the status of all tasks of a tenant by calling the API described in Querying Task Statuses in Batches.
+POST: https://{endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-status
+Obtain the endpoint from Regions and Endpoints.
+{ + "jobs": ["9a470239-2308-4bb5-a6bc-1040402fjb21", "dc67695a-ee3e-49b8-a022-a099bd81jb21"], + "pageReq": { + "cur_page": 1, + "per_page": 10 + } +}+
{ + "results": [{ + "id": "9a470239-2308-4bb5-a6bc-1040402fjb21", + "status": "INCRE_TRANSFER_STARTED" + }, { + "id": "dc67695a-ee3e-49b8-a022-a099bd81jb21", + "status": "INCRE_TRANSFER_FAILED" + }], + "count": 2 +}+
This section describes how to query task details of a tenant by calling the API described in Querying Task Details in Batches.
+POST: https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-detail
+Obtain the endpoint from Regions and Endpoints.
+{ + "jobs": ["24834eb6-be30-464e-a299-f7aa730jb101", "140b5236-88ad-43c8-811c-1268453jb101"], + "page_req": { + "cur_page": 1, + "per_page": 10 + } +}+
{ + "count": 2, + "results": [{ + "id": "24834eb6-be30-464e-a299-f7aa730jb101", + "name": "DRS-3999-lws", + "status": "STARTJOBING", + "description": "", + "create_time": "1608519469412", + "task_type": "FULL_INCR_TRANS", + "source_endpoint": { + "ip": "172.22.74.56", + "region": "eu-de", + "db_type": "mysql", + "db_port": 3306, + "ssl_link": false, + "project_id": "054ba152d480d55b2f5dc0069e7ddef0", + "db_user": "root" + }, + "target_endpoint": { + "ip": "172.21.176.219", + "region": "eu-de", + "db_type": "mysql", + "db_port": 3306, + "ssl_link": false, + "inst_id": "3ef57dbcc8db478a9e346d26ef2575bfin01", + "project_id": "054ba152d480d55b2f5dc0069e7ddef0", + "inst_name": "rds-lws-target", + "db_user": "root", + "vpc_id": "0ff8df7b-f0e9-4b16-ac16-1db3dacb69e4", + "subnet_id": "f857d371-2f03-4622-85f6-2b7d42d0d82c" + }, + "inst_info": { + "ip": "172.16.213.101", + "inst_type": "high", + "engine_type": "mysql", + "volume_size": 100, + "public_ip": "10.154.219.202", + "start_time": "0" + }, + "actual_start_time": "1608520069393", + "update_time": "1608520068979", + "job_direction": "up", + "db_use_type": "migration", + "need_restart": false, + "is_target_readonly": true, + "speed_limit": [], + "schema_type": "Tungsten", + "object_switch": true, + "replace_definer": true, + "migrate_user": false, + "az_code": "az2xahz", + "vpc_id": "0ff8df7b-f0e9-4b16-ac16-1db3dacb69e4", + "subnet_id": "f857d371-2f03-4622-85f6-2b7d42d0d82c", + "security_group_id": "d90c971b-4b9d-402c-9c59-5c239389b8dd", + "issue_coupon": false, + "support_ip_v6": false + }, { + "id": "140b5236-88ad-43c8-811c-1268453jb101", + "name": "DRS-0042-linxiaolu", + "status": "CONFIGURATION", + "description": "", + "create_time": "1608366204171", + "task_type": "FULL_INCR_TRANS", + "source_endpoint": { + "ip": "192.168.0.27", + "region": "eu-de", + "db_type": "mysql", + "db_port": 3306, + "ssl_link": false, + "project_id": "054ba152d480d55b2f5dc0069e7ddef0", + "db_user": "root" + }, + "target_endpoint": { + "ip": "192.168.0.131", + "region": "eu-de", + "db_type": "mysql", + "db_port": 3306, + "ssl_link": false, + "inst_id": "e05a3679efe241d8b5dee80b17c1a863in01", + "project_id": "054ba152d480d55b2f5dc0069e7ddef0", + "inst_name": "rds-1417-lxl", + "db_user": "root", + "vpc_id": "65f0391c-0582-44a6-aa50-248f97ed82e1", + "subnet_id": "352ad828-3467-4f03-987a-c55a5a9dd417" + }, + "inst_info": { + "ip": "192.168.0.229", + "status": "ACTIVE", + "inst_type": "high", + "engine_type": "mysql", + "volume_size": 100, + "public_ip": "10.154.219.72", + "start_time": "0" + }, + "actual_start_time": "1608369232412", + "full_transfer_complete_time": "1608369510202", + "update_time": "1608517066434", + "job_direction": "up", + "db_use_type": "migration", + "need_restart": false, + "is_target_readonly": true, + "speed_limit": [], + "schema_type": "Tungsten", + "object_switch": false, + "replace_definer": true, + "migrate_user": false, + "az_code": "az2xahz", + "vpc_id": "65f0391c-0582-44a6-aa50-248f97ed82e1", + "subnet_id": "352ad828-3467-4f03-987a-c55a5a9dd417", + "security_group_id": "d90c971b-4b9d-402c-9c59-5c239389b8dd", + "issue_coupon": false, + "support_ip_v6": false + }] +}+
This section describes how to start multiple configuration tasks by calling an API.
+POST: https://{endpoint}/ /v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-starting
+Obtain the endpoint from Regions and Endpoints.
+{ + "jobs": [{ + "job_id": "140b5236-88ad-43c8-811c-1268453jb101" + }] +}+
{ + "count": 1, + "results": [{ + "id": "140b5236-88ad-43c8-811c-1268453jb101", + "status": "success" + }] +}+
This section describes how to create a real-time migration task by calling an API.
+{ + "bind_eip": true,//Check whether an EIP has been bound to the replication instance in the public network scenario. + "db_use_type": "migration",//The usage type. The value can be migration (real-time migration), sync (real-time synchronization), or cloudDataGuard (real-time DR). This parameter is mandatory. + ""description": "",//Task description + "engine_type": "mysql",//The engine type. The value can be mysql, mongodb, or cloudDataGuard-mysql. + "is_target_readonly": true,//Specifies whether the destination instance is readable only. + "job_direction": "up",//Task direction. The value can be up or down. + "name": "DRS-2057",//Task name. This parameter is mandatory. + "net_type": "eip",// Network type. This parameter is mandatory and the value can be vpn, vpc, or eip. + "node_type": "high",//Specification type. This parameter is mandatory. + "source_Endpoint": {//Information body of the source database. This parameter is mandatory. + "db_type": "mysql",//The database type. The value can be mysql, mongodb, or gaussdbv5. This parameter is mandatory. + }, + "target_Endpoint": {//Information body of the destination database + "db_type": "mysql",//Database type. This parameter is mandatory. + "inst_id": "63e0699063494a8a93798f38abf3247ein01",// RDS instance ID. This parameter is mandatory when the database is an RDS DB instance. + "region": "eu-de" // The region where the RDS DB instance is located. This parameter is mandatory when the database is an RDS DB instance. + }, + "task_type": "FULL_INCR_TRANS" //Task mode. The value can be FULL_TRANS or FULL_INCR_TRANS. +}+
If the request fails, an error code and error information are returned. For details, see section Error Code.
+This API is used to enable or disable flow control for tasks. By default, the migration speed is not limited after a task is created.
+PUT /v3/{project_id}/jobs/batch-limit-speed
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID of a tenant in a region + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+The content type. +The default value is application/json. + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token obtained from IAM. + |
+
X-Language + |
+No + |
+String + |
+Request language type +Default value: en-us +Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
speed_limits + |
+Yes + |
+Array of LimitSpeedReq objects + |
+Speed limit in DR. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
job_id + |
+Yes + |
+String + |
+Task ID. + |
+
speed_limit + |
+Yes + |
+Array of SpeedLimitInfo objects + |
+Request body of flow control information. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
begin + |
+Yes + |
+String + |
+Start time (UTC) of flow control. The start time is an integer in hh:mm format and the minutes part is ignored. hh indicates the hour, for example, 01:00. + |
+
end + |
+Yes + |
+String + |
+End time (UTC) in the format of hh:mm, for example, 15:59. The value must end with 59. + |
+
speed + |
+Yes + |
+String + |
+Speed. The value ranges from 1 to 9,999, in MB/s. + |
+
is_utc + |
+No + |
+Boolean + |
+Whether the UTC time is used. + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
---|---|---|
count + |
+Integer + |
+Total number. + |
+
results + |
+Array of ModifyJobResp objects + |
+List of tasks that are modified in batches. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
id + |
+String + |
+Task ID. + |
+
status + |
+String + |
+Status Values: +
|
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
error_msg + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
Example of setting flow control for DR tasks in batches:
+https://{Endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-limit-speed+
{ + "speed_limits" : [ { + "job_id" : "7d0504f1-aba3-435f-914f-936b861jb502", + "speed_limit" : [ { + "begin" : "16:00", + "end" : "15:59", + "speed" : "15" + } ] + } ] +}+
Status code: 200
+OK
+{ + "results" : [ { + "id" : "efa2bd29-8780-494f-a2ee-188b003ejb11", + "status" : "success" + } ], + "count" : 1 +}+
Status Code + |
+Description + |
+
---|---|
200 + |
+OK + |
+
400 + |
+Bad Request + |
+
For details, see Error Code.
+This API is to modify database parameters.
+You need to call the API for obtaining database parameters for MySQL migration and MySQL DR tasks. This API can be called only when job_direction is set to up and the task status is CONFIGURATION. In dual-active DR mode, the parent task does not support this operation.
+POST /v3/{project_id}/jobs/{job_id}/params
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
job_id + |
+Yes + |
+String + |
+Task ID. + |
+
project_id + |
+Yes + |
+String + |
+Project ID of a tenant in a region + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+The content type. +The default value is application/json. + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token obtained from IAM. + |
+
X-Language + |
+No + |
+String + |
+Request language type +Default value: en-us +Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
group + |
+Yes + |
+String + |
+Parameter Groups Values: +
|
+
params + |
+Yes + |
+Array of ParamsReqBean objects + |
+Information about the parameters to be modified. + |
+
Status code: 202
+ +Parameter + |
+Type + |
+Description + |
+
---|---|---|
success + |
+Boolean + |
+Whether the parameters are modified. + |
+
should_restart + |
+String + |
+Whether the instance needs to be restarted. Values: +
|
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
error_msg + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
Example of modifying database parameters:
+https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/140b5236-88ad-43c8-811c-1268453jb101/params+
{ + "group" : "performance", + "params" : [ { + "key" : "binlog_stmt_cache_size", + "target_value" : "32678" + }, { + "key" : "bulk_insert_buffer_size", + "target_value" : "8388608" + } ] +}+
Status code: 202
+Accepted
+{ + "success" : true, + "should_restart" : "false" +}+
Status Code + |
+Description + |
+
---|---|
202 + |
+Accepted + |
+
400 + |
+Bad Request + |
+
For details, see Error Code.
+POST /v3/{project_id}/jobs/batch-retry-task
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID of a tenant in a region + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+The content type. +The default value is application/json. + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token obtained from IAM. + |
+
X-Language + |
+No + |
+String + |
+Request language type +Default value: en-us +Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
jobs + |
+Yes + |
+Array of RetryInfo objects + |
+List of requests for resuming upload tasks in batches. + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
---|---|---|
results + |
+Array of RetryTaskResp objects + |
+List of tasks that can be resumed in batches. + |
+
count + |
+Integer + |
+Total number. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
id + |
+String + |
+Task ID. + |
+
status + |
+String + |
+Status + |
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
error_msg + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
Example of resuming tasks in batches:
+https://{Endpoint}/v3/054babbbde80d4602f5cc0043a40ed8c/jobs/batch-retry-task+
{ + "jobs" : [ { + "job_id" : "140b5236-88ad-43c8-811c-1268453jb101" + } ] +}+
Status code: 200
+OK
+{ + "results" : [ { + "id" : "140b5236-88ad-43c8-811c-1268453jb101", + "status" : "success" + } ], + "count" : 1 +}+
Status Code + |
+Description + |
+
---|---|
200 + |
+OK + |
+
400 + |
+Bad Request + |
+
For details, see Error Code.
+This API is used to pause tasks in batches.
+POST /v3/{project_id}/jobs/batch-pause-task
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID of a tenant in a region + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+The content type. +The default value is application/json. + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token obtained from IAM. + |
+
X-Language + |
+No + |
+String + |
+Request language type +Default value: en-us +Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
jobs + |
+Yes + |
+Array of PauseInfo objects + |
+The value cannot contain empty objects. The value of job_id must comply with the UUID rule. + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
---|---|---|
results + |
+Array of PauseJobResp objects + |
+List of tasks to be suspended in batches. + |
+
count + |
+Integer + |
+Total number. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
id + |
+String + |
+Task ID. + |
+
status + |
+String + |
+Pause result. + |
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
error_msg + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
Example of suspending tasks in batches:
+https://{Endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-pause-task+
{ + "jobs" : [ { + "job_id" : "8d0e8e36-a618-490d-8a46-8c61ac9jb502", + "pause_mode" : "target" + } ] +}+
Status code: 200
+OK
+{ + "results" : [ { + "id" : "8d0e8e36-a618-490d-8a46-8c61ac9jb502", + "status" : "success" + } ], + "count" : 1 +}+
Status Code + |
+Description + |
+
---|---|
200 + |
+OK + |
+
400 + |
+Bad Request + |
+
For details, see Error Code.
+This API is used to change the passwords of the sources and destinations after a task is started.
+PUT /v3/{project_id}/jobs/batch-modify-pwd
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID of a tenant in a region + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+The content type. +The default value is application/json. + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token obtained from IAM. + |
+
X-Language + |
+No + |
+String + |
+Request language type +Default value: en-us +Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
jobs + |
+Yes + |
+Array of ModifyPwdEndPoint objects + |
+List of database passwords to be changed in batches. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
db_password + |
+Yes + |
+String + |
+Database password. + |
+
end_point_type + |
+Yes + |
+String + |
+Type. so indicates the source database. ta indicates the destination database. +Values: +
|
+
job_id + |
+Yes + |
+String + |
+Task ID. + |
+
kerberos + |
+No + |
+KerberosVO object + |
+Information required for Kerberos authentication. + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
---|---|---|
count + |
+Integer + |
+Total number. + |
+
results + |
+Array of ModifyJobResp objects + |
+List of tasks that are modified in batches. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
id + |
+String + |
+Task ID. + |
+
status + |
+String + |
+Status Values: +
|
+
end_point_type + |
+String + |
+Type. so indicates the source database. ta indicates the destination database. + |
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
error_msg + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
Example request for changing the passwords of the sources and destinations:
+https://{Endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-modify-pwd+
{ + "jobs" : [ { + "db_password" : "********", + "end_point_type" : "so", + "job_id" : "25df459d-a37c-41b9-bc2b-8c00ba32jb52" + }, { + "db_password" : "********", + "end_point_type" : "ta", + "job_id" : "25df459d-a37c-41b9-bc2b-8c00ba32jb52" + } ] +}+
Status code: 200
+OK
+{ + "results" : [ { + "id" : "8d0e8e36-a618-490d-8a46-8c61ac9jb502", + "status" : "success", + "end_point_type" : "so" + }, { + "id" : "8d0e8e36-a618-490d-8a46-8c61ac9jb502", + "status" : "success", + "end_point_type" : "ta" + } ], + "count" : 2 +}+
Status Code + |
+Description + |
+
---|---|
200 + |
+OK + |
+
400 + |
+Bad Request + |
+
For details, see Error Code.
+The API is used to set whether to migrate Definers to the user in batches.
+POST /v3/{project_id}/jobs/batch-replace-definer
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID of a tenant in a region + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+The content type. +The default value is application/json. + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token obtained from IAM. + |
+
X-Language + |
+No + |
+String + |
+Request language type +Default value: en-us +Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
jobs + |
+Yes + |
+Array of ReplaceDefinerInfo objects + |
+List of requests for setting replaceDefiners in batches. + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
---|---|---|
count + |
+Integer + |
+Total number. + |
+
results + |
+Array of ModifyJobResp objects + |
+List of tasks that are modified in batches. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
id + |
+String + |
+Task ID. + |
+
status + |
+String + |
+Status Values: +
|
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
error_msg + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
Example of setting DR definers in batches:
+https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-replace-definer+
{ + "jobs" : [ { + "job_id" : "7c685701-bfb5-4bb9-89f1-d0567f5jb502", + "replace_definer" : true + } ] +}+
Status code: 200
+OK
+{ + "count" : 1, + "results" : [ { + "id" : "7c685701-bfb5-4bb9-89f1-d0567f5jb502", + "status" : "success" + } ] +}+
Status Code + |
+Description + |
+
---|---|
200 + |
+OK + |
+
400 + |
+Bad Request + |
+
For details, see Error Code.
+This API is used to create a comparison task
+In the current version, a comparison task can be created only when the MySQL DR task is in the DR progress. The parent task cannot call the API.
+POST /v3/{project_id}/jobs/create-compare-task
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID of a tenant in a region + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+The content type. +The default value is application/json. + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token obtained from IAM. + |
+
X-Language + |
+No + |
+String + |
+Request language type +Default value: en-us +Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
job_id + |
+Yes + |
+String + |
+Task ID. + |
+
object_level_compare_type + |
+No + |
+String + |
+Object-level comparison type. If the value is empty, the object-level comparison is not created. If both object_level_compare_type and data_level_compare_info are left empty, only the created comparison task list is queried. +Value: +
|
+
data_level_compare_info + |
+No + |
+CreateDataLevelCompareReq object + |
+Data-level comparison information. If no data-level comparison is created, this parameter does not need to be transferred. If both object_level_compare_type and data_level_compare_info are left empty, only the created comparison task list is queried. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
conflict_policy + |
+Yes + |
+String + |
+Only one unfinished data-level comparison task can exist. This field determines how to process unfinished data-level comparison tasks. cancel: Cancel the task and create a new one. keep: Do not create a new task if the previous one is not complete. +Values: +
|
+
compare_type + |
+Yes + |
+String + |
+Data-level comparison type. lines: indicates row comparison. contents: value comparison. +Values: +
|
+
compare_mode + |
+No + |
+String + |
+Data-level comparison mode. If the value is empty, the object information needs to be transferred in compare_object_infos or compare_object_infos_with_token. quick_comparison: indicates quick comparison, which can be used only by whitelisted users. +Default value: quick_comparison +Value: +
|
+
start_time + |
+No + |
+String + |
+Start time of a comparison task. If the value is empty, the task is started immediately. + |
+
compare_object_infos + |
+No + |
+Array of CompareObjectInfo objects + |
+Data-level comparison object. In non-quick comparison mode, either compare_object_infos or compare_object_infos_with_token must be specified based on the migration scenario. + |
+
compare_object_infos_with_token + |
+No + |
+Array of CompareObjectInfoWithToken objects + |
+Object for data-level comparison (Cassandra DR only, with token information). In non-quick comparison mode, either compare_object_infos or compare_object_infos_with_token must be specified based on the migration scenario. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
db_name + |
+Yes + |
+String + |
+Database name. + |
+
table_name + |
+No + |
+Array of strings + |
+List of table names in the database. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
db_name + |
+Yes + |
+String + |
+Database name. + |
+
table_name_with_token + |
+No + |
+Array of CompareTableInfoWithToken objects + |
+List of tables (with tokens) in the database. + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
---|---|---|
job_id + |
+String + |
+Task ID + |
+
object_level_compare_create_result + |
+CreateCompareTaskResult object + |
+Result of creating an object-level comparison task. + |
+
data_level_compare_create_result + |
+CreateCompareTaskResult object + |
+Result of creating a data-level comparison task. + |
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
error_msg + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
compare_task_id + |
+String + |
+After the comparison task is created, the ID of the comparison task is returned for querying the result of the comparison task. + |
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
error_msg + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
Example of creating a comparison task:
+https://{Endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/create-compare-task+
{ + "job_id" : "94800607-3cd8-4f7d-a340-63a10f8jb502", + "object_level_compare_type" : "objects", + "data_level_compare_info" : { + "conflict_policy" : "keep", + "compare_type" : "contents", + "compare_mode" : null, + "start_time" : null, + "compare_object_infos" : [ { + "db_name" : "may_5", + "table_name" : [ "table_name_0", "table_name_1" ] + } ] + } +}+
Status code: 200
+OK
+{ + "job_id" : "94800607-3cd8-4f7d-a340-63a10f8jb502", + "object_level_compare_create_result" : { + "compare_task_id" : "dc1683d9-bdf2-4be9-967f-6ef0953369bc" + }, + "data_level_compare_create_result" : { + "compare_task_id" : "08cad1f8-9de2-42fa-b8ce-6c36daf730f6" + } +}+
Status Code + |
+Description + |
+
---|---|
200 + |
+OK + |
+
400 + |
+Bad Request + |
+
For details, see Error Code.
+This API is used to query the comparion result after creating a comparison task.
+POST /v3/{project_id}/jobs/query-compare-result
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID of a tenant in a region. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+The content type. +The default value is application/json. + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token obtained from IAM. + |
+
X-Language + |
+No + |
+String + |
+Request language type +Default value: en-us +Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
job_id + |
+Yes + |
+String + |
+Task ID + |
+
object_level_compare_id + |
+No + |
+String + |
+ID of the object-level comparison task that requests the query result. The value can be obtained from the returned parameters in Creating a Comparison Task. + |
+
line_compare_id + |
+No + |
+String + |
+ID of the row comparison task that requests the query result. The value can be obtained from the returned parameters in Creating a Comparison Task. + |
+
content_compare_id + |
+No + |
+String + |
+ID of the value comparison task that requests the query result. The value can be obtained from the returned parameters in Creating a Comparison Task. + |
+
current_page + |
+Yes + |
+Integer + |
+Current page number for pagination query, which is valid for the query result of comparison tasks. + |
+
per_page + |
+Yes + |
+Integer + |
+Number of records on each page. This parameter is valid only for query results of comparison tasks. + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
---|---|---|
job_id + |
+String + |
+Task ID + |
+
object_level_compare_results + |
+ObjectCompareResult object + |
+Object-level comparison result. + |
+
line_compare_results + |
+LineCompareResult object + |
+Row comparison result. + |
+
content_compare_results + |
+ContentCompareResult object + |
+Value comparison result. + |
+
compare_task_list_results + |
+CompareTaskListResult object + |
+List of comparison tasks. + |
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
error_msg + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
compare_task_id + |
+String + |
+ID of an object-level comparison task. + |
+
object_compare_overview + |
+Array of ObjectCompareResultOverview objects + |
+Overview of object comparison results. + |
+
object_compare_details + |
+Array of ObjectCompareResultDetails objects + |
+Object comparison result details. The key value is the object type in the object comparison result overview. + |
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
error_msg + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
object_type + |
+String + |
+Object type. +Values: +
|
+
object_compare_result + |
+String + |
+Comparison result. +Values: +
|
+
target_count + |
+Integer + |
+Number of objects of this type in the destination database. + |
+
source_count + |
+Integer + |
+Number of objects of this type in the source database. + |
+
diff_count + |
+Integer + |
+Number of differences between the source and destination databases. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
source_db_name + |
+String + |
+Source database name. + |
+
target_db_name + |
+String + |
+Destination database name. + |
+
source_db_value + |
+String + |
+Value in the source database. + |
+
target_db_value + |
+String + |
+Value in the destination database. + |
+
error_message + |
+String + |
+Error message. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
compare_task_id + |
+String + |
+ID of a row comparison task. + |
+
line_compare_overview + |
+Array of LineCompareResultOverview objects + |
+Row comparison result overview. + |
+
line_compare_overview_count + |
+Integer + |
+Row comparison result overview. + |
+
line_compare_details + |
+Array of LineCompareResultDetails objects + |
+Row comparison result details. + |
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
error_msg + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
source_db_name + |
+String + |
+Source database name. + |
+
target_db_name + |
+String + |
+Destination database name. + |
+
line_compare_result + |
+String + |
+Comparison result. +Values: +
|
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
source_db_name + |
+String + |
+Source database name. + |
+
LineCompareDetail + |
+Array of LineCompareDetail objects + |
+Row comparison details of the tables in the database. + |
+
line_compare_detail_count + |
+Integer + |
+Total number of row comparison results in the database. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
source_table_name + |
+String + |
+Table name of the source database. + |
+
target_table_name + |
+String + |
+Table name of the destination database. + |
+
source_row_num + |
+Integer + |
+Number of table rows in the source database. + |
+
target_row_num + |
+Integer + |
+Number of table rows in the destination database. + |
+
diff_row_num + |
+Integer + |
+Difference between the tables in the source and destination databases. + |
+
line_compare_result + |
+String + |
+Comparison result. +Values: +
|
+
message + |
+String + |
+Additional information. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
compare_task_id + |
+String + |
+ID of a value comparison task. + |
+
content_compare_overview + |
+Array of ContentCompareResultOverview objects + |
+Content comparison result overview. + |
+
content_compare_overview_count + |
+Integer + |
+Total number of value comparison results. + |
+
content_compare_details + |
+Array of ContentCompareResultDetails objects + |
+Value comparison result details. + |
+
content_compare_diffs + |
+Array of ContentCompareResultDiffs objects + |
+The value comparison results are different. + |
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
error_msg + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
source_db_name + |
+String + |
+Source database name. + |
+
target_db_name + |
+String + |
+Destination database name. + |
+
content_compare_result + |
+String + |
+Comparison result. +Values: +
|
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
source_db_name + |
+String + |
+Source database name. + |
+
content_compare_detail + |
+Array of ContentCompareDetail objects + |
+Value comparison details of the tables in the database. + |
+
content_compare_detail_count + |
+Integer + |
+Total number of value comparison results. + |
+
content_uncompare_detail + |
+Array of ContentCompareDetail objects + |
+Value comparison details of tables in the database (tables that cannot be compared). + |
+
content_uncompare_detail_count + |
+Integer + |
+Total number of value comparison results (tables that cannot be compared). + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
source_db_name + |
+String + |
+Source database name. + |
+
target_db_name + |
+String + |
+Destination database name. + |
+
source_table_name + |
+String + |
+Source database name. + |
+
target_table_name + |
+String + |
+Name of a table in the destination database. + |
+
source_row_num + |
+Integer + |
+Number of rows in the table of the source database. + |
+
target_row_num + |
+Integer + |
+Number of rows in the table of the destination database. + |
+
diff_row_num + |
+Integer + |
+Difference between the tables in the source and destination databases. + |
+
line_compare_result + |
+String + |
+Row comparison result. +Values: +
|
+
content_compare_result + |
+String + |
+Value comparison result. +Values: +
|
+
message + |
+String + |
+Provides additional information. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
source_db_name + |
+String + |
+Source database name. + |
+
source_table_name + |
+String + |
+Table name of the source database. + |
+
ContentCompareDiff + |
+Array of ContentCompareDiff objects + |
+The value comparison results are different. + |
+
content_compare_diff_count + |
+Integer + |
+Total number of differences in the value comparison result. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
target_select_sql + |
+String + |
+Query the SQL statements of the destination database. + |
+
source_select_sql + |
+String + |
+Query the SQL statements of the source database. + |
+
source_key_value + |
+Array of strings + |
+Key value list of the source database. + |
+
target_key_value + |
+Array of strings + |
+Key value list of the destination database. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
compare_task_list + |
+Array of CompareTaskList objects + |
+List of comparison tasks. + |
+
compare_task_list_count + |
+Integer + |
+Total number of comparison tasks. + |
+
error_msg + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
compare_task_id + |
+String + |
+ID of a comparison task. + |
+
compare_type + |
+String + |
+Type of a comparison task. + |
+
compare_task_status + |
+String + |
+Status of a comparison task. +Values: +
|
+
create_time + |
+String + |
+Comparison start time + |
+
end_time + |
+String + |
+Comparison end time + |
+
Request for querying the comparison result:
+https://{Endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/query-compare-result+
{ + "job_id" : "94800607-3cd8-4f7d-a340-63a10f8jb502", + "object_level_compare_id" : "dc1683d9-bdf2-4be9-967f-6ef0953369bc", + "line_compare_id" : "d45d569d-0a80-4cef-a412-da2a3bcdc9b7", + "content_compare_id" : "79e206e6-13eb-4556-8cd5-c994c9cbd4e6", + "current_page" : 1, + "per_page" : 2 +}+
Status code: 200
+OK
+{ + "job_id" : "c6e65e6a-de99-4112-9697-7c1923ajb201", + "object_level_compare_results" : { + "compare_task_id" : "dc1683d9-bdf2-4be9-967f-6ef0953369bc", + "object_compare_overview" : [ { + "object_type" : "DB", + "object_compare_result" : "CONSISTENT", + "source_count" : 1, + "target_count" : 1, + "diff_count" : 0 + }, { + "object_type" : "INDEX", + "object_compare_result" : "CONSISTENT", + "source_count" : 12, + "target_count" : 12, + "diff_count" : 0 + }, { + "object_type" : "TABLE", + "object_compare_result" : "CONSISTENT", + "source_count" : 6, + "target_count" : 6, + "diff_count" : 0 + } ], + "object_compare_details" : { + "TABLE" : [ { + "source_db_name" : "may_5", + "target_db_name" : "may_5", + "source_db_value" : "add_table_name_0", + "target_db_value" : "add_table_name_0" + }, { + "source_db_name" : "may_5", + "target_db_name" : "may_5", + "source_db_value" : "table_name_3", + "target_db_value" : "table_name_3" + } ], + "INDEX" : [ { + "source_db_name" : "may_5", + "target_db_name" : "may_5", + "source_db_value" : "`add_table_name_0`.`PRIMARY`", + "target_db_value" : "`add_table_name_0`.`PRIMARY`" + }, { + "source_db_name" : "may_5", + "target_db_name" : "may_5", + "source_db_value" : "`add_table_name_0`.`bak0`", + "target_db_value" : "`add_table_name_0`.`bak0`" + } ], + "DB" : [ { + "source_db_name" : "may_5", + "target_db_name" : "may_5", + "source_db_value" : "may_5", + "target_db_value" : "may_5" + } ] + } + }, + "line_compare_results" : { + "compare_task_id" : "d45d569d-0a80-4cef-a412-da2a3bcdc9b7", + "line_compare_overview" : [ { + "source_db_name" : "may_5", + "target_db_name" : "may_5", + "line_compare_result" : "INCONSISTENT" + } ], + "line_compare_overview_count" : 1, + "line_compare_details" : [ { + "source_db_name" : "may_5", + "line_compare_detail" : [ { + "source_table_name" : "table_name_0", + "source_row_num" : 0, + "target_table_name" : "table_name_0", + "target_row_num" : 1, + "diff_row_num" : 1, + "line_compare_result" : "INCONSISTENT" + }, { + "source_table_name" : "table_name_1", + "source_row_num" : 0, + "target_table_name" : "table_name_1", + "target_row_num" : 0, + "diff_row_num" : 0, + "line_compare_result" : "CONSISTENT" + } ], + "line_compare_detail_count" : 2 + } ] + }, + "content_compare_results" : { + "compare_task_id" : "79e206e6-13eb-4556-8cd5-c994c9cbd4e6", + "content_compare_overview" : [ { + "source_db_name" : "may_5", + "target_db_name" : "may_5", + "content_compare_result" : "INCONSISTENT" + } ], + "content_compare_overview_count" : 1, + "content_compare_details" : [ { + "source_db_name" : "may_5", + "content_compare_detail" : [ { + "source_db_name" : "may_5", + "target_db_name" : "may_5", + "source_table_name" : "table_name_0", + "target_table_name" : "table_name_0", + "source_row_num" : 0, + "target_row_num" : 1, + "diff_row_num" : 1, + "line_compare_result" : "INCONSISTENT", + "content_compare_result" : "INCONSISTENT" + }, { + "source_db_name" : "may_5", + "target_db_name" : "may_5", + "source_table_name" : "table_name_1", + "target_table_name" : "table_name_1", + "source_row_num" : 0, + "target_row_num" : 0, + "diff_row_num" : 0, + "line_compare_result" : "CONSISTENT", + "content_compare_result" : "CONSISTENT" + } ], + "content_compare_detail_count" : 2, + "content_uncompare_detail" : [ ], + "content_uncompare_detail_count" : 0 + } ], + "content_compare_diffs" : [ { + "source_db_name" : "may_5", + "source_table_name" : "table_name_0", + "content_compare_diff" : [ { + "target_key_value" : [ "5" ], + "target_select_sql" : "select * from may_5.table_name_0 where id = 5" + } ], + "content_compare_diff_count" : 1 + } ] + }, + "compare_task_list_results" : { + "compare_task_list_count" : 8, + "compare_task_list" : [ { + "compare_task_id" : "08cad1f8-9de2-42fa-b8ce-6c36daf730f6", + "compare_type" : "contents", + "compare_task_status" : "SUCCESSFUL", + "create_time" : "1607766111833", + "end_time" : "1607766310812" + }, { + "compare_task_id" : "dc1683d9-bdf2-4be9-967f-6ef0953369bc", + "compare_type" : "object_comparison", + "compare_task_status" : "SUCCESSFUL", + "create_time" : "1607766110535", + "end_time" : "1607766127373" + } ] + } +}+
Status Code + |
+Description + |
+
---|---|
200 + |
+OK + |
+
400 + |
+Bad Request + |
+
For details, see Error Code.
+This API is used to query tenant tasks by engine type, network type, task status, task name, or task ID.
+POST /v3/{project_id}/jobs
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID of a tenant in a region + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+The content type. +The default value is application/json. + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token obtained from IAM. + |
+
X-Language + |
+No + |
+String + |
+Request language type +Default value: en-us +Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
cur_page + |
+Yes + |
+Integer + |
+Current page. Set the value to 0 to obtain all items. +Default value: 1 + |
+
per_page + |
+Yes + |
+Integer + |
+Number of records on each page. +
|
+
db_use_type + |
+Yes + |
+String + |
+The migration scenario. The value can be migration (real-time migration), sync (real-time synchronization), or cloudDataGuard (real-time disaster recovery). +Values: +
|
+
engine_type + |
+No + |
+String + |
+Engine type of a DRS task. +Default value: mysql +Values: +
|
+
enterprise_project_id + |
+No + |
+String + |
+Enterprise project. If no value is specified, this parameter is set to null. This parameter cannot be left blank. When enterprise project is enabled, this parameter can be set. + |
+
name + |
+No + |
+String + |
+Name or ID. + |
+
net_type + |
+No + |
+String + |
+Network type. Values: +
|
+
service_name + |
+No + |
+String + |
+Service name. + |
+
status + |
+No + |
+String + |
+Status. The value can be CREATING, CREATE_FAILED, or CONFIGURATION. +STARTJOBING: The task is being started. +WAITING_FOR_START: The task is waiting to be started. +START_JOB_FAILED: The task fails to be started. +FULL_TRANSFER_STARTED: Full migration is in progress, and the DR scenario is initialized. +FULL_TRANSFER_FAILED: Full migration failed. Initialization failed in the DR scenario. +FULL_TRANSFER_COMPLETE: Full migration is complete, and the initialization is complete in the DR scenario. +INCRE_TRANSFER_STARTED: Incremental migration is being performed, and the DR task is in progress. +INCRE_TRANSFER_FAILED: Incremental migration fails and a DR exception occurs. +RELEASE_RESOURCE_STARTED: The task is being stopped. +RELEASE_RESOURCE_FAILED: Stop task failed. +RELEASE_RESOURCE_COMPLETE: The task is stopped. +CHANGE_JOB_STARTED: The task is being changed. +CHANGE_JOB_FAILED: Change task failed. +CHILD_TRANSFER_STARTING: The subtask is being started. +CHILD_TRANSFER_STARTED: The subtask is being migrated. +CHILD_TRANSFER_COMPLETE: The subtask migration is complete. +CHILD_TRANSFER_FAILED: Migrate subtask failed. +RELEASE_CHILD_TRANSFER_STARTED: The subtask is being stopped. +RELEASE_CHILD_TRANSFER_COMPLETE: The subtask is complete. +Values: +
|
+
tags + |
+No + |
+Array of ResourceTag objects + |
+Tags. + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
---|---|---|
total_record + |
+Integer + |
+Total number of tasks + |
+
jobs + |
+Array of JobInfo objects + |
+Task details. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
id + |
+String + |
+Task ID. + |
+
name + |
+String + |
+Task name. + |
+
status + |
+String + |
+Task status. Values: +
|
+
description + |
+String + |
+Task description. + |
+
create_time + |
+String + |
+Time when a task is created + |
+
engine_type + |
+String + |
+Engine type of a DRS task. Values: +
|
+
net_type + |
+String + |
+Network type. Values: +
|
+
billing_tag + |
+Boolean + |
+Billing tag. + |
+
job_direction + |
+String + |
+Task direction. Values: +
|
+
db_use_type + |
+String + |
+Task scenario. Values: +
|
+
task_type + |
+String + |
+Task mode. Values: +
|
+
children + |
+Array of ChildrenJobInfo objects + |
+Subtask information body. + |
+
node_newFramework + |
+Boolean + |
+Whether the framework is a new framework. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
billing_tag + |
+Boolean + |
+Billing tag. + |
+
create_time + |
+String + |
+Time when a task is created + |
+
db_use_type + |
+String + |
+Replication scenario. Values: +
|
+
description + |
+String + |
+Task description. + |
+
engine_type + |
+String + |
+Engine type of a DRS task. Values: +
|
+
error_msg + |
+String + |
+Task failure cause. + |
+
id + |
+String + |
+Task ID. + |
+
job_direction + |
+String + |
+Migration direction. Values: +
|
+
name + |
+String + |
+Task name. + |
+
net_type + |
+String + |
+Network type. Values: +
|
+
node_newFramework + |
+Boolean + |
+New framework + |
+
status + |
+String + |
+Task status. + |
+
task_type + |
+String + |
+Task mode. Values: +
|
+
https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs+
{ + "cur_page" : 1, + "db_use_type" : "migration", + "engine_type" : "", + "name" : "", + "net_type" : "", + "per_page" : 5, + "status" : "" +}+
Status code: 200
+OK
+{ + "jobs" : [ { + "id" : "24834eb6-be30-464e-a299-f7aa730jb101", + "name" : "DRS-3999-lws", + "status" : "INCRE_TRANSFER_FAILED", + "description" : "", + "create_time" : "2020-12-21 10:57:49", + "error_msg" : "service LOGMANAGER failed, cause by: Unable to connect to DBMS: url=jdbc:mysql://172.22.74.56:3306?useUnicode=true&allowLoadLocalInfile=false&characterEncoding=UTF-8&connectTimeout=5000&useSSL=false&allowPublicKeyRetrieval=true&verifyServerCertificate=false&serverTimezone=UTC user=root", + "engine_type" : "mysql", + "net_type" : "eip", + "billing_tag" : false, + "job_direction" : "up", + "db_use_type" : "migration", + "task_type" : "FULL_INCR_TRANS", + "node_newFramework" : false + }, { + "id" : "140b5236-88ad-43c8-811c-1268453jb101", + "name" : "DRS-0042-linxiaolu", + "status" : "CONFIGURATION", + "description" : "", + "create_time" : "2020-12-19 16:23:24", + "engine_type" : "mysql", + "net_type" : "eip", + "billing_tag" : false, + "job_direction" : "up", + "db_use_type" : "migration", + "task_type" : "FULL_INCR_TRANS", + "node_newFramework" : false + }, { + "id" : "7f8e6f74-72d2-4ddd-bb8f-6c41397jb101", + "name" : "DRS-0796", + "status" : "RELEASE_RESOURCE_COMPLETE", + "description" : "", + "create_time" : "2020-12-18 10:48:11", + "engine_type" : "mysql", + "net_type" : "eip", + "billing_tag" : false, + "job_direction" : "non-dbs", + "db_use_type" : "migration", + "task_type" : "FULL_INCR_TRANS", + "node_newFramework" : false + }, { + "id" : "14d88eeb-ee7e-4d30-a46e-a5ec8eajb101", + "name" : "masj-mysql_migration_down-1", + "status" : "INCRE_TRANSFER_STARTED", +"description": "[using] api test 2\n1. This API is used to configure the source and destination database information. Before selecting a table, you must perform this operation. \n2. If the description of a task in the configuration is successfully modified, 202 success is returned. \n3. If the description of a task in an incremental migration fails to be modified, 202 failed DRS.M01504\nAnother operation is being performed on the migration task or the migration task is abnormal. Try again later./", + "create_time" : "2020-12-15 15:43:02", + "engine_type" : "mysql", + "net_type" : "eip", + "billing_tag" : true, + "job_direction" : "down", + "db_use_type" : "migration", + "task_type" : "FULL_INCR_TRANS", + "node_newFramework" : false + }, { + "id" : "d54691d2-f105-434d-a75d-809b017jb101", + "name" : "masj-2-mysql_migration_down", + "status" : "CONFIGURATION", +"description": "[using] api test 2\n1. This API is used to configure the source and destination database information. Before selecting a table, you must perform this operation. \n2. If the description of a task in the configuration is successfully modified, 202 success is returned. \n3. If the description of a task in an incremental migration fails to be modified, 202 failed DRS.M01504\nAnother operation is being performed on the migration task or the migration task is abnormal. Try again later./", + "create_time" : "2020-12-14 21:39:07", + "engine_type" : "mysql", + "net_type" : "eip", + "billing_tag" : false, + "job_direction" : "down", + "db_use_type" : "migration", + "task_type" : "FULL_INCR_TRANS", + "node_newFramework" : false + } ], + "total_record" : 7 +}+
Status Code + |
+Description + |
+
---|---|
200 + |
+OK + |
+
400 + |
+Bad Request + |
+
For details, see Error Code.
+To ensure that service applications are not affected after the migration, DRS provides parameter comparison to help you compare parameters between the source and destination databases. This API is used to obtain database parameters of the source and destination databases.
+POST /v3/{project_id}/jobs/batch-get-params
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID of a tenant in a region + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+The content type. +The default value is application/json. + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token obtained from IAM. + |
+
X-Language + |
+No + |
+String + |
+Request language type +Default value: en-us +Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
jobs + |
+Yes + |
+Array of strings + |
+Request body for querying tasks in batches. + |
+
refresh + |
+Yes + |
+String + |
+Whether to obtain database parameters again. 1 indicates yes, and 0 indicates no (obtaining parameters from the cache). Set this parameter to 1 when this API is called for the first time. + |
+
Status code: 202
+ +Parameter + |
+Type + |
+Description + |
+
---|---|---|
params_list + |
+Array of QueryDbParamsResp objects + |
+Response body for querying database parameters. + |
+
count + |
+Integer + |
+Total number. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
params + |
+Array of params objects + |
+Data parameter information body. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
compare_result + |
+String + |
+Parameter comparison result. Values: +
|
+
data_type + |
+String + |
+Type + |
+
group + |
+String + |
+Metric Type Values: +
|
+
key + |
+String + |
+Parameter name + |
+
need_restart + |
+String + |
+Whether the instance needs to be restarted. Values: +
|
+
source_value + |
+String + |
+Source database parameter value. + |
+
target_value + |
+String + |
+Parameter value of the destination database. + |
+
value_range + |
+String + |
+Value Range + |
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
error_message + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
Example of the request body for obtaining database parameters in batches:
+https://{EndPoint}/drs/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-get-params+
{ + "jobs" : [ "140b5236-88ad-43c8-811c-1268453jb101" ], + "refresh": 1 +}+
Status code: 202
+Accepted
+{ + "count" : 1, + "params_list" : [ { + "params" : [ { + "group" : "performance", + "key" : "binlog_cache_size", + "source_value" : "16384", + "target_value" : "32768", + "compare_result" : "false", + "data_type" : "figure", + "value_range" : "4096-16777216", + "need_restart" : "false" + }, { + "group" : "performance", + "key" : "binlog_stmt_cache_size", + "source_value" : "32768", + "target_value" : "32768", + "compare_result" : "true", + "data_type" : "figure", + "value_range" : "4096-16777216", + "need_restart" : "false" + }, { + "group" : "performance", + "key" : "bulk_insert_buffer_size", + "source_value" : "8388608", + "target_value" : "8388608", + "compare_result" : "true", + "data_type" : "figure", + "value_range" : "0-18446744073709551615", + "need_restart" : "false" + }, { + "group" : "common", + "key" : "character_set_server", + "source_value" : "utf8", + "target_value" : "utf8", + "compare_result" : "true", + "data_type" : null, + "value_range" : "utf8|latin1|gbk|utf8mb4", + "need_restart" : "true" + }, { + "group" : "common", + "key" : "collation_server", + "source_value" : "utf8_general_ci", + "target_value" : "utf8_general_ci", + "compare_result" : "true", + "data_type" : null, + "value_range" : "latin1_german1_ci|latin1_swedish_ci|latin1_danish_ci|latin1_german2_ci|latin1_bin|latin1_general_ci|latin1_general_cs|latin1_spanish_ci|gbk_chinese_ci|gbk_bin|utf8_general_ci|utf8_bin|utf8_unicode_ci|utf8_icelandic_ci|utf8_latvian_ci|utf8_romanian_ci|utf8_slovenian_ci|utf8_polish_ci|utf8_estonian_ci|utf8_spanish_ci|utf8_swedish_ci|utf8_turkish_ci|utf8_czech_ci|utf8_danish_ci|utf8_lithuanian_ci|utf8_slovak_ci|utf8_spanish2_ci|utf8_roman_ci|utf8_persian_ci|utf8_esperanto_ci|utf8_hungarian_ci|utf8_sinhala_ci|utf8mb4_general_ci|utf8mb4_bin|utf8mb4_unicode_ci|utf8mb4_icelandic_ci|utf8mb4_latvian_ci|utf8mb4_romanian_ci|utf8mb4_slovenian_ci|utf8mb4_polish_ci|utf8mb4_estonian_ci|utf8mb4_spanish_ci|utf8mb4_swedish_ci|utf8mb4_turkish_ci|utf8mb4_czech_ci|utf8mb4_danish_ci|utf8mb4_lithuanian_ci|utf8mb4_slovak_ci|utf8mb4_spanish2_ci|utf8mb4_roman_ci|utf8mb4_persian_ci|utf8mb4_esperanto_ci|utf8mb4_hungarian_ci|utf8mb4_sinhala_ci", + "need_restart" : "true" + }, { + "group" : "common", + "key" : "connect_timeout", + "source_value" : "10", + "target_value" : "10", + "compare_result" : "true", + "data_type" : null, + "value_range" : "2-31536000", + "need_restart" : "false" + }, { + "group" : "common", + "key" : "explicit_defaults_for_timestamp", + "source_value" : "OFF", + "target_value" : "OFF", + "compare_result" : "true", + "data_type" : null, + "value_range" : "ON|OFF", + "need_restart" : "true" + }, { + "group" : "performance", + "key" : "innodb_buffer_pool_size", + "source_value" : "536870912", + "target_value" : "536870912", + "compare_result" : "true", + "data_type" : "figure", + "value_range" : "5242880-2147483648", + "need_restart" : "true" + }, { + "group" : "common", + "key" : "innodb_flush_log_at_trx_commit", + "source_value" : "1", + "target_value" : "1", + "compare_result" : "true", + "data_type" : null, + "value_range" : "0|1|2", + "need_restart" : "false" + }, { + "group" : "common", + "key" : "innodb_lock_wait_timeout", + "source_value" : "50", + "target_value" : "50", + "compare_result" : "true", + "data_type" : null, + "value_range" : "1-1073741824", + "need_restart" : "false" + }, { + "group" : "performance", + "key" : "key_buffer_size", + "source_value" : "16777216", + "target_value" : "16777216", + "compare_result" : "true", + "data_type" : "figure", + "value_range" : "8-9223372036854771712", + "need_restart" : "false" + }, { + "group" : "performance", + "key" : "long_query_time", + "source_value" : "1.000000", + "target_value" : "1.000000", + "compare_result" : "true", + "data_type" : "figure", + "value_range" : "0.03-3600", + "need_restart" : "false" + }, { + "group" : "common", + "key" : "max_connections", + "source_value" : "800", + "target_value" : "800", + "compare_result" : "true", + "data_type" : null, + "value_range" : "1-100000", + "need_restart" : "false" + }, { + "group" : "common", + "key" : "net_read_timeout", + "source_value" : "30", + "target_value" : "30", + "compare_result" : "true", + "data_type" : null, + "value_range" : "1-31536000", + "need_restart" : "false" + }, { + "group" : "common", + "key" : "net_write_timeout", + "source_value" : "60", + "target_value" : "60", + "compare_result" : "true", + "data_type" : null, + "value_range" : "1-31536000", + "need_restart" : "false" + }, { + "group" : "performance", + "key" : "read_buffer_size", + "source_value" : "262144", + "target_value" : "262144", + "compare_result" : "true", + "data_type" : "figure", + "value_range" : "8192-2147479552", + "need_restart" : "false" + }, { + "group" : "performance", + "key" : "read_rnd_buffer_size", + "source_value" : "524288", + "target_value" : "524288", + "compare_result" : "true", + "data_type" : "figure", + "value_range" : "1-2147483647", + "need_restart" : "false" + }, { + "group" : "performance", + "key" : "sort_buffer_size", + "source_value" : "262144", + "target_value" : "262144", + "compare_result" : "true", + "data_type" : "figure", + "value_range" : "32768-18446744073709551615", + "need_restart" : "false" + }, { + "group" : "performance", + "key" : "sync_binlog", + "source_value" : "1", + "target_value" : "1", + "compare_result" : "true", + "data_type" : "figure", + "value_range" : "0-4294967295", + "need_restart" : "false" + }, { + "group" : "common", + "key" : "tx_isolation", + "source_value" : "REPEATABLE-READ", + "target_value" : "REPEATABLE-READ", + "compare_result" : "true", + "data_type" : null, + "value_range" : "READ-UNCOMMITTED|READ-COMMITTED|REPEATABLE-READ|SERIALIZABLE", + "need_restart" : "false" + } ] + } ] +}+
Status Code + |
+Description + |
+
---|---|
202 + |
+Accepted + |
+
400 + |
+Bad Request + |
+
For details, see Error Code.
+This API is used to switch over virtual IP addresses.
+Only synchronization between self-built databases supports the dual virtual IP address switchover.
+POST /v3/{project_id}/jobs/{job_id}/switch-vip
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID of a tenant in a region. + |
+
job_id + |
+Yes + |
+String + |
+Job ID of a tenant in a region. If the task is a cross-AZ task, the parent task ID is used. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+The content type. +The default value is application/json. + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token obtained from IAM. + |
+
X-Language + |
+No + |
+String + |
+Request language type +Default value: en-us +Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
mode + |
+Yes + |
+String + |
+Switchover type. Values: +
|
+
Status code: 202
+ +Parameter + |
+Type + |
+Description + |
+
---|---|---|
id + |
+String + |
+Task ID. + |
+
status + |
+String + |
+Status Values: +
|
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
error_msg + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
Example of batch primary/standby switchover:
+https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/8c81a12f-2581-4424-a3ab-70ed874jb201/switch-vip+
{ + "mode": "source" +}+
Status code: 202
+Accepted
+{ + "id": "8c81a12f-2581-4424-a3ab-70ed874jb201", + "status": "success" +}+
Status Code + |
+Description + |
+
---|---|
202 + |
+Accepted + |
+
400 + |
+Bad Request + |
+
For details, see Error Code.
+This API is used to query the dual-virtual IP address switchover result.
+Only synchronization between self-built databases supports querying the results of dual virtual IP address switchover.
+GET /v3/{project_id}/jobs/{job_id}/get-switch-vip-status
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID of a tenant in a region + |
+
job_id + |
+Yes + |
+String + |
+Job ID of a tenant in a region. If the task is a cross-AZ task, the parent task ID is used. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+The content type. +The default value is application/json. + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token obtained from IAM. + |
+
X-Language + |
+No + |
+String + |
+Request language type +Default value: en-us +Values: +
|
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
---|---|---|
id + |
+String + |
+Task ID. + |
+
status + |
+String + |
+Status Values: +
|
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
error_msg + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
Example of batch primary/standby switchover:
+https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/260e27fd-4976-44dc-9948-e1265e4jb201/get-switch-vip-status+
Status code: 200
+Accepted
+{ + "id": "260e27fd-4976-44dc-9948-e1265e4jb201", + "status": "SWITCH_VIP_COMPLETE" +}+
Status Code + |
+Description + |
+
---|---|
200 + |
+OK + |
+
400 + |
+Bad Request + |
+
For details, see Error Code.
+This API supports synchronization policies.
+POST /v3/{project_id}/jobs/batch-sync-policy
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID of a tenant in a region + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+The content type. +The default value is application/json. + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token obtained from IAM. + |
+
X-Language + |
+No + |
+String + |
+Request language type +Default value: en-us +Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
jobs + |
+Yes + |
+Array of Table 4objects + |
+List of requests for setting synchronization policies in batches. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
job_id + |
+Yes + |
+String + |
+Task ID. + |
+
conflict_policy + |
+No + |
+String + |
+Conflict policy. +Values: +
|
+
filter_ddl_policy + |
+No + |
+String + |
+DDL filtering policy. +Values: +
|
+
ddl_trans + |
+No + |
+Boolean + |
+Whether to synchronize DDL during incremental synchronization. + |
+
index_trans + |
+No + |
+Boolean + |
+Whether to synchronize indexes during incremental synchronization. + |
+
slot_name + |
+No + |
+String + |
+Replication slot name. + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
---|---|---|
count + |
+Integer + |
+Total number. + |
+
results + |
+Array of ModifyJobResp objects + |
+List of returned synchronization policies that are configured in batches. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
id + |
+String + |
+Task ID. + |
+
status + |
+String + |
+Status Values: +
|
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
error_msg + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
The following is an example of configuring synchronization task policies in batches:
+https://{Endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-sync-policy+
{ + "jobs": [{ + "conflict_policy": "ignore", + "ddl_trans": true, + "filter_ddl_policy": "drop_database", + "index_trans": true, + "job_id": "19557d51-1ee6-4507-97a6-8f69164jb201" + }] +}+
Status code: 200
+OK
+{ + "results" : [ { + "id" : "19557d51-1ee6-4507-97a6-8f69164jb201", + "status" : "success" + } ], + "count" : 1 +}+
Status Code + |
+Description + |
+
---|---|
200 + |
+OK + |
+
400 + |
+Bad Request + |
+
For details, see Error Code.
+Name + |
+Type + |
+Description + |
+
---|---|---|
error_code + |
+String + |
+Specifies the error code returned when the API response is abnormal. For details, see section Error Code. + |
+
error_msg + |
+String + |
+Specifies the description of the error returned when the API response is abnormal. + |
+
{ + "error_code": "DRS.M00201", + "error_msg": "The %s parameter is empty." +} +{ + "error_code": "DRS.M00202", + "error_msg": "The value of %s is invalid." +}+
Status Code + |
+Description + |
+
---|---|
200 + |
+Request succeeded. + |
+
202 + |
+Asynchronous requests (such as performing a task) are submitted successfully. + |
+
Status Code + |
+Description + |
+
---|---|
400 Bad Request + |
+The server fails to process the request. + |
+
401 Unauthorized + |
+You must enter the username and password to access the requested page. + |
+
403 Forbidden + |
+You are forbidden to access the page requested. + |
+
404 Not Found + |
+The server could not find the requested page. + |
+
405 Method Not Allowed + |
+The method specified in the request is not allowed. + |
+
409 Conflict + |
+The request cannot be processed due to conflicts. + |
+
413 Request Entity Too Large + |
+The request exceeds the resource quota. + |
+
415 Unsupported Media Type + |
+Content-Type contained in the request header is not application/json. + |
+
422 Unprocessable Entity + |
+Parameter or object in the request cannot be identified. + |
+
500 Internal Server Error + |
+Failed to complete the request. The server is abnormal. + |
+
501 Not Implemented + |
+Failed to complete the request. The server does not support the requested function. + |
+
503 Service Unavailable + |
+Failed to complete the request. The system is currently unavailable. + |
+
Status Code + |
+Error Codes + |
+Error Message + |
+
---|---|---|
422 + |
+DRS.M00002 + |
+The returned result is empty. + |
+
500 + |
+DRS.M00004 + |
+Service is abnormal. Check logs. + |
+
400 + |
+DRS.M00007 + |
+Invalid request parameter. + |
+
403 + |
+DRS.M00100 + |
+Invalid token. + |
+
404 + |
+DRS.M00101 + |
+The user role is empty. + |
+
403 + |
+DRS.M00102 + |
+Insufficient user permissions. + |
+
401 + |
+DRS.M00103 + |
+You do not have operation permissions. Check account permissions on IAM. + |
+
400 + |
+DRS.M00105 + |
+User restricted. + |
+
400 + |
+DRS.M00200 + |
+Parameter error. + |
+
400 + |
+DRS.M00201 + |
+The parameter %s is empty. + |
+
400 + |
+DRS.M00202 + |
+The value of parameter %s is invalid. + |
+
400 + |
+DRS.M00210 + |
+The value of Page is invalid, %s + |
+
400 + |
+DRS.M00211 + |
+The value of Page exceeds the upper limit. + |
+
403 + |
+DRS.M00261 + |
+Invalid project ID. + |
+
400 + |
+DRS.M00269 + |
+The tag key must be unique. + |
+
400 + |
+DRS.M00270 + |
+The tag key or value exceeds the maximum length allowed. + |
+
400 + |
+DRS.M00271 + |
+The maximum number of tags has been reached. + |
+
400 + |
+DRS.M00273 + |
+Invalid parameter. The parameter contains %s. + |
+
422 + |
+DRS.M00277 + |
+The task name already exists. + |
+
400 + |
+DRS.M00299 + |
+Only one jobId is allowed. + |
+
400 + |
+DRS.M00300 + |
+Invalid request, %s + |
+
400 + |
+DRS.M00301 + |
+There are duplicate %s in request. + |
+
400 + |
+DRS.M00302 + |
+The transfer schema is invalid, please refer to supported transfer schema. + |
+
400 + |
+DRS.M00303 + |
+The corresponding parameter is not obtained from the cache. + |
+
400 + |
+DRS.M00304 + |
+This API cannot be called in the current task status. + |
+
400 + |
+DRS.M00305 + |
+Parameter error:%s + |
+
400 + |
+DRS.M00306 + |
+Start time cannot be the same as end time. + |
+
400 + |
+DRS.M00307 + |
+Only subtasks can invoke this interface. + |
+
400 + |
+DRS.M00308 + |
+Only parent tasks can invoke this interface. + |
+
400 + |
+DRS.M00401 + |
+%s is not support re-editing of synchronization tasks. + |
+
400 + |
+DRS.M00402 + |
+The subtask already exists. + |
+
400 + |
+DRS.M00403 + |
+This task does not support flow control. + |
+
422 + |
+DRS.M01501 + |
+Service error. + |
+
202 + |
+DRS.M01504 + |
+Another operation is being performed on the migration task or the migration task is abnormal. + |
+
400 + |
+DRS.M05003 + |
+Task information not found. + |
+
400 + |
+DRS.M05004 + |
+The task has been deleted or the resource has been released. + |
+
422 + |
+DRS.M05006 + |
+Invalid RDS DB instance. + |
+
200 + |
+DRS.M05066 + |
+Failed to create instance! + |
+
400 + |
+DRS.M06007 + |
+The DB instance cannot be left blank. + |
+
422 + |
+DRS.M06011 + |
+Failed to obtain RDS information. + |
+
422 + |
+DRS.M06020 + |
+The destination DB instance has been set to read/write by the migration task %s and cannot be used. + |
+
422 + |
+DRS.M06021 + |
+The destination DB instance has been set to read/write by the synchronization task %s and cannot be used. + |
+
400 + |
+DRS.M07000 + |
+The data transformation already exists. + |
+
400 + |
+DRS.KE0002 + |
+The username or password is incorrect. + |
+
400 + |
+DRS.M01503 + |
+Operation too frequent. Try again later. + |
+
Status + |
+Description + |
+
---|---|
CREATING + |
+The task is being created. + |
+
CREATE_FAILED + |
+The task fails to be created. + |
+
CONFIGURATION + |
+The task is being configured. + |
+
STARTJOBING + |
+The task is being started. + |
+
WAITING_FOR_START + |
+The task is waiting to be started. + |
+
START_JOB_FAILED + |
+The task fails to be started. + |
+
PAUSING + |
+The task is being paused. + |
+
FULL_TRANSFER_STARTED + |
+Full migration is in progress, and the DR scenario is initialized. + |
+
FULL_TRANSFER_FAILED + |
+Full migration failed. Initialization failed in the DR scenario. + |
+
FULL_TRANSFER_COMPLETE + |
+Full migration is complete, and the initialization is complete in the DR scenario. + |
+
INCRE_TRANSFER_STARTED + |
+Incremental migration is being performed, and the DR task is in progress. + |
+
INCRE_TRANSFER_FAILED + |
+Incremental migration fails and a DR exception occurs. + |
+
RELEASE_RESOURCE_STARTED + |
+The task is being stopped. + |
+
RELEASE_RESOURCE_FAILED + |
+Stop task failed. + |
+
RELEASE_RESOURCE_COMPLETE + |
+The task is stopped. + |
+
CHANGE_JOB_STARTED + |
+The task is being changed. + |
+
CHANGE_JOB_FAILED + |
+Change task failed. + |
+
CHILD_TRANSFER_STARTING + |
+The subtask is being started. + |
+
CHILD_TRANSFER_STARTED + |
+The subtask is being migrated. + |
+
CHILD_TRANSFER_COMPLETE + |
+The subtask migration is complete. + |
+
CHILD_TRANSFER_FAILED + |
+Migrate subtask failed. + |
+
RELEASE_CHILD_TRANSFER_STARTED + |
+The subtask is being stopped. + |
+
RELEASE_CHILD_TRANSFER_COMPLETE + |
+The subtask is complete. + |
+
This API is used to add rules for data processing.
+POST /v3/{project_id}/jobs/batch-transformation
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID of a tenant in a region + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+The content type. +The default value is application/json. + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token obtained from IAM. + |
+
X-Language + |
+No + |
+String + |
+Request language type +Default value: en-us +Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
jobs + |
+Yes + |
+Array of CheckDataTransformationReq objects + |
+Requests for adding data processing rules in batches. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
job_id + |
+No + |
+String + |
+Task ID. + |
+
object_info + |
+No + |
+Array of DatabaseObjectVO objects + |
+Object information. This parameter is mandatory when a processing rule is generated. + |
+
transformation_info + |
+Yes + |
+TransformationInfo object + |
+Processing information. + |
+
config_transformation + |
+No + |
+ConfigTransformationVo object + |
+
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
id + |
+No + |
+String + |
+Database name and database table name. For example, the format is lxl_test1-*-*-test_1, where lxl_test1 is the database name and test_1 is the table name. + |
+
select + |
+No + |
+String + |
+Whether to select advanced configuration. The value is true. + |
+
leavesNum + |
+No + |
+String + |
+Level of a processing object. The default value is 0. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
transformation_type + |
+Yes + |
+String + |
+
|
+
value + |
+Yes + |
+String + |
+Filter criteria. The processing rule value is a SQL statement, and the configuration rule value is config. The value contains a maximum of 256 characters. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
db_table_name + |
+Yes + |
+String + |
+Database-name.Table-name, for example, lxl_test1.test_1, where lxl_test1 is the database name and test_1 is the table name. + |
+
db_name + |
+Yes + |
+String + |
+Database name. The value contains a maximum of 256 characters. + |
+
table_name + |
+Yes + |
+String + |
+Table name The value contains a maximum of 256 characters. + |
+
col_names + |
+Yes + |
+String + |
+Column name The value contains a maximum of 256 characters. + |
+
prim_key_or_index + |
+Yes + |
+String + |
+Primary key or unique index The value contains a maximum of 256 characters. + |
+
indexs + |
+Yes + |
+String + |
+Index that requires optimization. The value contains a maximum of 256 characters. + |
+
values + |
+Yes + |
+String + |
+Filtering criteria. The value contains a maximum of 256 characters. + |
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
---|---|---|
results + |
+Array of DataTransformationResp objects + |
+Batch data processing response list. + |
+
count + |
+String + |
+Total number. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
id + |
+String + |
+Task ID. + |
+
status + |
+String + |
+Status Values: +
|
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
error_msg + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-transformation+
{ + "jobs" : [ { + "job_id" : "e894593d-5e0a-4652-af7e-1b0c239jb201", + "object_info" : [ ], + "transformation_info" : { + "transformation_type" : "configConditionalFilter", + "value" : "config" + }, + "config_transformation" : { + "col_names" : "id,name", + "db_name" : "lxl_test1", + "db_table_name" : "lxl_test1.test_1", + "indexs" : "name", + "prim_key_or_index" : "id", + "table_name" : "test_1", + "values" : "name like '%a%'" + } + } ] +}+
https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-transformation+
{ + "jobs" : [ { + "job_id" : "e894593d-5e0a-4652-af7e-1b0c239jb201", + "object_info" : [ { + "id" : "lxl_test1-*-*-test_1", + "select" : "true" + } ], + "transformation_info" : { + "transformation_type" : "contentConditionalFilter", + "value" : "id>5" + } + } ] +}+
Status code: 200
+OK
+{ + "count" : 1, + "results" : [ { + "id" : "e894593d-5e0a-4652-af7e-1b0c239jb201", + "status" : "success" + } ] +}+
Status Code + |
+Description + |
+
---|---|
200 + |
+OK + |
+
400 + |
+Bad Request + |
+
For details, see Error Code.
+A project ID needs to be specified in the URLs of some APIs. Therefore, you need to obtain a project ID before calling such APIs. To do so, perform the following operations:
+If there are multiple projects in one region, expand Region and view subproject IDs in the Project ID column.
+You can also obtain the project ID by calling the API used to query project information based on the specified criteria.
+The API used to obtain a project ID is GET https://{Endpoint}/v3/projects/, where {Endpoint} indicates the IAM endpoint. You can obtain the IAM endpoint from Regions and Endpoints. For details about API authentication, see Authentication.
+The following is an example response. The value of id is the project ID.
+{ + "projects": [ + { + "domain_id": "65382450e8f64ac0870cd180d14e684b", + "is_domain": false, + "parent_id": "65382450e8f64ac0870cd180d14e684b", + "name": "eu-de", + "description": "", + "links": { + "next": null, + "previous": null, + "self": "https://www.example.com/v3/projects/a4a5d4098fb4474fa22cd05f897d6b99" + }, + "id": "a4a5d4098fb4474fa22cd05f897d6b99", + "enabled": true + } + ], + "links": { + "next": null, + "previous": null, + "self": "https://www.example.com/v3/projects" + } +}+
An account ID is required for some URLs when an API is called. To obtain an account ID, perform the following operations:
+On the API Credentials page, view Account ID.
+Table 1 describes status codes.
+ +Status Code + |
+Code + |
+Description + |
+
---|---|---|
100 + |
+Continue + |
+The client should continue with its request. +This interim response is used to inform the client that the initial part of the request has been received and has not yet been rejected by the server. + |
+
101 + |
+Switching Protocols + |
+The protocol should be switched. The protocol can only be switched to a more advanced protocol. +For example, the current HTTP protocol is switched to a later version. + |
+
200 + |
+OK + |
+Request succeeded. + |
+
201 + |
+Created + |
+The request for creating a resource or task has been fulfilled. + |
+
202 + |
+Accepted + |
+The request has been accepted, but the processing has not been completed. + |
+
203 + |
+Non-Authoritative Information + |
+Unauthorized information. The request is successful. + |
+
204 + |
+NoContent + |
+The server has successfully processed the request, but has not returned any content. +The status code is returned in response to an HTTP OPTIONS request. + |
+
205 + |
+Reset Content + |
+The server has fulfilled the request, but the requester is required to reset the content. + |
+
206 + |
+Partial Content + |
+The server has processed certain GET requests. + |
+
300 + |
+Multiple Choices + |
+There are multiple options for the location of the requested resource. The response contains a list of resource characteristics and addresses from which the user or user agent (such as a browser) can choose the most appropriate one. + |
+
301 + |
+Moved Permanently + |
+The requested resource has been assigned a new permanent URI, and the new URI is contained in the response. + |
+
302 + |
+Found + |
+The requested resource was temporarily moved. + |
+
303 + |
+See Other + |
+Retrieve a location. +The response to the request can be found under a different URI and should be retrieved using a GET or POST method. + |
+
304 + |
+Not Modified + |
+The requested resource has not been modified. In such a case, there is no need to retransmit the resource since the client still has a previously-downloaded copy. + |
+
305 + |
+Use Proxy + |
+The requested resource must be accessed through a proxy. + |
+
306 + |
+Unused + |
+The HTTP status code is no longer used. + |
+
400 + |
+BadRequest + |
+Invalid request. +The client should not repeat the request without modifications. + |
+
401 + |
+Unauthorized + |
+The status code is returned after the client provides the authentication information, indicating that the authentication information is incorrect or invalid. + |
+
402 + |
+Payment Required + |
+This status code is reserved for future use. + |
+
403 + |
+Forbidden + |
+The request is rejected. +The server has received and understood the request; yet it refused to respond, because the request is set to deny access. Do not retry the request before modification. + |
+
404 + |
+NotFound + |
+The requested resource cannot be found. +The client should not repeat the request without modifications. + |
+
405 + |
+MethodNotAllowed + |
+The method specified in the request is not supported for the requested resource. +The client should not repeat the request without modifications. + |
+
406 + |
+Not Acceptable + |
+The server cannot fulfill the request according to the content characteristics of the request. + |
+
407 + |
+Proxy Authentication Required + |
+This status code is similar to 401, but indicates that the client must first authenticate itself with the proxy. + |
+
408 + |
+Request Time-out + |
+The server timed out waiting for the request. +The client may repeat the request without modifications at any later time. + |
+
409 + |
+Conflict + |
+The request could not be processed due to a conflict. +This status code indicates that the resource that the client attempts to create already exits, or the request fails to be processed because of the update of the conflict request. + |
+
410 + |
+Gone + |
+The requested resource is no longer available. +The requested resource has been deleted permanently. + |
+
411 + |
+Length Required + |
+The server refuses to process the request without a defined Content-Length. + |
+
412 + |
+Precondition Failed + |
+The server does not meet one of the preconditions that the requester puts on the request. + |
+
413 + |
+Request Entity Too Large + |
+The request is larger than that a server is able to process. The server may close the connection to prevent the client from continuing the request. If the server temporarily cannot process the request, the response will contain a Retry-After header field. + |
+
414 + |
+Request-URI Too Large + |
+The URI provided was too long for the server to process. + |
+
415 + |
+Unsupported Media Type + |
+The server is unable to process the media format in the request. + |
+
416 + |
+Requested range not satisfiable + |
+The requested range is invalid. + |
+
417 + |
+Expectation Failed + |
+The server fails to meet the requirements of the Expect request-header field. + |
+
422 + |
+UnprocessableEntity + |
+The request is well-formed but is unable to be processed due to semantic errors. + |
+
429 + |
+TooManyRequests + |
+The client has sent more requests than its rate limit is allowed within a given amount of time, or the server has received more requests than it is able to process within a given amount of time. In this case, it is advisable for the client to re-initiate requests after the time specified in the Retry-After header of the response expires. + |
+
500 + |
+InternalServerError + |
+The server is able to receive the request but it could not understand the request. + |
+
501 + |
+Not Implemented + |
+The server does not support the requested function. + |
+
502 + |
+Bad Gateway + |
+The server acting as a gateway or proxy receives an invalid response from a remote server. + |
+
503 + |
+ServiceUnavailable + |
+The requested service is invalid. +The client should not repeat the request without modifications. + |
+
504 + |
+ServerTimeout + |
+The request cannot be fulfilled within a given time. The response will reach the client only if the request carries a timeout parameter. + |
+
505 + |
+HTTP Version not supported + |
+The server does not support the HTTP protocol version used in the request. + |
+
Welcome to Data Replication Service (DRS). DRS is a stable, secure, and efficient cloud service for online database migration and real-time database synchronization. You can create a migration task to migrate data from a source database to a destination database.
+This document describes how to use application programming interfaces (APIs) to perform operations in DRS, such as creating, querying, obtaining, and deleting resources. For details about all supported operations, see API Overview.
+To access DRS through an API, ensure that you are familiar with DRS concepts. For details, see Product Introduction in Data Replication Service User Guide.
+DRS supports Representational State Transfer (REST) APIs, allowing you to call APIs using HTTPS. For details about API calling, see Calling APIs.
+An endpoint is the request address for calling an API. Endpoints vary depending on services and regions. For the endpoints of all services, see Regions and Endpoints.
+A domain is created after your registration. The domain has full access permissions for all of its cloud services and resources. It can be used to reset user passwords and grant user permissions. The domain is a payment entity and should not be used directly to perform routine management. For security purposes, create users and grant them permissions for routine management.
+An IAM user is created using a domain to use cloud services. Each IAM user has its own identity credentials (password and access keys).
+The domain name, username, and password will be required for API authentication.
+A region is a geographic area in which cloud resources are deployed. Availability zones (AZs) in the same region can communicate with each other over an intranet, while AZs in different regions are isolated from each other. Deploying cloud resources in different regions can better suit certain user requirements or comply with local laws or regulations.
+An AZ comprises one or multiple physical data centers equipped with independent ventilation, fire, water, and electricity facilities. Computing, network, storage, and other resources in an AZ are logically divided into multiple clusters. AZs within a region are interconnected using high-speed optical fibers to allow users to build cross-AZ high-availability systems.
+A project corresponds to a region. Default projects are defined to group and physically isolate resources (including computing, storage, and network resources) across regions. You can grant users permissions in a default project to access all resources in the region associated with the project. If you need more refined access control, create subprojects under a default project and purchase resources in subprojects. Then you can assign users the permissions required to access only the resources in the specific subprojects.
+A task ID is required for some URLs when an API is called. This section describes how to obtain a task ID.
+Alternatively, click the task name and view the task ID on the Basic Information tab.
+You can also obtain the task ID by calling the API in Creating Tasks in Batches.
+The following is an example response after a task is successfully created. In the response, id indicates the task ID.
+{ + "results" : [ { + "id" : "e11eaf8f-71ef-4fad-8890-aed7572ajb11", + "name" : "DRS-9228", + "status" : "CREATING", + "create_time" : "1599188556112" + } ], + "count" : 1 +}+
This API is used to query task statuses in batches by task ID.
+POST /v3/{project_id}/jobs/batch-status
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID of a tenant in a region + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+The content type. +The default value is application/json. + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token obtained from IAM. + |
+
X-Language + |
+No + |
+String + |
+Request language type +Default value: en-us +Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
jobs + |
+Yes + |
+Array of strings + |
+Querying task details in batches + |
+
page_req + |
+No + |
+PageReq object + |
+Pagination information. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
cur_page + |
+No + |
+Integer + |
+Current page number, which cannot exceed the maximum number of pages. (Number of pages = Number of transferred job IDs/Number of tasks on each page) +
|
+
per_page + |
+No + |
+Integer + |
+Number of items on each page. If this parameter is set to 0, all items are obtained. +
|
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
---|---|---|
results + |
+Array of QueryJobStatusResp objects + |
+Task status information + |
+
count + |
+Integer + |
+Number of returned tasks. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
id + |
+String + |
+Task ID. + |
+
status + |
+String + |
+Task status. Values: +
|
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
error_message + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
Example of querying task statuses in batches:
+https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-status+
{ + "jobs" : [ "9a470239-2308-4bb5-a6bc-1040402fjb21", "dc67695a-ee3e-49b8-a022-a099bd81jb21" ], + "page_req" : { + "cur_page" : 1, + "per_page" : 10 + } +}+
Status code: 200
+OK
+{ + "results" : [ { + "id" : "9a470239-2308-4bb5-a6bc-1040402fjb21", + "status" : "INCRE_TRANSFER_STARTED" + }, { + "id" : "dc67695a-ee3e-49b8-a022-a099bd81jb21", + "status" : "INCRE_TRANSFER_FAILED" + } ], + "count" : 2 +}+
Status Code + |
+Description + |
+
---|---|
200 + |
+OK + |
+
400 + |
+Bad Request + |
+
For details, see Error Code.
+This API is used to query task details in batches by task ID.
+POST /v3/{project_id}/jobs/batch-detail
+ +Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
project_id + |
+Yes + |
+String + |
+Project ID of a tenant in a region + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
Content-Type + |
+Yes + |
+String + |
+The content type. +The default value is application/json. + |
+
X-Auth-Token + |
+Yes + |
+String + |
+User token obtained from IAM. + |
+
X-Language + |
+No + |
+String + |
+Request language type +Default value: en-us +Values: +
|
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
jobs + |
+Yes + |
+Array of strings + |
+Querying task details in batches + |
+
page_req + |
+No + |
+PageReq object + |
+Pagination information. + |
+
Parameter + |
+Mandatory + |
+Type + |
+Description + |
+
---|---|---|---|
cur_page + |
+No + |
+Integer + |
+Current page number, which cannot exceed the maximum number of pages. (Number of pages = Number of transferred job IDs/Number of tasks on each page) +
|
+
per_page + |
+No + |
+Integer + |
+Number of items on each page. If this parameter is set to 0, all items are obtained. +
|
+
Status code: 200
+ +Parameter + |
+Type + |
+Description + |
+
---|---|---|
count + |
+Integer + |
+Number of tasks. + |
+
results + |
+Array of QueryJobResp objects + |
+Task details. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
id + |
+String + |
+Task ID. + |
+
parent_id + |
+String + |
+Parent task ID. + |
+
name + |
+String + |
+Task name. + |
+
status + |
+String + |
+Task status. Values: +
|
+
description + |
+String + |
+Description. + |
+
create_time + |
+String + |
+Creation time, in timestamp format. + |
+
task_type + |
+String + |
+Task mode. Values: +
|
+
source_endpoint + |
+Endpoint object + |
+Source database information. + |
+
dmq_endpoint + |
+Endpoint object + |
+DMQ information body. + |
+
source_sharding + |
+Array of Endpoint objects + |
+Information about the physical source database. + |
+
target_endpoint + |
+Endpoint object + |
+Information body of the destination database. + |
+
net_type + |
+String + |
+Network type. Values: +
|
+
failed_reason + |
+String + |
+Failure cause. + |
+
inst_info + |
+InstInfo object + |
+Replication instance information. + |
+
actual_start_time + |
+String + |
+Start time, in timestamp format. + |
+
full_transfer_complete_time + |
+String + |
+Full migration completion time, in timestamp format. + |
+
update_time + |
+String + |
+Update time, in timestamp format. + |
+
job_direction + |
+String + |
+Task direction. Values: +
|
+
db_use_type + |
+String + |
+Migration scenario Values: +
|
+
need_restart + |
+Boolean + |
+Whether the instance needs to be restarted. + |
+
is_target_readonly + |
+Boolean + |
+Whether the destination instance is restricted to read-only. + |
+
conflict_policy + |
+String + |
+Conflict policy. Values: +
|
+
filter_ddl_policy + |
+String + |
+DDL filtering policy. Values: +
|
+
speed_limit + |
+Array of SpeedLimitInfo objects + |
+Migration speed limit. + |
+
schema_type + |
+String + |
+Migration schemes. Values: +
|
+
node_num + |
+String + |
+The number of nodes. + |
+
object_switch + |
+Boolean + |
+Whether to select objects. + |
+
master_job_id + |
+String + |
+Main task ID + |
+
full_mode + |
+String + |
+Full snapshot mode. + |
+
struct_trans + |
+Boolean + |
+Whether to migrate the structure. + |
+
index_trans + |
+Boolean + |
+Whether to migrate indexes. + |
+
replace_definer + |
+Boolean + |
+Whether to replace the definer with the user of the destination database. + |
+
migrate_user + |
+Boolean + |
+Whether to migrate users. + |
+
sync_database + |
+Boolean + |
+Whether to perform database-level synchronization. + |
+
error_code + |
+String + |
+Error code, which is optional and indicates the returned information about the failure status. + |
+
error_message + |
+String + |
+Error message, which is optional and indicates the returned information about the failure status. + |
+
target_root_db + |
+DefaultRootDb object + |
+Information about the root node database of the destination instance. + |
+
az_code + |
+String + |
+AZ where the node is located. + |
+
vpc_id + |
+String + |
+VPC to which the node belongs. + |
+
subnet_id + |
+String + |
+Subnet where the node is located. + |
+
security_group_id + |
+String + |
+Security group to which the node belongs. + |
+
multi_write + |
+Boolean + |
+Whether the task is a multi-active DR task. The value is true when the task is a dual-active DR task. + |
+
support_ip_v6 + |
+Boolean + |
+Whether IPv6 is supported + |
+
inherit_id + |
+String + |
+Inherited task ID. + |
+
gtid + |
+String + |
+GTID set of breakpoints. + |
+
alarm_notify + |
+QuerySmnInfoResp object + |
+Exception notification settings. + |
+
is_multi_az + |
+Boolean + |
+Whether the task is a cross-AZ synchronization task. + |
+
az_name + |
+String + |
+AZ name of the node. + |
+
master_az + |
+String + |
+Primary AZ of the cross-AZ task. + |
+
slave_az + |
+String + |
+Standby AZ of the cross-AZ task. + |
+
node_role + |
+String + |
+Primary/Standby role of a task. + |
+
incre_start_position + |
+String + |
+Start point of an incremental task. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
db_type + |
+String + |
+Database type. Values: +
|
+
az_code + |
+String + |
+Code of the AZ where the database is located. + |
+
region + |
+String + |
+Region where the DB instance is located. This parameter is mandatory when the database is a cloud instance, for example, an RDS or GaussDB(for MySQL) instance. + |
+
inst_id + |
+String + |
+DB instance ID. This parameter is mandatory when the database is a cloud instance, for example, an RDS or GaussDB(for MySQL) instance. + |
+
vpc_id + |
+String + |
+ID of the VPC where the database is located. + |
+
subnet_id + |
+String + |
+ID of the subnet where the database is located. + |
+
security_group_id + |
+String + |
+ID of the security group to which the database belongs. + |
+
project_id + |
+String + |
+Project ID of an RDS DB instance. + |
+
db_password + |
+String + |
+Database password. + |
+
db_port + |
+Integer + |
+Database port. The value is an integer ranging from 1 to 65535. + |
+
db_user + |
+String + |
+Database user. + |
+
inst_name + |
+String + |
+The name of an RDS or GaussDB(for MySQL) instance. + |
+
ip + |
+String + |
+Database IP address. + |
+
mongo_ha_mode + |
+String + |
+Mongo HA mode. + |
+
ssl_cert_password + |
+String + |
+SSL certificate password. The certificate file name extension is .p12. + |
+
ssl_cert_check_sum + |
+String + |
+The checksum value of the SSL certificate, which is used for backend verification. This parameter is mandatory for secure connection to the source database. + |
+
ssl_cert_key + |
+String + |
+SSL certificate content, which is encrypted using Base64. + |
+
ssl_cert_name + |
+String + |
+SSL certificate name. + |
+
ssl_link + |
+String + |
+Whether SSL is enabled. + |
+
cluster_mode + |
+String + |
+For MongoDB 4.0 or later, if the cluster instance cannot obtain the IP address of the sharded node, set source_endpoint to Sharding4.0+. +Default value: Sharding4.0+ +Enumerated value: +
|
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
engine_type + |
+String + |
+Engine type of a DRS task. Values: +
|
+
inst_type + |
+String + |
+DB instance type. Values: +
|
+
ip + |
+String + |
+Private IP address of the replication instance. + |
+
public_ip + |
+String + |
+EIP of the replication instance. + |
+
start_time + |
+Integer + |
+Scheduled start time of a replication instance task. + |
+
status + |
+String + |
+Replication instance status. Values: +
|
+
volume_size + |
+Integer + |
+Storage space of a replication instance. + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
begin + |
+String + |
+Start time of flow control. + |
+
end + |
+String + |
+End time of flow control. + |
+
is_utc + |
+Boolean + |
+Whether the UTC time is used. + |
+
speed + |
+String + |
+Flow control + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
db_name + |
+String + |
+Database name. + |
+
db_encoding + |
+String + |
+Encoding format + |
+
Parameter + |
+Type + |
+Description + |
+
---|---|---|
subscriptions + |
+Array of SubscriptionInfo objects + |
+SMN information. + |
+
topic_name + |
+String + |
+Topic name. + |
+
delay_time + |
+Long + |
+Subscription delay. + |
+
rto_delay + |
+Long + |
+RTO delay. + |
+
rpo_delay + |
+Long + |
+RPO delay. + |
+
alarm_to_user + |
+Boolean + |
+Whether to notify users of alarms. + |
+
Request for querying task details:
+https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-detail+
{ + "jobs" : [ "24834eb6-be30-464e-a299-f7aa730jb101", "140b5236-88ad-43c8-811c-1268453jb101" ], + "page_req" : { + "cur_page" : 1, + "per_page" : 10 + } +}+
Status code: 200
+OK
+{ + "count" : 2, + "results" : [ { + "id" : "24834eb6-be30-464e-a299-f7aa730jb101", + "name" : "DRS-3999-lws", + "status" : "STARTJOBING", + "description" : "", + "create_time" : "1608519469412", + "task_type" : "FULL_INCR_TRANS", + "source_endpoint" : { + "ip" : "172.22.74.56", + "region" : "eu-de", + "db_type" : "mysql", + "db_port" : 3306, + "ssl_link" : false, + "project_id" : "054ba152d480d55b2f5dc0069e7ddef0", + "db_user" : "root" + }, + "target_endpoint" : { + "ip" : "172.21.176.219", + "region" : "eu-de", + "db_type" : "mysql", + "db_port" : 3306, + "ssl_link" : false, + "inst_id" : "3ef57dbcc8db478a9e346d26ef2575bfin01", + "project_id" : "054ba152d480d55b2f5dc0069e7ddef0", + "inst_name" : "rds-lws-target", + "db_user" : "root", + "vpc_id" : "0ff8df7b-f0e9-4b16-ac16-1db3dacb69e4", + "subnet_id" : "f857d371-2f03-4622-85f6-2b7d42d0d82c" + }, + "inst_info" : { + "ip" : "172.16.213.101", + "inst_type" : "high", + "engine_type" : "mysql", + "volume_size" : 100, + "public_ip" : "10.154.219.202", + "start_time" : "0" + }, + "actual_start_time" : "1608520069393", + "update_time" : "1608520068979", + "job_direction" : "up", + "db_use_type" : "migration", + "need_restart" : false, + "is_target_readonly" : true, + "speed_limit" : [ ], + "schema_type" : "Tungsten", + "object_switch" : true, + "replace_definer" : true, + "migrate_user" : false, + "az_code" : "az2xahz", + "vpc_id" : "0ff8df7b-f0e9-4b16-ac16-1db3dacb69e4", + "subnet_id" : "f857d371-2f03-4622-85f6-2b7d42d0d82c", + "security_group_id" : "d90c971b-4b9d-402c-9c59-5c239389b8dd", + "support_ip_v6" : false + }, { + "id" : "140b5236-88ad-43c8-811c-1268453jb101", + "name" : "DRS-0042-linxiaolu", + "status" : "CONFIGURATION", + "description" : "", + "create_time" : "1608366204171", + "task_type" : "FULL_INCR_TRANS", + "source_endpoint" : { + "ip" : "192.168.0.27", + "region" : "eu-de", + "db_type" : "mysql", + "db_port" : 3306, + "ssl_link" : false, + "project_id" : "054ba152d480d55b2f5dc0069e7ddef0", + "db_user" : "root" + }, + "target_endpoint" : { + "ip" : "192.168.0.131", + "region" : "eu-de", + "db_type" : "mysql", + "db_port" : 3306, + "ssl_link" : false, + "inst_id" : "e05a3679efe241d8b5dee80b17c1a863in01", + "project_id" : "054ba152d480d55b2f5dc0069e7ddef0", + "inst_name" : "rds-1417-lxl", + "db_user" : "root", + "vpc_id" : "65f0391c-0582-44a6-aa50-248f97ed82e1", + "subnet_id" : "352ad828-3467-4f03-987a-c55a5a9dd417" + }, + "inst_info" : { + "ip" : "192.168.0.229", + "status" : "ACTIVE", + "inst_type" : "high", + "engine_type" : "mysql", + "volume_size" : 100, + "public_ip" : "10.154.219.72", + "start_time" : "0" + }, + "actual_start_time" : "1608369232412", + "full_transfer_complete_time" : "1608369510202", + "update_time" : "1608517066434", + "job_direction" : "up", + "db_use_type" : "migration", + "need_restart" : false, + "is_target_readonly" : true, + "speed_limit" : [ ], + "schema_type" : "Tungsten", + "object_switch" : false, + "replace_definer" : true, + "migrate_user" : false, + "az_code" : "az2xahz", + "vpc_id" : "65f0391c-0582-44a6-aa50-248f97ed82e1", + "subnet_id" : "352ad828-3467-4f03-987a-c55a5a9dd417", + "security_group_id" : "d90c971b-4b9d-402c-9c59-5c239389b8dd", + "support_ip_v6" : false + } ] +}+
Status Code + |
+Description + |
+
---|---|
200 + |
+OK + |
+
For details, see Error Code.
+Released On + |
+Description + |
+
---|---|
2022-10-30 + |
+This issue is the sixth official release, which incorporates the following change: +
|
+
2022-04-14 + |
+This issue is the fifth official release, which incorporates the following change: +
|
+
2022-01-24 + |
+This issue is the fourth official release, which incorporates the following changes: +
|
+
2022-01-11 + |
+This issue is the third official release, which incorporates the following change: +
|
+
2021-08-04 + |
+This issue is the second official release, which incorporates the following change: +
|
+
2021-04-25 + |
+The issue is the first official release. + |
+