Querying the List of Valid Specifications Supported by Notebook Instances
Function
This API is used to obtain the available specifications supported by notebook instances. 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 access the target notebook instance. After this API is called, the system returns the valid specifications supported by the notebook instance. For example, the memory and CPU. If you do not have the permission to access the specified notebook instance or the notebook instance is not running, 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/flavors
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
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 |
---|---|---|---|
category |
No |
String |
Definition: Processor type Constraints: N/A Range: Enums:
Default Value: N/A |
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 |
type |
No |
String |
Definition: Cluster type Constraints: N/A Range: Enums:
Default Value: N/A |
sort_dir |
No |
String |
Definition: Sorting mode Constraints: N/A Range: Enums:
Default Value: DESC |
sort_key |
No |
String |
Definition: Sorting field. Separate multiple fields with commas (,). Constraints: N/A Range: The value can contain a maximum of 128 characters. Letters, digits, hyphens (-), underscores (_), and commas (,) are allowed. Default Value: N/A |
flavor_type |
No |
String |
Definition: Resource type Constraints: N/A Range: Enums:
Default Value: N/A |
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/flavors
Example Responses
Status code: 200
OK
{ "current" : 1, "data" : [ { "arch" : "x86_64", "billing" : { "code" : "modelarts.vm.cpu.2u", "unit_num" : 1 }, "category" : "CPU", "description" : "General-purpose Intel CPU flavor, ideal for rapid data exploration and experiments", "feature" : "NOTEBOOK", "free" : false, "id" : "modelarts.vm.cpu.2u", "memory" : 8388608, "name" : "CPU: 2 vCPUs 8 GB", "sold_out" : false, "storages" : [ "EVS", "OBSFS", "EFS", "OBS" ], "vcpus" : 2 } ], "pages" : 1, "size" : 1, "total" : 1 }
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