云服务器内容精选

  • 响应示例 状态码: 202 Accepted { "results" : [ { "id" : "e11eaf8f-71ef-4fad-8890-aed7572ajb11", "name" : "DRS-9228", "status" : "CREATING", "create_time" : "1599188556112" } ], "count" : 1 }
  • 响应参数 状态码: 202 表10 响应Body参数 参数 参数类型 描述 results Array of objects 批量创建任务的响应体集合。 详情请参见表11。 count Integer 总记录数。 表11 results字段数据结构说明 参数 参数类型 描述 id String 任务ID。 child_ids Array of strings 子任务ID集合,有子任务时返回该字段。 name String 任务名称。 status String 任务状态。 create_time String 创建时间,时间戳。 error_code String 错误码。 error_msg String 错误信息。
  • 请求示例 批量创建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" } ] }