doc-exports/docs/dds/api-ref/dds_api_0021.html
Ru, Li Yi a6e39ff5b3 DDS_API
Reviewed-by: Boka, Ladislav <ladislav.boka@t-systems.com>
Co-authored-by: Ru, Li Yi <liyiru7@huawei.com>
Co-committed-by: Ru, Li Yi <liyiru7@huawei.com>
2024-05-27 08:52:30 +00:00

133 lines
10 KiB
HTML

<a name="dds_api_0021"></a><a name="dds_api_0021"></a>
<h1 class="topictitle1">Restarting a DB Instance</h1>
<div id="body1470368157651"><div class="section" id="dds_api_0021__section4850156117316"><h4 class="sectiontitle">Function</h4><p id="dds_api_0021__p52780252141331">This API is used to restart a DB instance.</p>
<div class="notice" id="dds_api_0021__note19647914151512"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="dds_api_0021__p757016191831">The DDS DB instance will be unavailable during the restart process. Exercise caution when performing this operation.</p>
</div></div>
</div>
<div class="section" id="dds_api_0021__section1239972118494"><h4 class="sectiontitle">Constraints</h4><p id="dds_api_0021__p1649774041512">If the instance status is not normal, the instance cannot be restarted.</p>
</div>
<div class="section" id="dds_api_0021__section28961517113719"><h4 class="sectiontitle">URI</h4><ul id="dds_api_0021__ul53354139141429"><li id="dds_api_0021__li1270098217262">URI format<p id="dds_api_0021__p174818141875"><a name="dds_api_0021__li1270098217262"></a><a name="li1270098217262"></a>POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/restart</p>
</li></ul>
<ul id="dds_api_0021__ul49831254144655"><li id="dds_api_0021__li15430535">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dds_api_0021__table4657088" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="dds_api_0021__row60083059"><th align="left" class="cellrowborder" valign="top" width="21.86%" id="mcps1.3.3.3.1.1.2.4.1.1"><p id="dds_api_0021__p34889605">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="26.939999999999998%" id="mcps1.3.3.3.1.1.2.4.1.2"><p id="dds_api_0021__p7485743">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="51.2%" id="mcps1.3.3.3.1.1.2.4.1.3"><p id="dds_api_0021__p2775334615440">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dds_api_0021__row57385070"><td class="cellrowborder" valign="top" width="21.86%" headers="mcps1.3.3.3.1.1.2.4.1.1 "><p id="dds_api_0021__p2900824281">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="26.939999999999998%" headers="mcps1.3.3.3.1.1.2.4.1.2 "><p id="dds_api_0021__p22717550">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="51.2%" headers="mcps1.3.3.3.1.1.2.4.1.3 "><p id="dds_api_0021__p28182251">Specifies the project ID of a tenant in a region.</p>
</td>
</tr>
<tr id="dds_api_0021__row2864326155157"><td class="cellrowborder" valign="top" width="21.86%" headers="mcps1.3.3.3.1.1.2.4.1.1 "><p id="dds_api_0021__p1990092412819">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="26.939999999999998%" headers="mcps1.3.3.3.1.1.2.4.1.2 "><p id="dds_api_0021__p10737742155220">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="51.2%" headers="mcps1.3.3.3.1.1.2.4.1.3 "><p id="dds_api_0021__p1295692717172">Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API to create an instance.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="dds_api_0021__section3074340117316"><h4 class="sectiontitle">Requests</h4><ul id="dds_api_0021__ul1567010515358"><li id="dds_api_0021__li167018553514">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dds_api_0021__table133396233515" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="dds_api_0021__row165102318516"><th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.4.2.1.1.2.5.1.1"><p id="dds_api_0021__p116511423055">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18%" id="mcps1.3.4.2.1.1.2.5.1.2"><p id="dds_api_0021__p6651023359">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.4.2.1.1.2.5.1.3"><p id="dds_api_0021__p14434135218914">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="51%" id="mcps1.3.4.2.1.1.2.5.1.4"><p id="dds_api_0021__p118208192019">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dds_api_0021__row161835816275"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="dds_api_0021__p1022241919276">target_type</p>
</td>
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="dds_api_0021__p7191244323">No</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="dds_api_0021__p145094109293">String</p>
</td>
<td class="cellrowborder" valign="top" width="51%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><p id="dds_api_0021__p5222121932718">Specifies the type of the object to restart.</p>
<ul id="dds_api_0021__ul16867165184017"><li id="dds_api_0021__li0867205112400">This parameter is mandatory when you restart one or more nodes of a cluster instance.<ul id="dds_api_0021__ul1270101017110"><li id="dds_api_0021__li13267618111">Set the value to <strong id="dds_api_0021__b13331193218572">mongos</strong> if mongos nodes are restarted.</li><li id="dds_api_0021__li73271269119">Set the value to <strong id="dds_api_0021__b48706388576">shard</strong> if shard nodes are restarted.</li><li id="dds_api_0021__li1328166118">Set the value to <strong id="dds_api_0021__b7942174916716">config</strong> if config nodes are restarted.</li></ul>
</li><li id="dds_api_0021__li1486735134014">This parameter is not transferred when the DB instance is restarted.</li></ul>
</td>
</tr>
<tr id="dds_api_0021__row6651142313512"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="dds_api_0021__p290555482713">target_id</p>
</td>
<td class="cellrowborder" valign="top" width="18%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="dds_api_0021__p06510231257">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="dds_api_0021__p13509110162913">String</p>
</td>
<td class="cellrowborder" valign="top" width="51%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><p id="dds_api_0021__p465172314518">Specifies the ID of the object to be restarted, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance.</p>
<ul id="dds_api_0021__ul164931617154319"><li id="dds_api_0021__li19494717174315">In a cluster instance, the value is the ID of the node to restart.</li><li id="dds_api_0021__li449711717437">When you restart the entire DB instance, the value is the DB instance ID.</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="dds_api_0021__li0308195111814">Example request<p id="dds_api_0021__p1153892416584"><a name="dds_api_0021__li0308195111814"></a><a name="li0308195111814"></a>POST https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/9136fd2a9fcd405ea4674276ce36dae8in02/restart</p>
<div class="p" id="dds_api_0021__p55741823135817">Restart the DB instance.<pre class="codeblock" id="dds_api_0021__codeblock125743237582">{
"target_id":"9136fd2a9fcd405ea4674276ce36dae8in02"
}</pre>
</div>
<div class="p" id="dds_api_0021__p1857432315588">Restart shards.<pre class="codeblock" id="dds_api_0021__codeblock125741423115817">{
"target_type":"shard",
"target_id":"84e7c96b82aa4fedb3b00f98edd71ba4gr02"
}</pre>
</div>
<div class="p" id="dds_api_0021__p205741123205814">Restart configs.<pre class="codeblock" id="dds_api_0021__codeblock257452317588">{
"target_type":"config",
"target_id":"06439baa35c146d3a8965af59d370908gr02"
}</pre>
</div>
<div class="p" id="dds_api_0021__p16575923115813">Restart mongos.<pre class="codeblock" id="dds_api_0021__codeblock105748236582">{
"target_type":"mongos",
"target_id":"bd4dccbd53ae48d5bd3046bebf715079no02"
}</pre>
</div>
</li></ul>
</div>
<div class="section" id="dds_api_0021__section28521534113742"><h4 class="sectiontitle">Responses</h4><ul id="dds_api_0021__ul856805820341"><li id="dds_api_0021__li46056421">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dds_api_0021__table29807226151454" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameter description</caption><thead align="left"><tr id="dds_api_0021__row3223123151454"><th align="left" class="cellrowborder" valign="top" width="26%" id="mcps1.3.5.2.1.1.2.4.1.1"><p id="dds_api_0021__p59746450151454"><strong id="dds_api_0021__b129519322346">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24%" id="mcps1.3.5.2.1.1.2.4.1.2"><p id="dds_api_0021__p7624314151454">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.2.1.1.2.4.1.3"><p id="dds_api_0021__p12621102511117">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dds_api_0021__row19231203392012"><td class="cellrowborder" valign="top" width="26%" headers="mcps1.3.5.2.1.1.2.4.1.1 "><p id="dds_api_0021__p417012163212">job_id</p>
</td>
<td class="cellrowborder" valign="top" width="24%" headers="mcps1.3.5.2.1.1.2.4.1.2 "><p id="dds_api_0021__p317018169216">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.2.1.1.2.4.1.3 "><p id="dds_api_0021__p1017071652111">Indicates the workflow ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="dds_api_0021__li197826183514">Response example<pre class="codeblock" id="dds_api_0021__codeblock165681158183415">{
"job_id": "3711e2ad-5787-49bc-a47f-3f0b066af9f5"
}</pre>
</li></ul>
</div>
<div class="section" id="dds_api_0021__section51597550"><h4 class="sectiontitle">Status Code</h4><p id="dds_api_0021__en-us_topic_0000001387505349_p16131712193312">Status Code:202.</p>
<p id="dds_api_0021__en-us_topic_0000001387505349_p480617135329">For more information, see <a href="dds_status_code.html">Status Code</a>.</p>
</div>
<div class="section" id="dds_api_0021__section6522193710339"><h4 class="sectiontitle">Error Code</h4><p id="dds_api_0021__dds_api_0018_p20466124120334">For more information, see <a href="dds_error_code.html">Error Code</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_instance_mgmt.html">DB Instance Management</a></div>
</div>
</div>