Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ ModelArts/ API Reference/ Resource Management/ Obtaining Resource Specifications

Obtaining Resource Specifications

Updated on 2024-06-13 GMT+08:00

Function

Obtain resource specifications.

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}/resourceflavors

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

continue

No

String

Previous query location in pagination query.

labelSelector

No

String

Filter by label.

limit

No

Integer

Number of records on each page.

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

apiVersion

String

API version. Options:

  • v1

kind

String

Resource type. Options:

  • ResourceFlavorList: resource specifications

metadata

metadata object

Metadata of resource specifications.

items

Array of ResourceFlavor objects

Resource specifications.

Table 4 metadata

Parameter

Type

Description

continue

String

Next query location in pagination query.

remainingItemCount

Integer

Remaining resources.

Table 5 ResourceFlavor

Parameter

Type

Description

apiVersion

String

API version. Options:

  • v1

kind

String

Resource type. Options:

  • ResourceFlavor: resource specification

metadata

metadata object

Metadata of a resource specification.

spec

ResourceFlavorSpec object

Description of a resource flavor.

status

ResourceFlavorStatus object

Status of a resource specification.

Table 6 metadata

Parameter

Type

Description

name

String

Resource specification name.

labels

ResourceFlavorLabel object

Specifies the tag information of the resource flavor.

Table 7 ResourceFlavorLabel

Parameter

Type

Description

os.modelarts/scope

String

Job type corresponding to the resource specification.

Table 8 ResourceFlavorSpec

Parameter

Type

Description

type

String

Resource specification type. The options are as follows:

  • Dedicate: physical resource

cpuArch

String

Computer architecture. Options:

  • x86

  • arm64

cpu

String

Number of CPU cores.

memory

String

Memory size in GiB.

gpu

gpu object

GPU information.

npu

npu object

NPU information.

dataVolume

Array of dataVolume objects

Data disks.

billingModes

Array of integers

Billing mode supported by the flavor. Options:

  • 0: pay-per-use

  • 1: yearly/monthly

billingCode

String

Resource specification code, corresponding to an offering released on the operations platform.

jobFlavors

Array of strings

Training job types supported by resource specifications.

Table 9 gpu

Parameter

Type

Description

type

String

GPU type.

size

String

Number of GPUs

Table 10 npu

Parameter

Type

Description

type

String

NPU type.

size

String

Number of NPUs.

Table 11 dataVolume

Parameter

Type

Description

volumeType

String

Disk type. Options:

  • SSD: ultra-high I/O disk

  • GPSSD: general-purpose SSD disk

  • SAS: high I/O disk

  • SATA: common disk

size

String

Disk size, in GiB.

Table 12 ResourceFlavorStatus

Parameter

Type

Description

phase

Map<String,String>

Status of a resource flavor in each AZ. The value is in the format of (AZ,Status). Options for the status:

  • normal: The flavor is normal.

  • soldout: The flavor is sold out.

Status code: 401

Table 13 Response body parameters

Parameter

Type

Description

error_code

String

Error codes of ModelArts.

error_msg

String

Error message.

Status code: 404

Table 14 Response body parameters

Parameter

Type

Description

error_code

String

Error codes of ModelArts.

error_msg

String

Error message.

Example Requests

This API is used to obtain resource specifications.

GET https://{endpoint}/v1/{project_id}/resourceflavors

{ }

Example Responses

Status code: 200

OK

{
  "kind" : "ResourceFlavorList",
  "apiVersion" : "v1",
  "metadata" : { },
  "items" : [ {
    "kind" : "ResourceFlavor",
    "apiVersion" : "v1",
    "metadata" : {
      "name" : "modelarts.vm.cpu8u32g",
      "labels" : { }
    },
    "spec" : {
      "cpuArch" : "x86",
      "cpu" : "8",
      "memory" : "32Gi",
      "type" : "Dedicate",
      "billingCode" : "modelarts.vm.cpu.8ud",
      "billingModes" : [ 0 ]
    },
    "status" : {
      "phase" : {
        "cn-north-7a" : "soldout",
        "cn-north-7b" : "soldout",
        "cn-north-7c" : "normal"
      }
    }
  } ]
}

Status code: 401

Authorization failed.

{
  "error_code" : "ModelArts.50001000",
  "error_msg" : "token is invalid"
}

Status code: 404

Not found.

{
  "error_code" : "ModelArts.50005101",
  "error_msg" : "Resourceflavor not found."
}

Status Codes

Status Code

Description

200

OK

401

Authorization failed.

404

Not found.

Error Codes

See Error Codes.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback