forked from docs/doc-exports
Reviewed-by: gtema <artem.goncharov@gmail.com> Co-authored-by: Wang , Deng Ke <wangdengke2@huawei.com> Co-committed-by: Wang , Deng Ke <wangdengke2@huawei.com>
251 lines
17 KiB
HTML
251 lines
17 KiB
HTML
<a name="drs_03_0112"></a><a name="drs_03_0112"></a>
|
|
|
|
<h1 class="topictitle1">Starting Tasks in Batches</h1>
|
|
<div id="body1379010227511"><div class="section" id="drs_03_0112__section19791112285112"><h4 class="sectiontitle">Function</h4><p id="drs_03_0112__p97910221515">This API is used to start real-time migration, synchronization, and disaster recovery tasks in batches.</p>
|
|
</div>
|
|
<div class="section" id="drs_03_0112__section57921722175115"><h4 class="sectiontitle">Constraints</h4><ul id="drs_03_0112__ul91781715101811"><li id="drs_03_0112__li117811591816">This API can be called only after all tasks are configured.</li><li id="drs_03_0112__li9178161517181">In the dual-active DR scenario, this operation can be performed only when the forward task status is <strong id="drs_03_0112__b563918221805">INCRE_TRANSFER_STARTED</strong> and <strong id="drs_03_0112__b19166133612011">RPO&RTO</strong> is less than 60s. For backward tasks, this operation can be performed only after all tasks are configured. The parent task does not support this operation.</li></ul>
|
|
</div>
|
|
<div class="section" id="drs_03_0112__section12793112212518"><h4 class="sectiontitle">URI</h4><p id="drs_03_0112__p979492214511">POST /v3/{project_id}/jobs/batch-starting</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0112__table1979519228519" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="drs_03_0112__row1279462275116"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="drs_03_0112__p19796172214513">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="drs_03_0112__p127964223510">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="drs_03_0112__p137971422195118">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="drs_03_0112__p19797822175120">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="drs_03_0112__row379512224519"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="drs_03_0112__p179817225511">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="drs_03_0112__p679962225118">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="drs_03_0112__p1779910221514">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="drs_03_0112__p280002215519">Project ID of a tenant in a region</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="drs_03_0112__section680162216515"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0112__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="drs_03_0112__row1580232216518"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="drs_03_0112__p148031222115120">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.2"><p id="drs_03_0112__p780382216514">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.3"><p id="drs_03_0112__p580416228518">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.2.2.5.1.4"><p id="drs_03_0112__p680562213518">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="drs_03_0112__row1580220221513"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="drs_03_0112__p148051222155115">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="drs_03_0112__p19806722185113">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="drs_03_0112__p1806182275113">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="drs_03_0112__p4985121220423">The content type.</p>
|
|
<p id="drs_03_0112__p123256415450">The default value is <strong id="drs_03_0112__b165744156426">application/json</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="drs_03_0112__row48021222105115"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="drs_03_0112__p380842275112">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="drs_03_0112__p4808522185119">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="drs_03_0112__p480913222517">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="drs_03_0112__p8810142255119">User token obtained from IAM.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="drs_03_0112__row380218221515"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="drs_03_0112__p128101622165120">X-Language</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="drs_03_0112__p38111722185119">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="drs_03_0112__p19812172210517">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="drs_03_0112__p4869125616598">Request language type</p>
|
|
<p id="drs_03_0112__p68691956125917">Default value: <strong id="drs_03_0112__b1786912566599">en-us</strong></p>
|
|
<p id="drs_03_0112__p1386915625912">Values:</p>
|
|
<ul id="drs_03_0112__ul1586965613591"><li id="drs_03_0112__li1886915655910"><strong id="drs_03_0112__b158691656145912">en-us</strong></li><li id="drs_03_0112__li17869125685916"><strong id="drs_03_0112__b12869175615914">zh-cn</strong></li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0112__requestParameter" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="drs_03_0112__row3813132215114"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.1"><p id="drs_03_0112__p1681516229519">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.2"><p id="drs_03_0112__p10816112220514">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.3"><p id="drs_03_0112__p88171122205115">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.3.2.5.1.4"><p id="drs_03_0112__p1281742215116">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="drs_03_0112__row11813522195119"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.1 "><p id="drs_03_0112__p581842215518">jobs</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.2 "><p id="drs_03_0112__p2819152218513">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="drs_03_0112__p128191222205113">Array of <a href="#drs_03_0112__request_StartInfo">StartInfo</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p id="drs_03_0112__p128201122185118">Request list for starting tasks in batches.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="drs_03_0112__request_StartInfo"></a><a name="request_StartInfo"></a><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0112__request_StartInfo" frame="border" border="1" rules="all"><caption><b>Table 4 </b>StartInfo</caption><thead align="left"><tr id="drs_03_0112__row5821142217519"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.1"><p id="drs_03_0112__p1822422185111">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.2"><p id="drs_03_0112__p158224221519">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.3"><p id="drs_03_0112__p13823202218518">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.4.2.5.1.4"><p id="drs_03_0112__p128249223511">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="drs_03_0112__row16821132212515"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="drs_03_0112__p1082492214512">job_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="drs_03_0112__p13825152265110">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="drs_03_0112__p1782682216515">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="drs_03_0112__p15826162218518">Task ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="drs_03_0112__row14821822155112"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="drs_03_0112__p682772219512">start_time</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="drs_03_0112__p382819221518">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="drs_03_0112__p138281222125116">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="drs_03_0112__p68296223518">Task start time. The timestamp is accurate to milliseconds, for example, 1608188903063. If the value is empty, the task is started immediately.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="drs_03_0112__section1083019221516"><h4 class="sectiontitle">Response Parameters</h4><p id="drs_03_0112__p58301222518"><strong id="drs_03_0112__b0831102285110">Status code: 202</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0112__responseParameter" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response body parameters</caption><thead align="left"><tr id="drs_03_0112__row17831172225110"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.1"><p id="drs_03_0112__p15832102213514">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.2"><p id="drs_03_0112__p12833152217512">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.3.2.4.1.3"><p id="drs_03_0112__p1383352225110">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="drs_03_0112__row13831122216516"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="drs_03_0112__p0834192225115">results</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="drs_03_0112__p118356229512">Array of <a href="#drs_03_0112__response_StartJobResp">StartJobResp</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="drs_03_0112__p4836192219512">List of real-time disaster recovery tasks that are started in batches.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="drs_03_0112__row8831622155114"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="drs_03_0112__p083615229513">count</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="drs_03_0112__p583762215116">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="drs_03_0112__p883852214512">Total number.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="drs_03_0112__response_StartJobResp"></a><a name="response_StartJobResp"></a><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0112__response_StartJobResp" frame="border" border="1" rules="all"><caption><b>Table 6 </b>StartJobResp</caption><thead align="left"><tr id="drs_03_0112__row883852218519"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.4.1.1"><p id="drs_03_0112__p983972245119">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20.02%" id="mcps1.3.5.4.2.4.1.2"><p id="drs_03_0112__p5840112245115">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="59.98%" id="mcps1.3.5.4.2.4.1.3"><p id="drs_03_0112__p1584162216515">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="drs_03_0112__row78385223514"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="drs_03_0112__p684172220516">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.02%" headers="mcps1.3.5.4.2.4.1.2 "><p id="drs_03_0112__p784242216516">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.98%" headers="mcps1.3.5.4.2.4.1.3 "><p id="drs_03_0112__p12842722145115">Task ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="drs_03_0112__row1783872215119"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="drs_03_0112__p118438228513">status</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.02%" headers="mcps1.3.5.4.2.4.1.2 "><p id="drs_03_0112__p8844202210514">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.98%" headers="mcps1.3.5.4.2.4.1.3 "><p id="drs_03_0112__p2844422135115">Status Values:</p>
|
|
<ul id="drs_03_0112__ul16846112219514"><li id="drs_03_0112__li584619225514"><strong id="drs_03_0112__b48461222145114">success</strong></li><li id="drs_03_0112__li14846122195114"><strong id="drs_03_0112__b584715227519">failed</strong></li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="drs_03_0112__row38384225510"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="drs_03_0112__p6847172219516">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.02%" headers="mcps1.3.5.4.2.4.1.2 "><p id="drs_03_0112__p17848922185114">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.98%" headers="mcps1.3.5.4.2.4.1.3 "><p id="drs_03_0112__p5848162219511">Error code, which is optional and indicates the returned information about the failure status.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="drs_03_0112__row2838522145113"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="drs_03_0112__p1849152295118">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.02%" headers="mcps1.3.5.4.2.4.1.2 "><p id="drs_03_0112__p11850722125113">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.98%" headers="mcps1.3.5.4.2.4.1.3 "><p id="drs_03_0112__p17850102245118">Error message, which is optional and indicates the returned information about the failure status.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="drs_03_0112__section16851922175119"><h4 class="sectiontitle">Example Request</h4><p id="drs_03_0112__p2852622105119">Example of starting real-time DR tasks in batches:</p>
|
|
<pre class="screen" id="drs_03_0112__screen1919139121319">https://{Endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-starting</pre>
|
|
<pre class="screen" id="drs_03_0112__screen197708442134">{
|
|
"jobs" : [ {
|
|
"job_id" : "140b5236-88ad-43c8-811c-1268453jb101"
|
|
} ]
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="drs_03_0112__section1285742255116"><h4 class="sectiontitle">Example Response</h4><p id="drs_03_0112__p15857222155117"><strong id="drs_03_0112__b1485792212517">Status code: 202</strong></p>
|
|
<p id="drs_03_0112__p188581722125116">Accepted</p>
|
|
<pre class="screen" id="drs_03_0112__screen5859122295118">{
|
|
"count" : 1,
|
|
"results" : [ {
|
|
"id" : "140b5236-88ad-43c8-811c-1268453jb101",
|
|
"status" : "success"
|
|
} ]
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="drs_03_0112__section4863192255119"><h4 class="sectiontitle">Status Code</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0112__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="drs_03_0112__row2086352210511"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.8.2.1.3.1.1"><p id="drs_03_0112__p786432215115">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.8.2.1.3.1.2"><p id="drs_03_0112__p9865192215518">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="drs_03_0112__row38637226515"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="drs_03_0112__p118651822145118">202</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="drs_03_0112__p1789074120150">Accepted</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="drs_03_0112__row16863132275115"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="drs_03_0112__p0867152217519">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="drs_03_0112__p1486782214510">Bad Request</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="drs_03_0112__section12868922145110"><h4 class="sectiontitle">Error Code</h4><p id="drs_03_0112__p7869922195111">For details, see <a href="drs_05_0004.html">Error Code</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="drs_03_0101.html">Public API Management</a></div>
|
|
</div>
|
|
</div>
|
|
|