Lai, Weijian 2f0818cf3d ModelArts API 22.3.0 version-20240311
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>
2024-04-05 09:35:42 +00:00

510 lines
36 KiB
HTML

<a name="RunCodeLab"></a><a name="RunCodeLab"></a>
<h1 class="topictitle1">Opening a CodeLab Instance</h1>
<div id="body0000001321658221"><div class="section" id="RunCodeLab__section4289125164116"><h4 class="sectiontitle">Function</h4><p id="RunCodeLab__p13289165115412">This API is used to open a free CodeLab instance. After opening it, you can switch to another instance as required.</p>
</div>
<div class="section" id="RunCodeLab__section728955112415"><h4 class="sectiontitle">Constraints</h4><p id="RunCodeLab__p17290195116413">None</p>
</div>
<div class="section" id="RunCodeLab__section1629116514412"><h4 class="sectiontitle">URI</h4><p id="RunCodeLab__p8291551144110">POST /v1/{project_id}/notebooks/open</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="RunCodeLab__table8293551104113" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="RunCodeLab__row13292205113419"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="RunCodeLab__p17293165114119">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="RunCodeLab__p122941651114113">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="RunCodeLab__p1629445174113">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="RunCodeLab__p102951151154119">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="RunCodeLab__row1329218518418"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="RunCodeLab__p629515144118">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="RunCodeLab__p929575164120">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="RunCodeLab__p11296165154118">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="RunCodeLab__p12297135110414">Project ID. For details, see <a href="modelarts_03_0147.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="RunCodeLab__section132989512419"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="RunCodeLab__request_NotebookOpenRequest" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request body parameters</caption><thead align="left"><tr id="RunCodeLab__row14299651164118"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="RunCodeLab__p1630035113413">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.2"><p id="RunCodeLab__p1430185194115">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.3"><p id="RunCodeLab__p430114511410">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.2.2.5.1.4"><p id="RunCodeLab__p12302851164113">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="RunCodeLab__row20299175113419"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="RunCodeLab__p15302105124118">image_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="RunCodeLab__p9302125114119">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="RunCodeLab__p19303125154117">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="RunCodeLab__p153031451114110">Image ID of the CodeLab instance to be opened. If this parameter is left blank, a multi-kernel CPU instance is opened by default. For details, see <a href="ListImage.html">Querying Supported Images</a>.</p>
</td>
</tr>
<tr id="RunCodeLab__row13299145112419"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="RunCodeLab__p20303135115415">share_url</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="RunCodeLab__p133041511413">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="RunCodeLab__p18305135116412">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="RunCodeLab__p23051951134117">URL of an IPYNB file encrypted using Base64. The file is downloaded by default when the CodeLab instance is opened.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="RunCodeLab__section15306151174110"><h4 class="sectiontitle">Response Parameters</h4><p id="RunCodeLab__p1930755117411"><strong id="RunCodeLab__b113071651174111">Status code: 200</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="RunCodeLab__response_NotebookResp" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response body parameters</caption><thead align="left"><tr id="RunCodeLab__row4308251164114"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.1"><p id="RunCodeLab__p1731015154119">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.2"><p id="RunCodeLab__p103111051204119">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.3.2.4.1.3"><p id="RunCodeLab__p13312145110414">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="RunCodeLab__row430810518415"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="RunCodeLab__p1831255113417">action_progress</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="RunCodeLab__p1731310514417">Array of <a href="#RunCodeLab__response_JobProgress">JobProgress</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="RunCodeLab__p1531355113411">Instance initialization progress.</p>
</td>
</tr>
<tr id="RunCodeLab__row17308151134113"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="RunCodeLab__p7314195174115">description</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="RunCodeLab__p331475104111">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="RunCodeLab__p2315175118419">Instance description</p>
</td>
</tr>
<tr id="RunCodeLab__row8308125113417"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="RunCodeLab__p1031516517411">endpoints</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="RunCodeLab__p183161151134116">Array of <a href="#RunCodeLab__response_EndpointsRes">EndpointsRes</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="RunCodeLab__p131795118418">Local IDE (such as PyCharm and vsCode) or SSH client for remotely accessing a notebook instance through SSH.</p>
</td>
</tr>
<tr id="RunCodeLab__row2308105134110"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="RunCodeLab__p20318125117419">fail_reason</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="RunCodeLab__p103181951144116">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="RunCodeLab__p2319125119418">Instance failure cause</p>
</td>
</tr>
<tr id="RunCodeLab__row1430855174113"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="RunCodeLab__p16319251114115">feature</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="RunCodeLab__p031918518418">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="RunCodeLab__p8320951104116">Instance type. Options: - <strong id="RunCodeLab__b133203515410">DEFAULT</strong>: free CodeLab instance. You can create only one. - <strong id="RunCodeLab__b17320751124110">NOTEBOOK</strong>: billed instance.</p>
</td>
</tr>
<tr id="RunCodeLab__row17308195114116"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="RunCodeLab__p1932085119415">flavor</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="RunCodeLab__p12321185110418">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="RunCodeLab__p1232115512410">Instance flavor</p>
</td>
</tr>
<tr id="RunCodeLab__row23081751154110"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="RunCodeLab__p15321145154119">id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="RunCodeLab__p93225512413">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="RunCodeLab__p1132285114115">Instance ID.</p>
</td>
</tr>
<tr id="RunCodeLab__row1730845124114"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="RunCodeLab__p7323205194117">image</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="RunCodeLab__p6323151184110"><a href="#RunCodeLab__response_Image">Image</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="RunCodeLab__p1632410510414">Instance image</p>
</td>
</tr>
<tr id="RunCodeLab__row930875174114"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="RunCodeLab__p5324145174112">lease</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="RunCodeLab__p1132565124113"><a href="#RunCodeLab__response_Lease">Lease</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="RunCodeLab__p133251517414">Countdown to automatic instance stop.</p>
</td>
</tr>
<tr id="RunCodeLab__row5308135110418"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="RunCodeLab__p5326115119414">name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="RunCodeLab__p19326205194114">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="RunCodeLab__p1032755194116">Instance name</p>
</td>
</tr>
<tr id="RunCodeLab__row73087518416"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="RunCodeLab__p103275515419">pool</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="RunCodeLab__p18328155116414"><a href="#RunCodeLab__response_Pool">Pool</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="RunCodeLab__p10328751134113">Basic information about the dedicated pool, which is returned by the instance created in the dedicated pool.</p>
</td>
</tr>
<tr id="RunCodeLab__row830835114418"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="RunCodeLab__p15329651164115">status</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="RunCodeLab__p1333016519412">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="RunCodeLab__p83301051114112">Instance status Options: \r\n-<strong id="RunCodeLab__b1833025110418">INIT</strong>: The instance is being initialized. \r\n-<strong id="RunCodeLab__b1433011518412">CREATING</strong>: The instance is being created. \r\n-<strong id="RunCodeLab__b1333035144117">STARTING</strong>: The instance is starting. \r\n-STOPPING: The instance is stopping. \r\n-DELETING: The instance is being deleted.\r\n-RUNNING: The instance is running.\r\n-STOPPED: The instance is stopped.\r\n-SNAPSHOTTING: A snapshot is being taken for the instance (status when the image is being saved).\r\n-CREATE_FAILED: The instance fails to be created. \r\n-START_FAILED: The instance fails to be started. \r\n-DELETE_FAILED: The instance fails to be deleted.\r\n-ERROR: An error occurs. \r\n-DELETED: The instance is deleted. \r\n-FROZEN: The instance is frozen.</p>
</td>
</tr>
<tr id="RunCodeLab__row9309195144110"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="RunCodeLab__p333175184117">token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="RunCodeLab__p6331155144110">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="RunCodeLab__p9332115194116">Token used for notebook authentication</p>
</td>
</tr>
<tr id="RunCodeLab__row1309135134111"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="RunCodeLab__p19333135116416">url</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="RunCodeLab__p14333175194119">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="RunCodeLab__p14334651114118">URL for accessing the notebook instance</p>
</td>
</tr>
<tr id="RunCodeLab__row7309051144116"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="RunCodeLab__p2334185154113">volume</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="RunCodeLab__p15335115194116"><a href="#RunCodeLab__response_VolumeRes">VolumeRes</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="RunCodeLab__p2335151164111">Storage volume</p>
</td>
</tr>
<tr id="RunCodeLab__row19309185144119"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.1 "><p id="RunCodeLab__p16336165104119">workspace_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="RunCodeLab__p1633685114415">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.3.2.4.1.3 "><p id="RunCodeLab__p193361151124115">Workspace ID. If no workspaces are available, the default value is <strong id="RunCodeLab__b113371951194117">0</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="RunCodeLab__response_JobProgress"></a><a name="response_JobProgress"></a><table cellpadding="4" cellspacing="0" summary="" id="RunCodeLab__response_JobProgress" frame="border" border="1" rules="all"><caption><b>Table 4 </b>JobProgress</caption><thead align="left"><tr id="RunCodeLab__row9337125113419"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.4.1.1"><p id="RunCodeLab__p1433895124116">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.4.1.2"><p id="RunCodeLab__p4339351164118">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.4.2.4.1.3"><p id="RunCodeLab__p8339851154116">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="RunCodeLab__row15337151164112"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="RunCodeLab__p133407510419">notebook_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="RunCodeLab__p1134045124119">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="RunCodeLab__p13340195174113">Instance ID.</p>
</td>
</tr>
<tr id="RunCodeLab__row1333765134113"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="RunCodeLab__p1934175114416">status</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="RunCodeLab__p9341105134117">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="RunCodeLab__p1034235124118">Job status in a specified step. Options: - <strong id="RunCodeLab__b1534275119415">WAITING</strong>: The job is waiting to begin. - <strong id="RunCodeLab__b83421951164112">PROCESSING</strong>: The job is being processed. - <strong id="RunCodeLab__b6342195116416">FAILED</strong>: The job failed. - <strong id="RunCodeLab__b10342105115418">COMPLETED</strong>: The task is complete.</p>
</td>
</tr>
<tr id="RunCodeLab__row17337155112412"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="RunCodeLab__p1134325164120">step</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="RunCodeLab__p2343351104114">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="RunCodeLab__p1334411510417">Job step. Options: - 1: Storage preparation. - 2: Computing resource preparation. - 3: Network configurations. - 4: Instance initialization.</p>
</td>
</tr>
<tr id="RunCodeLab__row433718511411"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="RunCodeLab__p2034512515416">step_description</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="RunCodeLab__p3345751124119">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="RunCodeLab__p2346751154119">Description of a step in a job.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="RunCodeLab__response_EndpointsRes"></a><a name="response_EndpointsRes"></a><table cellpadding="4" cellspacing="0" summary="" id="RunCodeLab__response_EndpointsRes" frame="border" border="1" rules="all"><caption><b>Table 5 </b>EndpointsRes</caption><thead align="left"><tr id="RunCodeLab__row193471351174119"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.5.2.4.1.1"><p id="RunCodeLab__p133481051174119">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.5.2.4.1.2"><p id="RunCodeLab__p14349145116412">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.5.2.4.1.3"><p id="RunCodeLab__p103495514418">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="RunCodeLab__row73471151164113"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.1 "><p id="RunCodeLab__p4350051164119">allowed_access_ips</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.2 "><p id="RunCodeLab__p6350155174114">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.5.2.4.1.3 "><p id="RunCodeLab__p1835125144111">Whitelist of public IP addresses that are allowed to access the notebook instance through SSH. By default, all public IP addresses can access the notebook instance. If this parameter is specified, only the clients with the specified IP addresses can access the notebook instance.</p>
</td>
</tr>
<tr id="RunCodeLab__row19347251164111"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.1 "><p id="RunCodeLab__p113511251154113">dev_service</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.2 "><p id="RunCodeLab__p635245112412">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.5.2.4.1.3 "><p id="RunCodeLab__p835220516412">Supported services. Options: - <strong id="RunCodeLab__b123521651104112">NOTEBOOK</strong>: You can access the notebook instance using HTTPS.- <strong id="RunCodeLab__b10352205174112">SSH</strong>: You can remotely access the notebook instance through SSH.</p>
</td>
</tr>
<tr id="RunCodeLab__row14347951134111"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.1 "><p id="RunCodeLab__p1035395115413">ssh_keys</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.2 "><p id="RunCodeLab__p63538514416">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.5.2.4.1.3 "><p id="RunCodeLab__p11354951144115">List of SSH key pairs. You can set multiple key pairs to access an SSH instance at the same time.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="RunCodeLab__response_Image"></a><a name="response_Image"></a><table cellpadding="4" cellspacing="0" summary="" id="RunCodeLab__response_Image" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Image</caption><thead align="left"><tr id="RunCodeLab__row43551951124112"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.6.2.4.1.1"><p id="RunCodeLab__p335785164113">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.6.2.4.1.2"><p id="RunCodeLab__p735719516413">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.6.2.4.1.3"><p id="RunCodeLab__p1735811512415">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="RunCodeLab__row1835575110412"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.1 "><p id="RunCodeLab__p14358155144113">id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.2 "><p id="RunCodeLab__p735811514419">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.6.2.4.1.3 "><p id="RunCodeLab__p1135995144118">Image ID</p>
</td>
</tr>
<tr id="RunCodeLab__row8355251174115"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.1 "><p id="RunCodeLab__p93596513410">name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.2 "><p id="RunCodeLab__p123605513417">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.6.2.4.1.3 "><p id="RunCodeLab__p103616511411">Image name.</p>
</td>
</tr>
<tr id="RunCodeLab__row18355125118413"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.1 "><p id="RunCodeLab__p736175114417">swr_path</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.2 "><p id="RunCodeLab__p7362195184110">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.6.2.4.1.3 "><p id="RunCodeLab__p6363115194113">SWR image address</p>
</td>
</tr>
<tr id="RunCodeLab__row1335665164119"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.1 "><p id="RunCodeLab__p163648515413">type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.4.1.2 "><p id="RunCodeLab__p3364105154120">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.6.2.4.1.3 "><p id="RunCodeLab__p93651451194119">Image type. Options: - <strong id="RunCodeLab__b23657514414">BUILD_IN</strong>: built-in system image- <strong id="RunCodeLab__b10365145114117">DEDICATED</strong>: image saved by the user</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="RunCodeLab__response_Lease"></a><a name="response_Lease"></a><table cellpadding="4" cellspacing="0" summary="" id="RunCodeLab__response_Lease" frame="border" border="1" rules="all"><caption><b>Table 7 </b>Lease</caption><thead align="left"><tr id="RunCodeLab__row53661951174111"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.7.2.4.1.1"><p id="RunCodeLab__p93673512413">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.7.2.4.1.2"><p id="RunCodeLab__p15368125111414">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.7.2.4.1.3"><p id="RunCodeLab__p17368115114412">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="RunCodeLab__row153661515411"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.1 "><p id="RunCodeLab__p153691851124113">create_time</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.2 "><p id="RunCodeLab__p63691051134115">Long</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.7.2.4.1.3 "><p id="RunCodeLab__p1137095116419">Time (UTC) when the instance is created, accurate to millisecond.</p>
</td>
</tr>
<tr id="RunCodeLab__row19366551124119"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.1 "><p id="RunCodeLab__p1237055110416">duration</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.2 "><p id="RunCodeLab__p1937135112410">Long</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.7.2.4.1.3 "><p id="RunCodeLab__p537111511411">Instance running duration, which is calculated based on the instance creation time. If the instance creation time plus the duration is greater than the current time, the system automatically stops the instance.</p>
</td>
</tr>
<tr id="RunCodeLab__row5366125124111"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.1 "><p id="RunCodeLab__p137225134114">enable</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.2 "><p id="RunCodeLab__p9372135124114">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.7.2.4.1.3 "><p id="RunCodeLab__p137385111414">Whether to enable auto stop of the instance.</p>
</td>
</tr>
<tr id="RunCodeLab__row7366165114419"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.1 "><p id="RunCodeLab__p13373105164110">update_time</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.4.1.2 "><p id="RunCodeLab__p4373351114113">Long</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.7.2.4.1.3 "><p id="RunCodeLab__p7374105144114">Time (UTC) when the instance is last updated (excluding the keepalive heartbeat time), accurate to millisecond.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="RunCodeLab__response_Pool"></a><a name="response_Pool"></a><table cellpadding="4" cellspacing="0" summary="" id="RunCodeLab__response_Pool" frame="border" border="1" rules="all"><caption><b>Table 8 </b>Pool</caption><thead align="left"><tr id="RunCodeLab__row5375351134112"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.8.2.4.1.1"><p id="RunCodeLab__p537695194116">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.8.2.4.1.2"><p id="RunCodeLab__p1377195111413">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.8.2.4.1.3"><p id="RunCodeLab__p1037745113419">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="RunCodeLab__row2037555194118"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.1 "><p id="RunCodeLab__p1337865184111">id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.2 "><p id="RunCodeLab__p133786512414">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.8.2.4.1.3 "><p id="RunCodeLab__p1037816517414">ID of a dedicated resource pool</p>
</td>
</tr>
<tr id="RunCodeLab__row4375151184119"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.1 "><p id="RunCodeLab__p3379951164111">name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.4.1.2 "><p id="RunCodeLab__p173795515414">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.8.2.4.1.3 "><p id="RunCodeLab__p1438035114113">Name of a dedicated resource pool</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="RunCodeLab__response_VolumeRes"></a><a name="response_VolumeRes"></a><table cellpadding="4" cellspacing="0" summary="" id="RunCodeLab__response_VolumeRes" frame="border" border="1" rules="all"><caption><b>Table 9 </b>VolumeRes</caption><thead align="left"><tr id="RunCodeLab__row1838116518419"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.9.2.4.1.1"><p id="RunCodeLab__p13382105124114">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.9.2.4.1.2"><p id="RunCodeLab__p11383125113414">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.9.2.4.1.3"><p id="RunCodeLab__p18383125111411">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="RunCodeLab__row83815514416"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.4.1.1 "><p id="RunCodeLab__p1038495114419">capacity</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.4.1.2 "><p id="RunCodeLab__p1438419519412">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.9.2.4.1.3 "><p id="RunCodeLab__p18385151144115">Storage capacity. The default value is 5 GB for EVS and 50 GB for EFS. The maximum value is 4,096 GB.</p>
</td>
</tr>
<tr id="RunCodeLab__row4381185112419"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.4.1.1 "><p id="RunCodeLab__p1138517511415">category</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.4.1.2 "><p id="RunCodeLab__p163861951104117">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.9.2.4.1.3 "><p id="RunCodeLab__p638665119414">Storage category. Options: \r\n-<strong id="RunCodeLab__b638715515413">EFS</strong>: Scalable File Service (SFS), which is the default storage. \r\n-<strong id="RunCodeLab__b1387115154117">EVS</strong>: Elastic Volume Service (EVS). \r\n\r\n For details about the differences between the two types of storage, see Selecting a Storage Type in DevEnviron.\r\n.\r\n\r\n\r\n\r\n</p>
</td>
</tr>
<tr id="RunCodeLab__row13381165164115"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.4.1.1 "><p id="RunCodeLab__p15387135154112">mount_path</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.4.1.2 "><p id="RunCodeLab__p9387195119417">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.9.2.4.1.3 "><p id="RunCodeLab__p20388145164117">Directory of the notebook instance to which OBS storage is mounted. Currently, the directory is <strong id="RunCodeLab__b163881651104114">/home/ma-user/work/</strong>.</p>
</td>
</tr>
<tr id="RunCodeLab__row93811551184118"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.4.1.1 "><p id="RunCodeLab__p0389051174110">ownership</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.4.1.2 "><p id="RunCodeLab__p1038910514412">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.9.2.4.1.3 "><p id="RunCodeLab__p1039085116415">Owner to which the resource belongs. Options: - <strong id="RunCodeLab__b63901851174114">MANAGED</strong>: Resources are managed by services.- <strong id="RunCodeLab__b3390151134120">DEDICATED</strong>: Resources are managed by the user account. This mode is supported only when the instance category is <strong id="RunCodeLab__b193901751164111">EFS</strong>.</p>
</td>
</tr>
<tr id="RunCodeLab__row1738135117415"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.4.1.1 "><p id="RunCodeLab__p93901451204116">status</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.4.1.2 "><p id="RunCodeLab__p6391051204113">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.9.2.4.1.3 "><p id="RunCodeLab__p43921951144117">EVS disk capacity expansion status, which is <strong id="RunCodeLab__b1392551124120">RESIZING</strong> during capacity expansion and does not affect the instance.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="RunCodeLab__section1339255113412"><h4 class="sectiontitle">Example Requests</h4><pre class="screen" id="RunCodeLab__screen1393175144114">{ }</pre>
</div>
<div class="section" id="RunCodeLab__section13931951114114"><h4 class="sectiontitle">Example Responses</h4><p id="RunCodeLab__p939455184119"><strong id="RunCodeLab__b1939519512417">Status code: 200</strong></p>
<p id="RunCodeLab__p6395251104114">OK</p>
<pre class="screen" id="RunCodeLab__screen2039875124117">{
"action_progress" : [ {
"step" : 1,
"status" : "WAITING",
"description" : "Prepare the storage."
}, {
"step" : 2,
"status" : "WAITING",
"description" : "Prepare the compute resource."
}, {
"step" : 3,
"status" : "WAITING",
"description" : "Configuring the network."
}, {
"step" : 4,
"status" : "WAITING",
"description" : "Initialize the notebook instance."
} ],
"create_at" : 1638841805440,
"feature" : "DEFAULT",
"flavor" : "modelarts.vm.cpu.free",
"id" : "f9937afa-ca78-45b6-bc12-7ecf42553c48",
"image" : {
"description" : "description",
"id" : "e1a07296-22a8-4f05-8bc8-e936c8e54090",
"name" : "notebook2.0-mul-kernel-cpu-cp36",
"swr_path" : ".xxxx.com/atelier/notebook2.0-mul-kernel-cpu-cp36:3.3.2-release_v1",
"tag" : "3.3.2-release_v1",
"type" : "BUILD_IN"
},
"lease" : {
"create_at" : 1638841805439,
"duration" : 3600000,
"enable" : true,
"update_at" : 1638841805439
},
"name" : "notebook_5ee4bf0e",
"status" : "CREATING",
"token" : "58ba50c6-e8ff-245c-4840-49e51aa70737",
"update_at" : 1638841805440,
"workspace_id" : "0"
}</pre>
</div>
<div class="section" id="RunCodeLab__section1622714523414"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="RunCodeLab__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="RunCodeLab__row1641075112412"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.8.2.1.3.1.1"><p id="RunCodeLab__p2227185213411">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.8.2.1.3.1.2"><p id="RunCodeLab__p32281552184116">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="RunCodeLab__row041025116418"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="RunCodeLab__p202281520414">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="RunCodeLab__p152281652134119">OK</p>
</td>
</tr>
<tr id="RunCodeLab__row6410115134114"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="RunCodeLab__p14228352164110">201</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="RunCodeLab__p6228135213410">Created</p>
</td>
</tr>
<tr id="RunCodeLab__row10410951174117"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="RunCodeLab__p1228175215412">401</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="RunCodeLab__p72299523418">Unauthorized</p>
</td>
</tr>
<tr id="RunCodeLab__row2410551164111"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="RunCodeLab__p112297526413">403</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="RunCodeLab__p11229352134120">Forbidden</p>
</td>
</tr>
<tr id="RunCodeLab__row54109511411"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="RunCodeLab__p92291052144111">404</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="RunCodeLab__p1122915214117">Not Found</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="RunCodeLab__section19229152124110"><h4 class="sectiontitle">Error Codes</h4><p id="RunCodeLab__p123015215413">See <a href="modelarts_03_0095.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="notebook.html">DevEnviron Instance Management</a></div>
</div>
</div>