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

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

请求示例

  • 批量创建MySQL入云实时迁移任务,任务模式为全量+增量,网络类型为公网网络
    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" : "cn-xianhz-1",
          "db_type" : "mysql",
          "inst_id" : "e05a3679efe241d8b5dee80b17c1a863in01"
        },
        "is_target_readonly" : false,
        "bind_eip" : true
      } ]
    }
  • 批量创建MySQL本云为备实时灾备任务,网络类型为公网网络
    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" : "cn-xianhz-1",
          "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
      } ]
    }
  • 批量创建DDS副本入云实时迁移任务,任务模式为全量+增量,网络类型为公网网络
    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" : "cn-xianhz-1",
          "db_type" : "mongodb",
          "inst_id" : "3cadd5a0ef724f55ac7fa5bcb5f4fc5fin02"
        },
        "bind_eip" : true
      } ]
    }
  • 创建MySQL主备入云同步任务,任务模式为全量+增量,网络类型为公网网络
    https://{endpoint}/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" : "cn-xianhz-1",
          "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"
      } ]
    }
support.huaweicloud.com/api-drs/drs_03_0104.html