Obtaining the Available Flavors

Function

Obtain the available flavors.

Constraints

None

Debugging

You can debug this API through automatic authentication in or use the SDK sample code generated by API Explorer.

URI

GET /v1/{project_id}/notebooks/flavors

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details, see Obtaining a Project ID and Name.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

category

No

String

Processor type. Options:

  • CPU

  • GPU

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.

  • MANAGED: public cluster

  • DEDICATED: dedicated cluster

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 (,).

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

current

Integer

Current page

data

Array of NotebookFlavor objects

Pagination data

flavors

Array of NotebookFlavor objects

Data

pages

Integer

Total number of pages

size

Integer

Number of records on each page

total

Long

Total number of records

Table 4 NotebookFlavor

Parameter

Type

Description

arch

String

Architecture type. Options:

  • X86_64

  • AARCH64

ascend

AscendInfo object

NPU information

billing

BillingInfo object

CDR information

category

String

Processor type. Options:

  • CPU

  • GPU

description

String

Specification description

feature

String

Flavor type. Options:

  • DEFAULT: CodeLab

  • NOTEBOOK: notebook

free

Boolean

Free flavor or not

gpu

GPUInfo object

GPU information

id

String

Flavor ID

memory

Long

Memory size

name

String

Flavor name

sold_out

Boolean

Whether resources are sufficient.

  • true: Resources are insufficient.

  • false: Resources are sufficient.

storages

Array of strings

Storage type. Options:

  • EVS

  • EFS

vcpus

Integer

Number of vCPUs

Table 5 AscendInfo

Parameter

Type

Description

npu

Integer

Number of NPUs

npu_memory

String

NPU memory

type

String

NPU type

Table 6 BillingInfo

Parameter

Type

Description

code

String

Billing code

unit_num

Integer

Billing unit

Table 7 GPUInfo

Parameter

Type

Description

gpu

Integer

Number of GPUs

gpu_memory

String

GPU memory

type

String

GPU type

Example Requests

None

Example Responses

Status code: 200

OK

{
  "current" : 2,
  "data" : [ {
    "arch" : "x86_64",
    "billing" : {
      "code" : "modelarts.bm.gpu.v100NV32",
      "unit_num" : 4
    },
    "category" : "GPU",
    "description" : "Four NVIDIA V100 GPUs, each with 32GB of memory, ideal for deep learning algorithm training and debugging.",
    "feature" : "NOTEBOOK",
    "free" : false,
    "gpu" : {
      "gpu" : 4,
      "gpu_memory" : "128",
      "type" : "nvidia-v100-pcie32"
    },
    "id" : "modelarts.bm.gpu.4v100NV32.nosdi",
    "memory" : 134217728,
    "name" : "GPU: 4*V100(128GB)|CPU: 32vCPUs 256GB",
    "sold_out" : true,
    "storages" : [ "EFS", "OBSFS", "OBS", "EVS" ],
    "vcpus" : 32
  }, {
    "arch" : "x86_64",
    "billing" : {
      "code" : "modelarts.bm.gpu.v100NV32.eco",
      "unit_num" : 2
    },
    "category" : "GPU",
    "description" : "Two Shared NVIDIA V100 GPU with 64GB of memory, ideal for ML development",
    "feature" : "NOTEBOOK",
    "free" : false,
    "gpu" : {
      "gpu" : 0.5,
      "gpu_memory" : "64",
      "type" : "nvidia-v100-nv32"
    },
    "id" : "modelarts.bm.gpu.2v100NV32.share",
    "memory" : 67108864,
    "name" : "vGPU: 2*V100(32GB)|CPU: 8vCPUs 64GB",
    "sold_out" : false,
    "storages" : [ "EFS", "OBSFS", "OBS", "EVS" ],
    "vcpus" : 8
  } ],
  "pages" : 26,
  "size" : 2,
  "total" : 52
}

Status Codes

Status Code

Description

200

OK

401

Unauthorized

403

Forbidden

404

Not Found

Error Codes

See Error Codes.