Updated on 2023-12-27 GMT+08:00

Restarting a Migration Task

Function

This API is used to restart a migration task after the task failed or has been paused.

URI

PUT /v1/{project_id}/objectstorage/task/{task_id}

Table 1 describes the parameters in the URI.

Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Specifies the project ID.

task_id

Yes

Specifies the task ID.

Request

Request Parameters

Table 2 describes the request parameters.

Table 2 Request parameters

Parameter

Mandatory

Type

Description

operation

Yes

String

Specifies the operation type, which is start for this API.

source_ak

Yes

String

Specifies the AK of the source node. Enter a maximum of 100 characters.

source_sk

Yes

String

Specifies the SK of the source node. Enter a maximum of 100 characters.

target_ak

Yes

String

Specifies the AK of the destination node. Enter a maximum of 100 characters.

target_sk

Yes

String

Specifies the SK of the destination node. Enter a maximum of 100 characters.

source_cdn_authentication_key

No

String

Specifies the CDN authentication key.

migration_failed_object

No

Boolean

Specifies whether to perform a full migration. The value can be true, null, or false.

  • If the value is true, the objects fail to be migrated in the migration task will be retransmitted.
  • If the value is blank or false, all objects in the migration task will be migrated.

Response

Response Parameters

None.

Examples

Request example

PUT /v1/{project_id}/objectstorage/task/{task_id}

{ 
    "operation": "start",  
    "source_ak": "source_ak",  
    "source_sk": "source_sk",  
    "target_ak": "target_ak",  
    "target_sk": "target_sk", 
    "source_cdn_authentication_key": "xxxxxx",
    "migration_failed_object": false
}

Response example

None.

Status Code

For details about the status code, see Status Code.