{"base_path":null,"components":null,"consumes":"[\"application/json\"]","definitions":{"BaseResponse":{"description":"API响应基类","properties":{"error_code":{"description":"错误码。","maxLength":12,"minLength":0,"type":"string"},"error_msg":{"description":"错误描述。","maxLength":1000,"minLength":0,"type":"string"}}},"CreateDesktopReq":{"description":"创建桌面请求。","properties":{"availability_zone":{"description":"可用分区。将桌面创建到指定的可用分区。如果不指定则使用系统随机的可用分区。","maxLength":255,"minLength":0,"type":"string"},"data_volumes":{"description":"数据盘列表。","items":{"$ref":"#/definitions/Volume"},"maxItems":10,"minItems":0,"type":"array","x-maxLength":10,"x-minLength":0},"desktop_name":{"description":"搭配size使用,当size为1时代表桌面名,位数1-15,当size大于1时代表桌面名前缀,位数:1-13。","maxLength":15,"minLength":0,"type":"string"},"desktop_name_policy_id":{"description":"策略id,用于指定生成桌面名称策略,如果指定了桌面名称则优先使用指定的桌面名称。","maxLength":36,"minLength":0,"type":"string"},"desktop_type":{"description":"云桌面类型。\n- DEDICATED:专属桌面,单用户。\n- SHARED: 多用户共享桌面。","enum":["DEDICATED","SHARED"],"maxLength":255,"minLength":0,"type":"string"},"desktops":{"description":"创建桌面使用的参数列表。长度为1-100。\n\n当前不支持一批桌面不同配置,所有桌面的配置和第一台的一致,如果第一台未设置参数,则取外层的同名参数。","items":{"$ref":"#/definitions/Desktop"},"maxItems":100,"minItems":1,"type":"array","x-maxLength":100,"x-minLength":0},"eip":{"$ref":"#/definitions/Eip","description":"Eip信息。"},"email_notification":{"default":true,"description":"创建成功后是否发送邮件通知桌面用户,默认为true。","enum":[true,false],"type":"boolean"},"enterprise_project_id":{"default":"0","description":"企业项目ID,默认\"0\"","maxLength":36,"minLength":0,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"image_id":{"description":"镜像ID,用于私有镜像创建桌面场景,配合product_id使用。","maxLength":255,"minLength":1,"type":"string"},"image_type":{"default":"private","description":"镜像类型。默认值为private。\n\n- private:私有镜像。\n- gold:公共镜像。","maxLength":55,"minLength":1,"type":"string"},"nics":{"description":"桌面对应的网卡信息,如果不指定则使用默认网卡。","items":{"$ref":"#/definitions/Nic"},"maxItems":5,"minItems":0,"type":"array","x-maxLength":5,"x-minLength":0},"product_id":{"description":"套餐ID。","maxLength":255,"minLength":1,"type":"string"},"root_volume":{"$ref":"#/definitions/Volume","description":"系统盘。"},"security_groups":{"description":"桌面使用的安全组,如果不指定则默认使用桌面代理中指定的安全组。","items":{"$ref":"#/definitions/SecurityGroupInfo"},"maxItems":5,"minItems":0,"type":"array","x-maxLength":5,"x-minLength":0},"size":{"description":"创建不分配用户的桌面的个数,和desktops不能同时生效,搭配desktop_name使用。","maximum":100,"minimum":1,"type":"integer"},"tags":{"description":"标签列表。","items":{"$ref":"#/definitions/Tag"},"maxItems":10,"minItems":0,"type":"array","x-is-registered":"Y","x-maxLength":10,"x-minLength":0}},"required":["desktop_type","desktops","image_id","image_type","product_id","root_volume"]},"CreateDesktopRsp":{"description":"创建按需桌面时的响应体,可根据job_id查询资源是否创建成功。","properties":{"job_id":{"description":"创建云桌面总任务id","maxLength":255,"minLength":1,"type":"string"}}},"Desktop":{"properties":{"computer_name":{"description":"桌面名,桌面名必须保证唯一。桌面名称只允许输入大写字母、小写字母、数字、中划线,以字母或数字开头、不能以中划线结尾,长度范围为1~15。","maxLength":15,"minLength":1,"type":"string"},"desktop_name_prefix":{"description":"桌面名称前缀,不指定\"computer_name\"时生效。","maxLength":5,"minLength":0,"type":"string"},"user_email":{"description":"合法用户邮箱,桌面创建成功后系统会通过发送邮件的方式通知用户。","maxLength":255,"minLength":1,"type":"string"},"user_group":{"description":"桌面用户所属的用户组。\n\n- sudo:Linux管理员组。\n- default:Linux默认用户组。\n- administrators:Windows管理员组。管理员拥有对该桌面的完全访问权,可以做任何需要的更改(禁用操作除外)。\n- users:Windows标准用户组。标准用户可以使用大多数软件,并可以更改不影响其他用户的系统设置。","maxLength":255,"minLength":1,"type":"string"},"user_name":{"description":"桌面所属的用户,当桌面创建成功后此用户可以登录该桌面。只允许输入大写字母、小写字母、数字、中划线(-)和下划线(_)。域类型为LITE_AD时,使用小写字母或者大写字母开头,长度范围为[1-20]。当域类型为LOCAL_AD时,用户名可以使用小写字母或者大写字母或者数字开头,长度范围为[1-20]。","maxLength":20,"minLength":1,"type":"string","x-isSensitive":true},"user_phone":{"description":"合法用户手机号。","maxLength":255,"minLength":1,"type":"string"}},"required":["user_name"]},"Eip":{"description":"Eip信息。","properties":{"bandwidth_size":{"description":"带宽大小","format":"int32","maximum":2000,"minimum":1,"type":"integer"},"charge_mode":{"description":"eip带宽计费模式\n- TRAFFIC:按流量计费。\n- BANDWIDTH:按带宽计费。","enum":["TRAFFIC","BANDWIDTH"],"maxLength":10,"minLength":0,"type":"string"},"id":{"description":"桌面绑定的Eip的id,有值时优先绑定Eip。","maxLength":255,"minLength":1,"type":"string"},"type":{"description":"EIP的类型,5_bgp(全动态BGP),5_sbgp(静态BGP)","maxLength":255,"minLength":0,"type":"string"}}},"Nic":{"properties":{"subnet_id":{"description":"网卡对应的子网ID。","maxLength":255,"minLength":0,"type":"string"}},"required":["subnet_id"]},"SecurityGroupInfo":{"properties":{"id":{"description":"安全组ID。","maxLength":255,"minLength":0,"type":"string"}},"required":["id"]},"Tag":{"description":"标签","properties":{"key":{"description":"标签的键,不能为空,最大长度128个unicode字符。大小写字母,数字,可以包含中划线“-”,下划线“_”,不能包含以下字符“=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。","maxLength":128,"minLength":0,"type":"string"},"value":{"default":"","description":"标签的值,最大长度43个unicode字符。大小写字母,数字,可以包含中划线“-”,下划线“_”,不能包含以下字符“=”,“*”,“<”,“>”,“\\”,“,”,“|”,“/”。","maxLength":43,"minLength":0,"type":"string"}},"required":["key"]},"Volume":{"description":"磁盘","properties":{"size":{"description":"磁盘容量,单位GB。系统盘大小范围[80-32760],数据盘范围[10-32760],大小为10的倍数。","maximum":32760,"minimum":10,"type":"integer"},"type":{"description":"桌面数据盘对应的磁盘类型,需要与系统所提供的磁盘类型相匹配。\n\n-SAS:高IO。\n-SSD:超高IO。","maxLength":255,"minLength":1,"type":"string"}},"required":["size","type"]}},"description":null,"group_id":"7383c32d5d5e4d0481c071faeb994404","host":"workspace.cn-north-4.myhuaweicloud.com","id":"92de1dfa7b504836b3c54bba1feecec5","info_version":"v2","method":"post","name":"CreateDesktop","parameters":{},"paths":{"/v2/{project_id}/desktops":{"post":{"description":"创建桌面,并将此桌面分配给用户,当桌面创建成功后用户可以登录使用。","operationId":"CreateDesktop","parameters":[{"description":"用户Token。\n\n通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。","in":"header","maxLength":15000,"minLength":1,"name":"X-Auth-Token","required":true,"type":"string","x-annotations":"@Size(max = 15000, min = 1)","x-example":"MIIDkgYJKoZIhvcNAQcCoIIDgzCCXXXXXX...","x-is-registered":"N"},{"description":"发送的实体的MIME类型。","in":"header","maxLength":255,"minLength":1,"name":"Content-Type","required":false,"type":"string","x-annotations":"@Size(max = 255, min = 1)","x-example":"application/json"},{"description":"项目ID。","in":"path","maxLength":255,"minLength":1,"name":"project_id","required":true,"type":"string","x-annotations":"@Size(max = 255, min = 1)","x-example":"2b31ed520xxxxxxebedb6e57xxxxxxxx"},{"description":"创建云桌面请求。","in":"body","name":"CreateDesktopRequestBody","required":true,"schema":{"$ref":"#/definitions/CreateDesktopReq"}}],"responses":{"200":{"description":"创建云桌面响应。","examples":{"application/json":{"job_id":"3979904c-7beb-4f34-835f-2fa989a5550a"}},"schema":{"$ref":"#/definitions/CreateDesktopRsp"}},"400":{"description":"由于包含语法错误,当前请求无法被服务器理解。","schema":{"$ref":"#/definitions/BaseResponse"}},"401":{"description":"鉴权失败。","schema":{"$ref":"#/definitions/BaseResponse"}},"403":{"description":"没有操作权限。","schema":{"$ref":"#/definitions/BaseResponse"}},"404":{"description":"找不到资源。","schema":{"$ref":"#/definitions/BaseResponse"}},"500":{"description":"服务内部错误,具体返回错误码请参见错误码说明。","schema":{"$ref":"#/definitions/BaseResponse"}}},"schemes":["https"],"summary":"创建桌面","tags":["Desktop"],"x-apiexplorer-hide":"N","x-apig-group":"public,internal_token,internal_appcode","x-apigateway-request-type":"public","x-is-registered":"Y","x-request-examples-1":{"availability_zone":"az3.manage.x86","desktop_type":"DEDICATED","desktops":[{"user_email":"aaaaa@huawei.com","user_group":"administrators","user_name":"ljh-002"}],"email_notification":true,"image_id":"a866298d-67db-44b0-a1f1-9d09bdddc20f","image_type":"gold","nics":[{"subnet_id":"5dee0216-2260-47c2-9368-98a27d910e55"}],"product_id":"workspace.c2.large.windows.2","root_volume":{"size":80,"type":"SAS"}},"x-request-examples-text-1":{"availability_zone":"az3.manage.x86","desktop_type":"DEDICATED","desktops":[{"user_email":"aaaaa@huawei.com","user_group":"administrators","user_name":"ljh-002"}],"email_notification":true,"image_id":"a866298d-67db-44b0-a1f1-9d09bdddc20f","image_type":"gold","nics":[{"subnet_id":"5dee0216-2260-47c2-9368-98a27d910e55"}],"product_id":"workspace.c2.large.windows.2","root_volume":{"size":80,"type":"SAS"}},"x-support-sdk":"Y","x-workspace-api-auth":"CBC"}}},"product_short":"Workspace","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"创建桌面","tags":"桌面","uri":null,"version":"2.0"}