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

时间:2024-09-09 14:42:23

请求示例

更新租户指定ID批量异步任务详情,任务模式为全量+增量,公网网络类型。

https://{endpoint}/v5/054ba152d480d55b2f5dc0069e7ddef0/batch-async-jobs/bd4193aa-072d-4ce6-beec-adffc7252341

{
  "jobs" : [ {
    "type" : "all",
    "params" : {
      "job_id" : "c7debc9c-8e09-4a5d-8dd6-cc44f78jb20r",
      "base_info" : {
        "name" : "DRS-1234",
        "job_type" : "sync",
        "engine_type" : "oracle-to-gaussdbv5",
        "job_direction" : "up",
        "task_type" : "FULL_INCR_TRANS",
        "net_type" : "eip",
        "charging_mode" : "on_demand",
        "enterprise_project_id" : "0",
        "description" : "",
        "expired_days" : "14",
        "tags" : [ {
          "key" : "test",
          "value" : "test"
        } ]
      },
      "source_endpoint" : [ {
        "db_type" : "oracle",
        "endpoint_type" : "offline",
        "endpoint_role" : "so",
        "endpoint" : {
          "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" : {
          "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"
        }
      } ],
      "alarm_notify" : {
        "alarm_to_user" : true,
        "topic_urn" : "urn:smn:cn-north-4:f2c2468c3ee7410c862a461ca073d2f2:test",
        "delay_time" : 60
      },
      "speed_limit" : [ {
        "begin" : "16:00",
        "end" : "15:59",
        "speed" : "10"
      } ],
      "policy_config" : {
        "ddl_trans" : false
      },
      "db_object" : {
        "object_scope" : "table",
        "target_root_db" : {
          "db_name" : "target_db_name",
          "db_encoding" : "utf8"
        },
        "object_info" : {
          "source_db1" : {
            "name" : "source_db1",
            "all" : false,
            "tables" : {
              "source_tb1" : {
                "type" : "table",
                "name" : "source_tb1",
                "all" : true
              },
              "source_tb2" : {
                "type" : "table",
                "name" : "source_tb2",
                "all" : true
              }
            }
          }
        }
      },
      "node_info" : {
        "spec" : {
          "node_type" : "medium"
        }
      }
    }
  }, {
    "type" : "endpoint",
    "params" : {
      "job_id" : "dc6016cf-f3b6-4c2d-b4d7-5084b0fjb20r",
      "source_endpoint" : [ {
        "db_type" : "oracle",
        "endpoint_type" : "offline",
        "endpoint_role" : "so",
        "endpoint" : {
          "endpoint_name" : "oracle",
          "ip" : "10.154.227.134",
          "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" : "f59e6118-da89-4fdb-9b98-65f56709928a",
          "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"
        },
        "ssl" : {
          "ssl_link" : false
        }
      } ]
    }
  } ]
}
support.huaweicloud.com/api-drs/drs_03_0168.html