计算管理/镜像存储相关接口/镜像存储相关接口/本地镜像仓库相关接口
POSTStandalone Image Storage Related Interfaces起始版本 同步需要认证
添加本地镜像仓库
添加本地镜像仓库
调试可用性
在线调试
使用当前认证信息和示例参数提交 Mock 请求。
请求参数
请求体字段
paramsObject必填请求体参数结构
hostnameString必填服务器主机地址
usernameString必填服务器 SSH 用户名 (用于 Ansible 部署)
passwordString必填服务器 SSH 用户密码
sshPortint服务器 SSH 端口
urlString必填镜像仓库本地数据存放路径
nameString必填本地镜像仓库名称
descriptionString镜像仓库的详细描述
typeString这里是 ImageStoreBackupStorage
importImagesboolean是否导入镜像
resourceUuidString资源UUID。若指定,镜像仓库会使用该字段值作为UUID
systemTagsList系统标签
userTagsList用户标签
响应状态
请求地址
POST/zstack/v1/backup-storage/image-store
/zstack/v1/backup-storage/image-store
请求示例
curl -X POST 'http://{host}/zstack/v1/backup-storage/image-store' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"hostname":"<hostname>","username":"<username>","password":"<password>","sshPort":1,"url":"<url>","name":"<name>","description":"<description>","type":"<type>","importImages":true,"resourceUuid":"<resourceUuid>","systemTags":["<systemTags>"],"userTags":["<userTags>"]}}'
响应示例
200{}变更历史
此 API 暂无变更历史记录。
