List Migration Task Groups
Function
This API is used to list all migration task groups in a user account.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
oms:taskgroup:list
List
taskgroup *
-
-
-
URI
GET /v2/{project_id}/taskgroups
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
The project ID. Minimum: 1 Maximum: 1024 |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
limit |
No |
Integer |
The maximum number of migration task groups displayed on one page. The default value is 10. A maximum of 100 records can be returned. Minimum: 1 Maximum: 100 Default: 10 |
|
offset |
No |
Integer |
The start serial number of migration task groups. The default value is 0. The value must be greater than or equal to 0. If offset is set to 0, the query starts from the first record. Minimum: 0 Maximum: 2147483647 Default: 0 |
|
status |
No |
Integer |
The migration task group status. If this parameter is not specified, groups in all statuses are queried. 0: waiting 1: executing/creating 2: monitoring 3: paused 4: creation failed 5: migration failed 6: succeeded 7: pausing 8: waiting to be deleted 9: deleted Minimum: 0 Maximum: 9 |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
The token used for IAM authentication. Minimum: 1 Maximum: 16384 |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
count |
Long |
The total number of migration task groups that meet the search criteria. Minimum: 0 Maximum: 9223372036854775807 |
|
taskgroups |
Array of TaskGroupResp objects |
The details of queried migration task groups. Array Length: 0 - 100 |
|
Parameter |
Type |
Description |
|---|---|---|
|
group_id |
String |
Task group ID. Minimum: 1 Maximum: 100 |
|
status |
Integer |
The migration task group status. 0: Waiting 1: Executing/Creating 2: Monitoring 3. Paused 4: Creation failed 5: Migration failed 6: Succeeded 7: Paused 8: Waiting to be deleted 9: Deleted Minimum: 0 Maximum: 9 |
|
error_reason |
ErrorReasonResp object |
The cause for the task group failure. This field is left blank when the task group is not in the Failed state. |
|
src_node |
TaskGroupSrcNodeResp object |
The source information. |
|
description |
String |
The task group description, which cannot exceed 255 characters. The following special characters are not allowed: ^<>&"' Minimum: 0 Maximum: 255 |
|
dst_node |
TaskGroupDstNodeResp object |
The destination information. |
|
enable_metadata_migration |
Boolean |
Whether metadata migration is enabled. This function is disabled by default. Even if this function is disabled, the Content-Type metadata will still be migrated to ensure a successful migration. Default: false |
|
enable_failed_object_recording |
Boolean |
Whether the function of recording failed objects is enabled. |
|
enable_restore |
Boolean |
Whether automatic restoration of archived data is enabled. It takes a long time to restore archived data in the source bucket, which will greatly slow down the migration speed. You are advised to restore the archived data before the migration.If this function is enabled, archived objects will be automatically restored and then migrated. If this function is disabled, archived objects will be ignored during the migration, and their information will be recorded in the list of failed objects. |
|
task_type |
String |
The task type. The default value is PREFIX. LIST: migrates only the objects recorded in a predefined object list. URL_LIST: migrates only the objects recorded in a predefined URL list. PREFIX: migrates only the objects that match the specified prefixes. Enumeration values: |
|
bandwidth_policy |
Array of BandwidthPolicyDto objects |
The traffic limiting rules. Each element in the array corresponds to the maximum bandwidth in a time period. A maximum of five periods are allowed, and the periods cannot overlap. Array Length: 0 - 5 |
|
smn_config |
SmnInfo object |
The configuration of SMN message sending. |
|
source_cdn |
SourceCdnResp object |
Whether migration from CDN is enabled. If this field is included, migration from CDN is supported. Otherwise, it is not supported. If migration from CDN is enabled, the source objects to be migrated are obtained from the specified CDN domain name during migration. |
|
migrate_since |
Long |
A timestamp in milliseconds. Only source objects that are modified after the specified timestamp will be migrated. The default value 0 indicates that no time is specified. Minimum: 0 Maximum: 9223372036854775807 Default: 0 |
|
migrate_speed |
Long |
The migration speed (byte/s). Minimum: 0 Maximum: 9223372036854775807 |
|
total_time |
Long |
The total time used by the migration task group, in milliseconds. Minimum: 0 Maximum: 9223372036854775807 |
|
start_time |
Long |
The start time (Unix timestamp, in millisecond) of the migration task group. Minimum: 0 Maximum: 9223372036854775807 |
|
total_task_num |
Long |
The total number of migration tasks in the task group. Minimum: 0 Maximum: 9223372036854775807 |
|
create_task_num |
Long |
The number of created migration tasks in the task group. Minimum: 0 Maximum: 9223372036854775807 |
|
failed_task_num |
Long |
The number of failed migration tasks in the task group. Minimum: 0 Maximum: 9223372036854775807 |
|
complete_task_num |
Long |
The number of completed migration tasks in the task group. Minimum: 0 Maximum: 9223372036854775807 |
|
paused_task_num |
Long |
The number of paused migration tasks in the task group. Minimum: 0 Maximum: 9223372036854775807 |
|
executing_task_num |
Long |
The number of migration tasks being executed in the task group. Minimum: 0 Maximum: 9223372036854775807 |
|
waiting_task_num |
Long |
The number of waiting migration tasks in the task group. Minimum: 0 Maximum: 9223372036854775807 |
|
total_num |
Long |
The total number of objects to be migrated in the migration task group. Minimum: 0 Maximum: 9223372036854775807 |
|
create_complete_num |
Long |
The total number of objects contained in created migration tasks. Minimum: 0 Maximum: 9223372036854775807 |
|
success_num |
Long |
The number of migrated objects. Minimum: 0 Maximum: 9223372036854775807 |
|
fail_num |
Long |
The number of failed objects. Minimum: 0 Maximum: 9223372036854775807 |
|
skip_num |
Long |
The number of skipped objects. Minimum: 0 Maximum: 9223372036854775807 |
|
total_size |
Long |
The size (in bytes) of the objects that have been migrated. Minimum: 0 Maximum: 9223372036854775807 |
|
create_complete_size |
Long |
The total size (in bytes) of objects migrated in the created migration tasks. Minimum: 0 Maximum: 9223372036854775807 |
|
complete_size |
Long |
The total size of migrated objects, in bytes. Minimum: 0 Maximum: 9223372036854775807 |
|
failed_object_record |
FailedObjectRecordDto object |
The record of failed objects. |
|
object_overwrite_mode |
String |
How a source object handles its paired destination object, either overwriting the object or skipping the migration. The default value is SIZE_LAST_MODIFIED_COMPARISON_OVERWRITE.NO_OVERWRITE indicates the system never allows overwriting. The system always skips source objects and keeps their paired destination objects.SIZE_LAST_MODIFIED_COMPARISON_OVERWRITE: The system allows overwriting based on the results of size or modification time checks. This is the default value. If a source object has the same name as the paired destination object, the system compares the sizes and last modification time of the source and destination objects to determine whether to overwrite the destination object. The encryption status of the source and destination objects must be the same. If the source object has a different size or was last modified more recently than its paired destination object, the destination object will be overwritten.CRC64_COMPARISON_OVERWRITE: The system allows overwriting if the source and destination objects have different CRC64 checksums. This option is only available for migration within Huawei Cloud or from Alibaba Cloud or Tencent Cloud. If a source object has a CRC64 checksum different from its paired destination object, the destination object will be overwritten. The encryption status of the source and destination objects must be the same. If there are no CRC64 checksums in the metadata, the SIZE_LAST_MODIFIED_COMPARISON_OVERWRITE value is used.FULL_OVERWRITE indicates the system always allows overwriting. The system always allows source objects to overwrite their paired destination objects. Enumeration values: |
|
dst_storage_policy |
String |
The destination storage class. This parameter is required only when the destination is Huawei Cloud OBS. The default value is STANDARD. STANDARD: Huawei Cloud OBS Standard storage IA: Huawei Cloud OBS Infrequent Access storage ARCHIVE: Huawei Cloud OBS Archive storage DEEP_ARCHIVE: Huawei Cloud OBS Deep Archive storage SRC_STORAGE_MAPPING: The source storage class is retained and mapped to Huawei Cloud OBS storage class. Default: STANDARD Minimum: 0 Maximum: 128 Enumeration values: |
|
obs_system |
String |
OBS system type. BUCKET: general bucket. PFS: parallel file system. Enumeration values: |
|
consistency_check |
String |
The method for checking whether objects are consistent before and after migration. The encryption status of the source and destination objects must be the same. The check method and results will be recorded in the object list. The default value is size_last_modified.size_last_modified: The default value. The system checks object consistency with object size and last modification time. If the source and destination objects have the same size and the destination's last modification time is not earlier than the source's, the system considers the source object does not need to be migrated or has been already migrated successfully.crc64: This option is only available for migration on Huawei Cloud or from Alibaba Cloud or Tencent Cloud. If a source object and its paired destination object have CRC64 checksums in the metadata, the checksums are checked. Otherwise, their sizes and last modification times are checked.no_check: This option is only available for migration of HTTP/HTTPS data. This option takes effect for source objects whose sizes cannot be obtained from the Content-Length field in the standard HTTP protocol. In this case, the migration is considered successful once the data is downloaded successfully, without requiring additional data check. These source objects will overwrite their paired destination objects directly. If the size of a source object can be obtained from the Content-Length field in the standard HTTP protocol, its size and last modification time will be checked. Enumeration values: |
|
enable_requester_pays |
Boolean |
Whether Requester Pays is enabled. If this function is enabled, the requester pays for the request and data transmission. |
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
The error code returned when a migration fails. Minimum: 0 Maximum: 10 |
|
error_msg |
String |
The migration failure cause. Minimum: 0 Maximum: 1024 |
|
Parameter |
Type |
Description |
|---|---|---|
|
bucket |
String |
The name of the source bucket. Minimum: 0 Maximum: 1024 |
|
cloud_type |
String |
The source cloud service provider.The value can be AWS, AZURE, ALIYUN, TENCENT, HUAWEICLOUD, QINGCLOUD, KINGSOFTCLOUD, BAIDU, QINIU, GOOGLE, URLSOURCE, or UCLOUD. The default value is ALIYUN. Enumeration values: |
|
region |
String |
The region where the source bucket is located. Minimum: 0 Maximum: 100 |
|
app_id |
String |
Tencent Cloud app ID. This parameter is returned if cloud_type is Tencent. Minimum: 0 Maximum: 255 |
|
object_key |
Array of strings |
If task_type is set to prefix, this parameter indicates the name prefixes of the objects to be migrated. Minimum: 0 Maximum: 1024 Array Length: 0 - 500 |
|
list_file |
ListFile object |
The list file configuration. list_file is mandatory when task_type is set to list or url_list. |
|
Parameter |
Type |
Description |
|---|---|---|
|
list_file_key |
String |
The object names in the object list file or URL list file. Minimum: 1 Maximum: 1024 |
|
obs_bucket |
String |
The name of the OBS bucket for storing the object list files. Ensure that this bucket is in the same region as the destination bucket, or the task creation will fail. Minimum: 0 Maximum: 1024 |
|
list_file_num |
String |
The number of stored object list files. Minimum: 0 Maximum: 65535 |
|
Parameter |
Type |
Description |
|---|---|---|
|
bucket |
String |
The name of the destination bucket. Minimum: 0 Maximum: 1024 |
|
region |
String |
The region where the destination bucket is located. Minimum: 0 Maximum: 100 |
|
save_prefix |
String |
The path prefix used to organize object locations in the destination bucket. The prefix is added before an object key to form a new key. The length of the new key cannot exceed 1,024 characters. Minimum: 0 Maximum: 1024 |
|
Parameter |
Type |
Description |
|---|---|---|
|
end |
String |
The time when traffic limiting is ended. The format is hh:mm, for example, 12:03. |
|
max_bandwidth |
Long |
The maximum traffic bandwidth allowed in the specified period. The unit is byte/s. The value ranges from 1,048,576 bytes/s (equivalent to 1 MB/s) to 209,715,200 bytes/s (equivalent to 200 MB/s). Minimum: 1048576 Maximum: 209715200 |
|
start |
String |
The time when traffic limiting is started. The format is hh:mm, for example, 12:03. |
|
Parameter |
Type |
Description |
|---|---|---|
|
notify_result |
Boolean |
Whether SMN messages are sent successfully after a migration task is complete. |
|
notify_error_message |
String |
The error code that records why the SMN messages failed to be sent. The value is empty if migration tasks are successful. Minimum: 0 Maximum: 1024 |
|
topic_name |
String |
The SMN topic name. The value is empty if SMN messages are sent successfully. Minimum: 0 Maximum: 5120 |
|
Parameter |
Type |
Description |
|---|---|---|
|
domain |
String |
The domain name used to obtain objects to be migrated. Minimum: 0 Maximum: 1024 |
|
protocol |
String |
The protocol type. HTTP and HTTPS are supported. Enumeration values: |
|
authentication_type |
String |
The authentication type. The value can be: NONE: public access without authentication type QINIU_PRIVATE_AUTHENTICATION: Qiniu private URL signature ALIYUN_OSS_A: Alibaba Cloud URL signature, simple and universal ALIYUN_OSS_B: Alibaba Cloud header signature, used for API calling ALIYUN_OSS_C: Alibaba Cloud STS temporary security token, the most secure KSYUN_PRIVATE_AUTHENTICATION: Kingsoft Cloud private URL signature AZURE_SAS_TOKEN: Microsoft Azure shared access signature, flexible and secure TENCENT_COS_A: Tencent Cloud multi-signature scenarios (not recommended) TENCENT_COS_B: Tencent Cloud single-signature scenarios, the most secure TENCENT_COS_C: Tencent Cloud header signature, used for API calling TENCENT_COS_D: Tencent Cloud header signature, used for API calling Enumeration values: |
|
Parameter |
Type |
Description |
|---|---|---|
|
result |
Boolean |
Whether retransmission of failed objects is supported. |
|
list_file_key |
String |
The path for storing the list of failed objects. Minimum: 0 Maximum: 1024 |
|
error_code |
String |
The error code returned when the list of failed objects fails to be uploaded. Minimum: 0 Maximum: 10 |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_msg |
String |
Error message. |
|
error_code |
String |
Error code. |
Status code: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
error_msg |
String |
Error message. |
|
error_code |
String |
Error code. |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_msg |
String |
Error message. |
|
error_code |
String |
Error code. |
Example Requests
This example queries 10 migration task groups in the project f4e146cac1de45669c3fed73dc3b9c6f.
Get https://{endpoint}/v2/f4e146cac1de45669c3fed73dc3b9c6f/taskgroups?offset=0&limit=10
Example Responses
Status code: 200
Ok
{
"count" : 353,
"taskgroups" : [ {
"group_id" : "9dd98a5e-7ea3-4d80-abff-4c23914313e4",
"status" : 6,
"error_reason" : null,
"src_node" : {
"bucket" : "api-auto-test",
"cloud_type" : "TENCENT",
"region" : "ap-beijing",
"app_id" : "1254563210",
"object_key" : [ "test" ],
"list_file" : null
},
"description" : "",
"dst_node" : {
"bucket" : "test-l30022277",
"region" : "cn-north-7",
"save_prefix" : ""
},
"enable_metadata_migration" : false,
"enable_failed_object_recording" : true,
"enable_restore" : false,
"task_type" : "PREFIX",
"bandwidth_policy" : [ ],
"smn_config" : null,
"source_cdn" : null,
"migrate_since" : 0,
"migrate_speed" : 0,
"total_time" : 973657,
"start_time" : 1663654062461,
"total_task_num" : null,
"create_task_num" : null,
"failed_task_num" : null,
"complete_task_num" : null,
"paused_task_num" : null,
"executing_task_num" : null,
"waiting_task_num" : null,
"total_num" : 6,
"create_complete_num" : null,
"success_num" : 6,
"fail_num" : 0,
"skip_num" : 0,
"total_size" : 2469022100,
"create_complete_size" : null,
"complete_size" : 2469022100,
"failed_object_record" : {
"result" : null,
"list_file_key" : null,
"error_code" : null
},
"object_overwrite_mode" : "SIZE_LAST_MODIFIED_COMPARISON_OVERWRITE",
"consistency_check" : "size_last_modified",
"enable_requester_pays" : false
}, {
"group_id" : "2597fc69-af30-4411-b59d-b37857b69792",
"status" : 6,
"error_reason" : null,
"src_node" : {
"bucket" : "test-retry",
"cloud_type" : "HUAWEICLOUD",
"region" : "cn-north-7",
"app_id" : "",
"object_key" : [ "%21" ],
"list_file" : null
},
"description" : "",
"dst_node" : {
"bucket" : "assess-bucket-1",
"region" : "cn-north-7",
"save_prefix" : ""
},
"enable_metadata_migration" : false,
"enable_failed_object_recording" : true,
"enable_restore" : false,
"task_type" : "PREFIX",
"bandwidth_policy" : [ ],
"smn_config" : null,
"source_cdn" : null,
"migrate_since" : 0,
"migrate_speed" : 0,
"total_time" : 43440,
"start_time" : 1663340552910,
"total_task_num" : null,
"create_task_num" : null,
"failed_task_num" : null,
"complete_task_num" : null,
"paused_task_num" : null,
"executing_task_num" : null,
"waiting_task_num" : null,
"total_num" : 1,
"create_complete_num" : null,
"success_num" : 0,
"fail_num" : 0,
"skip_num" : 1,
"total_size" : 1205,
"create_complete_size" : null,
"complete_size" : 1205,
"failed_object_record" : {
"result" : null,
"list_file_key" : null,
"error_code" : null
},
"object_overwrite_mode" : "SIZE_LAST_MODIFIED_COMPARISON_OVERWRITE",
"consistency_check" : "size_last_modified",
"enable_requester_pays" : false
}, {
"group_id" : "d85ed5a8-61a1-492f-a146-2fd092dc37cf",
"status" : 5,
"error_reason" : null,
"src_node" : {
"bucket" : "assess-bucket-1",
"cloud_type" : "HUAWEICLOUD",
"region" : "cn-north-7",
"app_id" : "",
"object_key" : [ "" ],
"list_file" : null
},
"description" : "",
"dst_node" : {
"bucket" : "assess-bucket-1",
"region" : "cn-north-7",
"save_prefix" : ""
},
"enable_metadata_migration" : false,
"enable_failed_object_recording" : true,
"enable_restore" : false,
"task_type" : "PREFIX",
"bandwidth_policy" : [ ],
"smn_config" : null,
"source_cdn" : null,
"migrate_since" : 0,
"migrate_speed" : 0,
"total_time" : 4047612,
"start_time" : 1663070894867,
"total_task_num" : null,
"create_task_num" : null,
"failed_task_num" : null,
"complete_task_num" : null,
"paused_task_num" : null,
"executing_task_num" : null,
"waiting_task_num" : null,
"total_num" : 99020,
"create_complete_num" : null,
"success_num" : 0,
"fail_num" : 99020,
"skip_num" : 0,
"total_size" : 954329692,
"create_complete_size" : null,
"complete_size" : 954329692,
"failed_object_record" : {
"result" : true,
"list_file_key" : "oms/task_group/d85ed5a8-61a1-492f-a146-2fd092dc37cf/failed_object_lists/",
"error_code" : null
},
"object_overwrite_mode" : "SIZE_LAST_MODIFIED_COMPARISON_OVERWRITE",
"consistency_check" : "size_last_modified",
"enable_requester_pays" : false
}, {
"group_id" : "2a84320a-eddb-4413-9b12-a0251aae0f3e",
"status" : 6,
"error_reason" : null,
"src_node" : {
"bucket" : "api-test",
"cloud_type" : "UCLOUD",
"region" : "cn-bj",
"app_id" : "",
"object_key" : [ "test" ],
"list_file" : null
},
"description" : "",
"dst_node" : {
"bucket" : "test-l30022277",
"region" : "cn-north-7",
"save_prefix" : ""
},
"enable_metadata_migration" : false,
"enable_failed_object_recording" : true,
"enable_restore" : false,
"task_type" : "PREFIX",
"bandwidth_policy" : [ ],
"smn_config" : null,
"source_cdn" : null,
"migrate_since" : 0,
"migrate_speed" : 0,
"total_time" : 63228,
"start_time" : 1662725286648,
"total_task_num" : null,
"create_task_num" : null,
"failed_task_num" : null,
"complete_task_num" : null,
"paused_task_num" : null,
"executing_task_num" : null,
"waiting_task_num" : null,
"total_num" : 6,
"create_complete_num" : null,
"success_num" : 5,
"fail_num" : 0,
"skip_num" : 1,
"total_size" : 0,
"create_complete_size" : null,
"complete_size" : 0,
"failed_object_record" : {
"result" : null,
"list_file_key" : null,
"error_code" : null
},
"object_overwrite_mode" : "SIZE_LAST_MODIFIED_COMPARISON_OVERWRITE",
"consistency_check" : "size_last_modified",
"enable_requester_pays" : false
}, {
"group_id" : "64bca3b2-6ccc-4ca4-8394-17d3c7bdf871",
"status" : 6,
"error_reason" : null,
"src_node" : {
"bucket" : "api-auto-test",
"cloud_type" : "TENCENT",
"region" : "ap-beijing",
"app_id" : "1254563210",
"object_key" : [ "test" ],
"list_file" : null
},
"description" : "",
"dst_node" : {
"bucket" : "test-l30022277",
"region" : "cn-north-7",
"save_prefix" : ""
},
"enable_metadata_migration" : false,
"enable_failed_object_recording" : true,
"enable_restore" : false,
"task_type" : "PREFIX",
"bandwidth_policy" : [ ],
"smn_config" : null,
"source_cdn" : null,
"migrate_since" : 0,
"migrate_speed" : 0,
"total_time" : 553999,
"start_time" : 1662725057215,
"total_task_num" : null,
"create_task_num" : null,
"failed_task_num" : null,
"complete_task_num" : null,
"paused_task_num" : null,
"executing_task_num" : null,
"waiting_task_num" : null,
"total_num" : 6,
"create_complete_num" : null,
"success_num" : 6,
"fail_num" : 0,
"skip_num" : 0,
"total_size" : 2469022100,
"create_complete_size" : null,
"complete_size" : 2469022100,
"failed_object_record" : {
"result" : null,
"list_file_key" : null,
"error_code" : null
},
"object_overwrite_mode" : "SIZE_LAST_MODIFIED_COMPARISON_OVERWRITE",
"consistency_check" : "size_last_modified",
"enable_requester_pays" : false
}, {
"group_id" : "4c019e94-9ac1-4cd6-b404-982816b20c2f",
"status" : 6,
"error_reason" : null,
"src_node" : {
"bucket" : "api-auto-hangzhou",
"cloud_type" : "ALIYUN",
"region" : "cn-hangzhou",
"app_id" : "",
"object_key" : [ "test" ],
"list_file" : null
},
"description" : "",
"dst_node" : {
"bucket" : "test-l30022277",
"region" : "cn-north-7",
"save_prefix" : ""
},
"enable_metadata_migration" : false,
"enable_failed_object_recording" : true,
"enable_restore" : false,
"task_type" : "PREFIX",
"bandwidth_policy" : [ ],
"smn_config" : null,
"source_cdn" : null,
"migrate_since" : 0,
"migrate_speed" : 0,
"total_time" : 33279,
"start_time" : 1662723650469,
"total_task_num" : null,
"create_task_num" : null,
"failed_task_num" : null,
"complete_task_num" : null,
"paused_task_num" : null,
"executing_task_num" : null,
"waiting_task_num" : null,
"total_num" : 3,
"create_complete_num" : null,
"success_num" : 3,
"fail_num" : 0,
"skip_num" : 0,
"total_size" : 31840,
"create_complete_size" : null,
"complete_size" : 31840,
"failed_object_record" : {
"result" : null,
"list_file_key" : null,
"error_code" : null
},
"object_overwrite_mode" : "SIZE_LAST_MODIFIED_COMPARISON_OVERWRITE",
"consistency_check" : "size_last_modified",
"enable_requester_pays" : false
}, {
"group_id" : "5f5dd578-a3a6-4324-ad64-647a38ffb395",
"status" : 6,
"error_reason" : null,
"src_node" : {
"bucket" : "api-auto-test",
"cloud_type" : "BAIDU",
"region" : "bj",
"app_id" : "",
"object_key" : [ "test" ],
"list_file" : null
},
"description" : "",
"dst_node" : {
"bucket" : "assess-bucket-1",
"region" : "cn-north-7",
"save_prefix" : ""
},
"enable_metadata_migration" : false,
"enable_failed_object_recording" : true,
"enable_restore" : false,
"task_type" : "PREFIX",
"bandwidth_policy" : [ ],
"smn_config" : null,
"source_cdn" : null,
"migrate_since" : 0,
"migrate_speed" : 0,
"total_time" : 53427,
"start_time" : 1662722500472,
"total_task_num" : null,
"create_task_num" : null,
"failed_task_num" : null,
"complete_task_num" : null,
"paused_task_num" : null,
"executing_task_num" : null,
"waiting_task_num" : null,
"total_num" : 15,
"create_complete_num" : null,
"success_num" : 15,
"fail_num" : 0,
"skip_num" : 0,
"total_size" : 94864941,
"create_complete_size" : null,
"complete_size" : 94864941,
"failed_object_record" : {
"result" : null,
"list_file_key" : null,
"error_code" : null
},
"object_overwrite_mode" : "SIZE_LAST_MODIFIED_COMPARISON_OVERWRITE",
"consistency_check" : "size_last_modified",
"enable_requester_pays" : false
}, {
"group_id" : "912e951b-ae19-4f65-bb94-c889601d8a43",
"status" : 6,
"error_reason" : null,
"src_node" : {
"bucket" : "assess-bucket-1",
"cloud_type" : "HUAWEICLOUD",
"region" : "cn-north-7",
"app_id" : "",
"object_key" : [ "" ],
"list_file" : null
},
"description" : "",
"dst_node" : {
"bucket" : "oms-onebox-lqm",
"region" : "cn-north-7",
"save_prefix" : ""
},
"enable_metadata_migration" : false,
"enable_failed_object_recording" : true,
"enable_restore" : false,
"task_type" : "PREFIX",
"bandwidth_policy" : [ ],
"smn_config" : null,
"source_cdn" : null,
"migrate_since" : 0,
"migrate_speed" : 0,
"total_time" : 590588,
"start_time" : 1662640213374,
"total_task_num" : null,
"create_task_num" : null,
"failed_task_num" : null,
"complete_task_num" : null,
"paused_task_num" : null,
"executing_task_num" : null,
"waiting_task_num" : null,
"total_num" : 99052,
"create_complete_num" : null,
"success_num" : 99052,
"fail_num" : 0,
"skip_num" : 0,
"total_size" : 1847919442,
"create_complete_size" : null,
"complete_size" : 1847919442,
"failed_object_record" : {
"result" : null,
"list_file_key" : null,
"error_code" : null
},
"object_overwrite_mode" : "SIZE_LAST_MODIFIED_COMPARISON_OVERWRITE",
"consistency_check" : "size_last_modified",
"enable_requester_pays" : false
}, {
"group_id" : "398b5845-b180-47a1-a7c9-56f051ed3f34",
"status" : 5,
"error_reason" : null,
"src_node" : {
"bucket" : "hw-src",
"cloud_type" : "HUAWEICLOUD",
"region" : "cn-north-7",
"app_id" : "",
"object_key" : [ "gd.jpg" ],
"list_file" : null
},
"description" : "",
"dst_node" : {
"bucket" : "zzww",
"region" : "cn-north-7",
"save_prefix" : ""
},
"enable_metadata_migration" : false,
"enable_failed_object_recording" : true,
"enable_restore" : false,
"task_type" : "PREFIX",
"bandwidth_policy" : [ ],
"smn_config" : null,
"source_cdn" : null,
"migrate_since" : 0,
"migrate_speed" : 0,
"total_time" : 709891300,
"start_time" : 1662369530210,
"total_task_num" : null,
"create_task_num" : null,
"failed_task_num" : null,
"complete_task_num" : null,
"paused_task_num" : null,
"executing_task_num" : null,
"waiting_task_num" : null,
"total_num" : 1,
"create_complete_num" : null,
"success_num" : 0,
"fail_num" : 1,
"skip_num" : 0,
"total_size" : 3528,
"create_complete_size" : null,
"complete_size" : 0,
"failed_object_record" : {
"result" : true,
"list_file_key" : "oms/task_group/398b5845-b180-47a1-a7c9-56f051ed3f34/failed_object_lists/",
"error_code" : null
},
"object_overwrite_mode" : "SIZE_LAST_MODIFIED_COMPARISON_OVERWRITE",
"consistency_check" : "size_last_modified",
"enable_requester_pays" : false
}, {
"group_id" : "494cad85-cbe5-4d62-8e70-e4f0e847e39c",
"status" : 6,
"error_reason" : null,
"src_node" : {
"bucket" : "test-l30022277-src",
"cloud_type" : "HUAWEICLOUD",
"region" : "cn-north-7",
"app_id" : "",
"object_key" : [ "test" ],
"list_file" : null
},
"description" : "",
"dst_node" : {
"bucket" : "test-l30022277",
"region" : "cn-north-7",
"save_prefix" : ""
},
"enable_metadata_migration" : false,
"enable_failed_object_recording" : true,
"enable_restore" : false,
"task_type" : "PREFIX",
"bandwidth_policy" : [ ],
"smn_config" : null,
"source_cdn" : null,
"migrate_since" : 0,
"migrate_speed" : 0,
"total_time" : 33513,
"start_time" : 1661928705453,
"total_task_num" : null,
"create_task_num" : null,
"failed_task_num" : null,
"complete_task_num" : null,
"paused_task_num" : null,
"executing_task_num" : null,
"waiting_task_num" : null,
"total_num" : 2,
"create_complete_num" : null,
"success_num" : 0,
"fail_num" : 0,
"skip_num" : 2,
"total_size" : 155,
"create_complete_size" : null,
"complete_size" : 155,
"failed_object_record" : {
"result" : null,
"list_file_key" : null,
"error_code" : null
},
"object_overwrite_mode" : "SIZE_LAST_MODIFIED_COMPARISON_OVERWRITE",
"consistency_check" : "size_last_modified",
"enable_requester_pays" : false
} ]
}
SDK Sample Code
The SDK sample code is as follows.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
package com.huaweicloud.sdk.test; import com.huaweicloud.sdk.core.auth.ICredential; import com.huaweicloud.sdk.core.auth.BasicCredentials; import com.huaweicloud.sdk.core.exception.ConnectionException; import com.huaweicloud.sdk.core.exception.RequestTimeoutException; import com.huaweicloud.sdk.core.exception.ServiceResponseException; import com.huaweicloud.sdk.oms.v2.region.OmsRegion; import com.huaweicloud.sdk.oms.v2.*; import com.huaweicloud.sdk.oms.v2.model.*; public class ListTaskGroupSolution { public static void main(String[] args) { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment String ak = System.getenv("CLOUD_SDK_AK"); String sk = System.getenv("CLOUD_SDK_SK"); String projectId = "{project_id}"; ICredential auth = new BasicCredentials() .withProjectId(projectId) .withAk(ak) .withSk(sk); OmsClient client = OmsClient.newBuilder() .withCredential(auth) .withRegion(OmsRegion.valueOf("<YOUR REGION>")) .build(); ListTaskGroupRequest request = new ListTaskGroupRequest(); try { ListTaskGroupResponse response = client.listTaskGroup(request); System.out.println(response.toString()); } catch (ConnectionException e) { e.printStackTrace(); } catch (RequestTimeoutException e) { e.printStackTrace(); } catch (ServiceResponseException e) { e.printStackTrace(); System.out.println(e.getHttpStatusCode()); System.out.println(e.getRequestId()); System.out.println(e.getErrorCode()); System.out.println(e.getErrorMsg()); } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# coding: utf-8 import os from huaweicloudsdkcore.auth.credentials import BasicCredentials from huaweicloudsdkoms.v2.region.oms_region import OmsRegion from huaweicloudsdkcore.exceptions import exceptions from huaweicloudsdkoms.v2 import * if __name__ == "__main__": # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment ak = os.environ["CLOUD_SDK_AK"] sk = os.environ["CLOUD_SDK_SK"] projectId = "{project_id}" credentials = BasicCredentials(ak, sk, projectId) client = OmsClient.new_builder() \ .with_credentials(credentials) \ .with_region(OmsRegion.value_of("<YOUR REGION>")) \ .build() try: request = ListTaskGroupRequest() response = client.list_task_group(request) print(response) except exceptions.ClientRequestException as e: print(e.status_code) print(e.request_id) print(e.error_code) print(e.error_msg) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" oms "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/oms/v2" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/oms/v2/model" region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/oms/v2/region" ) func main() { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment ak := os.Getenv("CLOUD_SDK_AK") sk := os.Getenv("CLOUD_SDK_SK") projectId := "{project_id}" auth := basic.NewCredentialsBuilder(). WithAk(ak). WithSk(sk). WithProjectId(projectId). Build() client := oms.NewOmsClient( oms.OmsClientBuilder(). WithRegion(region.ValueOf("<YOUR REGION>")). WithCredential(auth). Build()) request := &model.ListTaskGroupRequest{} response, err := client.ListTaskGroup(request) if err == nil { fmt.Printf("%+v\n", response) } else { fmt.Println(err) } } |
For SDK sample code of more programming languages, see the Sample Code tab in API Explorer. SDK sample code can be automatically generated.
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Ok |
|
400 |
Bad Request |
|
403 |
Forbidden |
|
500 |
Server Error |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot