基本信息

Action:/qai/aicp/resource/resource_group

Method: POST

Content-Type:application/json

请求参数

参数 类型 描述 是否必须

name

string

资源组名称。

yes

description

string

描述信息。

yes

sku_id

string

资源规格 ID,用户可通过调用 GetResourceGroup API 获取。

yes

pod_type

string

可使用该资源组的作业类型,如 infer(推理服务),instance(容器实例),job(分布式任务)。用户可输入多个值。

yes

customize_enable

interger

是否允许自定义规格,0 表示不允许,1 表示允许,默认值为 1

yes

响应参数

此接口包含的公共响应参数,可参见前文内容,其他参数介绍如下:

参数 类型 描述

data.status

string

状态。

data.reason

string

原因。

data.user_id

string

用户 ID。

data.root_user_id

string

根用户 ID。

data.create_at

string

创建时间。

data.updated_at

string

更新时间。

data.rg_id

string

资源组 ID。

data.name

string

资源组名称。

data.rescource_type

string

资源组类型。

data.description

string

描述信息。

data.pod_type

string

可使用该资源组的作业类型,如 infer(推理服务),instance(容器实例),job(分布式训练任务)。

data.customize_enable

integer

是否允许自定义规格。

请求示例

curl -X 'POST' \
  'https://ai.coreshub.cn/qai/aicp/resource/resource_group' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "description": "",
  "sku_id": "",
  "pod_type": [
    "infer",
    "instance",
    "job"
  ],
  "customize_enable": 1
}'

响应示例

{
  "ret_code": 0,
  "message": "success",
  "meta": {
    "X_REQUEST_ID": "string",
    "X_REQUEST_USER": "string"
  },
  "data": {
    "status": "string",
    "reason": "string",
    "user_id": "string",
    "root_user_id": "",
    "created_at": "2025-03-27T02:26:02.082Z",
    "updated_at": "2025-03-27T02:26:02.082Z",
    "rg_id": "string",
    "name": "",
    "resource_type": "",
    "description": "",
    "pod_type": "",
    "customize_enable": 1
  }
}