Creating a Development Environment Instance =========================================== Function -------- This API is used to create a development environment instance for code development. Calling this API is an asynchronous operation. The job status can be obtained by calling the API described in `Querying the Details About a Development Environment Instance <../devenviron/querying_the_details_about_a_development_environment_instance.html#modelarts030112>`__. URI --- POST /v1/{project_id}/demanager/instances `Table 1 <#modelarts030110enustopic0136223949table569625523811>`__ describes the required parameters. .. _modelarts030110enustopic0136223949table569625523811: .. table:: **Table 1** Parameters +------------+-----------+--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Mandatory | Type | Description | +============+===========+========+==================================================================================================================================================================================+ | project_id | Yes | String | Project ID. For details about how to obtain the project ID, see `Obtaining a Project ID and Name <../common_parameters/obtaining_a_project_id_and_name.html#modelarts030147>`__. | +------------+-----------+--------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Request Body ------------ `Table 2 <#modelarts030110enustopic0136223949table2542581515>`__ describes the request parameters. .. _modelarts030110enustopic0136223949table2542581515: .. table:: **Table 2** Parameters +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Mandatory | Type | Description | +=================+=================+=================+=============================================================================================================================================================================+ | name | Yes | String | Instance name, which contains a maximum of 64 characters. | | | | | | | | | | The value can contain letters, digits, hyphens (-), and underscores (_). | +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | profile_id | Yes | String | Configuration ID. The options are as follows: | | | | | | | | | | - Ascend-Power-Engine 1.0(python3) | | | | | - Multi-Engine 1.0 (python3)-cpu | | | | | - Multi-Engine 1.0 (python3)-gpu | | | | | - Multi-Engine 2.0 (python3) | +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | description | No | String | Instance description. The value contains a maximum of 512 characters and cannot contain the following special characters: &<>"'/. By default, this parameter is left blank. | +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | flavor | Yes | String | Instance flavor. The options are as follows: | | | | | | | | | | - modelarts.kat1.xlarge | | | | | - modelarts.vm.cpu.2u | | | | | - modelarts.vm.cpu.8u | | | | | - modelarts.vm.gpu.v100 | | | | | | | | | | The preceding flavors are for reference only. The actual flavors depend on the region. If you need to use other flavors, contact the administrator to change the flavors. | +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | spec | Yes | Object | Instance definition. Only **Notebook** is supported. For example, see `Table 3 <#modelarts030110enustopic0136223949table1661540121718>`__. | +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | workspace | No | Object | Workspace. The default workspace ID is **0**. For details, see `Table 7 <#modelarts030110enustopic0136223949table195831523711>`__. | +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | pool | No | Object | Resource pool. For details, see `Table 8 <#modelarts030110enustopic0136223949requestpoolspec>`__. | +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ai_project | No | Object | AI project. For details, see `Table 10 <#modelarts030110enustopic0136223949requestaiproject>`__. | +-----------------+-----------------+-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _modelarts030110enustopic0136223949table1661540121718: .. table:: **Table 3** **notebook** parameters +----------------+-----------+--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Mandatory | Type | Description | +================+===========+====================+=================================================================================================================================================================================================================+ | storage | Yes | Object | Storage path. For details, see `Table 4 <#modelarts030110enustopic0136223949table14531721311>`__. | +----------------+-----------+--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | extend_storage | No | Array | Extended storage list. For details, see `Table 4 <#modelarts030110enustopic0136223949table14531721311>`__. Extended storage supports only **obsfs** and is available only for certain dedicated resource pools. | +----------------+-----------+--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | auto_stop | No | Object | Auto stop parameter. For details, see `Table 6 <#modelarts030110enustopic0136223949table756291982911>`__. | +----------------+-----------+--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | annotations | No | Map | Label information, which can be extended. By default, this parameter is left blank. | +----------------+-----------+--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _modelarts030110enustopic0136223949table14531721311: .. table:: **Table 4** **storage** parameters +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Mandatory | Type | Description | +=================+=================+=================+================================================================================================================================================================================================+ | type | Yes | String | Storage type. | | | | | | | | | | Only **obs** and **evs** are supported. | +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | location | No | Object | Storage location. If **type** is set to **obs**, this parameter is mandatory. See `Table 5 <#modelarts030110enustopic0136223949table10263721145>`__. By default, this parameter is left blank. | +-----------------+-----------------+-----------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _modelarts030110enustopic0136223949table10263721145: .. table:: **Table 5** **location** parameters +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Mandatory | Type | Description | +=================+=================+=================+=============================================================================================================================================================================================================================================+ | path | No | String | Storage path | | | | | | | | | | - If **type** is set to **obs**, this parameter is mandatory. The value must be a valid OBS bucket path and end with a slash (/). The value must be a specific directory in an OBS bucket rather than the root directory of an OBS bucket. | +-----------------+-----------------+-----------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _modelarts030110enustopic0136223949table756291982911: .. table:: **Table 6** **auto_stop** parameters +-----------+-----------+---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Mandatory | Type | Description | +===========+===========+=========+=================================================================================================================================================================================================================================================================================+ | enable | No | Boolean | Whether to enable the auto stop function. The value **true** indicates that the function is enabled and the instance will automatically stop when the running duration is reached. The value **false** indicates that the function is disabled. The default value is **false**. | +-----------+-----------+---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | duration | No | Integer | Running duration, in seconds. The value ranges from 3,600 to 86,400. After this parameter is set, it is valid for each startup. This parameter is mandatory when **enable** is set to **true**. | +-----------+-----------+---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | prompt | No | Boolean | Whether to display a prompt again. This parameter is provided for the console to determine whether to display a prompt again. The default value is **true**. | +-----------+-----------+---------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _modelarts030110enustopic0136223949table195831523711: .. table:: **Table 7** **workspace** parameters +-----------+-----------+--------+---------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Mandatory | Type | Description | +===========+===========+========+=================================================================================================================================+ | id | No | String | Workspace ID. If no workspace is created, the default value is **0**. If a workspace is created and used, use the actual value. | +-----------+-----------+--------+---------------------------------------------------------------------------------------------------------------------------------+ .. _modelarts030110enustopic0136223949requestpoolSpec: .. table:: **Table 8** **poolSpec** parameters +-----------+-----------+--------+----------------------------------------------------------------------------------------------------------------+ | Parameter | Mandatory | Type | Description | +===========+===========+========+================================================================================================================+ | id | Yes | String | Resource pool ID. | +-----------+-----------+--------+----------------------------------------------------------------------------------------------------------------+ | type | No | String | Resource pool type. | +-----------+-----------+--------+----------------------------------------------------------------------------------------------------------------+ | name | No | String | Resource pool name. | +-----------+-----------+--------+----------------------------------------------------------------------------------------------------------------+ | owner | No | Object | Owner of the resource pool. For details, see `Table 9 <#modelarts030110enustopic0136223949requestuserspec>`__. | +-----------+-----------+--------+----------------------------------------------------------------------------------------------------------------+ .. _modelarts030110enustopic0136223949requestuserSpec: .. table:: **Table 9** **userSpec** parameters +------------+-----------+--------+--------------------------------------------------+ | Parameter | Mandatory | Type | Description | +============+===========+========+==================================================+ | project_id | No | String | ID of the project to which the resource belongs. | +------------+-----------+--------+--------------------------------------------------+ .. _modelarts030110enustopic0136223949requestAIProject: .. table:: **Table 10** **AIProject** parameters ========= ========= ====== ========================================== Parameter Mandatory Type Description ========= ========= ====== ========================================== id No String AI project ID. This parameter is reserved. ========= ========= ====== ========================================== Response Body ------------- `Table 11 <#modelarts030110enustopic0136223949table1282791914324>`__ describes the response parameters. .. _modelarts030110enustopic0136223949table1282791914324: .. table:: **Table 11** Parameters +-------------------------+--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | +=========================+========+=========================================================================================================================================================================================================+ | id | String | Instance ID | +-------------------------+--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | name | String | Instance name | +-------------------------+--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | description | String | Instance description | +-------------------------+--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | status | String | Instance status | +-------------------------+--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | creation_timestamp | String | Time when an instance is created | +-------------------------+--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | latest_update_timestamp | String | Time when an instance is modified | +-------------------------+--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | profile | Object | Configuration information. For details, see `Table 12 <#modelarts030110enustopic0136223949table14360146192514>`__. | +-------------------------+--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | flavor | String | Instance flavor | +-------------------------+--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | flavor_details | Object | For details about the flavor, see `Table 16 <#modelarts030110enustopic0136223949table15315195310273>`__. | +-------------------------+--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | pool | Object | For details about the dedicated resource pool, see `Table 17 <#modelarts030110enustopic0136223949table1757552712913>`__. | +-------------------------+--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | spec | Object | Instance definition For details about parameters of a notebook instance, see `Table 19 <#modelarts030110enustopic0136223949table8449155512217>`__. | +-------------------------+--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | workspace | Object | Workspace. For details, see `Table 24 <#modelarts030110enustopic0136223949table11410143081110>`__. | +-------------------------+--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ai_project | Object | AI project. For details, see `Table 25 <#modelarts030110enustopic0136223949responseaiproject>`__. | +-------------------------+--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | error_code | String | Error code. For details, see `Error Codes <../common_parameters/error_codes.html>`__. | +-------------------------+--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | queuing_info | Object | Queuing information. For details, see `Table 26 <#modelarts030110enustopic0136223949table1535133818408>`__. | +-------------------------+--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | user | Object | User information. For details, see `Table 27 <#modelarts030110enustopic0136223949table478950164319>`__. | +-------------------------+--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | repository | Object | Git repository information. For details, see `Table 28 <#modelarts030110enustopic0136223949table63971252184512>`__. This parameter cannot be used. It is automatically returned when the API is called. | +-------------------------+--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _modelarts030110enustopic0136223949table14360146192514: .. table:: **Table 12** **profile** parameters +-------------+--------------------+---------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | +=============+====================+===============================================================================================================+ | id | String | Configuration ID | +-------------+--------------------+---------------------------------------------------------------------------------------------------------------+ | name | String | Configuration name | +-------------+--------------------+---------------------------------------------------------------------------------------------------------------+ | description | String | Configuration description | +-------------+--------------------+---------------------------------------------------------------------------------------------------------------+ | de_type | String | Development environment type. Only **Notebook** is supported. | +-------------+--------------------+---------------------------------------------------------------------------------------------------------------+ | flavor_type | String | Hardware, which can be **CPU**, **GPU**, or **Ascend**. | +-------------+--------------------+---------------------------------------------------------------------------------------------------------------+ | provision | Object | Deployment information. For details, see `Table 13 <#modelarts030110enustopic0136223949table108415111491>`__. | +-------------+--------------------+---------------------------------------------------------------------------------------------------------------+ | labels | Map | Label | +-------------+--------------------+---------------------------------------------------------------------------------------------------------------+ .. _modelarts030110enustopic0136223949table108415111491: .. table:: **Table 13** **provision** parameters +-----------+--------+-----------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | +===========+========+===========================================================================================================+ | type | String | Deployment type. Only **Docker** is supported. | +-----------+--------+-----------------------------------------------------------------------------------------------------------+ | spec | Object | Deployment details. For details, see `Table 14 <#modelarts030110enustopic0136223949table368911231548>`__. | +-----------+--------+-----------------------------------------------------------------------------------------------------------+ .. _modelarts030110enustopic0136223949table368911231548: .. table:: **Table 14** **spec** parameters +-----------+--------+--------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | +===========+========+============================================================================================================================================+ | engine | String | Deployment engine. Only **CCE** is supported. | +-----------+--------+--------------------------------------------------------------------------------------------------------------------------------------------+ | params | Object | Deployment parameters. Only **Docker** is supported. For details, see `Table 15 <#modelarts030110enustopic0136223949table932452015018>`__. | +-----------+--------+--------------------------------------------------------------------------------------------------------------------------------------------+ .. _modelarts030110enustopic0136223949table932452015018: .. table:: **Table 15** Docker deployment parameters +-------------+--------------------+-------------------------------------------------------------------------------------+ | Parameter | Type | Description | +=============+====================+=====================================================================================+ | namespace | String | SWR organization name, which is globally unique | +-------------+--------------------+-------------------------------------------------------------------------------------+ | image_name | String | Image name | +-------------+--------------------+-------------------------------------------------------------------------------------+ | image_tag | String | Image tag | +-------------+--------------------+-------------------------------------------------------------------------------------+ | annotations | Map | Label information, which can be extended. By default, this parameter is left blank. | +-------------+--------------------+-------------------------------------------------------------------------------------+ .. _modelarts030110enustopic0136223949table15315195310273: .. table:: **Table 16** **flavor_details** parameters +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | +=======================+=======================+==========================================================================================================+ | name | String | Flavor name | +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------+ | status | String | Flavor sale status The options are as follows: | | | | | | | | - **onSale** | | | | - **soldOut** | +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------+ | queuing_num | Integer | This parameter is mandatory when **promo_type** is set to **Free** and **status** is set to **soldOut**. | +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------+ | queue_left_time | Integer | Left queuing time, in seconds | | | | | | | | This parameter is mandatory when **promo_type** is set to **Free** and **status** is set to **soldOut**. | +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------+ | storage_list | Array | Supported storage type. The options are as follows: | | | | | | | | - **obs** | | | | - **evs** | +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------+ | is_permitted | Boolean | Whether the current user has the permission to use this flavor | +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------+ | type | String | Flavor status. The options are as follows: | | | | | | | | - **GPU** | | | | - **CPU** | | | | - **ASCEND** | +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------+ | params | Dict | Parameters that describing flavor | +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------+ | promo_type | String | Promotion type. The options are as follows: | | | | | | | | - Free | | | | - NoDiscount | +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------+ | instance_num | Integer | Number of instances of this flavor the current created | +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------+ | duration | Integer | Auto stop time after startup, in seconds | +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------+ | store_time | Integer | Maximum retention period of an inactive instance of this flavor in the database, in hours | | | | | | | | The default value is **-1**, indicating that the instance can be permanently saved. | +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------+ | billing_flavor | String | Billing specifications. If this field is left blank, the specifications name is used for billing. | +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------+ | billing_params | Integer | Billing ratio This parameter is mandatory when **billing_flavor** is specified. | +-----------------------+-----------------------+----------------------------------------------------------------------------------------------------------+ .. _modelarts030110enustopic0136223949table1757552712913: .. table:: **Table 17** **pool** parameters +-----------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | +===========+========+==============================================================================================================================================================+ | id | String | ID of a resource pool | +-----------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | name | String | Name of a resource pool | +-----------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | type | String | Type of a resource pool. **USER_DEFINED** indicates a dedicated resource pool. | +-----------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | owner | Object | This parameter is mandatory when **type** is set to **USER_DEFINED**. For details, see `Table 18 <#modelarts030110enustopic0136223949table1532233153818>`__. | +-----------+--------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _modelarts030110enustopic0136223949table1532233153818: .. table:: **Table 18** **owner** parameters ========== ====== =========== Parameter Type Description ========== ====== =========== project_id String Project ID ========== ====== =========== .. _modelarts030110enustopic0136223949table8449155512217: .. table:: **Table 19** **notebook** parameters +-----------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | +=============================+=======================+=========================================================================================================================================================================================================+ | log_path | String | Path for storing custom image logs | +-----------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | custom_script_path | String | Path for storing custom initialization scripts used when a notebook instance is started | +-----------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | storage | Object | Storage path. For details, see `Table 20 <#modelarts030110enustopic0136223949table9228954163219>`__. | +-----------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | credential | Object | AK and SK for accessing OBS. For details, see `Table 30 <#modelarts030110enustopic0136223949table970685216555>`__. | +-----------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | repository | Object | Git repository information. For details, see `Table 28 <#modelarts030110enustopic0136223949table63971252184512>`__. This parameter cannot be used. It is automatically returned when the API is called. | +-----------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | resource_reserved_timestamp | Integer | Time when the resource is reserved | +-----------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | auto_stop | Object | Auto stop parameter. For details, see `Table 23 <#modelarts030110enustopic0136223949table14279174582613>`__. | +-----------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | failed_reasons | Object | Cause for a creation or startup failure. For details, see `Table 22 <#modelarts030110enustopic0136223949table72771614152013>`__. | +-----------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | annotations | Map | Annotations | | | | | | | | The generated URL cannot be directly accessed. | +-----------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | extend_params | Map | Extended parameter | +-----------------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _modelarts030110enustopic0136223949table9228954163219: .. table:: **Table 20** **storage** parameters +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | +=======================+=======================+==================================================================================================================================================================================================+ | type | String | Storage type. | | | | | | | | Only **obs** and **evs** are supported. | +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | location | Object | Storage location. If **type** is set to **obs**, this parameter is mandatory. See `Table 21 <#modelarts030110enustopic0136223949table212131963416>`__. By default, this parameter is left blank. | +-----------------------+-----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _modelarts030110enustopic0136223949table212131963416: .. table:: **Table 21** **location** parameters +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | +=======================+=======================+=============================================================================================================================================================================================================================================+ | path | String | Storage path | | | | | | | | - If **type** is set to **obs**, this parameter is mandatory. The value must be a valid OBS bucket path and end with a slash (/). The value must be a specific directory in an OBS bucket rather than the root directory of an OBS bucket. | +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | volume_size | Integer | If **type** is set to **obs**, this parameter does not need to be set. | +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _modelarts030110enustopic0136223949table72771614152013: .. table:: **Table 22** **failed_reasons** parameters ========= ================== ============= Parameter Type Description ========= ================== ============= code String Error code. message String Error message detail Map Error details ========= ================== ============= .. _modelarts030110enustopic0136223949table14279174582613: .. table:: **Table 23** **auto_stop** parameters +----------------+---------+---------------------------------------------------------------------------------------+ | Parameter | Type | Description | +================+=========+=======================================================================================+ | enable | Boolean | Whether to enable the auto stop function | +----------------+---------+---------------------------------------------------------------------------------------+ | duration | Integer | Running duration, in seconds | +----------------+---------+---------------------------------------------------------------------------------------+ | prompt | Boolean | Whether to display a prompt again. This parameter is provided for the console to use. | +----------------+---------+---------------------------------------------------------------------------------------+ | stop_timestamp | Integer | Time when the instance stops. The value is a 13-digit timestamp. | +----------------+---------+---------------------------------------------------------------------------------------+ | remain_time | Integer | Remaining time before actual stop, in seconds | +----------------+---------+---------------------------------------------------------------------------------------+ .. _modelarts030110enustopic0136223949table11410143081110: .. table:: **Table 24** **workspace** parameters ========= ====== ============ Parameter Type Description ========= ====== ============ id String Workspace ID ========= ====== ============ .. _modelarts030110enustopic0136223949responseAIProject: .. table:: **Table 25** **AIProject** parameters ========= ====== ============= Parameter Type Description ========= ====== ============= id String AI project ID ========= ====== ============= .. _modelarts030110enustopic0136223949table1535133818408: .. table:: **Table 26** **queuing_info** parameters +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | +=======================+=======================+=================================================================================================================================================================================+ | id | String | Instance ID | +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | name | String | Instance name | +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | de_type | String | Development environment type. By default, all types are returned. | | | | | | | | Only **Notebook** is supported. | +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | flavor | String | Instance flavor. By default, all types are returned. | +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | flavor_details | Object | Flavor details, which display the flavor information and whether the flavor is sold out For details, see `Table 16 <#modelarts030110enustopic0136223949table15315195310273>`__. | +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | status | String | Instance status. By default, all statuses are returned, including: | | | | | | | | - **CREATE_QUEUING** | | | | - **START_QUEUING** | +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | begin_timestamp | Integer | Time when an instance starts queuing. The value is a 13-digit timestamp. | +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | remain_time | Integer | Left queuing time, in seconds | +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | end_timestamp | Integer | Time when an instance completes queuing. The value is a 13-digit timestamp. | +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | rank | Integer | Ranking of an instance in a queue | +-----------------------+-----------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. _modelarts030110enustopic0136223949table478950164319: .. table:: **Table 27** **user** parameters ========= ====== =========== Parameter Type Description ========= ====== =========== id String User ID name String Username ========= ====== =========== .. _modelarts030110enustopic0136223949table63971252184512: .. table:: **Table 28** **repository** parameters +-----------------+--------+----------------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | +=================+========+======================================================================================================================+ | id | String | Repository ID | +-----------------+--------+----------------------------------------------------------------------------------------------------------------------+ | branch | String | Repository branch | +-----------------+--------+----------------------------------------------------------------------------------------------------------------------+ | user_name | String | Repository username | +-----------------+--------+----------------------------------------------------------------------------------------------------------------------+ | user_email | String | Repository user mailbox | +-----------------+--------+----------------------------------------------------------------------------------------------------------------------+ | type | String | Repository type. The options are **CodeClub** and **GitHub**. | +-----------------+--------+----------------------------------------------------------------------------------------------------------------------+ | connection_info | Object | Repository link information. For details, see `Table 29 <#modelarts030110enustopic0136223949table13487192116490>`__. | +-----------------+--------+----------------------------------------------------------------------------------------------------------------------+ .. _modelarts030110enustopic0136223949table13487192116490: .. table:: **Table 29** **connection_info** parameters +------------+--------+----------------------------------------------------------------------------------------------------------------+ | Parameter | Type | Description | +============+========+================================================================================================================+ | protocol | String | Repository link protocol. The options are **ssh** and **https**. | +------------+--------+----------------------------------------------------------------------------------------------------------------+ | url | String | Repository link address | +------------+--------+----------------------------------------------------------------------------------------------------------------+ | credential | Object | Certificate information. For details, see `Table 30 <#modelarts030110enustopic0136223949table970685216555>`__. | +------------+--------+----------------------------------------------------------------------------------------------------------------+ .. _modelarts030110enustopic0136223949table970685216555: .. table:: **Table 30** **credential** parameters =============== ====== ======================= Parameter Type Description =============== ====== ======================= ssh_private_key String SSH private certificate access_token String OAuth token of GitHub =============== ====== ======================= Samples ------- The following shows how to create the **notebook-instance** instance with ID **Python3-gpu**. - Sample request .. code-block:: { "name": "notebook-instance", "description": "", "profile_id": "Multi-Engine 1.0 (python3)-gpu", "flavor": "modelarts.bm.gpu.v100NV32", "spec": { "storage": { "location": { "volume_size": 5 }, "type": "evs" }, "auto_stop": { "enable": true, "duration": 3600 } }, "workspace": { "id": "0" } } - Successful sample response .. code-block:: { "ai_project": { "id": "default-ai-project" }, "creation_timestamp": "1594887749962", "description": "", "flavor": "modelarts.bm.gpu.v100NV32", "flavor_details": { "name": "modelarts.bm.gpu.v100NV32", "params": { "CPU": 8, "GPU": 1, "gpu_type": "v100NV32", "memory": "64GiB" }, "status": "onSale", "type": "GPU" }, "id": "DE-7d558ef8-c73d-11ea-964c-0255ac100033", "latest_update_timestamp": "1594887749962", "name": "notebook-c6fd", "profile": { "de_type": "Notebook", "description": "multi engine, gpu, python 3.6 for notebook", "flavor_type": "GPU", "id": "Multi-Engine 1.0 (python3)-gpu", "name": "Multi-Engine 1.0 (python3)-gpu", "provision": { "annotations": { "category": "Multi-Engine 1.0", "type": "system" }, "spec": { "engine": "CCE", "params": { "image_name": "mul-kernel-gpu-cuda-cp36", "image_tag": "2.0.5-B003", "namespace": "atelier" } }, "type": "Docker" } }, "spec": { "annotations": { "target_domain": "https://xxx", "url": "" }, "auto_stop": { "duration": 3600, "enable": true, "prompt": true }, "extend_params": null, "failed_reasons": null, "repository": null, "extend_storage": null, "storage": { "location": { "path": "/home/ma-user/work", "volume_size": 5, "volume_unit": "GB" }, "type": "evs" } }, "status": "CREATING", "user": { "id": "15dda26361214ca2a5953917d2f48ffb", "name": "ops_dev_env" }, "workspace": { "id": "0" } } - Failed sample response .. code-block:: { "error_message": "The param path needs to end with /.", "error_code": "ModelArts.6318" } Status Code ----------- For details about the status code, see `Status Code <../common_parameters/status_code.html#modelarts030094>`__.