对象存储迁移服务 OMS-创建迁移任务:请求示例
请求示例
使用阿里云A方式进行https CDN方式迁移,开启按时段限速,限速值为50MB/S,将对象列表object_list_file.txt中的对象列表执行迁移,并开启迁移结果通知。
POST https://{endpoint}/v2/{project_id}/tasks { "task_type" : "list", "src_node" : { "cloud_type" : "HuaweiCloud", "region" : "cn-north-1", "bucket" : "src_bucket", "ak" : "src_ak", "sk" : "src_sk", "list_file" : { "obs_bucket" : "list_file_bucket", "list_file_key" : "object_list_file.txt" } }, "dst_node" : { "region" : "cn-north-1", "ak" : "dst_ak", "sk" : "dst_sk", "bucket" : "dst_bucket" }, "enable_kms" : false, "enable_failed_object_recording" : true, "description" : "xxx", "migrate_since" : 123456789, "bandwidth_policy" : [ { "start" : "00:00", "end" : "23:59", "max_bandwidth" : 50000000 } ], "source_cdn" : { "protocol" : "https", "domain" : "xxx.xxx.xxx", "authentication_type" : "ALIYUN_OSS_A", "authentication_key" : "xxx" }, "smn_config" : { "topic_urn" : "urn:smn:region:4cf2090802d94440b4cdd72ef26857b2: OMS ", "trigger_conditions" : [ "SUC CES S", "FAILURE" ], "language" : "en-us" } }
使用阿里云A方式进行https CDN方式迁移,开启按时段限速,限速值为50MB/S,将对象文件/前缀["file1.xxx", "file2.xxx", "path1/"]进行迁移,并开启迁移结果通知
POST https://{endpoint}/v2/{project_id}/tasks { "task_type" : "object", "src_node" : { "cloud_type" : "HuaweiCloud", "region" : "cn-north-1", "bucket" : "src_bucket", "ak" : "src_ak", "sk" : "src_sk", "object_key" : [ "file1.xxx", "file2.xxx", "path1/" ] }, "dst_node" : { "region" : "cn-north-1", "ak" : "dst_ak", "sk" : "dst_sk", "bucket" : "dst_bucket" }, "enable_kms" : false, "enable_failed_object_recording" : true, "description" : "xxx", "migrate_since" : 123456789, "bandwidth_policy" : [ { "start" : "00:00", "end" : "23:59", "max_bandwidth" : 50000000 } ], "source_cdn" : { "protocol" : "https", "domain" : "xxx.xxx.xxx", "authentication_type" : "ALIYUN_OSS_A", "authentication_key" : "xxx" }, "smn_config" : { "topic_urn" : "urn:smn:region:4cf2090802d94440b4cdd72ef26857b2:OMS", "trigger_conditions" : [ "SUCCESS", "FAILURE" ], "language" : "en-us" } }
创建URL列表迁移任务,将object_list_file.txt中的URL列表执行迁移。
POST https://{endpoint}/v2/{project_id}/tasks { "task_type" : "url_list", "src_node" : { "cloud_type" : "URLSource", "list_file" : { "obs_bucket" : "list_file_bucket", "list_file_key" : "object_list_file.txt" } }, "dst_node" : { "region" : "cn-north-1", "ak" : "dst_ak", "sk" : "dst_sk", "bucket" : "dst_bucket" }, "enable_kms" : false, "enable_failed_object_recording" : true, "description" : "xxx" }
创建前缀迁移任务,将[ "abc", "123", "prefix3", "path/prefix4" ]为前缀的对象文件进行迁移。
POST https://{endpoint}/v2/{project_id}/tasks { "task_type" : "prefix", "src_node" : { "cloud_type" : "HuaweiCloud", "region" : "cn-north-1", "bucket" : "src_bucket", "ak" : "src_ak", "sk" : "src_sk", "object_key" : [ "abc", "123", "prefix3", "path/prefix4" ] }, "dst_node" : { "region" : "cn-north-1", "ak" : "dst_ak", "sk" : "dst_sk", "bucket" : "dst_bucket" }, "enable_kms" : false, "enable_failed_object_recording" : true, "description" : "xxx" }