doc-exports/docs/drs/api-ref/drs_03_0148.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

171 lines
12 KiB
HTML

<a name="drs_03_0148"></a><a name="drs_03_0148"></a>
<h1 class="topictitle1">Querying the Switchover Result</h1>
<div id="body0000001120792039"><div class="section" id="drs_03_0148__section1966734303620"><h4 class="sectiontitle">Function</h4><p id="drs_03_0148__p19676174333616">This API is used to query the dual-virtual IP address switchover result.</p>
</div>
<div class="section" id="drs_03_0148__section667813439369"><h4 class="sectiontitle">Constraints</h4><p id="drs_03_0148__p867914316367">Only synchronization between self-built databases supports querying the results of dual virtual IP address switchover.</p>
</div>
<div class="section" id="drs_03_0148__section668074313360"><h4 class="sectiontitle">URI</h4><p id="drs_03_0148__p96811843193612">GET /v3/{project_id}/jobs/{job_id}/get-switch-vip-status</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0148__table15684743113619" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="drs_03_0148__row168394316363"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="drs_03_0148__p468511432360">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_0148__p126861343143619">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_0148__p1168824343612">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_0148__p069074313615">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="drs_03_0148__row26831843163618"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="drs_03_0148__p196913430363">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="drs_03_0148__p186933439364">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="drs_03_0148__p206951543153615">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="drs_03_0148__p12696144383612">Project ID of a tenant in a region</p>
</td>
</tr>
<tr id="drs_03_0148__row9640123115813"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="drs_03_0148__p116403234586">job_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="drs_03_0148__p176405239589">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="drs_03_0148__p17640723135812">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="drs_03_0148__p17640162375815">Job ID of a tenant in a region. If the task is a cross-AZ task, the parent task ID is used.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="drs_03_0148__section166975438363"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0148__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="drs_03_0148__row1869920432367"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="drs_03_0148__p1970264353612">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_0148__p16704543153611">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_0148__p270544314360">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_0148__p157061243133618">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="drs_03_0148__row8699204373618"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="drs_03_0148__p6707943153611">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="drs_03_0148__p470812431361">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="drs_03_0148__p13710144311365">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="drs_03_0148__p38561010141410">The content type.</p>
<p id="drs_03_0148__p123256415450">The default value is <strong id="drs_03_0148__b1296021318149">application/json</strong>.</p>
</td>
</tr>
<tr id="drs_03_0148__row1569964383615"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="drs_03_0148__p11713104373612">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_0148__p127141043153610">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="drs_03_0148__p27159438365">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="drs_03_0148__p6716543113619">User token obtained from IAM.</p>
</td>
</tr>
<tr id="drs_03_0148__row206994433364"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="drs_03_0148__p771894311364">X-Language</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="drs_03_0148__p872014438369">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="drs_03_0148__p1572204333619">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="drs_03_0148__p17723184312360">Request language type</p>
<p id="drs_03_0148__p68691956125917">Default value: <strong id="drs_03_0148__b1786912566599">en-us</strong></p>
<p id="drs_03_0148__p1386915625912">Values:</p>
<ul id="drs_03_0148__ul1586965613591"><li id="drs_03_0148__li1886915655910"><strong id="drs_03_0148__b158691656145912">en-us</strong></li><li id="drs_03_0148__li17869125685916"><strong id="drs_03_0148__b12869175615914">zh-cn</strong></li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="drs_03_0148__section1073664312365"><h4 class="sectiontitle">Response Parameters</h4><p id="drs_03_0148__p5737743193613">Status code: 200</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0148__responseParameter" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response body parameters</caption><thead align="left"><tr id="drs_03_0148__row87391343163611"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.1"><p id="drs_03_0148__p1974214433365">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_0148__p157431843113610">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_0148__p11745134323614">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="drs_03_0148__row073924310368"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="drs_03_0148__p187461843153612">id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="drs_03_0148__p774774343618">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="drs_03_0148__p1374817434366">Task ID.</p>
</td>
</tr>
<tr id="drs_03_0148__row18740144323612"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="drs_03_0148__p20749154313618">status</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="drs_03_0148__p97521543113617">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="drs_03_0148__p187531843193610">Status Values:</p>
<ul id="drs_03_0148__ul9133134412716"><li id="drs_03_0148__li5133164418718"><strong id="drs_03_0148__b98954373018">SWITCH_VIP_COMPLETE</strong>: The switchover is successful.</li><li id="drs_03_0148__li51337441479"><strong id="drs_03_0148__b947616723010">SWITCH_VIP_FAILED</strong>: The switchover failed.</li><li id="drs_03_0148__li1458295371218"><strong id="drs_03_0148__b384211016300">SWITCH_VIP_START</strong>: The switchover is in progress.</li></ul>
</td>
</tr>
<tr id="drs_03_0148__row163451459627"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="drs_03_0148__p10345185918216">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="drs_03_0148__p634516593220">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="drs_03_0148__p1934617591026">Error code, which is optional and indicates the returned information about the failure status.</p>
</td>
</tr>
<tr id="drs_03_0148__row182501854728"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="drs_03_0148__p92511754428">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="drs_03_0148__p425117541726">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="drs_03_0148__p82511054427">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_0148__section1929315441366"><h4 class="sectiontitle">Example Request</h4><p id="drs_03_0148__p1629424412366">Example of batch primary/standby switchover:</p>
<pre class="screen" id="drs_03_0148__screen6908142841415">https://{EndPoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/260e27fd-4976-44dc-9948-e1265e4jb201/get-switch-vip-status</pre>
</div>
<div class="section" id="drs_03_0148__section192961144113620"><h4 class="sectiontitle">Example Response</h4><p id="drs_03_0148__p62971644153610"><strong id="drs_03_0148__b82971044153616">Status code: 200</strong></p>
<p id="drs_03_0148__p18298144463615">Accepted</p>
<pre class="screen" id="drs_03_0148__screen5298144413361">{
"id": "260e27fd-4976-44dc-9948-e1265e4jb201",
"status": "SWITCH_VIP_COMPLETE"
}</pre>
</div>
<div class="section" id="drs_03_0148__section1634515449362"><h4 class="sectiontitle">Status Code</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="drs_03_0148__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="drs_03_0148__row7116154433611"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.8.2.1.3.1.1"><p id="drs_03_0148__p934654413369">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_0148__p834754433612">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="drs_03_0148__row0116174443610"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="drs_03_0148__p634724433615">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="drs_03_0148__p02051125534">OK</p>
</td>
</tr>
<tr id="drs_03_0148__row5116144413610"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="drs_03_0148__p83482441365">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="drs_03_0148__p203491448361">Bad Request</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="drs_03_0148__section1835084418368"><h4 class="sectiontitle">Error Code</h4><p id="drs_03_0148__p16350184418367">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_api_0100.html">Real-Time Synchronization Management</a></div>
</div>
</div>