Obtaining Resource Specifications
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
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details, see Obtaining a Project ID and Name. |
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
Parameter |
Type |
Description |
---|---|---|
apiVersion |
String |
API version. Options:
|
kind |
String |
Resource type. Options:
|
metadata |
metadata object |
Metadata of resource specifications. |
items |
Array of ResourceFlavor objects |
Resource specifications. |
Parameter |
Type |
Description |
---|---|---|
continue |
String |
Next query location in pagination query. |
remainingItemCount |
Integer |
Remaining resources. |
Parameter |
Type |
Description |
---|---|---|
apiVersion |
String |
API version. Options:
|
kind |
String |
Resource type. Options:
|
metadata |
metadata object |
Metadata of a resource specification. |
spec |
ResourceFlavorSpec object |
Description of a resource flavor. |
status |
ResourceFlavorStatus object |
Status of a resource specification. |
Parameter |
Type |
Description |
---|---|---|
name |
String |
Resource specification name. |
labels |
ResourceFlavorLabel object |
Specifies the tag information of the resource flavor. |
Parameter |
Type |
Description |
---|---|---|
os.modelarts/scope |
String |
Job type corresponding to the resource specification. |
Parameter |
Type |
Description |
---|---|---|
type |
String |
Resource specification type. The options are as follows:
|
cpuArch |
String |
Computer architecture. Options:
|
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:
|
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. |
Parameter |
Type |
Description |
---|---|---|
volumeType |
String |
Disk type. Options:
|
size |
String |
Disk size, in GiB. |
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:
|
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error codes of ModelArts. |
error_msg |
String |
Error message. |
Status code: 404
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.
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