数据复制服务 DRS-修改对比策略:请求示例

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

请求示例

  • 打开周期性对比,策略为每天对比,生效时间段为UTC时间的00:00:00到04:00:00,北京时间(UTC+08:00)08:00:00到12:00:00,对比类型为行数对比
    https://{endpoint}/v5/5237e10fe9aa4ad5b16b6a5245248314/jobs/163b98e8-6088-46c3-8b86-c18fea6jb502/compare-policy
    
    {
      "action" : "open",
      "begin_time" : "00:00:00",
      "compare_policy" : "normal",
      "compare_type" : [ "lines" ],
      "end_time" : "04:00:00",
      "period" : "* * 1,2,3,4,5,6,7"
    }
  • 打开周期性对比,策略为每周周一、周三、周五对比,生效时间段为UTC时间的00:00:00到09:00:00,北京时间(UTC+08:00)08:00:00到17:00:00,对比类型为行数和对象对比
    https://{endpoint}/v5/5237e10fe9aa4ad5b16b6a5245248314/jobs/163b98e8-6088-46c3-8b86-c18fea6jb502/compare-policy
    
    {
      "action" : "open",
      "begin_time" : "00:00:00",
      "compare_type" : [ "lines", "object_comparison" ],
      "end_time" : "09:00:00",
      "period" : "* * 1,3,5"
    }
  • 关闭周期性对比
    https://{endpoint}/v5/5237e10fe9aa4ad5b16b6a5245248314/jobs/163b98e8-6088-46c3-8b86-c18fea6jb502/compare-policy
    
    {
      "action" : "close"
    }
  • 打开周期性对比,策略为按小时对比,生效时间段为UTC时间00:00:00到04:00:00,北京时间(UTC+08:00)08:00:00到12:00:00,间隔1小时对比一次,对比类型为行数和对象对比
    https://{endpoint}/v5/5237e10fe9aa4ad5b16b6a5245248314/jobs/163b98e8-6088-46c3-8b86-c18fea6jb502/compare-policy
    
    {
      "action" : "open",
      "begin_time" : "00:00:00",
      "compare_policy" : "normal",
      "compare_type" : [ "lines", "object_comparison" ],
      "end_time" : "04:00:00",
      "period" : "* * 1,2,3,4,5,6,7",
      "interval_hour" : 1
    }
support.huaweicloud.com/api-drs/drs_03_0259.html