Files
doc-exports/docs/modelarts/api-ref/CreateImage.html
2025-05-09 10:22:58 +00:00

373 lines
34 KiB
HTML

<a name="EN-US_TOPIC_0000002268806193"></a><a name="EN-US_TOPIC_0000002268806193"></a>
<h1 class="topictitle1">Saving a Running Instance as a Container Image</h1>
<div id="body32001227"><div class="section" id="EN-US_TOPIC_0000002268806193__section8280528131117"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000002268806193__p728014283119">A running instance can be saved as a container image. In the saved image, the installed dependency package (pip package) is not lost. In the VS Code remote development scenario, the plug-ins installed on the server are not lost.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000002268806193__section1228042831117"><h4 class="sectiontitle">Constraints</h4><p id="EN-US_TOPIC_0000002268806193__p928052818117">None</p>
</div>
<div class="section" id="EN-US_TOPIC_0000002268806193__section1528052810115"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0000002268806193__p72801928101117">POST /v1/{project_id}/notebooks/{id}/create-image</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000002268806193__table1428182811114" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000002268806193__row0281928171114"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="EN-US_TOPIC_0000002268806193__p15282132819114">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="EN-US_TOPIC_0000002268806193__p4282428171113">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="EN-US_TOPIC_0000002268806193__p1628232851118">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="EN-US_TOPIC_0000002268806193__p3282162811112">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000002268806193__row10281122812110"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000002268806193__p0282172801119">id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="EN-US_TOPIC_0000002268806193__p11282928151114">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="EN-US_TOPIC_0000002268806193__p1628311285114">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="EN-US_TOPIC_0000002268806193__p152831328161111">Notebook instance ID, which can be obtained by calling the API for querying the notebook instance list.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row12811528111111"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000002268806193__p1328362811118">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="EN-US_TOPIC_0000002268806193__p328315283112">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="EN-US_TOPIC_0000002268806193__p028362814117">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="EN-US_TOPIC_0000002268806193__p9283162851118">Project ID. For details, see <a href="modelarts_03_0147.html">Obtaining a Project ID and Name</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000002268806193__section428316288110"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000002268806193__en-us_topic_0000002091282781_request_ImageCreateReq" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request body parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000002268806193__row32842028101113"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="EN-US_TOPIC_0000002268806193__p528412812114">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.2"><p id="EN-US_TOPIC_0000002268806193__p13285142810117">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.3"><p id="EN-US_TOPIC_0000002268806193__p19285182861115">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.2.2.5.1.4"><p id="EN-US_TOPIC_0000002268806193__p728518281119">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000002268806193__row16284128181114"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="EN-US_TOPIC_0000002268806193__p10285112811116">description</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="EN-US_TOPIC_0000002268806193__p1928532810113">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="EN-US_TOPIC_0000002268806193__p2285142861114">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="EN-US_TOPIC_0000002268806193__p20285202811119">Image description with a maximum of 512 characters</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row14284162871119"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="EN-US_TOPIC_0000002268806193__p18285628131120">name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="EN-US_TOPIC_0000002268806193__p928517283118">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="EN-US_TOPIC_0000002268806193__p628516288116">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="EN-US_TOPIC_0000002268806193__p1628692815119">Image name, which contains a maximum of 512 characters, including lowercase letters, digits, hyphens (-), underscores (_), and periods (.)</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row12284142815115"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="EN-US_TOPIC_0000002268806193__p1328612817111">namespace</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="EN-US_TOPIC_0000002268806193__p52868286110">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="EN-US_TOPIC_0000002268806193__p1428614288110">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="EN-US_TOPIC_0000002268806193__p122866285110">Organization to which the image belongs. You can create and view the organization on the <strong id="EN-US_TOPIC_0000002268806193__b17286172811114">Organization Management</strong> page of the SWR console.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row112841285114"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="EN-US_TOPIC_0000002268806193__p5286112815113">tag</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="EN-US_TOPIC_0000002268806193__p18286112821110">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="EN-US_TOPIC_0000002268806193__p11286628151116">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="EN-US_TOPIC_0000002268806193__p6286228141111">Image tag, which can contain a maximum of 64 characters, including letters, digits, hyphens (-), underscores (_), and periods (.)</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row202846284111"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="EN-US_TOPIC_0000002268806193__p228682816116">workspace_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="EN-US_TOPIC_0000002268806193__p828752841120">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="EN-US_TOPIC_0000002268806193__p192873283118">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="EN-US_TOPIC_0000002268806193__p16287928101116">Workspace ID If no workspace is created, the default value is 0. If a workspace is created and used, the actual value prevails.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000002268806193__section1328722861110"><h4 class="sectiontitle">Response Parameters</h4><p id="EN-US_TOPIC_0000002268806193__p62871528121111"><strong id="EN-US_TOPIC_0000002268806193__b2287192821118">Status code: 200</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000002268806193__en-us_topic_0000002091282781_response_Image" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response body parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000002268806193__row11288182817119"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.5.3.2.4.1.1"><p id="EN-US_TOPIC_0000002268806193__p2029018283114">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.5.3.2.4.1.2"><p id="EN-US_TOPIC_0000002268806193__p15290182891115">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.3.2.4.1.3"><p id="EN-US_TOPIC_0000002268806193__p12905288117">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000002268806193__row5288152811113"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002268806193__p629132815114">arch</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002268806193__p1529142831117">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002268806193__p129113285116">Processor architecture supported by the image. Enums:</p>
<ul id="EN-US_TOPIC_0000002268806193__ul62911628111116"><li id="EN-US_TOPIC_0000002268806193__li129162831119"><p id="EN-US_TOPIC_0000002268806193__p3291228121115"><a name="EN-US_TOPIC_0000002268806193__li129162831119"></a><a name="li129162831119"></a><strong id="EN-US_TOPIC_0000002268806193__b1929142818110">X86_64</strong>: x86 architecture</p>
</li><li id="EN-US_TOPIC_0000002268806193__li17291528151114"><p id="EN-US_TOPIC_0000002268806193__p52911628101114"><a name="EN-US_TOPIC_0000002268806193__li17291528151114"></a><a name="li17291528151114"></a><strong id="EN-US_TOPIC_0000002268806193__b729122820114">AARCH64</strong>: Arm architecture</p>
</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row11288202820114"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002268806193__p6291228111110">create_at</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002268806193__p22914289111">Long</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002268806193__p1329214283115">Specifies the time (UTC ms) when the image is created.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row92881528201113"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002268806193__p22921428141119">description</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002268806193__p6292152891113">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002268806193__p17292728151110">Image description with a maximum of 512 characters</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row628812812115"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002268806193__p62927289114">dev_services</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002268806193__p15292102891116">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002268806193__p1229262811115">Services supported by the image. Enums:</p>
<ul id="EN-US_TOPIC_0000002268806193__ul1229282814118"><li id="EN-US_TOPIC_0000002268806193__li8292128121110"><p id="EN-US_TOPIC_0000002268806193__p5292102813115"><a name="EN-US_TOPIC_0000002268806193__li8292128121110"></a><a name="li8292128121110"></a><strong id="EN-US_TOPIC_0000002268806193__b1129212281115">NOTEBOOK</strong>: You can access a notebook instance using HTTPS.</p>
</li><li id="EN-US_TOPIC_0000002268806193__li1429314284112"><p id="EN-US_TOPIC_0000002268806193__p1929342813117"><a name="EN-US_TOPIC_0000002268806193__li1429314284112"></a><a name="li1429314284112"></a><strong id="EN-US_TOPIC_0000002268806193__b10293128131115">SSH</strong>: You can remotely access a notebook instance from a local IDE through SSH.</p>
</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row1028832814117"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002268806193__p2293928111112">id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002268806193__p12293142818118">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002268806193__p1829312821113">Specifies the image ID of the notebook instance to be created. The image ID is in the Universally Unique Identifier (UUID) format. For details about how to obtain the ID of a preset image, see ListImage.xml.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row122881028161111"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002268806193__p1029332819113">name</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002268806193__p10293182812119">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002268806193__p182937285116">Image name, which contains a maximum of 512 characters, including lowercase letters, digits, hyphens (-), underscores (_), and periods (.)</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row192886282111"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002268806193__p1729311289112">namespace</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002268806193__p429302861118">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002268806193__p13293162881118">Organization to which the image belongs. You can create and view the organization on the <strong id="EN-US_TOPIC_0000002268806193__b429417289112">Organization Management</strong> page of the SWR console.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row4289132881118"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002268806193__p22945288115">origin</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002268806193__p1929472891110">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002268806193__p42941828131115">Image source, which defaults to <strong id="EN-US_TOPIC_0000002268806193__b12294122815117">CUSTOMIZE</strong>. This parameter is optional. Enums:</p>
<ul id="EN-US_TOPIC_0000002268806193__ul429452813114"><li id="EN-US_TOPIC_0000002268806193__li1029482881114"><p id="EN-US_TOPIC_0000002268806193__p11294728191113"><a name="EN-US_TOPIC_0000002268806193__li1029482881114"></a><a name="li1029482881114"></a><strong id="EN-US_TOPIC_0000002268806193__b1829418289111">CUSTOMIZE</strong>: custom image</p>
</li><li id="EN-US_TOPIC_0000002268806193__li729419282118"><p id="EN-US_TOPIC_0000002268806193__p152941728181110"><a name="EN-US_TOPIC_0000002268806193__li729419282118"></a><a name="li729419282118"></a><strong id="EN-US_TOPIC_0000002268806193__b19294328111116">IMAGE_SAVE</strong>: image saved by a notebook instance</p>
</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row9289102871119"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002268806193__p1294182810118">resource_categories</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002268806193__p9294162831119">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002268806193__p1294182811112">Flavors supported by the image. Enums:</p>
<ul id="EN-US_TOPIC_0000002268806193__ul15294182851111"><li id="EN-US_TOPIC_0000002268806193__li10295132812116"><p id="EN-US_TOPIC_0000002268806193__p192951028181114"><a name="EN-US_TOPIC_0000002268806193__li10295132812116"></a><a name="li10295132812116"></a><strong id="EN-US_TOPIC_0000002268806193__b12295192817117">CPU</strong></p>
</li><li id="EN-US_TOPIC_0000002268806193__li142951928121114"><p id="EN-US_TOPIC_0000002268806193__p529517283113"><a name="EN-US_TOPIC_0000002268806193__li142951928121114"></a><a name="li142951928121114"></a><strong id="EN-US_TOPIC_0000002268806193__b4295628161115">GPU</strong></p>
</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row11289112814118"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002268806193__p16295202819113">service_type</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002268806193__p102950289114">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002268806193__p18295182817114">Supported image types. Options:</p>
<ul id="EN-US_TOPIC_0000002268806193__ul1629519283114"><li id="EN-US_TOPIC_0000002268806193__li1295192815111"><p id="EN-US_TOPIC_0000002268806193__p102957281114"><a name="EN-US_TOPIC_0000002268806193__li1295192815111"></a><a name="li1295192815111"></a><strong id="EN-US_TOPIC_0000002268806193__b42951280117">COMMON</strong>: common image</p>
</li><li id="EN-US_TOPIC_0000002268806193__li3295122812115"><p id="EN-US_TOPIC_0000002268806193__p1029582812115"><a name="EN-US_TOPIC_0000002268806193__li3295122812115"></a><a name="li3295122812115"></a><strong id="EN-US_TOPIC_0000002268806193__b19295528131114">INFERENCE</strong>: image used for inference</p>
</li><li id="EN-US_TOPIC_0000002268806193__li192951928161111"><p id="EN-US_TOPIC_0000002268806193__p1729672851115"><a name="EN-US_TOPIC_0000002268806193__li192951928161111"></a><a name="li192951928161111"></a>TRAIN: image used for training</p>
</li><li id="EN-US_TOPIC_0000002268806193__li9296328131118"><p id="EN-US_TOPIC_0000002268806193__p1629632851120"><a name="EN-US_TOPIC_0000002268806193__li9296328131118"></a><a name="li9296328131118"></a>DEV: image used for development and debugging</p>
</li><li id="EN-US_TOPIC_0000002268806193__li82961428111117"><p id="EN-US_TOPIC_0000002268806193__p10296228111110"><a name="EN-US_TOPIC_0000002268806193__li82961428111117"></a><a name="li82961428111117"></a>UNKNOWN: image whose supported services are not specified</p>
</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row52891328141110"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002268806193__p10296152871117">size</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002268806193__p629682881111">Long</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002268806193__p1329682831115">Specifies the image size, in KB.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row18289122812117"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002268806193__p1296628111112">status</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002268806193__p9297152817116">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002268806193__p1729713286117">Image status. Options:</p>
<ul id="EN-US_TOPIC_0000002268806193__ul192979285111"><li id="EN-US_TOPIC_0000002268806193__li629722812117"><p id="EN-US_TOPIC_0000002268806193__p18297182811112"><a name="EN-US_TOPIC_0000002268806193__li629722812117"></a><a name="li629722812117"></a><strong id="EN-US_TOPIC_0000002268806193__b32971028181114">INIT</strong>: The image is being initialized.</p>
</li><li id="EN-US_TOPIC_0000002268806193__li8297142816117"><p id="EN-US_TOPIC_0000002268806193__p20297528131113"><a name="EN-US_TOPIC_0000002268806193__li8297142816117"></a><a name="li8297142816117"></a><strong id="EN-US_TOPIC_0000002268806193__b4297142820114">CREATING</strong>: The image is being saved. In this case, the notebook instance is unavailable.</p>
</li><li id="EN-US_TOPIC_0000002268806193__li1029792841115"><p id="EN-US_TOPIC_0000002268806193__p72978284112"><a name="EN-US_TOPIC_0000002268806193__li1029792841115"></a><a name="li1029792841115"></a><strong id="EN-US_TOPIC_0000002268806193__b1829722819112">CREATE_FAILED</strong>: Saving the image failed.</p>
</li><li id="EN-US_TOPIC_0000002268806193__li829712813115"><p id="EN-US_TOPIC_0000002268806193__p1029772815113"><a name="EN-US_TOPIC_0000002268806193__li829712813115"></a><a name="li829712813115"></a><strong id="EN-US_TOPIC_0000002268806193__b429772841116">ERROR</strong>: An error occurs.</p>
</li><li id="EN-US_TOPIC_0000002268806193__li172971328121118"><p id="EN-US_TOPIC_0000002268806193__p122971328201117"><a name="EN-US_TOPIC_0000002268806193__li172971328121118"></a><a name="li172971328121118"></a><strong id="EN-US_TOPIC_0000002268806193__b182976286110">DELETED</strong>: The image has been deleted.</p>
</li><li id="EN-US_TOPIC_0000002268806193__li3297192813118"><p id="EN-US_TOPIC_0000002268806193__p3297152851116"><a name="EN-US_TOPIC_0000002268806193__li3297192813118"></a><a name="li3297192813118"></a><strong id="EN-US_TOPIC_0000002268806193__b1297628121113">ACTIVE</strong>: The image has been saved, which you can view on the SWR console and use to create notebook instances.</p>
</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row10289528121110"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002268806193__p729732811115">status_message</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002268806193__p10298102815112">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002268806193__p7298112813114">Build information during image saving</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row8289182881116"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002268806193__p1929812851114">support_res_categories</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002268806193__p3298132814117">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002268806193__p3298102819116">Flavors supported by the image. Enums:</p>
<ul id="EN-US_TOPIC_0000002268806193__ul3298132812112"><li id="EN-US_TOPIC_0000002268806193__li1329814289111"><p id="EN-US_TOPIC_0000002268806193__p122981428121114"><a name="EN-US_TOPIC_0000002268806193__li1329814289111"></a><a name="li1329814289111"></a><strong id="EN-US_TOPIC_0000002268806193__b129832816117">CPU</strong></p>
</li><li id="EN-US_TOPIC_0000002268806193__li8298102815119"><p id="EN-US_TOPIC_0000002268806193__p172981328201116"><a name="EN-US_TOPIC_0000002268806193__li8298102815119"></a><a name="li8298102815119"></a><strong id="EN-US_TOPIC_0000002268806193__b12298142815119">GPU</strong></p>
</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row028952871114"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002268806193__p5298328181118">swr_path</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002268806193__p1729815283110">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002268806193__p52992285113">SWR image address</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row12289228171118"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002268806193__p1929962841116">tag</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002268806193__p329932801115">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002268806193__p19302102851117">Image tag</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row328902821112"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002268806193__p1530214282119">type</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002268806193__p183021828141118">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002268806193__p330332841112">Image type. Enums:</p>
<ul id="EN-US_TOPIC_0000002268806193__ul1830319285115"><li id="EN-US_TOPIC_0000002268806193__li1130302813114"><p id="EN-US_TOPIC_0000002268806193__p18303162816113"><a name="EN-US_TOPIC_0000002268806193__li1130302813114"></a><a name="li1130302813114"></a><strong id="EN-US_TOPIC_0000002268806193__b1630310288116">BUILD_IN</strong>: built-in system image</p>
</li><li id="EN-US_TOPIC_0000002268806193__li14303132881110"><p id="EN-US_TOPIC_0000002268806193__p230310286115"><a name="EN-US_TOPIC_0000002268806193__li14303132881110"></a><a name="li14303132881110"></a><strong id="EN-US_TOPIC_0000002268806193__b16303328101113">DEDICATED</strong>: image you have saved</p>
</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row202891528101117"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002268806193__p163031628141117">update_at</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002268806193__p183031028151111">Long</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002268806193__p130313281119">Specifies the time (UTC ms) when the image was last updated.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row1528992820110"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002268806193__p930419284112">visibility</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002268806193__p1730452801110">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002268806193__p530413287114">Image visibility. Enums:</p>
<ul id="EN-US_TOPIC_0000002268806193__ul16304162811118"><li id="EN-US_TOPIC_0000002268806193__li10304152819119"><p id="EN-US_TOPIC_0000002268806193__p4304112821111"><a name="EN-US_TOPIC_0000002268806193__li10304152819119"></a><a name="li10304152819119"></a><strong id="EN-US_TOPIC_0000002268806193__b13046282118">PRIVATE</strong>: private image</p>
</li><li id="EN-US_TOPIC_0000002268806193__li1030442816113"><p id="EN-US_TOPIC_0000002268806193__p123048287111"><a name="EN-US_TOPIC_0000002268806193__li1030442816113"></a><a name="li1030442816113"></a><strong id="EN-US_TOPIC_0000002268806193__b03040288116">PUBLIC</strong>: All users can perform read-only operations based on the image ID.</p>
</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row102896286112"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002268806193__p130413284110">workspace_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002268806193__p3304528101114">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002268806193__p1630452813115">Workspace ID. If no workspaces are available, the default value is <strong id="EN-US_TOPIC_0000002268806193__b1305428181119">0</strong>.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row18290132831110"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002268806193__p103051528171111">flavor_type</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002268806193__p18305728111113">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002268806193__p8305128131111">Image resource type.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000002268806193__section3305122851110"><h4 class="sectiontitle">Example Requests</h4><p id="EN-US_TOPIC_0000002268806193__p19306202814114">The following is an example of how to save a running instance as a container image whose image name is <strong id="EN-US_TOPIC_0000002268806193__b6306428201120">pytorch1_4</strong> and organization is <strong id="EN-US_TOPIC_0000002268806193__b113061228151112">atelier-auto</strong>.</p>
<pre class="screen" id="EN-US_TOPIC_0000002268806193__screen1830652815114">{
"name" : "pytorch1_4",
"namespace" : "atelier-auto",
"tag" : "20221223",
"description" : "save from notebook-x21d",
"workspace_id" : "0"
}</pre>
</div>
<div class="section" id="EN-US_TOPIC_0000002268806193__section173071228121113"><h4 class="sectiontitle">Example Responses</h4><p id="EN-US_TOPIC_0000002268806193__p1307192810119"><strong id="EN-US_TOPIC_0000002268806193__b3307152810117">Status code: 200</strong></p>
<p id="EN-US_TOPIC_0000002268806193__p11307132861118">OK</p>
<pre class="screen" id="EN-US_TOPIC_0000002268806193__screen130732813115">{
"arch" : "x86_64",
"create_at" : 1671786468811,
"description" : "notebook2.0 20200816",
"dev_services" : [ "SSH", "NOTEBOOK" ],
"id" : "4e0d1854-63e5-4517-b683-a0ee97a692a1",
"name" : "pytorch1_4",
"namespace" : "atelier-auto",
"origin" : "IMAGE_SAVE",
"resource_categories" : [ "CPU", "GPU" ],
"service_type" : "TRAIN",
"status" : "INIT",
"swr_path" : "swr.xxxxx.com/atelier-auto/pytorch1_4:20221223",
"tag" : "20221223",
"type" : "DEDICATED",
"update_at" : 1671786468811,
"visibility" : "PRIVATE",
"workspace_id" : "0"
}</pre>
</div>
<div class="section" id="EN-US_TOPIC_0000002268806193__section9309152861117"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000002268806193__en-us_topic_0000002091282781_status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0000002268806193__row15309028191113"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.8.2.1.3.1.1"><p id="EN-US_TOPIC_0000002268806193__p193101028101114">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.8.2.1.3.1.2"><p id="EN-US_TOPIC_0000002268806193__p8310112820119">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000002268806193__row1830932816112"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="EN-US_TOPIC_0000002268806193__p8310122851114">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="EN-US_TOPIC_0000002268806193__p2310182881117">OK</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row1331015281111"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="EN-US_TOPIC_0000002268806193__p331142810117">201</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="EN-US_TOPIC_0000002268806193__p531192810119">Created</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row53101328111117"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="EN-US_TOPIC_0000002268806193__p331122815113">401</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="EN-US_TOPIC_0000002268806193__p431113288119">Unauthorized</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row1231052851113"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="EN-US_TOPIC_0000002268806193__p63111228111118">403</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="EN-US_TOPIC_0000002268806193__p10311202891119">Forbidden</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000002268806193__row15310142801111"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="EN-US_TOPIC_0000002268806193__p153117288113">404</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="EN-US_TOPIC_0000002268806193__p3311928161116">Not Found</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000002268806193__section331212288112"><h4 class="sectiontitle">Error Codes</h4><p id="EN-US_TOPIC_0000002268806193__p1131262881114">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">Development Environment Management</a></div>
</div>
</div>