数据复制服务 DRS-批量测试连接-集群模式:请求示例

时间:2024-10-18 19:41:51

请求示例

  • MySQL主备任务测试连接
    https://{endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/cluster/batch-connection
    
    {
    	"jobs": [{
    		"action": "testConnection",
    		"job_id": "0ac45233-8de7-4f02-9de1-d71cab7jb201",
    		"property": "[{\"ip\":\"192.168.2.232:3306\",\"dbtype\":\"mysql\",\"dbuser\":\"root\",\"dbpassword\":\"******\",\"ssllink\":false,\"projectId\":\"054ba152d480d55b2f5dc0069e7ddef0\",\"region\":\"cn-xianhz-1\",\"nettype\":\"eip\",\"endpointtype\":\"so\"}]"
    	}]
    }
  • 源库为DDS集群测试连接
    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\":\"******\"},{\"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\":\"******\"},{\"ip\":\"192.168.7.37:8635\",\"nettype\":\"eip\",\"dbtype\":\"mongodb\",\"dbport\":0,\"dbuser\":\"rwuser\",\"dbpassword\":\"******\",\"ssllink\":false,\"sslcertkey\":\"\",\"sslcertname\":\"\",\"sslcertchecksum\":\"\",\"endpointtype\":\"ls\",\"dbName\":\"admin\"}]"
      } ]
    }
support.huaweicloud.com/api-drs/drs_03_0106.html