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>
253 lines
17 KiB
HTML
253 lines
17 KiB
HTML
<a name="drs_03_0133"></a><a name="drs_03_0133"></a>
|
|
|
|
<h1 class="topictitle1">Pausing Tasks in Batches</h1>
|
|
<div id="body1642101495115"><div class="section" id="drs_03_0133__section154217144511"><h4 class="sectiontitle">Function</h4><p id="drs_03_0133__p1342117149518">This API is used to pause tasks in batches.</p>
|
|
</div>
|
|
<div class="section" id="drs_03_0133__section57921722175115"><h4 class="sectiontitle">Constraints</h4><ul id="drs_03_0133__ul4650103718193"><li id="drs_03_0133__li148726231713">Migration and synchronization tasks can be paused.</li><li id="drs_03_0133__li11112134020523">Only tasks in the FULL_TRANSFER_STARTED, FULL_TRANSFER_FAILED, FULL_TRANSFER_COMPLETE, INCRE_TRANSFER_STARTED or INCRE_TRANSFER_FAILED state can be paused.</li></ul>
|
|
</div>
|
|
<div class="section" id="drs_03_0133__section24221714135114"><h4 class="sectiontitle">URI</h4><p id="drs_03_0133__p942219144516">POST /v3/{project_id}/jobs/batch-pause-task</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0133__table1342312147513" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="drs_03_0133__row942241418519"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="drs_03_0133__p134238143518">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_0133__p642310144515">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_0133__p134235144519">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_0133__p4423141419519">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="drs_03_0133__row174221714125110"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="drs_03_0133__p1042481417515">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="drs_03_0133__p1942451425111">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="drs_03_0133__p3424151485116">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="drs_03_0133__p11424814185112">Project ID of a tenant in a region</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="drs_03_0133__section642571435115"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0133__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="drs_03_0133__row144251214195110"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="drs_03_0133__p1342517149519">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_0133__p042631475118">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_0133__p9426151418513">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_0133__p144264142518">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="drs_03_0133__row1442511420515"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="drs_03_0133__p64261014105110">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="drs_03_0133__p442751485112">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="drs_03_0133__p84270145518">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="drs_03_0133__p04281424174418">The content type.</p>
|
|
<p id="drs_03_0133__p123256415450">The default value is <strong id="drs_03_0133__b5258112711441">application/json</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="drs_03_0133__row442501413514"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="drs_03_0133__p14427314175111">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_0133__p0428131415117">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="drs_03_0133__p10428114125111">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="drs_03_0133__p442811415517">User token obtained from IAM.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="drs_03_0133__row154251414125120"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="drs_03_0133__p1742881465117">X-Language</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="drs_03_0133__p1342801425112">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="drs_03_0133__p18429814125114">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="drs_03_0133__p4869125616598">Request language type</p>
|
|
<p id="drs_03_0133__p68691956125917">Default value: <strong id="drs_03_0133__b1786912566599">en-us</strong></p>
|
|
<p id="drs_03_0133__p1386915625912">Values:</p>
|
|
<ul id="drs_03_0133__ul1586965613591"><li id="drs_03_0133__li1886915655910"><strong id="drs_03_0133__b158691656145912">en-us</strong></li><li id="drs_03_0133__li17869125685916"><strong id="drs_03_0133__b12869175615914">zh-cn</strong></li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0133__requestParameter" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="drs_03_0133__row142914141513"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.1"><p id="drs_03_0133__p18430014175111">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_0133__p543051415115">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_0133__p184305141519">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_0133__p1643091416511">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="drs_03_0133__row94291014125118"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.1 "><p id="drs_03_0133__p643111465111">jobs</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.2 "><p id="drs_03_0133__p11431121413518">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="drs_03_0133__p1343191445117">Array of <a href="#drs_03_0133__request_PauseInfo">PauseInfo</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p id="drs_03_0133__p143118143511">The value cannot contain empty objects. The value of <strong id="drs_03_0133__b0907175017611">job_id</strong> must comply with the UUID rule.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="drs_03_0133__request_PauseInfo"></a><a name="request_PauseInfo"></a><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0133__request_PauseInfo" frame="border" border="1" rules="all"><caption><b>Table 4 </b>PauseInfo</caption><thead align="left"><tr id="drs_03_0133__row4432171419515"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.1"><p id="drs_03_0133__p164321014175118">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_0133__p11433131413514">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_0133__p114331414135116">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_0133__p1343316141511">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="drs_03_0133__row1743261418513"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="drs_03_0133__p11433191445112">job_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="drs_03_0133__p17433514175115">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="drs_03_0133__p84345143511">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="drs_03_0133__p1343414143513">Task ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="drs_03_0133__row84321014145115"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="drs_03_0133__p1943410145514">pause_mode</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="drs_03_0133__p2434614165116">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="drs_03_0133__p1435181413516">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="drs_03_0133__p515974311715">Pause type. <strong id="drs_03_0133__b16442127186">target</strong>: Stop replay. <strong id="drs_03_0133__b7275522881">all</strong>: Stop log capturing and replay.</p>
|
|
<p id="drs_03_0133__p1915913432170">Values:</p>
|
|
<ul id="drs_03_0133__ul201599437177"><li id="drs_03_0133__li815919431177"><strong id="drs_03_0133__b131591043191717">target</strong></li><li id="drs_03_0133__li17159174351716"><strong id="drs_03_0133__b8159134391711">all</strong></li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="drs_03_0133__section10436414145114"><h4 class="sectiontitle">Response Parameters</h4><p id="drs_03_0133__p8437161415112"><strong id="drs_03_0133__b1743711410515">Status code: 200</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0133__responseParameter" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response body parameters</caption><thead align="left"><tr id="drs_03_0133__row144378145517"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.1"><p id="drs_03_0133__p3438141417519">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_0133__p154382014195115">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_0133__p143801445116">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="drs_03_0133__row34377143511"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="drs_03_0133__p0438121410517">results</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="drs_03_0133__p1243912144517">Array of <a href="#drs_03_0133__response_PauseJobResp">PauseJobResp</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="drs_03_0133__p7439114145118">List of tasks to be suspended in batches.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="drs_03_0133__row343741495118"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="drs_03_0133__p9439121410518">count</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="drs_03_0133__p6439181475118">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="drs_03_0133__p19439111465119">Total number.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="drs_03_0133__response_PauseJobResp"></a><a name="response_PauseJobResp"></a><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0133__response_PauseJobResp" frame="border" border="1" rules="all"><caption><b>Table 6 </b>PauseJobResp</caption><thead align="left"><tr id="drs_03_0133__row84401714175111"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.4.1.1"><p id="drs_03_0133__p2440414115116">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.4.1.2"><p id="drs_03_0133__p174411314115110">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.4.2.4.1.3"><p id="drs_03_0133__p1544110140519">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="drs_03_0133__row184407146519"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="drs_03_0133__p1441161435112">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="drs_03_0133__p74413146515">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="drs_03_0133__p14442014175111">Task ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="drs_03_0133__row10440131420515"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="drs_03_0133__p7442161419518">status</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="drs_03_0133__p1244213144518">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="drs_03_0133__p104424147513">Pause result.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="drs_03_0133__row9440151419515"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="drs_03_0133__p1644251410512">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="drs_03_0133__p844321425114">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="drs_03_0133__p19443181415514">Error code, which is optional and indicates the returned information about the failure status.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="drs_03_0133__row15440121415514"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="drs_03_0133__p15443141415119">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="drs_03_0133__p64431714135112">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="drs_03_0133__p944410147519">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_0133__section6444151415117"><h4 class="sectiontitle">Example Request</h4><p id="drs_03_0133__p4444101419517">Example of suspending tasks in batches:</p>
|
|
<pre class="screen" id="drs_03_0133__screen174303317378">https://{Endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-pause-task</pre>
|
|
<pre class="screen" id="drs_03_0133__screen11898710143710">{
|
|
"jobs" : [ {
|
|
"job_id" : "8d0e8e36-a618-490d-8a46-8c61ac9jb502",
|
|
"pause_mode" : "target"
|
|
} ]
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="drs_03_0133__section1644671465110"><h4 class="sectiontitle">Example Response</h4><p id="drs_03_0133__p3446414165117"><strong id="drs_03_0133__b14446111415517">Status code: 200</strong></p>
|
|
<p id="drs_03_0133__p24461114195111">OK</p>
|
|
<pre class="screen" id="drs_03_0133__screen124478147510">{
|
|
"results" : [ {
|
|
"id" : "8d0e8e36-a618-490d-8a46-8c61ac9jb502",
|
|
"status" : "success"
|
|
} ],
|
|
"count" : 1
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="drs_03_0133__section134481214165117"><h4 class="sectiontitle">Status Code</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0133__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="drs_03_0133__row7448814115111"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.8.2.1.3.1.1"><p id="drs_03_0133__p174485142518">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_0133__p844914143512">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="drs_03_0133__row16448114185119"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="drs_03_0133__p15449314115113">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="drs_03_0133__p1064020581613">OK</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="drs_03_0133__row174480144515"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="drs_03_0133__p244941413519">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="drs_03_0133__p19450191415110">Bad Request</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="drs_03_0133__section745011455117"><h4 class="sectiontitle">Error Code</h4><p id="drs_03_0133__p134509144513">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>
|
|
|