更新时间:2022-04-25 GMT+08:00
分享

查询ModelArts计算节点规格

功能介绍

该接口用于查询ModelArts计算节点规格。

URI

GET /v1/{project_id}/job-spec/train

参数说明请参见表1-URI参数说明
表1 URI参数说明

名称

是否必选

类型

说明

project_id

String

项目编号,用于资源隔离。

响应消息

响应参数请参见表2

表2 响应参数说明

参数名称

参数类型

说明

is_success

Boolean

请求是否成功。

specs

List

计算资源规格列表,表3

error_code

String

请求失败时的错误码,请求成功时无此字段。

error_msg

String

请求失败时的错误信息,请求成功时无此字段。

表3 specs参数说明

参数名称

参数类型

说明

spec_id

Long

资源规格的ID。

core

String

资源规格的核数。

cpu

String

资源规格CPU内存。

gpu_num

Int

资源规格GPU的个数。

gpu_type

String

资源规格GPU的类型。

spec_code

String

云资源的规格类型。

max_num

Int

以选择的最大节点数量。

storage

String

资源规格的ssd大小。

interface_type

Int

接口类型。

no_resource

Boolean

所选规格资源是否充足,True代表没有资源。

示例

  • 成功响应示例
    {
      "is_success": true,
      "specs": [
        {
          "spec_id": 2,
          "core": "2",
          "cpu": "8",
          "gpu_num": 0,
          "gpu_type": "",
          "spec_code": "modelarts.vm.cpu.2u",
          "max_num": 2,
          "storage": "",
          "interface_type": 3,
          "no_resource": false
        }
      ]
    }
  • 失败响应示例
    { 
        "is_success": false, 
        "error_code": "res.1006", 
        "error_msg": "The content for the request is invalid." 
    }

状态码

状态码请参见状态码

分享:

    相关文档

    相关产品