数据复制服务 DRS-批量异步创建任务:请求示例

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

请求示例

  • 批量异步创建Oracle到 GaussDB 分布式版按需实时同步任务,任务模式为全量+增量,公网网络类型。
    https://{endpoint}/v5/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-async-create
    
    {
      "jobs" : [ {
        "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"
          }
        }
      } ]
    }
support.huaweicloud.com/api-drs/drs_03_0164.html