{"base_path":null,"components":null,"consumes":"[\"application/json\"]","definitions":{"BadRequestErrorResp":{"description":"API错误响应。","properties":{"error_code":{"description":"错误码,失败时返回。","example":"WKS.00211102","readOnly":true,"type":"string"},"error_msg":{"description":"错误描述。","example":"The parameter is invalid.","readOnly":true,"type":"string"}}},"ConflictErrorResp":{"description":"API错误响应。","properties":{"error_code":{"description":"错误码,失败时返回。","example":"WKS.00211103","readOnly":true,"type":"string"},"error_msg":{"description":"错误描述。","example":"The request could not be completed due to a conflict of the resource.","readOnly":true,"type":"string"}}},"CreateImageServerReq":{"description":"创建镜像实例请求。","properties":{"attach_apps":{"description":"云应用仓库软件唯一标识请求列表。","example":["3f791197-d166-4c8e-81e4-38c40ffc1989","62f48b59-0ebb-4b1e-ad35-f64948a0591b"],"items":{"description":"云应用仓库软件唯一标识。","maxLength":128,"minLength":1,"type":"string"},"maxItems":100,"minItems":0,"type":"array","uniqueItems":true},"authorize_accounts":{"description":"应用组授权用户,\n* 限制用户类型:'USER' - 用户","items":{"$ref":"#/definitions/ImageAccountInfo"},"maxItems":1,"minItems":1,"type":"array"},"availability_zone":{"default":"","description":"镜像实例的可用区,空值表示随机选取可用区。","example":"cn-north-5a","maxLength":255,"minLength":0,"type":"string"},"description":{"default":"","description":"镜像实例描述。","example":"流程开发应用镜像 Windows Server 2016","maxLength":255,"minLength":0,"type":"string"},"enterprise_project_id":{"description":"**⚠ : 此属性是预留字段,不需要传值,目前镜像产物默认属于default企业项目**\n镜像所属的企业项目ID,默认属于default企业项目。\n关于企业项目ID的获取及企业项目特性的详细信息,请参考“[企业中心总览](https://support.huaweicloud.com/zh-cn/usermanual-em/zh-cn_topic_0123692049.html)”。","example":"0","maxLength":64,"minLength":0,"type":"string"},"extra_session_size":{"description":"需要付费的会话数,单位/个。","example":2,"maximum":10000,"minimum":1,"type":"integer"},"extra_session_type":{"$ref":"#/definitions/ExtraSessionTypeEnum"},"flavor_id":{"description":"规格ID。","example":"c3.large.4","maxLength":255,"minLength":1,"type":"string"},"image_ref":{"$ref":"#/definitions/ImageRef"},"is_vdi":{"default":false,"description":"是否为vdi单会话模式。","example":false,"type":"boolean"},"name":{"description":"镜像实例名称,名称需满足如下规则:\n1. 由中文,英文大小写,数字,_-组成,不能有空格\n2. 长度范围1~64个字符","example":"流程开发应用镜像","maxLength":64,"minLength":1,"pattern":"^(?! +$)[\\w\\u4e00-\\u9fa5\\u002d_][\\w\\u4e00-\\u9fa5\\u002d_]{0,63}$","type":"string"},"ou_name":{"default":"","description":"组织名称。","example":"wksappusers","maxLength":255,"minLength":0,"type":"string"},"product_id":{"description":"镜像实例产品套餐ID。","example":"966e942b-ca09-4edc-8de7-9be0ccc350e1","maxLength":128,"minLength":1,"type":"string"},"root_volume":{"$ref":"#/definitions/Volume","description":"镜像实例系统盘配置信息。"},"route_policy":{"$ref":"#/definitions/RoutePolicy"},"scheduler_hints":{"$ref":"#/definitions/WdhParam"},"subnet_id":{"description":"镜像实例网卡对应的子网唯一标识。","example":"0ddf778f-c0fe-4717-9251-001caee7c95e","maxLength":128,"minLength":1,"type":"string"},"tags":{"description":"标签信息,最多包含20个key,不允许重复。","items":{"$ref":"#/definitions/TmsTag"},"maxItems":20,"minItems":0,"type":"array"},"vpc_id":{"description":"镜像实例所属虚拟私有云唯一标识。","example":"6d611025-b2e1-4877-b237-5eb10d37d86a","maxLength":128,"minLength":1,"type":"string"}},"required":["authorize_accounts","image_ref","name","product_id","root_volume","subnet_id","vpc_id"]},"CreateImageServerResp":{"allOf":[{"$ref":"#/definitions/JobIdInfo"}],"description":"创建按需镜像实例时的响应体,可根据job_id查询资源是否创建成功。"},"ExtraSessionTypeEnum":{"description":"付费会话类型\n* `GPU` - GPU规格会话\n* `CPU` - 普通CPU规格会话","enum":["GPU","CPU"],"example":"CPU","type":"string"},"ForbiddenErrorResp":{"description":"API错误响应。","properties":{"error_code":{"description":"错误码,失败时返回。","example":"WKS.00081102","readOnly":true,"type":"string"},"error_msg":{"description":"错误描述。","example":"User does not have permission to access this resource.","readOnly":true,"type":"string"}}},"ImageAccountInfo":{"description":"用户详细信息。","properties":{"account":{"description":"用户(组)。","example":"zhangsan***@test.com","maxLength":128,"minLength":1,"type":"string"},"account_type":{"description":"用户类型:\n* `USER` - 用户\n* `USER_GROUP` - 用户组","enum":["USER","USER_GROUP"],"example":"USER_GROUP","type":"string"},"domain":{"description":"域名称。","example":"siv.***.huawei.com","maxLength":64,"minLength":0,"type":"string"}},"required":["account","account_type"],"type":"object"},"ImageRef":{"description":"镜像源信息。","properties":{"id":{"description":"镜像源的唯一标识。","example":"1","maxLength":128,"minLength":1,"type":"string"},"image_type":{"description":"镜像源的镜像类型:\n* `gold` - 云市场镜像\n* `public` - 公共镜像\n* `private` - 私有镜像\n* `shared` - 共享镜像\n* `other` - 其他","enum":["gold","public","private","shared","other"],"example":"private","type":"string"},"product_id":{"default":"","description":"镜像源的产品ID,对于`gold`镜像类型,这个值是的必须项。","example":"00301-1238008-0--0","pattern":"^\\S{0,100}$","type":"string"},"spce_code":{"default":"","description":"镜像源的规格编码,对于`gold`镜像类型,这个值是的必须项。","example":"78b3e72878a81a9b3bfd2b3c912c0f58","pattern":"^\\S{0,100}$","type":"string"}},"required":["id","image_type"],"type":"object"},"InternalServerErrorResp":{"description":"API错误响应。","properties":{"error_code":{"description":"错误码,失败时返回。","example":"WKS.00211401","readOnly":true,"type":"string"},"error_msg":{"description":"错误描述。","example":"The requested operation failed. Please try again later.","readOnly":true,"type":"string"}}},"JobIdInfo":{"properties":{"job_id":{"description":"任务ID。","example":"84d5dd05-2977-4e37-8409-cf0b027f6a5b","readOnly":true,"type":"string"}}},"MethodNotAllowedErrorResp":{"description":"API错误响应。","properties":{"error_code":{"description":"错误码,失败时返回。","example":"WKS.00000405","readOnly":true,"type":"string"},"error_msg":{"description":"错误描述。","example":"The method specified in the request is not allowed for this resource.","readOnly":true,"type":"string"}}},"NotFoundErrorResp":{"description":"API错误响应。","properties":{"error_code":{"description":"错误码,失败时返回。","example":"WKS.00211902","readOnly":true,"type":"string"},"error_msg":{"description":"错误描述。","example":"The application does not exist","readOnly":true,"type":"string"}}},"RoutePolicy":{"description":"路由策略。","properties":{"cpu_threshold":{"description":"cpu使用率阈值,单位为%。","example":85,"maximum":100,"minimum":1,"type":"integer"},"max_session":{"description":"单台服务器最大的连接会话数。","example":2,"maximum":1024,"minimum":1,"type":"integer"},"mem_threshold":{"description":"内存使用率阈值,单位为%。","example":85,"maximum":100,"minimum":1,"type":"integer"}}},"ServiceUnavailableErrorResp":{"description":"API错误响应。","properties":{"error_code":{"description":"错误码,失败时返回。","example":"WKS.00050902","readOnly":true,"type":"string"},"error_msg":{"description":"错误描述。","example":"The service is now unavailable to process the request.","readOnly":true,"type":"string"}}},"TmsTag":{"description":"tms标签。","properties":{"key":{"description":"键。最大长度128个unicode字符。\n1. 可用 UTF-8 格式表示的字母(包含中文、西班牙语、葡语等)、数字和空格,以及以下字符: _ . : = + - @\n2. 两头不能有空白字符","example":"demo01","pattern":"^((?!_sys_)[\\p{L}\\p{Z}\\p{N}_.:=+\\-@]{1,128})(?<!\\s)$","type":"string"},"value":{"description":"值。每个值最大长度255个unicode字符。\n1. 可用 UTF-8 格式表示的字母(包含中文、西班牙语、葡语等)、数字和空格,以及以下字符: _ . : = + - @","example":"01","pattern":"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]{0,255})$","type":"string"}},"required":["key","values"]},"UnauthorizedErrorResp":{"description":"API错误响应。","properties":{"error_code":{"description":"错误码,失败时返回。","example":"WKS.00211302","readOnly":true,"type":"string"},"error_msg":{"description":"错误描述。","example":"User authorization error.","readOnly":true,"type":"string"}}},"Volume":{"description":"磁盘。","properties":{"cluster_id":{"description":"云服务器系统盘对应的存储池的ID。","example":"c950ee97-587c-4f24-8a74-3367e3da570f","maxLength":255,"minLength":0,"type":"string"},"size":{"description":"磁盘容量,单位GB,数值约束为10的倍数。\n* `系统盘` minLength: 10,maxLength: 1024\n* `数据盘` minLength: 10,maxLength: 32768","example":10,"maximum":32768,"minimum":10,"type":"integer"},"type":{"$ref":"#/definitions/VolumeType"}},"required":["size","type"]},"VolumeType":{"description":"磁盘类型,获取可用磁盘类型详见接口磁盘管理ListVolumeType。\n* `ESSD` - 极速型SSD\n* `SSD` - 超高IO\n* `GPSSD` - 通用型SSD\n* `SAS` - 高IO\n* `SATA` - 普通IO","enum":["ESSD","SSD","GPSSD","SAS","SATA"],"example":"SSD","type":"string"},"WdhParam":{"description":"wdh参数。","properties":{"dedicated_host_id":{"description":"云办公主机id。","maxLength":255,"minLength":0,"type":"string"},"tenancy":{"description":"类型。","maxLength":255,"minLength":1,"type":"string"}},"title":"WdhParam","type":"object"}},"description":null,"group_id":"fe7dbee2e20f4aa589be7dce935a38ad","host":"appstream.cn-north-4.myhuaweicloud.com","id":"8f0b05f358d8465a84ee09765eb45357","info_version":"v1","method":"post","name":"CreateImageServer","parameters":{},"paths":{"/v1/{project_id}/image-servers":{"post":{"description":"创建镜像实例。","operationId":"CreateImageServer","parameters":[{"description":"用户Token。\n通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。","in":"header","maxLength":2147483647,"minLength":1,"name":"X-Auth-Token","required":false,"type":"string","x-example":"MIIDkgYJKoZIhvcNAQcCoIIDgzCCXXXXXX...","x-is-registered":"N"},{"description":"CBC接口回调时,请求头里带上的业务ID。","in":"header","maxLength":64,"minLength":0,"name":"Service-Transaction-Id","required":false,"type":"string","x-example":"MIIDkgYJKoZIhvcNAQcCoIIDgzCCXXXXXX..."},{"description":"交易组件调用时下发的关联ID。","in":"header","maxLength":64,"minLength":0,"name":"X-Linked-Id","required":false,"type":"string","x-example":"MIIDkgYJKoZIhvcNAQcCoIIDgzCCXXXXXX..."},{"description":"项目唯一标识。","in":"path","maxLength":128,"minLength":1,"name":"project_id","required":true,"type":"string","x-example":"2b31ed520xxxxxxebedb6e57xxxxxxxx"},{"description":"创建镜像实例请求内容。","in":"body","name":"CreateImageServerRequestBody","required":true,"schema":{"$ref":"#/definitions/CreateImageServerReq"}}],"responses":{"200":{"description":"成功响应。","examples":{"application/json":{"job_id":"697612196825268224"}},"schema":{"$ref":"#/definitions/CreateImageServerResp"}},"400":{"description":"由于包含语法错误,当前请求无法被服务器理解。","schema":{"$ref":"#/definitions/BadRequestErrorResp"}},"401":{"description":"鉴权失败。","schema":{"$ref":"#/definitions/UnauthorizedErrorResp"}},"403":{"description":"没有操作权限。","schema":{"$ref":"#/definitions/ForbiddenErrorResp"}},"404":{"description":"找不到资源。","schema":{"$ref":"#/definitions/NotFoundErrorResp"}},"405":{"description":"请求中指定的方法不被允许。","schema":{"$ref":"#/definitions/MethodNotAllowedErrorResp"}},"409":{"description":"请求中冲突。","schema":{"$ref":"#/definitions/ConflictErrorResp"}},"500":{"description":"服务内部错误,具体返回错误码请参见错误码说明。","schema":{"$ref":"#/definitions/InternalServerErrorResp"}},"503":{"description":"服务不可用。","schema":{"$ref":"#/definitions/ServiceUnavailableErrorResp"}}},"security":[{"apig-auth-iam-used-authn5":[]}],"summary":"创建镜像实例","tags":["ImageServer"],"x-api-type":"open-api","x-apiexplorer-hide":"N","x-apig-group":"internal,public","x-apigateway-backend":{"httpVpcEndpoints":{"description":"","method":"post","name":"wks-imagemanager-lb","path":"/v1/{project_id}/image-servers","scheme":"https","timeout":30000},"parameters":[{"description":"","in":"header","name":"X-Auth-Token","origin":"request","value":"X-Auth-Token"},{"description":"","in":"path","name":"project_id","origin":"request","value":"project_id"}],"type":"HTTP-VPC"},"x-apigateway-cors":false,"x-apigateway-match-mode":"NORMAL","x-apigateway-ratelimit":"workspace_default_operate","x-apigateway-request-type":"public","x-is-registered":"N","x-request-examples-1":{"attach_apps":[],"authorize_accounts":[{"account":"administrator","account_type":"USER","domain":"wksapp**.huawei.com"}],"availability_zone":"","description":"测试镜像创建。","image_ref":{"id":"da02e5ca-c6ec-4685-8ecb-f116bb5bdd2c","image_type":"gold","product_id":"OFFI874943784560095232","spce_code":"90a6e84bb3e822fe54999b6be5bbae1e"},"is_vdi":true,"name":"镜像任务0508","product_id":"workspace.x86.performance.xlarge4","root_volume":{"size":60,"type":"SATA"},"subnet_id":"a5842cb4-5718-4b0a-8b27-3a3e9c74f977","vpc_id":"59785ba5-e5d5-4836-b9de-19f22ac15175"},"x-request-examples-url-1":"POST /v1/a4da8115c9d8464ead3a38309130523f/image-servers","x-support-sdk":"Y"}}},"product_short":"WorkspaceApp","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":{"apig-auth-app":{"in":"header","name":"Authorization","type":"apiKey","x-apigateway-auth-type":"AppSigv1"},"apig-auth-iam":{"in":"header","name":"unused","type":"apiKey","x-apigateway-auth-type":"IAM"},"apig-auth-iam-used-authn5":{"in":"header","name":"unused","type":"apiKey","x-apigateway-auth-opt":{"inner-auth-type":"iam_auth_n5"},"x-apigateway-auth-type":"IAM"}},"summary":"创建镜像实例","tags":"镜像管理","uri":null,"version":"2.0"}