4525 lines
120 KiB
JSON
4525 lines
120 KiB
JSON
{
|
||
"openapi": "3.0.1",
|
||
"info": {
|
||
"title": "默认模块",
|
||
"description": "新增跨服务虚拟机数据迁移接口,支持通过 rsync + SSH tunneluser 在两个 kvm-virtctl 之间进行虚拟机数据传输和恢复。",
|
||
"version": "1.0.0"
|
||
},
|
||
"tags": [
|
||
{
|
||
"name": "UserVm-Volume"
|
||
},
|
||
{
|
||
"name": "UserVm-Snapshot"
|
||
},
|
||
{
|
||
"name": "UserVm-Backup"
|
||
},
|
||
{
|
||
"name": "UserVm-PostGroup"
|
||
},
|
||
{
|
||
"name": "admin-用户虚拟机-安全组"
|
||
},
|
||
{
|
||
"name": "UserVm-Network"
|
||
},
|
||
{
|
||
"name": "UserVm-Networking"
|
||
},
|
||
{
|
||
"name": "admin-用户虚拟机-组网"
|
||
},
|
||
{
|
||
"name": "UserVm"
|
||
},
|
||
{
|
||
"name": "admin-用户虚拟机"
|
||
},
|
||
{
|
||
"name": "UserGoods"
|
||
}
|
||
],
|
||
"paths": {
|
||
"/api/v1/admin/good/user_vm/volume/list": {
|
||
"get": {
|
||
"summary": "获取虚拟机数据卷列表",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-Volume"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "user_goods_id",
|
||
"in": "query",
|
||
"description": "用户商品 ID",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "page",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "integer",
|
||
"default": 1
|
||
}
|
||
},
|
||
{
|
||
"name": "count",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "integer",
|
||
"default": 20
|
||
}
|
||
},
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/volume/detail": {
|
||
"get": {
|
||
"summary": "获取数据卷详情",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-Volume"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "user_goods_id",
|
||
"in": "query",
|
||
"description": "用户商品 ID",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "volume_id",
|
||
"in": "query",
|
||
"description": "数据卷 ID",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/volume/create": {
|
||
"post": {
|
||
"summary": "创建数据卷",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-Volume"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"description": "用户商品 ID",
|
||
"example": 0
|
||
},
|
||
"name": {
|
||
"type": "string",
|
||
"description": "数据卷名称",
|
||
"example": ""
|
||
},
|
||
"size": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "大小(GB)",
|
||
"example": 0
|
||
},
|
||
"target_device": {
|
||
"type": "string",
|
||
"description": "目标设备名",
|
||
"example": ""
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "创建成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/volume/resize": {
|
||
"post": {
|
||
"summary": "扩容数据卷",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-Volume"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"example": 0
|
||
},
|
||
"volume_id": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"example": 0
|
||
},
|
||
"size": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "新大小(GB)",
|
||
"example": 0
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id",
|
||
"volume_id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/volume/mount": {
|
||
"post": {
|
||
"summary": "挂载数据卷",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-Volume"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"example": 0
|
||
},
|
||
"volume_id": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"example": 0
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id",
|
||
"volume_id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/volume/unmount": {
|
||
"post": {
|
||
"summary": "卸载数据卷",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-Volume"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"example": 0
|
||
},
|
||
"volume_id": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"example": 0
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id",
|
||
"volume_id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/volume/delete": {
|
||
"delete": {
|
||
"summary": "删除数据卷",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-Volume"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "user_goods_id",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "volume_id",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "删除成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/snapshot/list": {
|
||
"get": {
|
||
"summary": "获取虚拟机快照列表",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-Snapshot"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "user_goods_id",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/snapshot/create": {
|
||
"post": {
|
||
"summary": "创建快照",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-Snapshot"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"example": 0
|
||
},
|
||
"name": {
|
||
"type": "string",
|
||
"description": "快照名称",
|
||
"example": ""
|
||
},
|
||
"description": {
|
||
"type": "string",
|
||
"description": "快照描述",
|
||
"example": ""
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "创建成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/snapshot/restore": {
|
||
"post": {
|
||
"summary": "恢复快照",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-Snapshot"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"example": 0
|
||
},
|
||
"snapshot_id": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"example": 0
|
||
},
|
||
"name": {
|
||
"type": "string",
|
||
"example": ""
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id",
|
||
"snapshot_id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/snapshot/delete": {
|
||
"post": {
|
||
"summary": "删除快照",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-Snapshot"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"example": 0
|
||
},
|
||
"snapshot_id": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"example": 0
|
||
},
|
||
"name": {
|
||
"type": "string",
|
||
"example": ""
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id",
|
||
"snapshot_id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/snapshot/progress": {
|
||
"get": {
|
||
"summary": "获取快照任务进度",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-Snapshot"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "user_goods_id",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "task_id",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/snapshot/count": {
|
||
"get": {
|
||
"summary": "获取快照数量",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-Snapshot"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "user_goods_id",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/snapshot/set_limit": {
|
||
"post": {
|
||
"summary": "设置快照上限",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-Snapshot"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"example": 0
|
||
},
|
||
"limit": {
|
||
"type": "integer",
|
||
"example": 0
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id",
|
||
"limit"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/backup/list": {
|
||
"get": {
|
||
"summary": "获取虚拟机备份列表",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-Backup"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "user_goods_id",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/backup/create": {
|
||
"post": {
|
||
"summary": "创建备份",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-Backup"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"example": 0
|
||
},
|
||
"name": {
|
||
"type": "string",
|
||
"example": ""
|
||
},
|
||
"description": {
|
||
"type": "string",
|
||
"example": ""
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "创建成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/backup/restore": {
|
||
"post": {
|
||
"summary": "恢复备份",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-Backup"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"example": 0
|
||
},
|
||
"backup_id": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"example": 0
|
||
},
|
||
"name": {
|
||
"type": "string",
|
||
"example": ""
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id",
|
||
"backup_id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/backup/delete": {
|
||
"post": {
|
||
"summary": "删除备份",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-Backup"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"example": 0
|
||
},
|
||
"backup_id": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"example": 0
|
||
},
|
||
"name": {
|
||
"type": "string",
|
||
"example": ""
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id",
|
||
"backup_id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/backup/progress": {
|
||
"get": {
|
||
"summary": "获取备份任务进度",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-Backup"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "user_goods_id",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "task_id",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/backup/count": {
|
||
"get": {
|
||
"summary": "获取备份数量",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-Backup"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "user_goods_id",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/backup/set_limit": {
|
||
"post": {
|
||
"summary": "设置备份上限",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-Backup"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"example": 0
|
||
},
|
||
"limit": {
|
||
"type": "integer",
|
||
"example": 0
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id",
|
||
"limit"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/post_group/list": {
|
||
"get": {
|
||
"summary": "获取虚拟机安全组列表",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-PostGroup"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "user_goods_id",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "keyword",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/post_group/detail": {
|
||
"get": {
|
||
"summary": "获取安全组详情",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-PostGroup"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "user_goods_id",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "id",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/post_group/create": {
|
||
"post": {
|
||
"summary": "创建安全组",
|
||
"deprecated": false,
|
||
"description": "通过 user_goods_id 确定服务,自动从虚拟机系统卷获取宿主机ID,使用 UserGoods 的 UserId",
|
||
"tags": [
|
||
"admin-用户虚拟机-安全组"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"description": "用户商品ID",
|
||
"example": 0
|
||
},
|
||
"name": {
|
||
"type": "string",
|
||
"description": "安全组名称",
|
||
"example": ""
|
||
},
|
||
"direction": {
|
||
"type": "string",
|
||
"description": "方向描述",
|
||
"example": ""
|
||
},
|
||
"lock": {
|
||
"type": "boolean",
|
||
"description": "是否锁定",
|
||
"default": false,
|
||
"example": "false"
|
||
},
|
||
"drop_all": {
|
||
"type": "boolean",
|
||
"description": "是否丢弃所有",
|
||
"default": false,
|
||
"example": "false"
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id",
|
||
"name"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"type": "integer",
|
||
"example": 200
|
||
},
|
||
"data": {
|
||
"type": "object",
|
||
"properties": {}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/post_group/update": {
|
||
"post": {
|
||
"summary": "修改安全组",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"admin-用户虚拟机-安全组"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"description": "用户商品ID",
|
||
"example": 0
|
||
},
|
||
"id": {
|
||
"type": "integer",
|
||
"description": "安全组ID",
|
||
"example": 0
|
||
},
|
||
"name": {
|
||
"type": "string",
|
||
"description": "安全组名称(可选)",
|
||
"example": ""
|
||
},
|
||
"direction": {
|
||
"type": "string",
|
||
"description": "方向描述(可选)",
|
||
"example": ""
|
||
},
|
||
"lock": {
|
||
"type": "boolean",
|
||
"description": "是否锁定(可选)",
|
||
"example": ""
|
||
},
|
||
"drop_all": {
|
||
"type": "boolean",
|
||
"description": "是否丢弃所有(可选)",
|
||
"example": ""
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id",
|
||
"id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"type": "integer",
|
||
"example": 200
|
||
},
|
||
"data": {
|
||
"type": "object",
|
||
"properties": {}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/post_group/bind": {
|
||
"post": {
|
||
"summary": "绑定安全组到虚拟机",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-PostGroup"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"example": 0
|
||
},
|
||
"id": {
|
||
"type": "integer",
|
||
"description": "安全组 ID",
|
||
"example": 0
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id",
|
||
"id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/post_group/unbind": {
|
||
"post": {
|
||
"summary": "解绑安全组",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-PostGroup"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"example": 0
|
||
},
|
||
"id": {
|
||
"type": "integer",
|
||
"example": 0
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id",
|
||
"id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/post_group/apply": {
|
||
"post": {
|
||
"summary": "应用安全组",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-PostGroup"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"example": 0
|
||
},
|
||
"id": {
|
||
"type": "integer",
|
||
"example": 0
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id",
|
||
"id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/post_group/set_shared": {
|
||
"post": {
|
||
"summary": "设置安全组共享",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"admin-用户虚拟机-安全组"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"description": "用户商品ID",
|
||
"example": 0
|
||
},
|
||
"id": {
|
||
"type": "integer",
|
||
"description": "安全组ID",
|
||
"example": 0
|
||
},
|
||
"shared": {
|
||
"type": "boolean",
|
||
"description": "是否共享",
|
||
"example": ""
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id",
|
||
"id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"type": "integer",
|
||
"example": 200
|
||
},
|
||
"data": {
|
||
"type": "object",
|
||
"properties": {}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/post_group/delete": {
|
||
"delete": {
|
||
"summary": "删除安全组",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"admin-用户虚拟机-安全组"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "user_goods_id",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "id",
|
||
"in": "query",
|
||
"description": "安全组ID",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"type": "integer",
|
||
"example": 200
|
||
},
|
||
"data": {
|
||
"type": "object",
|
||
"properties": {}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/post_group/enable_whitelist": {
|
||
"post": {
|
||
"summary": "启用安全组白名单",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-PostGroup"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"example": 0
|
||
},
|
||
"id": {
|
||
"type": "integer",
|
||
"example": 0
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id",
|
||
"id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/post_group/disable_whitelist": {
|
||
"post": {
|
||
"summary": "禁用安全组白名单",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-PostGroup"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"example": 0
|
||
},
|
||
"id": {
|
||
"type": "integer",
|
||
"example": 0
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id",
|
||
"id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/post_group/update_rule": {
|
||
"post": {
|
||
"summary": "修改安全组规则",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"admin-用户虚拟机-安全组"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"description": "用户商品ID",
|
||
"example": 0
|
||
},
|
||
"id": {
|
||
"type": "integer",
|
||
"description": "规则ID",
|
||
"example": 0
|
||
},
|
||
"port_group_id": {
|
||
"type": "integer",
|
||
"description": "安全组ID",
|
||
"example": 0
|
||
},
|
||
"priority": {
|
||
"type": "integer",
|
||
"description": "优先级",
|
||
"example": 0
|
||
},
|
||
"protocol": {
|
||
"type": "string",
|
||
"description": "协议",
|
||
"example": ""
|
||
},
|
||
"action": {
|
||
"type": "string",
|
||
"description": "动作(allow/drop)",
|
||
"example": ""
|
||
},
|
||
"port_range": {
|
||
"type": "string",
|
||
"description": "端口范围",
|
||
"example": ""
|
||
},
|
||
"ip_range": {
|
||
"type": "string",
|
||
"description": "IP范围",
|
||
"example": ""
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id",
|
||
"id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"type": "integer",
|
||
"example": 200
|
||
},
|
||
"data": {
|
||
"type": "object",
|
||
"properties": {}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/post_group/create_rule": {
|
||
"post": {
|
||
"summary": "创建安全组规则",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-PostGroup"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"example": 0
|
||
},
|
||
"group_id": {
|
||
"type": "integer",
|
||
"example": 0
|
||
},
|
||
"priority": {
|
||
"type": "integer",
|
||
"example": 0
|
||
},
|
||
"protocol": {
|
||
"type": "string",
|
||
"example": ""
|
||
},
|
||
"action": {
|
||
"type": "string",
|
||
"example": ""
|
||
},
|
||
"port_range": {
|
||
"type": "string",
|
||
"example": ""
|
||
},
|
||
"ip_range": {
|
||
"type": "string",
|
||
"example": ""
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id",
|
||
"group_id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/post_group/delete_rule": {
|
||
"delete": {
|
||
"summary": "删除安全组规则",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-PostGroup"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "user_goods_id",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "id",
|
||
"in": "query",
|
||
"description": "规则 ID",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "删除成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/post_group/user_list": {
|
||
"get": {
|
||
"summary": "获取用户安全组列表",
|
||
"deprecated": false,
|
||
"description": "通过 user_goods_id 确定服务和用户,查询该用户拥有的安全组列表",
|
||
"tags": [
|
||
"admin-用户虚拟机-安全组"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "user_goods_id",
|
||
"in": "query",
|
||
"description": "用户商品ID(用于确定 service 和 user)",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "page",
|
||
"in": "query",
|
||
"description": "页码,默认 1",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "integer",
|
||
"default": 1
|
||
}
|
||
},
|
||
{
|
||
"name": "page_size",
|
||
"in": "query",
|
||
"description": "每页数量,默认 20",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "integer",
|
||
"default": 20
|
||
}
|
||
},
|
||
{
|
||
"name": "keyword",
|
||
"in": "query",
|
||
"description": "搜索关键词",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"type": "integer",
|
||
"example": 200
|
||
},
|
||
"data": {
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "array",
|
||
"description": "安全组列表",
|
||
"items": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "integer"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"lock": {
|
||
"type": "boolean"
|
||
},
|
||
"drop_all": {
|
||
"type": "boolean"
|
||
},
|
||
"shared": {
|
||
"type": "boolean"
|
||
},
|
||
"user_id": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"total": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/network/list": {
|
||
"get": {
|
||
"summary": "获取虚拟机网络列表",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-Network"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "user_goods_id",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "page",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "integer",
|
||
"default": 1
|
||
}
|
||
},
|
||
{
|
||
"name": "count",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "integer",
|
||
"default": 20
|
||
}
|
||
},
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/network/detail": {
|
||
"get": {
|
||
"summary": "获取网络详情",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-Network"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "user_goods_id",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "network_id",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "host_id",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/networking/list": {
|
||
"get": {
|
||
"summary": "获取用户组网列表",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-Networking"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "user_goods_id",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "page",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "integer",
|
||
"default": 1
|
||
}
|
||
},
|
||
{
|
||
"name": "count",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "integer",
|
||
"default": 20
|
||
}
|
||
},
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/networking/detail": {
|
||
"get": {
|
||
"summary": "获取用户组网详情",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-Networking"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "user_goods_id",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "networking_id",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/networking/create": {
|
||
"post": {
|
||
"summary": "创建用户组网",
|
||
"deprecated": false,
|
||
"description": "管理员通过 user_goods_id 创建用户组网,自动从虚拟机系统卷获取宿主机ID",
|
||
"tags": [
|
||
"admin-用户虚拟机-组网"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"description": "用户商品ID",
|
||
"example": 0
|
||
},
|
||
"name": {
|
||
"type": "string",
|
||
"description": "组网名称",
|
||
"example": ""
|
||
},
|
||
"description": {
|
||
"type": "string",
|
||
"description": "组网描述",
|
||
"example": ""
|
||
},
|
||
"bridge_name": {
|
||
"type": "string",
|
||
"description": "网桥名称",
|
||
"example": ""
|
||
},
|
||
"gateway": {
|
||
"type": "string",
|
||
"description": "网关地址",
|
||
"example": ""
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id",
|
||
"name"
|
||
]
|
||
},
|
||
"examples": {}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"type": "integer",
|
||
"example": 200
|
||
},
|
||
"data": {
|
||
"type": "object",
|
||
"properties": {}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/networking/assign": {
|
||
"post": {
|
||
"summary": "分配组网 IP 到虚拟机",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-Networking"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"example": 0
|
||
},
|
||
"networking_id": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"example": 0
|
||
},
|
||
"ip": {
|
||
"type": "string",
|
||
"description": "指定 IP(可选)",
|
||
"example": ""
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id",
|
||
"networking_id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/networking/remove_network": {
|
||
"post": {
|
||
"summary": "移除组网网络",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm-Networking"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"example": 0
|
||
},
|
||
"networking_id": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"example": 0
|
||
},
|
||
"network_id": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"example": 0
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id",
|
||
"networking_id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/networking/delete": {
|
||
"delete": {
|
||
"summary": "删除用户组网",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"admin-用户虚拟机-组网"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "user_goods_id",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "networking_id",
|
||
"in": "query",
|
||
"description": "",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"type": "integer",
|
||
"example": 200
|
||
},
|
||
"data": {
|
||
"type": "object",
|
||
"properties": {}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/list": {
|
||
"get": {
|
||
"summary": "获取用户虚拟机列表",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "page",
|
||
"in": "query",
|
||
"description": "页码",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "integer",
|
||
"default": 1
|
||
}
|
||
},
|
||
{
|
||
"name": "count",
|
||
"in": "query",
|
||
"description": "每页数量",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "integer",
|
||
"default": 10
|
||
}
|
||
},
|
||
{
|
||
"name": "user_id",
|
||
"in": "query",
|
||
"description": "按用户 ID 筛选",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "good_id",
|
||
"in": "query",
|
||
"description": "按商品 ID 筛选",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "bound",
|
||
"in": "query",
|
||
"description": "是否已绑定虚拟机(true=已绑定,false=未绑定,不传=全部)",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "boolean"
|
||
}
|
||
},
|
||
{
|
||
"name": "key",
|
||
"in": "query",
|
||
"description": "关键词搜索(按商品名称模糊匹配)",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/components/schemas/UserGoods"
|
||
}
|
||
},
|
||
"all_count": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/detail": {
|
||
"get": {
|
||
"summary": "获取用户虚拟机详情",
|
||
"deprecated": false,
|
||
"description": "返回 UserGoods 信息,若已绑定虚拟机则同时返回远程虚拟机详情",
|
||
"tags": [
|
||
"UserVm"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "user_goods_id",
|
||
"in": "query",
|
||
"description": "用户商品 ID",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods": {
|
||
"$ref": "#/components/schemas/UserGoods"
|
||
},
|
||
"vm": {
|
||
"type": "object",
|
||
"description": "远程虚拟机详情(未绑定时无此字段)",
|
||
"properties": {}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/vnc": {
|
||
"get": {
|
||
"summary": "获取虚拟机VNC连接",
|
||
"deprecated": false,
|
||
"description": "通过 user_goods_id 获取虚拟机的 VNC 远程连接地址",
|
||
"tags": [
|
||
"admin-用户虚拟机"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "user_goods_id",
|
||
"in": "query",
|
||
"description": "用户商品ID",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"type": "integer",
|
||
"example": 200
|
||
},
|
||
"data": {
|
||
"type": "object",
|
||
"properties": {
|
||
"url": {
|
||
"type": "string",
|
||
"description": "VNC连接地址"
|
||
},
|
||
"expire_at": {
|
||
"type": "string",
|
||
"format": "date-time",
|
||
"description": "连接过期时间"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/host_images": {
|
||
"get": {
|
||
"summary": "获取可用的镜像列表",
|
||
"deprecated": false,
|
||
"description": "通过 user_goods_id 获取对应虚拟机所在宿主机上已同步完成的镜像列表。先获取VM详情,从系统卷中提取宿主机ID,再对比宿主机镜像同步状态,仅返回 synced 状态的镜像。",
|
||
"tags": [
|
||
"admin-用户虚拟机"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "user_goods_id",
|
||
"in": "query",
|
||
"description": "用户商品ID",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"type": "integer",
|
||
"example": 200
|
||
},
|
||
"data": {
|
||
"type": "object",
|
||
"properties": {
|
||
"host_id": {
|
||
"type": "integer",
|
||
"description": "宿主机ID"
|
||
},
|
||
"total": {
|
||
"type": "integer",
|
||
"description": "已完成镜像数量"
|
||
},
|
||
"data": {
|
||
"type": "array",
|
||
"description": "已完成(synced)的镜像列表",
|
||
"items": {
|
||
"type": "object",
|
||
"properties": {
|
||
"image": {
|
||
"type": "object",
|
||
"description": "镜像信息",
|
||
"properties": {
|
||
"id": {
|
||
"type": "integer"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"os_type": {
|
||
"type": "string"
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"size": {
|
||
"type": "integer"
|
||
},
|
||
"desc": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"sync_status": {
|
||
"type": "string",
|
||
"description": "同步状态(synced)",
|
||
"example": "synced"
|
||
},
|
||
"host_status": {
|
||
"type": "string",
|
||
"description": "宿主机侧镜像状态"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/create": {
|
||
"post": {
|
||
"summary": "创建用户虚拟机(同时创建 UserGoods)",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"good_id": {
|
||
"type": "integer",
|
||
"description": "商品 ID(必须为云服务器类型)",
|
||
"example": 0
|
||
},
|
||
"order_id": {
|
||
"type": "integer",
|
||
"description": "订单id",
|
||
"example": 0
|
||
},
|
||
"user_id": {
|
||
"type": "integer",
|
||
"description": "用户 ID",
|
||
"example": 0
|
||
},
|
||
"name": {
|
||
"type": "string",
|
||
"description": "虚拟机名称",
|
||
"example": ""
|
||
},
|
||
"memory": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "内存(KiB)",
|
||
"example": 0
|
||
},
|
||
"vcpu": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "虚拟CPU数",
|
||
"example": 0
|
||
},
|
||
"system_size": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "系统盘大小(GB)",
|
||
"example": 0
|
||
},
|
||
"rx_bandwidth": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "下行带宽",
|
||
"example": 0
|
||
},
|
||
"tx_bandwidth": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "上行带宽",
|
||
"example": 0
|
||
},
|
||
"image_id": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "镜像 ID",
|
||
"example": 0
|
||
},
|
||
"host_id": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "指定宿主机 ID",
|
||
"example": 0
|
||
},
|
||
"host_group_id": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "指定宿主机组 ID(不传则使用商品绑定的主机组)",
|
||
"example": 0
|
||
},
|
||
"ipv4_num": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "IPv4 IP数量",
|
||
"example": 0
|
||
},
|
||
"ipv6_num": {
|
||
"description": "IPv6 IP数量",
|
||
"example": 0,
|
||
"type": "integer"
|
||
},
|
||
"network_ids": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "integer",
|
||
"format": "int64"
|
||
},
|
||
"description": "网络 ID 列表",
|
||
"example": ""
|
||
},
|
||
"snapshot_num": {
|
||
"type": "integer",
|
||
"description": "快照上限",
|
||
"example": 0
|
||
},
|
||
"backup_num": {
|
||
"type": "integer",
|
||
"description": "备份上限",
|
||
"example": 0
|
||
},
|
||
"renew_price": {
|
||
"type": "integer",
|
||
"description": "续费价格",
|
||
"example": 0
|
||
},
|
||
"base_price": {
|
||
"type": "integer",
|
||
"description": "基础价格",
|
||
"example": 0
|
||
},
|
||
"note": {
|
||
"type": "string",
|
||
"description": "备注",
|
||
"example": ""
|
||
},
|
||
"expire_time": {
|
||
"type": "string",
|
||
"description": "到期时间,格式:2006-01-02 15:04:05",
|
||
"example": ""
|
||
}
|
||
},
|
||
"required": [
|
||
"good_id",
|
||
"user_id",
|
||
"memory",
|
||
"vcpu",
|
||
"system_size",
|
||
"image_id"
|
||
]
|
||
},
|
||
"examples": {}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "创建成功",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods": {
|
||
"$ref": "#/components/schemas/UserGoods"
|
||
},
|
||
"vm": {
|
||
"type": "object",
|
||
"description": "创建的虚拟机信息",
|
||
"properties": {}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/bind": {
|
||
"post": {
|
||
"summary": "绑定虚拟机到 UserGoods",
|
||
"deprecated": false,
|
||
"description": "将一个未绑定的 UserGoods 绑定到一个已存在的虚拟机",
|
||
"tags": [
|
||
"UserVm"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"description": "用户商品 ID",
|
||
"example": 0
|
||
},
|
||
"vm_id": {
|
||
"type": "integer",
|
||
"description": "虚拟机 ID",
|
||
"example": 0
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id",
|
||
"vm_id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "绑定成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/transfer": {
|
||
"post": {
|
||
"summary": "转移用户虚拟机",
|
||
"deprecated": false,
|
||
"description": "将用户虚拟机的 UserGoods 归属权转移至目标用户",
|
||
"tags": [
|
||
"UserVm"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"description": "用户商品 ID",
|
||
"example": 0
|
||
},
|
||
"target_user_id": {
|
||
"type": "integer",
|
||
"description": "目标用户 ID",
|
||
"example": 0
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id",
|
||
"target_user_id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "转移成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/migrate": {
|
||
"post": {
|
||
"summary": "迁移虚拟机(更换宿主机)",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"description": "用户商品 ID",
|
||
"example": 0
|
||
},
|
||
"target_host_id": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "目标宿主机 ID(与 target_host_group_id 二选一)",
|
||
"example": 0
|
||
},
|
||
"target_host_group_id": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "目标宿主机组 ID",
|
||
"example": 0
|
||
},
|
||
"ipv4_num": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "新分配的IPv4数量(不传保持原数量)",
|
||
"example": 0
|
||
},
|
||
"ipv6_num": {
|
||
"description": "新分配的IPv6数量(不传保持原数量)",
|
||
"example": 0,
|
||
"type": "integer"
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id"
|
||
]
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "迁移成功",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/MigrateVMReply"
|
||
}
|
||
}
|
||
},
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/update_traffic": {
|
||
"post": {
|
||
"summary": "修改虚拟机带宽",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"description": "用户商品 ID",
|
||
"example": 0
|
||
},
|
||
"rx_bandwidth": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "下行带宽",
|
||
"example": 0
|
||
},
|
||
"tx_bandwidth": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "上行带宽",
|
||
"example": 0
|
||
},
|
||
"traffic_max": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "流量上限",
|
||
"example": 0
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/update": {
|
||
"post": {
|
||
"summary": "修改虚拟机",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"description": "用户商品 ID",
|
||
"example": 0
|
||
},
|
||
"rx_bandwidth": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "下行带宽",
|
||
"example": 0
|
||
},
|
||
"tx_bandwidth": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "上行带宽",
|
||
"example": 0
|
||
},
|
||
"root_password": {
|
||
"type": "string",
|
||
"description": "root 密码",
|
||
"example": ""
|
||
},
|
||
"ssh_port": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "SSH 端口",
|
||
"example": 0
|
||
},
|
||
"internet_network_id": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "公网网络 ID",
|
||
"example": 0
|
||
},
|
||
"port_group_id": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "安全组 ID",
|
||
"example": 0
|
||
},
|
||
"snapshot_num": {
|
||
"type": "integer",
|
||
"description": "快照上限",
|
||
"example": 0
|
||
},
|
||
"backup_num": {
|
||
"type": "integer",
|
||
"description": "备份上限",
|
||
"example": 0
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/refactor": {
|
||
"post": {
|
||
"summary": "重构虚拟机",
|
||
"deprecated": false,
|
||
"description": "修改虚拟机的核心配置(CPU/内存/网络/密码等),相当于重新定义虚拟机规格",
|
||
"tags": [
|
||
"UserVm"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"description": "用户商品 ID",
|
||
"example": 0
|
||
},
|
||
"memory": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "内存(KiB)",
|
||
"example": 0
|
||
},
|
||
"vcpu": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "虚拟CPU数",
|
||
"example": 0
|
||
},
|
||
"rx_bandwidth": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "下行带宽",
|
||
"example": 0
|
||
},
|
||
"tx_bandwidth": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "上行带宽",
|
||
"example": 0
|
||
},
|
||
"root_password": {
|
||
"type": "string",
|
||
"description": "root 密码",
|
||
"example": ""
|
||
},
|
||
"uuid": {
|
||
"type": "string",
|
||
"description": "UUID",
|
||
"example": ""
|
||
},
|
||
"mate_data_id": {
|
||
"type": "string",
|
||
"description": "元数据 ID",
|
||
"example": ""
|
||
},
|
||
"physical_name": {
|
||
"type": "string",
|
||
"description": "物理名称",
|
||
"example": ""
|
||
},
|
||
"config_path": {
|
||
"type": "string",
|
||
"description": "配置路径",
|
||
"example": ""
|
||
},
|
||
"ssh_port": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "SSH 端口",
|
||
"example": 0
|
||
},
|
||
"vnc_port": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "VNC 端口",
|
||
"example": 0
|
||
},
|
||
"vnc_password": {
|
||
"type": "string",
|
||
"description": "VNC 密码",
|
||
"example": ""
|
||
},
|
||
"internet_network_id": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "公网网络 ID",
|
||
"example": 0
|
||
},
|
||
"port_group_id": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "安全组 ID",
|
||
"example": 0
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/start": {
|
||
"post": {
|
||
"summary": "启动虚拟机",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"description": "用户商品 ID",
|
||
"example": 0
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/stop": {
|
||
"post": {
|
||
"summary": "停止虚拟机",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"description": "用户商品 ID",
|
||
"example": 0
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/reboot": {
|
||
"post": {
|
||
"summary": "重启虚拟机",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"description": "用户商品 ID",
|
||
"example": 0
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/suspend": {
|
||
"post": {
|
||
"summary": "暂停虚拟机",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"description": "用户商品 ID",
|
||
"example": 0
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/resume": {
|
||
"post": {
|
||
"summary": "恢复虚拟机",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"description": "用户商品 ID",
|
||
"example": 0
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/rescue": {
|
||
"post": {
|
||
"summary": "救援虚拟机",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"description": "用户商品 ID",
|
||
"example": 0
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/exit_rescue": {
|
||
"post": {
|
||
"summary": "退出救援模式",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"description": "用户商品 ID",
|
||
"example": 0
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/rebuild": {
|
||
"post": {
|
||
"summary": "重装虚拟机系统",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"user_goods_id": {
|
||
"type": "integer",
|
||
"description": "用户商品 ID",
|
||
"example": 0
|
||
},
|
||
"image_id": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "新镜像 ID",
|
||
"example": 0
|
||
}
|
||
},
|
||
"required": [
|
||
"user_goods_id",
|
||
"image_id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "操作成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_vm/delete": {
|
||
"delete": {
|
||
"summary": "删除用户虚拟机(同时删除远程VM和UserGoods)",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserVm"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "user_goods_id",
|
||
"in": "query",
|
||
"description": "用户商品 ID",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "删除成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_goods/list": {
|
||
"get": {
|
||
"summary": "获取用户商品列表",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserGoods"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "page",
|
||
"in": "query",
|
||
"description": "页码",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "integer",
|
||
"default": 1
|
||
}
|
||
},
|
||
{
|
||
"name": "count",
|
||
"in": "query",
|
||
"description": "每页数量",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "integer",
|
||
"default": 10
|
||
}
|
||
},
|
||
{
|
||
"name": "user_id",
|
||
"in": "query",
|
||
"description": "按用户 ID 筛选",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "good_id",
|
||
"in": "query",
|
||
"description": "按商品 ID 筛选",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "key",
|
||
"in": "query",
|
||
"description": "关键词搜索(按商品名称模糊匹配)",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/components/schemas/UserGoods"
|
||
}
|
||
},
|
||
"all_count": {
|
||
"type": "integer",
|
||
"description": "总数"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_goods/detail": {
|
||
"get": {
|
||
"summary": "获取用户商品详情",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserGoods"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"in": "query",
|
||
"description": "用户商品 ID",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "成功",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/components/schemas/UserGoods"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_goods/create": {
|
||
"post": {
|
||
"summary": "新增用户商品",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserGoods"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"good_id": {
|
||
"type": "integer",
|
||
"description": "商品 ID",
|
||
"example": 0
|
||
},
|
||
"user_id": {
|
||
"type": "integer",
|
||
"description": "用户 ID",
|
||
"example": 0
|
||
},
|
||
"order_id": {
|
||
"type": "integer",
|
||
"description": "订单 ID",
|
||
"example": 0
|
||
},
|
||
"good_plan_id": {
|
||
"type": "integer",
|
||
"description": "商品套餐 ID",
|
||
"example": 0
|
||
},
|
||
"item_id": {
|
||
"type": "integer",
|
||
"description": "归属项 ID",
|
||
"example": 0
|
||
},
|
||
"renew_price": {
|
||
"type": "integer",
|
||
"description": "续费价格",
|
||
"example": 0
|
||
},
|
||
"base_price": {
|
||
"type": "integer",
|
||
"description": "基础价格",
|
||
"example": 0
|
||
},
|
||
"note": {
|
||
"type": "string",
|
||
"description": "备注说明",
|
||
"example": ""
|
||
},
|
||
"expire_time": {
|
||
"type": "string",
|
||
"description": "到期时间,格式:2006-01-02 15:04:05",
|
||
"example": ""
|
||
},
|
||
"order_args": {
|
||
"description": "订单参数 json",
|
||
"example": "",
|
||
"type": "string"
|
||
}
|
||
},
|
||
"required": [
|
||
"good_id",
|
||
"user_id"
|
||
]
|
||
},
|
||
"examples": {}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "创建成功",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/components/schemas/UserGoods"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_goods/update": {
|
||
"post": {
|
||
"summary": "修改用户商品",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserGoods"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "integer",
|
||
"description": "用户商品 ID",
|
||
"example": 0
|
||
},
|
||
"note": {
|
||
"type": "string",
|
||
"description": "备注说明",
|
||
"example": ""
|
||
},
|
||
"renew_price": {
|
||
"type": "integer",
|
||
"description": "续费价格",
|
||
"example": 0
|
||
},
|
||
"base_price": {
|
||
"type": "integer",
|
||
"description": "基础价格",
|
||
"example": 0
|
||
},
|
||
"expire_time": {
|
||
"type": "string",
|
||
"description": "到期时间,格式:2006-01-02 15:04:05",
|
||
"example": ""
|
||
},
|
||
"item_id": {
|
||
"type": "integer",
|
||
"description": "归属项 ID",
|
||
"example": 0
|
||
}
|
||
},
|
||
"required": [
|
||
"id"
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"required": true
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "修改成功",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"$ref": "#/components/schemas/UserGoods"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
},
|
||
"/api/v1/admin/good/user_goods/delete": {
|
||
"delete": {
|
||
"summary": "删除用户商品",
|
||
"deprecated": false,
|
||
"description": "",
|
||
"tags": [
|
||
"UserGoods"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "id",
|
||
"in": "query",
|
||
"description": "用户商品 ID",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
{
|
||
"name": "Authorization",
|
||
"in": "header",
|
||
"description": "",
|
||
"example": "Bearer {{token}}",
|
||
"schema": {
|
||
"type": "string",
|
||
"default": "Bearer {{token}}"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "删除成功",
|
||
"headers": {}
|
||
}
|
||
},
|
||
"security": []
|
||
}
|
||
}
|
||
},
|
||
"components": {
|
||
"schemas": {
|
||
"MigrateVMReply": {
|
||
"type": "object",
|
||
"properties": {
|
||
"old_vm": {
|
||
"type": "object",
|
||
"description": "原虚拟机信息",
|
||
"properties": {}
|
||
},
|
||
"new_vm": {
|
||
"type": "object",
|
||
"description": "新虚拟机信息",
|
||
"properties": {}
|
||
},
|
||
"task": {
|
||
"type": "object",
|
||
"description": "创建任务",
|
||
"properties": {}
|
||
}
|
||
}
|
||
},
|
||
"UserGoods": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "integer"
|
||
},
|
||
"goodId": {
|
||
"type": "integer"
|
||
},
|
||
"good": {
|
||
"type": "object",
|
||
"properties": {}
|
||
},
|
||
"tag": {
|
||
"type": "string"
|
||
},
|
||
"userId": {
|
||
"type": "integer"
|
||
},
|
||
"user": {
|
||
"type": "object",
|
||
"properties": {}
|
||
},
|
||
"orderId": {
|
||
"type": "integer"
|
||
},
|
||
"order": {
|
||
"type": "object",
|
||
"properties": {}
|
||
},
|
||
"expireTime": {
|
||
"type": "string",
|
||
"format": "date-time"
|
||
},
|
||
"note": {
|
||
"type": "string"
|
||
},
|
||
"goodPlanId": {
|
||
"type": "integer"
|
||
},
|
||
"itemId": {
|
||
"type": "integer",
|
||
"description": "虚拟机 ID"
|
||
},
|
||
"renewPrice": {
|
||
"type": "integer"
|
||
},
|
||
"basePrice": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {},
|
||
"securitySchemes": {}
|
||
},
|
||
"servers": [],
|
||
"security": []
|
||
} |