Querying the List of Switchable Specifications Supported by Notebook Instances
Function
This API is used to obtain the available specifications that can be switched during notebook instance creation.
This API applies to the following scenario: When you want to know the configuration options supported by a notebook instance, you can use this API to query the list of available specifications. Before using this API, ensure that you have logged in to the system and have the permission to create a notebook instance. After this API is called, the system returns the switchable specifications supported by the notebook instance. For example, the memory and CPU. If you do not have the permission to create a notebook instance, the API will return an error message.
Constraints
No constraints
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
GET /v1/{project_id}/notebooks/{id}/flavors
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
id |
Yes |
String |
Definition: Notebook instance ID. The ID is in the format of a Universally Unique Identifier (UUID). For details about how to obtain the ID, see Querying Notebook Instances. Constraints: N/A Range: N/A Default Value: N/A |
project_id |
Yes |
String |
Definition: Project ID. For details, see Obtaining a Project ID and Name. Constraints: N/A Range: N/A Default Value: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
limit |
No |
Integer |
Definition: Number of valid specifications displayed on each page. There is no limit by default. Constraints: N/A Range: N/A Default Value: N/A |
offset |
No |
Integer |
Definition: Start offset of the records on each page Constraints: N/A Range: N/A Default Value: 0 |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
current |
Integer |
Definition: Current page number. Range: Positive integers |
data |
Array of NotebookFlavor objects |
Definition: Pagination data. |
flavors |
Array of NotebookFlavor objects |
Definition: List of flavors that can be switched. |
pages |
Integer |
Definition: Total number of pages. Range: Positive integers |
size |
Integer |
Definition: Number of records on each page Range: Positive integers |
total |
Long |
Definition: Total number of records. Range: Non-negative integers |
Parameter |
Type |
Description |
---|---|---|
arch |
String |
Definition: Architecture type. Range:
|
ascend |
AscendInfo object |
Description: NPU information. |
billing |
BillingInfo object |
Definition: CDR information. |
category |
String |
Definition: Processor type. Range:
|
description |
String |
Definition: Specifications description. Range: N/A |
feature |
String |
Definition: Instance type. Range:
|
free |
Boolean |
Definition: Whether free specifications are used. Range: Boolean
|
gpu |
GPUInfo object |
Description: GPU information. |
id |
String |
Definition: Specification ID. Range: N/A |
memory |
Long |
Definition: Memory size. Range: N/A |
name |
String |
Definition: Specification name. Range: N/A |
sold_out |
Boolean |
Definition: Whether resources are sufficient. Range: Boolean
|
storages |
Array of strings |
Definition: Storage type supported by the specification. Range:
|
vcpus |
Integer |
Definition: Number of CPU cores. Range: N/A |
Parameter |
Type |
Description |
---|---|---|
npu |
Integer |
Definition: Number of NPUs. Range: N/A |
npu_memory |
String |
Definition: NPU memory. Range: N/A |
type |
String |
Definition: NPU type. Range: N/A |
Example Requests
GET https://{endpoint}/v1/{project_id}/notebooks/{id}/flavors
Example Responses
Status code: 200
OK
{ "current" : 1, "data" : [ { "arch" : "aarch64", "ascend" : { "npu_memory" : "32", "npu" : 2, "type" : "ascend-snt9" }, "billing" : { "code" : "modelarts.kat1.xlarge", "unit_num" : 2 }, "category" : "ASCEND", "description" : "The Ascend specification is suitable for deep learning code running and debugging", "feature" : "NOTEBOOK", "free" : false, "id" : "modelarts.bm.snt9.xlarge.2", "memory" : 201326592, "name" : "Ascend: 2*Ascend snt9|CPU: 48vCPUs 192GB", "sold_out" : false, "storages" : [ "EFS" ], "vcpus" : 48 }, { "arch" : "aarch64", "ascend" : { "npu_memory" : "128", "npu" : 8, "type" : "ascend-snt9" }, "billing" : { "code" : "modelarts.kat1.8xlarge", "unit_num" : 1 }, "category" : "ASCEND", "description" : "The Ascend specification is suitable for deep learning code running and debugging", "feature" : "NOTEBOOK", "free" : false, "id" : "modelarts.bm.snt9.xlarge.8", "memory" : 805306368, "name" : "Ascend: 8*Ascend snt9|CPU: 192vCPUs 768GB", "sold_out" : false, "storages" : [ "EFS" ], "vcpus" : 192 } ], "flavors" : [ { "arch" : "aarch64", "ascend" : { "npu_memory" : "32", "npu" : 2, "type" : "ascend-snt9" }, "billing" : { "code" : "modelarts.kat1.xlarge", "unit_num" : 2 }, "category" : "ASCEND", "description" : "The Ascend specification is suitable for deep learning code running and debugging", "feature" : "NOTEBOOK", "free" : false, "id" : "modelarts.bm.snt9.xlarge.2", "memory" : 201326592, "name" : "Ascend: 2*Ascend snt9|CPU: 48vCPUs 192GB", "sold_out" : false, "storages" : [ "EFS" ], "vcpus" : 48 }, { "arch" : "aarch64", "ascend" : { "npu_memory" : "128", "npu" : 8, "type" : "ascend-snt9" }, "billing" : { "code" : "modelarts.kat1.8xlarge", "unit_num" : 1 }, "category" : "ASCEND", "description" : "The Ascend specification is suitable for deep learning code running and debugging", "feature" : "NOTEBOOK", "free" : false, "id" : "modelarts.bm.snt9.xlarge.8", "memory" : 805306368, "name" : "Ascend: 8*Ascend snt9|CPU: 192vCPUs 768GB", "sold_out" : false, "storages" : [ "EFS" ], "vcpus" : 192 } ], "pages" : 1, "size" : 2, "total" : 2 }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not found |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot