数据复制服务 DRS-更新指定ID任务详情:请求示例

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

请求示例

  • 更新租户指定ID任务对象信息
    https://{endpoint}/v5/054ba152d480d55b2f5dc0069e7ddef0/jobs/c7debc9c-8e09-4a5d-8dd6-cc44f78jb20r 
      
     { 
       "job" : { 
         "type" : "db_object", 
         "params" : { 
           "db_object" : { 
             "object_scope" : "table", 
             "target_root_db" : { 
               "db_name" : "mytest", 
               "db_encoding" : "utf8" 
             }, 
             "object_info" : { 
               "TEST1" : { 
                 "name" : "TEST1", 
                 "tables" : { 
                   "TBL_1" : { 
                     "name" : "TBL_1", 
                     "type" : "table", 
                     "all" : true, 
                     "is_synchronized" : false 
                   }, 
                   "TBL_2" : { 
                     "name" : "TBL_2", 
                     "type" : "table", 
                     "all" : true, 
                     "is_synchronized" : false 
                   } 
                 } 
               }, 
               "TEST2" : { 
                 "name" : "TEST2", 
                 "all" : true, 
                 "tables" : { 
                   "WT_1" : { 
                     "name" : "WT_1", 
                     "type" : "table", 
                     "all" : true, 
                     "is_synchronized" : false 
                   }, 
                   "WT_2" : { 
                     "name" : "WT_2", 
                     "type" : "table", 
                     "all" : true, 
                     "is_synchronized" : false 
                   } 
                 } 
               } 
             } 
           } 
         } 
       } 
     }
  • 更新租户指定ID任务名称为DRS-1234。
    https://{endpoint}/v5/054ba152d480d55b2f5dc0069e7ddef0/jobs/c7debc9c-8e09-4a5d-8dd6-cc44f78jb20r
    
    {
      "job" : {
        "type" : "name",
        "params" : {
          "base_info" : {
            "name" : "DRS-1234"
          }
        }
      }
    }
  • 更新任务源库、目标库的信息。
    https://{endpoint}/v5/054ba152d480d55b2f5dc0069e7ddef0/jobs/c7debc9c-8e09-4a5d-8dd6-cc44f78jb20r
    
    {
      "job" : {
        "type" : "endpoint",
        "params" : {
          "source_endpoint" : [ {
            "db_type" : "oracle",
            "endpoint_type" : "offline",
            "endpoint_role" : "so",
            "endpoint" : {
              "id" : "f59e6118-da89-4fdb-9b98-65f56709928a",
              "endpoint_name" : "oracle",
              "ip" : "10.154.217.239",
              "db_port" : "1521",
              "db_user" : "ORACLE_USER",
              "db_name" : "serviceName.orcl",
              "db_password" : "******"
            },
            "ssl" : {
              "ssl_link" : false
            }
          } ],
          "target_endpoint" : [ {
            "db_type" : "gaussdbv5",
            "endpoint_type" : "cloud",
            "endpoint_role" : "ta",
            "endpoint" : {
              "id" : "10deb576-8885-473b-a213-4d76e668dc0d",
              "endpoint_name" : "cloud_gaussdbv5",
              "instance_id" : "c2c7579bc09c490b9d8009db715aeb0ain14",
              "db_user" : "root",
              "db_password" : "******"
            },
            "cloud" : {
              "region" : "cn-north-4",
              "project_id" : "9dc8c0f3f74c4dbb23c29cf0318ee561",
              "az_code" : "cn-north-4a,cn-north-4g,cn-north-4c"
            },
            "vpc" : {
              "vpc_id" : "2cb5d364-ae63-4fbb-85b7-7d59f4a88f8f",
              "subnet_id" : "2cb54324-ae63-4fbb-85b7-7d59f4a88f8f",
              "security_group_id" : "039a3s89-665a-43e2-9b4f-bda7d9ee148d"
            }
          } ]
        }
      }
    }
support.huaweicloud.com/api-drs/drs_03_0160.html