{"base_path":null,"components":null,"consumes":"[\"application/json\",\"application/json;charset=utf-8\"]","definitions":{"AuthorizedObjects":{"description":"查询桌面池授权的用户、用户组响应的用户/用户组信息。","properties":{"created_at":{"description":"创建时间。格式为:UTC格式,例如“2022-05-11T11:45:42.000Z”。","maxLength":100,"minLength":0,"type":"string"},"object_id":{"description":"用户/用户组id。","maxLength":255,"minLength":1,"type":"string"},"object_name":{"description":"用户/用户组名称。","maxLength":100,"minLength":1,"type":"string"},"object_type":{"description":"绑定对象类型枚举。\n\n- USER:用户\n- USER_GROUP:用户组","enum":["USER","USER_GROUP"],"maxLength":100,"minLength":1,"type":"string"},"user_group":{"description":"桌面用户所属的用户权限组。\n\n- sudo:Linux管理员组。\n- default:Linux默认用户组。\n- administrators:Windows管理员组。管理员拥有对该桌面的完全访问权,可以做任何需要的更改(禁用操作除外)。\n- users:Windows标准用户组。标准用户可以使用大多数软件,并可以更改不影响其他用户的系统设置。","maxLength":55,"minLength":1,"type":"string"}},"required":["object_id","object_name","object_type","user_group"]},"AutoscalePolicy":{"description":"弹性伸缩策略。","properties":{"autoscale_type":{"description":"弹性伸缩类型,ACCESS_CREATED:接入时创建,AUTO_CREATED:弹性伸缩。","enum":["ACCESS_CREATED","AUTO_CREATED"],"maxLength":55,"minLength":0,"type":"string"},"max_auto_created":{"description":"自动创建桌面上限。","maximum":1000,"minimum":1,"type":"integer"},"min_idle":{"description":"空闲桌面低于多少时开始自动创建桌面。","maximum":1000,"minimum":1,"type":"integer"},"once_auto_created":{"description":"一次自动创建桌面的数量。","maximum":100,"minimum":1,"type":"integer"}}},"BaseResponse":{"description":"API响应基类。","properties":{"encoded_authorization_message":{"description":"加密后的详细拒绝原因,用户可以自行调用STS服务的decode-authorization-message接口进行解密。","readOnly":true,"type":"string"},"error_code":{"description":"错误码。","maxLength":12,"minLength":0,"type":"string"},"error_msg":{"description":"错误描述。","maxLength":1000,"minLength":0,"type":"string"}}},"CreateDesktopPoolReq":{"description":"创建桌面请求。","properties":{"authorized_objects":{"description":"要授权的用户/用户组列表。","items":{"$ref":"#/definitions/AuthorizedObjects"},"maxItems":500,"minItems":0,"type":"array","x-maxLength":500,"x-minLength":0},"autoscale_policy":{"$ref":"#/definitions/AutoscalePolicy"},"availability_zone":{"description":"可用分区。将桌面创建到指定的可用分区。如果不指定则使用系统随机的可用分区。","maxLength":255,"minLength":0,"type":"string"},"data_volumes":{"description":"数据盘列表。","items":{"$ref":"#/definitions/VolumeInfo"},"maxItems":10,"minItems":0,"type":"array","x-maxLength":10,"x-minLength":0},"description":{"description":"桌面池描述。","maxLength":255,"minLength":0,"type":"string"},"desktop_name_policy_id":{"description":"策略id,用于指定生成桌面名称策略。","maxLength":36,"minLength":0,"type":"string"},"disconnected_retention_period":{"description":"动态池桌面断连多少分钟内,保留用户与桌面的绑定关系,超时后自动解绑。","maximum":43200,"minimum":10,"type":"integer"},"enable_autoscale":{"default":false,"description":"桌面池是否开启弹性伸缩类型,为false则表示不开启弹性伸缩,为true则表示开启弹性伸缩。","type":"boolean"},"enterprise_project_id":{"default":"0","description":"企业项目ID,默认\"0。\"","maxLength":36,"minLength":0,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"flavor_id":{"description":"产品规格ID。可用区是边缘可用区时,必填此参数。","maxLength":255,"minLength":1,"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"},"name":{"description":"桌面池名称,桌面池名称必须保证唯一。桌面名称只允许输入中文、大写字母、小写字母、数字、中划线,长度范围为1~255。","maxLength":255,"minLength":1,"type":"string"},"ou_name":{"description":"OU名称,在对接AD时使用,需提前在AD中创建OU。","maxLength":255,"minLength":0,"type":"string"},"product_id":{"description":"套餐ID。","maxLength":255,"minLength":1,"type":"string"},"root_volume":{"$ref":"#/definitions/VolumeInfo","description":"系统盘。"},"security_groups":{"description":"桌面使用的安全组,如果不指定则默认使用桌面代理中指定的安全组。","items":{"$ref":"#/definitions/SecurityGroup"},"maxItems":5,"minItems":0,"type":"array","x-maxLength":5,"x-minLength":0},"size":{"description":"桌面池大小:当前桌面池要创建多少台桌面。","maximum":100,"minimum":0,"type":"integer"},"subnet_ids":{"description":"创建桌面使用的子网ID。","items":{"maxLength":55,"minLength":0,"type":"string"},"maxItems":100,"minItems":0,"type":"array","x-maxLength":100,"x-minLength":0},"tags":{"description":"标签列表。","items":{"$ref":"#/definitions/Tag"},"maxItems":10,"minItems":0,"type":"array","x-maxLength":10,"x-minLength":0},"type":{"description":"桌面池类型,DYNAMIC:动态池,STATIC:静态池。","enum":["DYNAMIC","STATIC"],"maxLength":255,"minLength":0,"type":"string"},"vpc_id":{"description":"创建桌面时的VPC ID。","maxLength":255,"minLength":1,"type":"string"}},"required":["image_id","image_type","name","product_id","root_volume","size","subnet_ids","type"]},"CreateDesktopPoolRsp":{"allOf":[{"$ref":"#/definitions/CreateDesktopRsp"}],"description":"创建按需桌面时的响应体,可根据job_id查询资源是否创建成功。"},"CreateDesktopRsp":{"description":"创建按需桌面时的响应体,可根据job_id查询资源是否创建成功。","properties":{"job_id":{"description":"创建云桌面总任务id。","maxLength":255,"minLength":1,"type":"string"}}},"SecurityGroup":{"description":"安全组。","properties":{"id":{"description":"安全组ID。","maxLength":255,"minLength":0,"type":"string"},"name":{"description":"安全组名称。","maxLength":55,"minLength":0,"type":"string"}},"required":["id"]},"Tag":{"description":"标签。","properties":{"key":{"description":"标签的键,不能为空,最大长度128个unicode字符。标签的键可以包含任意语种字母、数字、空格和_.:=+-@,但首尾不能含有空格,不能以_sys_开头。","maxLength":128,"minLength":0,"type":"string"},"value":{"default":"","description":"标签的值,最大长度43个unicode字符。标签的值可以包含任意语种字母、数字、空格和_.:=+-@,但首尾不能含有空格。","maxLength":43,"minLength":0,"type":"string"}},"required":["key"]},"VolumeInfo":{"description":"磁盘信息。","properties":{"id":{"description":"批量操作磁盘的磁盘集合id。","maxLength":255,"minLength":1,"type":"string"},"resource_spec_code":{"description":"规格。","maxLength":255,"minLength":0,"type":"string"},"size":{"description":"磁盘容量,单位GB。","maximum":8200,"minimum":0,"type":"integer"},"type":{"description":"桌面数据盘对应的磁盘类型,需要与系统所提供的磁盘类型相匹配。\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":"a86a4a0648464d2bb432d39ba1c431ee","info_version":"v2","method":"post","name":"CreateDesktopPool","parameters":{},"paths":{"/v2/{project_id}/desktop-pools":{"post":{"description":"创建桌面池,可将此桌面池分配给用户、用户组,用户登录时会绑定其中一个桌面。\n注:需通过开通委托功能接口先对云服务进行授权才可以使用该功能","operationId":"CreateDesktopPool","parameters":[{"description":"用户Token。\n\n通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。","in":"header","maxLength":40000,"minLength":1,"name":"X-Auth-Token","required":false,"type":"string","x-annotations":"@Size(max = 40000, min = 1)","x-example":"MIIDkgYJKoZIhvcNAQcCoIIDgzCCXXXXXX..."},{"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":"CreateDesktopPoolRequestBody","required":true,"schema":{"$ref":"#/definitions/CreateDesktopPoolReq"}}],"responses":{"200":{"description":"创建桌面池响应。","examples":{"application/json":{"job_id":"3979904c-7beb-4f34-835f-2fa989a5550a"}},"schema":{"$ref":"#/definitions/CreateDesktopPoolRsp"}},"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":["DesktopPool"],"x-api-type":"open-api","x-apiexplorer-hide":"N","x-apig-group":"public,internal_token,internal_appcode","x-apigateway-request-type":"public","x-imports":["com.huawei.workspace.auth.iam5.WksIamAuthMeta","com.huawei.workspace.auth.iam5.OperationType","com.huawei.workspace.auth.iam5.ResourceType","com.huawei.clouds.wushan.auth.token.IamAuthMeta","com.huawei.clouds.wushan.auth.token.IamAuthLevel","com.huawei.clouds.wushan.integration.common.auth.EnableAuth","com.huawei.clouds.wushan.cts.meta.CtsMeta"],"x-is-registered":"Y","x-methodAnnotations":["@EnableAuth","@WksIamAuthMeta(operationType=OperationType.CREATE, resourceType=ResourceType.DESKTOP_POOL, tagField = \"tags\")","@IamAuthMeta(authLevel = IamAuthLevel.INSTANCE_LIST, abacAction = \"workspace:desktopPools:create\", needApigwJwtAuthCheck = false, authContextInitializerName = \"createDesktopPoolsAuthContextInitializer\", needRbacCheck = false, needAbacResourceCheck = true)","@CtsMeta(serviceType = \"Workspace\", resourceType = \"workspace\", traceName = \"createDesktopPool\")"],"x-request-examples-1":{"availability_zone":"az3.manage.x86","image_id":"a866298d-67db-44b0-a1f1-9d09bdddc20f","image_type":"gold","name":"POOL01","product_id":"workspace.c2.large.windows.2","root_volume":{"size":80,"type":"SAS"},"size":50,"subnet_ids":["5dee0216-2260-47c2-9368-98a27d910e55"],"type":"STATIC"},"x-request-examples-text-1":{"availability_zone":"az3.manage.x86","image_id":"a866298d-67db-44b0-a1f1-9d09bdddc20f","image_type":"gold","name":"POOL01","product_id":"workspace.c2.large.windows.2","root_volume":{"size":80,"type":"SAS"},"size":50,"subnet_ids":["5dee0216-2260-47c2-9368-98a27d910e55"],"type":"STATIC"},"x-support-sdk":"Y","x-workspace-api-auth":"CBC"}}},"product_short":"Workspace","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"}