增加配置模板
测试中
POST
/{adminPath}/addConfiguretemplate
最后修改时间:2023-09-24 12:49:45
责任人:mryunqi
请求参数
Path 参数
adminPath
string
必需
示例值:
admin
Header 参数
Authorization
string
可选
Body 参数application/json
configureTemplateId
integer | null
配置模板ID
sockets
integer | null
插槽数,默认为1
cores
integer | null
核心,默认1
threads
integer | null
线程数,默认1
devirtualization
boolean | null
可选
kvm
boolean | null
可选
cpuModel
integer | null
cpu信息模型ID
modelGroup
integer | null
可选
nested
boolean | null
可选
cpu
string | null
可选
cpuUnits
integer | null
可选
bwlimit
integer | null
可选
flowLimit
integer | null
可选
usedFlow
number | null
可选
arch
string | null
可选
acpi
string | null
可选
memory
integer | null
可选
storage
string | null
可选
systemDiskSize
integer | null
可选
mbpsRd
integer | null
可选
mbpsRdMax
integer | null
可选
mbpsWr
integer | null
可选
mbpsWrMax
integer | null
可选
iopsRd
integer | null
可选
iopsRdMax
integer | null
可选
iopsWr
integer | null
可选
iopsWrMax
integer | null
可选
dataDisk
可选
bandwidth
integer | null
带宽,单位Mbps
onBoot
integer | null
可选
ifnat
integer | null
是否开启nat
natnum
integer | null
nat端口转发数量
name
string
必需
示例
{
"sockets": 1,
"cores": 2,
"threads": 2,
"nested": false,
"cpu": "host",
"arch": "x86_64",
"memory": 1024,
"storage": "auto",
"systemDiskSize": 40,
"bandwidth": 100,
"onBoot": 1
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/admin/addConfiguretemplate' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
"sockets": 1,
"cores": 2,
"threads": 2,
"nested": false,
"cpu": "host",
"arch": "x86_64",
"memory": 1024,
"storage": "auto",
"systemDiskSize": 40,
"bandwidth": 100,
"onBoot": 1
}'
返回响应
🟢200成功
application/json
Body
object {0}
示例
{}
修改于 2023-09-24 12:49:45