doc-exports/docs/drs/api-ref/drs_03_0110.html
Wang , Deng Ke 231618c804 DRS API 2.0.38SP23 version
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>
2022-11-24 16:49:13 +00:00

261 lines
18 KiB
HTML

<a name="drs_03_0110"></a><a name="drs_03_0110"></a>
<h1 class="topictitle1">Performing a Batch Pre-Check</h1>
<div id="body1738610580372"><div class="section" id="drs_03_0110__section14386155817371"><h4 class="sectiontitle">Function</h4><p id="drs_03_0110__p1238916589374">This API is used to perform batch pre-check to check whether the migration, synchronization, DR can be performed.</p>
</div>
<div class="section" id="drs_03_0110__section174028414452"><h4 class="sectiontitle">Constraints</h4><ul id="drs_03_0110__ul021333141215"><li id="drs_03_0110__li62233141214">After a task is created, the task status is <strong id="drs_03_0110__b07616392515">CONFIGURATION</strong>. The task can be invoked only after the test of connections to the source and destination databases is successful and the API for modifying the task is invoked.</li><li id="drs_03_0110__li6219334129">In the dual-active DR scenario, when the forward task status is <strong id="drs_03_0110__b1599713589118">INCRE_TRANSFER_STARTED</strong>, the backward task does not need to call this API, and the parent task cannot call this API.</li></ul>
</div>
<div class="section" id="drs_03_0110__section153902582378"><h4 class="sectiontitle">URI</h4><p id="drs_03_0110__p103921458113710">POST /v3/{project_id}/jobs/batch-precheck</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0110__table0400135816377" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="drs_03_0110__row1839817586379"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="drs_03_0110__p154018588377">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_0110__p1440113589374">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_0110__p0402155853716">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_0110__p1940585863714">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="drs_03_0110__row20398558143714"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="drs_03_0110__p17406175853710">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="drs_03_0110__p14406258193717">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="drs_03_0110__p44061258123716">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="drs_03_0110__p154075583377">Project ID of a tenant in a region</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="drs_03_0110__section12407165833715"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0110__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="drs_03_0110__row11409185833716"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="drs_03_0110__p1241075813720">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_0110__p1941015811375">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_0110__p154101558153712">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_0110__p1141125817376">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="drs_03_0110__row19409115863718"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="drs_03_0110__p5411205812374">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="drs_03_0110__p241235814378">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="drs_03_0110__p641275843718">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="drs_03_0110__p1384401881815">The content type.</p>
<p id="drs_03_0110__p123256415450">The default value is <strong id="drs_03_0110__b15397115913124">application/json</strong>.</p>
</td>
</tr>
<tr id="drs_03_0110__row84091758173716"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="drs_03_0110__p11413358113714">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_0110__p141320586379">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="drs_03_0110__p2414145873711">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="drs_03_0110__p1641425810375">User token obtained from IAM.</p>
</td>
</tr>
<tr id="drs_03_0110__row16409125812376"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="drs_03_0110__p5415155818370">X-Language</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="drs_03_0110__p12415125815376">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="drs_03_0110__p1417058163711">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="drs_03_0110__p7418185863712">Request language type</p>
<p id="drs_03_0110__p68691956125917">Default value: <strong id="drs_03_0110__b23973118132">en-us</strong></p>
<p id="drs_03_0110__p1386915625912">Values:</p>
<ul id="drs_03_0110__ul1586965613591"><li id="drs_03_0110__li1886915655910"><strong id="drs_03_0110__b158691656145912">en-us</strong></li><li id="drs_03_0110__li17869125685916"><strong id="drs_03_0110__b12869175615914">zh-cn</strong></li></ul>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0110__requestParameter" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="drs_03_0110__row1420858133714"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.1"><p id="drs_03_0110__p642110583375">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_0110__p5421558103710">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_0110__p24222583379">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_0110__p12422458113715">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="drs_03_0110__row1842055863716"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.1 "><p id="drs_03_0110__p164231558193718">jobs</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.2 "><p id="drs_03_0110__p3423195883710">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p id="drs_03_0110__p12424258133711">Array of <a href="#drs_03_0110__request_PreCheckInfo">PreCheckInfo</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p id="drs_03_0110__p94241758103716">The list of batch pre-check requests.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="drs_03_0110__request_PreCheckInfo"></a><a name="request_PreCheckInfo"></a><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0110__request_PreCheckInfo" frame="border" border="1" rules="all"><caption><b>Table 4 </b>PreCheckInfo</caption><thead align="left"><tr id="drs_03_0110__row19425155811374"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.5.1.1"><p id="drs_03_0110__p842775816372">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_0110__p4427185843716">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_0110__p3428205823713">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_0110__p1142812583375">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="drs_03_0110__row642585817377"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="drs_03_0110__p6428195843717">job_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="drs_03_0110__p19429115812378">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="drs_03_0110__p64293582374">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="drs_03_0110__p1242995853714">Task ID.</p>
</td>
</tr>
<tr id="drs_03_0110__row1942605814377"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.1 "><p id="drs_03_0110__p54309582371">precheck_mode</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.2 "><p id="drs_03_0110__p13430658173711">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.5.1.3 "><p id="drs_03_0110__p2430658143716">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.4.2.5.1.4 "><p id="drs_03_0110__p19430155814373">Pre-check mode. Value:</p>
<ul id="drs_03_0110__ul143115817377"><li id="drs_03_0110__li943135810371"><strong id="drs_03_0110__b17431105843720">forStartJob</strong></li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="drs_03_0110__section943213588375"><h4 class="sectiontitle">Response Parameters</h4><p id="drs_03_0110__p1343216586375"><strong id="drs_03_0110__b6120205710134">Status code: 200</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0110__responseParameter" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response body parameters</caption><thead align="left"><tr id="drs_03_0110__row134331058143712"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.1"><p id="drs_03_0110__p74361058113720">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_0110__p20436115833711">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_0110__p17437125833710">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="drs_03_0110__row54341758163718"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="drs_03_0110__p13437175814377">results</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="drs_03_0110__p7437155811378">Array of <a href="#drs_03_0110__response_PostPreCheckResp">PostPreCheckResp</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="drs_03_0110__p1438105873715">Pre-check response body.</p>
</td>
</tr>
<tr id="drs_03_0110__row843445813373"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="drs_03_0110__p5438155815376">count</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="drs_03_0110__p34391758133720">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="drs_03_0110__p143965817379">Total number.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="drs_03_0110__response_PostPreCheckResp"></a><a name="response_PostPreCheckResp"></a><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0110__response_PostPreCheckResp" frame="border" border="1" rules="all"><caption><b>Table 6 </b>PostPreCheckResp</caption><thead align="left"><tr id="drs_03_0110__row244125853710"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.4.1.1"><p id="drs_03_0110__p1442175843719">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_0110__p19442135811372">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_0110__p17443558113713">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="drs_03_0110__row144175816374"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="drs_03_0110__p944375814379">id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="drs_03_0110__p844355813376">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="drs_03_0110__p344445814379">Task ID.</p>
</td>
</tr>
<tr id="drs_03_0110__row1044145873714"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="drs_03_0110__p11444185893719">precheck_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="drs_03_0110__p544415810373">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="drs_03_0110__p1944595816377">Pre-check ID.</p>
</td>
</tr>
<tr id="drs_03_0110__row12441105863716"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="drs_03_0110__p6445185816378">status</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="drs_03_0110__p64453584373">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="drs_03_0110__p1144615813371">Success or failure status. Values:</p>
<ul id="drs_03_0110__ul844645811378"><li id="drs_03_0110__li7446165833718"><strong id="drs_03_0110__b13446145883719">success</strong></li><li id="drs_03_0110__li944619585373"><strong id="drs_03_0110__b8446125873710">failed</strong></li></ul>
</td>
</tr>
<tr id="drs_03_0110__row104411258183718"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="drs_03_0110__p3447258133716">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="drs_03_0110__p344735813376">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="drs_03_0110__p444717584378">Error code, which is optional and indicates the returned information about the failure status.</p>
</td>
</tr>
<tr id="drs_03_0110__row15441358103711"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="drs_03_0110__p7448105814378">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="drs_03_0110__p84481758183714">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="drs_03_0110__p4448458123718">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_0110__section194481258193710"><h4 class="sectiontitle">Example Request</h4><p id="drs_03_0110__p10449115814372">Example of MySQL pre-check for real-time migration:</p>
<pre class="screen" id="drs_03_0110__screen57821512194416">https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-precheck</pre>
<pre class="screen" id="drs_03_0110__screen9953161714444">{
"jobs" : [ {
"job_id" : "140b5236-88ad-43c8-811c-1268453jb101",
"precheck_mode" : "forStartJob"
} ]
}</pre>
</div>
<div class="section" id="drs_03_0110__section6455135815371"><h4 class="sectiontitle">Example Response</h4><p id="drs_03_0110__p2456125893717"><strong id="drs_03_0110__b191915497142">Status code: 200</strong></p>
<p id="drs_03_0110__p13456145811374">OK</p>
<pre class="screen" id="drs_03_0110__screen9457125823715">{
"results" : [ {
"id" : "140b5236-88ad-43c8-811c-1268453jb101",
"status" : "success",
"precheck_id" : "140b5236-88ad-43c8-811c-1268453jb101"
} ],
"count" : 1
}</pre>
</div>
<div class="section" id="drs_03_0110__section845916582372"><h4 class="sectiontitle">Status Code</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0110__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="drs_03_0110__row184601958183716"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.8.2.1.3.1.1"><p id="drs_03_0110__p1846145893716">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_0110__p11461155813371">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="drs_03_0110__row446055823715"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="drs_03_0110__p10462658123710">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="drs_03_0110__p1046320583373">OK</p>
</td>
</tr>
<tr id="drs_03_0110__row10460125883710"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="drs_03_0110__p346313582371">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="drs_03_0110__p44647582371">Bad Request</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="drs_03_0110__section44661258143713"><h4 class="sectiontitle">Error Code</h4><p id="drs_03_0110__p184661058153720">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>