创建主机规格

接口URL

/api/v1/resource/spec

请求方式

POST

Content-Type

application/json

认证方式

Bearer auth

请求Header参数

参数名 示例值 参数类型 是否必填 参数描述
Accept application/json Text -
Content-Type application/json Text -

请求Body参数

{
    "Name": "spec",
    "CpuArch": "x86_64",
    "CpuModel": "intel",
    "CpuCores": 2,
    "OS": "centos",
    "Storage": 128,
    "DiskType": "SSD",
    "Memory": 4,
    "Notes": ""
}
参数名 示例值 参数类型 是否必填 参数描述
Name spec String 名称
CpuArch x86_64 String CPU 架构 [x86_64/aarch64]
CpuModel intel String CPU 型号
CpuCores 2 Integer CPU 核心数量
OS centos String 操作系统
Storage 128 Integer 存储容量,单位 GB
DiskType SSD String 磁盘类型 [HDD/SSD]
Memory 4 Integer 内存容量,单位 GB
Notes - String 说明

成功响应示例

{
    "Data": {
        "ID": 2,
        "CreatedAt": "2023-09-21T14:28:40.32+08:00",
        "UpdatedAt": "2023-09-21T14:28:40.32+08:00",
        "DeletedAt": null,
        "Name": "spec",
        "CpuArch": "x86_64",
        "CpuModel": "intel",
        "CpuCores": 2,
        "OS": "centos",
        "Storage": 128,
        "DiskType": "SSD",
        "Memory": 4,
        "Notes": ""
    },
    "Success": true
}
参数名 示例值 参数类型 参数描述
Data - Object
Data.ID 2 Integer
Data.CreatedAt 2023-09-21T14:28:40.32+08:00 String 创建时间
Data.UpdatedAt 2023-09-21T14:28:40.32+08:00 String 更新时间
Data.DeletedAt null Null 删除时间
Data.Name spec String 名称
Data.CpuArch x86_64 String CPU 架构 [x86_64/aarch64]
Data.CpuModel intel String CPU 型号
Data.CpuCores 2 Integer CPU 核心数量
Data.OS centos String 操作系统
Data.Storage 128 Integer 存储容量,单位 GB
Data.DiskType SSD String 磁盘类型 [HDD/SSD]
Data.Memory 4 Integer 内存容量,单位 GB
Data.Notes - String 说明
Success true Boolean
© 2024 平凯星辰(北京)科技有限公司 all right reserved,powered by GitbookFile Modify: 2024-04-02 15:37:04

results matching ""

    No results matching ""