This API is used to enable or disable flow control for tasks. By default, the migration speed is not limited after a task is created.
PUT /v3/{project_id}/jobs/batch-limit-speed
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID of a tenant in a region |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-Type |
Yes |
String |
The content type. The default value is application/json. |
X-Auth-Token |
Yes |
String |
User token obtained from IAM. |
X-Language |
No |
String |
Request language type Default value: en-us Values:
|
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
speed_limits |
Yes |
Array of LimitSpeedReq objects |
Speed limit in DR. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
job_id |
Yes |
String |
Task ID. |
speed_limit |
Yes |
Array of SpeedLimitInfo objects |
Request body of flow control information. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
begin |
Yes |
String |
Start time (UTC) of flow control. The start time is an integer in hh:mm format and the minutes part is ignored. hh indicates the hour, for example, 01:00. |
end |
Yes |
String |
End time (UTC) in the format of hh:mm, for example, 15:59. The value must end with 59. |
speed |
Yes |
String |
Speed. The value ranges from 1 to 9,999, in MB/s. |
is_utc |
No |
Boolean |
Whether the UTC time is used. |
Status code: 200
Parameter |
Type |
Description |
---|---|---|
count |
Integer |
Total number. |
results |
Array of ModifyJobResp objects |
List of tasks that are modified in batches. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Task ID. |
status |
String |
Status Values:
|
error_code |
String |
Error code, which is optional and indicates the returned information about the failure status. |
error_msg |
String |
Error message, which is optional and indicates the returned information about the failure status. |
Example of setting flow control for DR tasks in batches:
https://{Endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-limit-speed
{ "speed_limits" : [ { "job_id" : "7d0504f1-aba3-435f-914f-936b861jb502", "speed_limit" : [ { "begin" : "16:00", "end" : "15:59", "speed" : "15" } ] } ] }
Status code: 200
OK
{ "results" : [ { "id" : "efa2bd29-8780-494f-a2ee-188b003ejb11", "status" : "success" } ], "count" : 1 }
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
For details, see Error Code.