forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Lai, Weijian <laiweijian4@huawei.com> Co-committed-by: Lai, Weijian <laiweijian4@huawei.com>
120 lines
9.6 KiB
HTML
120 lines
9.6 KiB
HTML
<a name="EN-US_TOPIC_0000001943967301"></a><a name="EN-US_TOPIC_0000001943967301"></a>
|
|
|
|
<h1 class="topictitle1">Managing a Development Environment Instance</h1>
|
|
<div id="body1540007468581"><div class="section" id="EN-US_TOPIC_0000001943967301__section88894735616"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000001943967301__p17844122205611">This API is used to startor stop a notebook instance.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001943967301__section20261580353"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0000001943967301__p134094315119">POST /v1/{project_id}/demanager/instances/{instance_id}/action</p>
|
|
</div>
|
|
<div class="p" id="EN-US_TOPIC_0000001943967301__p149561641164510"><a href="#EN-US_TOPIC_0000001943967301__table569625523811">Table 1</a> describes the required parameters.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001943967301__table569625523811"></a><a name="table569625523811"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001943967301__table569625523811" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001943967301__row169945510386"><th align="left" class="cellrowborder" valign="top" width="19%" id="mcps1.3.3.2.2.5.1.1"><p id="EN-US_TOPIC_0000001943967301__p370019557384">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.3.2.2.5.1.2"><p id="EN-US_TOPIC_0000001943967301__p2702115512388">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13%" id="mcps1.3.3.2.2.5.1.3"><p id="EN-US_TOPIC_0000001943967301__p1704955163819">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="52%" id="mcps1.3.3.2.2.5.1.4"><p id="EN-US_TOPIC_0000001943967301__p070515554383">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001943967301__row187062555388"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001943967301__p570711558389">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001943967301__p1070819552389">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001943967301__p147095558384">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52%" headers="mcps1.3.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001943967301__p4972959911831">Project ID. For details about how to obtain a project ID, see <a href="modelarts_03_0147.html">Obtaining a Project ID and Name</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001943967301__row16670119161415"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.3.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001943967301__p11308137181317">instance_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001943967301__p175711944161316">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.3.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001943967301__p05711544181313">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52%" headers="mcps1.3.3.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001943967301__p830883717136">Instance ID</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001943967301__section722833995517"><h4 class="sectiontitle">Request Body</h4><div class="p" id="EN-US_TOPIC_0000001943967301__p61943115467"><a href="#EN-US_TOPIC_0000001943967301__table46411941555">Table 2</a> describes the request parameters.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001943967301__table46411941555"></a><a name="table46411941555"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001943967301__table46411941555" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001943967301__row26431149518"><th align="left" class="cellrowborder" valign="top" width="19%" id="mcps1.3.4.2.2.2.5.1.1"><p id="EN-US_TOPIC_0000001943967301__p66461141354">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.4.2.2.2.5.1.2"><p id="EN-US_TOPIC_0000001943967301__p9646841254">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13%" id="mcps1.3.4.2.2.2.5.1.3"><p id="EN-US_TOPIC_0000001943967301__p06477412510">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="52%" id="mcps1.3.4.2.2.2.5.1.4"><p id="EN-US_TOPIC_0000001943967301__p76491840517">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001943967301__row14649141251"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.4.2.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001943967301__p135851959153210">action</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001943967301__p2585859143211">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.4.2.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001943967301__p5585135923214">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52%" headers="mcps1.3.4.2.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001943967301__p1726412121981">Operation on a development environment instance. The options are as follows:</p>
|
|
<ul id="EN-US_TOPIC_0000001943967301__ul121104457206"><li id="EN-US_TOPIC_0000001943967301__li7111645152017"><strong id="EN-US_TOPIC_0000001943967301__b169731430204611">start</strong></li><li id="EN-US_TOPIC_0000001943967301__li177241647172018"><strong id="EN-US_TOPIC_0000001943967301__b1875014324468">stop</strong></li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001943967301__section8857352133212"><h4 class="sectiontitle">Response Body</h4><p id="EN-US_TOPIC_0000001943967301__p171672054134620"><a href="#EN-US_TOPIC_0000001943967301__table14581542113111">Table 3</a> describes the response parameters.</p>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001943967301__table14581542113111"></a><a name="table14581542113111"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001943967301__table14581542113111" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001943967301__row7581144216315"><th align="left" class="cellrowborder" valign="top" width="19%" id="mcps1.3.5.3.2.4.1.1"><p id="EN-US_TOPIC_0000001943967301__p4886449203110">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.5.3.2.4.1.2"><p id="EN-US_TOPIC_0000001943967301__p1388718492317">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="65%" id="mcps1.3.5.3.2.4.1.3"><p id="EN-US_TOPIC_0000001943967301__p48891049143113">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001943967301__row1558134210313"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001943967301__p478563424717">current_status</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001943967301__p7741113017490">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001943967301__p56329492917">Current status of an instance</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001943967301__row0159718325"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001943967301__p101604112325">previous_state</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001943967301__p12160161183219">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001943967301__p126776443415">Previous status of an instance</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001943967301__section207913354815"><h4 class="sectiontitle">Sample Request</h4><p id="EN-US_TOPIC_0000001943967301__p1023743012319">The following shows how to start instance <span class="parmvalue" id="EN-US_TOPIC_0000001943967301__parmvalue92591917526"><b>6fa459ea-ee8a-3ca4-894e-db77e160355e</b></span>.</p>
|
|
<div class="p" id="EN-US_TOPIC_0000001943967301__p5359155018230"><pre class="screen" id="EN-US_TOPIC_0000001943967301__screen19700719102416">{
|
|
"action": "start"
|
|
}</pre>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001943967301__section26412042412"><h4 class="sectiontitle">Sample Response</h4><ul id="EN-US_TOPIC_0000001943967301__ul1063118145248"><li id="EN-US_TOPIC_0000001943967301__li56311214172416">Successful response<pre class="screen" id="EN-US_TOPIC_0000001943967301__screen126311714172412">{
|
|
"current_status": "STARTING",
|
|
"previous_state": "STOPPED"
|
|
}</pre>
|
|
</li><li id="EN-US_TOPIC_0000001943967301__li20631414122420">Failed response<pre class="screen" id="EN-US_TOPIC_0000001943967301__screen206311314102410">{
|
|
"error_message": "The instance does not exist.",
|
|
"error_code": "ModelArts.6309"
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001943967301__section157661945274"><h4 class="sectiontitle">Status Code</h4><p id="EN-US_TOPIC_0000001943967301__p919113015575">For details about the status code, see <a href="modelarts_03_0094.html">Status Code</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="modelarts_03_0108.html">DevEnviron (Old Version)</a></div>
|
|
</div>
|
|
</div>
|
|
|