基本信息

Action:/qai/aicp/resource/node

Method: POST

Content-Type:application/json

请求参数

参数 类型 描述 是否必须

zone_id

string

可用区 ID。

no

sku_id

string

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

yes

rg_id

string

资源组 ID。

yes

count

integer

数量。

yes

duration

integer

购买时长。

yes

auto_renewl

integer

是否自动续费。

yes

charge_mode

string

计费模式,弹性计费(elastic)或者包年包月(monthly)。

yes

响应参数

此接口仅包含公共响应参数,可参见前文内容,其他参数说明如下:

参数 类型 描述

rgn_ids

array<any>

资源组内计算节点 ID。

请求示例

curl -X 'POST' \
  'https://ai.coreshub.cn/qai/aicp/resource/node' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "sku_id": "string",
  "rg_id": "string",
  "count": 1,
  "duration": 1,
  "auto_renewal": 1,
  "charge_mode": "monthly"
}'

响应示例

{
  "ret_code": 0,
  "message": "success",
  "meta": {
    "X_REQUEST_ID": "string",
    "X_REQUEST_USER": "string"
  },
  "rgn_ids": []
}