Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Wuwan, Qi <wuwanqi1@noreply.gitea.eco.tsi-dev.otc-service.com> Co-committed-by: Wuwan, Qi <wuwanqi1@noreply.gitea.eco.tsi-dev.otc-service.com>
34 KiB
Querying the List of Valid Specifications Supported by Notebook Instances
Function
This API is used to query the list of valid specifications supported by a notebook instance.
Constraints
None
URI
GET /v1/{project_id}/notebooks/flavors
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID and Name. |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
category |
No |
String |
Processor type. The options are as follows: |
limit |
No |
Integer |
Number of records on each page. (No limit by default) |
offset |
No |
Integer |
Start offset of the records on each page. The default value is 0. |
type |
No |
String |
Cluster type. Enums: |
sort_dir |
No |
String |
Sorting mode. The options are ASC (ascending order) and DESC (descending order). The default value is DESC. |
sort_key |
No |
String |
Sorting fields. Separate multiple fields with commas (,). |
flavor_type |
No |
String |
Resource type. |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
|---|---|---|
current |
Integer |
Current page |
data |
Array of NotebookFlavor objects |
Pagination data |
flavors |
Array of NotebookFlavor objects |
List of specifications that can be switched. |
pages |
Integer |
Total number of pages |
size |
Integer |
Number of records on each page |
total |
Long |
Total number of records |
Parameter |
Type |
Description |
|---|---|---|
arch |
String |
Architecture type. |
billing |
BillingInfo object |
CDR information |
category |
String |
Processor type. Options: |
description |
String |
Specification description |
feature |
String |
Specification type. The options are as follows: |
free |
Boolean |
Specifies whether the flavor is free of charge. |
gpu |
GPUInfo object |
GPU information |
id |
String |
Flavor ID |
memory |
Long |
Memory size |
name |
String |
Flavor name |
sold_out |
Boolean |
Whether resources are sufficient. |
storages |
Array of strings |
Storage type. Options: |
vcpus |
Integer |
Number of vCPUs |
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.