创建资源池
更新时间:2026-01-05
描述
创建资源池,目前支持创建托管资源池。
请求结构
Plain Text
1POST ?action=CreateResourcePool
2Host:aihc.bj.baidubce.com
3Authorization:authorization string
4ContentType: application/json
5version: v2
请求头域
除公共头域外,无其它特殊头域。
请求参数
| 参数名称 | 类型 | 是否必须 | 说明 |
|---|---|---|---|
| spec | CreateSpec | 是 | 创建资源池配置 |
| nodes | List<NodeSet> | 是 | 创建资源池的节点配置:一次只支持配置一种规格 |
返回头域
除公共头域外,无其他特殊头域。
返回参数
| 参数名称 | 类型 | 说明 |
|---|---|---|
| resourcePoolId | String | 创建的资源池 ID |
| requestId | String | 创建请求的requestId |
请求示例
Plain Text
1{
2 "spec": {
3 "region": "bj",
4 "name": "cpu_resource_pool",
5 "type": "dedicatedV2",
6 "network": {
7 "nodes": {
8 "vpcId": "vpc-f0pp0jbzip3c",
9 "subnetIds": [
10 "sbn-qqk36ianqkte"
11 ],
12 "securityGroups": [
13 // {
14 // "type": "enterprise",
15 // "id": "esg-1h9e1fbj3kdd",
16 // "name": "aihc-qa-test"
17 // }
18 ]
19 },
20 "pods": {
21 "subnetIds": [
22 "sbn-qqk36ianqkte",
23 "sbn-eqysif811df6"
24 ]
25 }
26 },
27 "bindingStorages": [
28 {
29 "provider": "pfs",
30 "type": "pfsMT",
31 "id": "mt-RsEUd2"
32 }
33 ],
34 "bindingMonitors": [
35 {
36 "provider": "cprom",
37 "id": "cprom-hf8sc8j91urp7"
38 }
39 ]
40 },
41 "nodes": [
42 {
43 "addNodeSpec": {
44 "machineSpec": "aihc.g5.c2m8",
45 "zoneName": "cn-bj-d",
46 "resourceChargingOption": {
47 "chargingType": "Prepaid",
48 "purchaseTime": 1,
49 "purchaseTimeUnit": "MONTH",
50 "autoRenew": true,
51 "autoRenewTime": 1,
52 "autoRenewTimeUnit": "MONTH"
53 }
54 // "ehcClusterId": "ehc-1P05cvhr"
55 },
56 "count": 1
57 }
58 ]
59}
返回示例
Plain Text
1{
2 "requestId": "dcd2714c-7b3b-4f0f-99a3-2a6ca88f8e29",
3 "resourcePoolId": "aihc-xesditpvgcog"
4}
