huawei-cloud-api-definitions-Workspace 0.1.20250711

Huawei Cloud API definitions, generated from OpenAPI spec
Documentation
1
{"base_path":null,"components":null,"consumes":"[\"application/json\",\"application/json;charset=utf-8\"]","definitions":{"AssignModelInfo":{"description":"批量分配桌面策略。","properties":{"assign_dimension":{"description":"分配的维度,当前支持\n\n- USER: “用户为维度”\n- DESKTOP:“桌面为维度”两种。","enum":["USER","DESKTOP"],"type":"string"},"desktop_assigin_user_num":{"default":1,"description":"每个桌面自动分配的用户数,当子策略为 DESKTOP_ASSIGN_FIXED_USER 必填。","format":"int32","maximum":100,"minimum":0,"type":"integer"},"desktop_name_policy_id":{"description":"策略id,用于指定生成桌面名称策略,如果指定了桌面名称则优先使用指定的桌面名称。","maxLength":36,"minLength":0,"type":"string"},"priority_strategy":{"description":"优先分配的策略,策略名为规则为{维度}_{子策略}\n\n- USER_NO_DESKTOP:  用户维度-无桌面\n- USER_FIXED_DESKTOP_NUM: 用户维度-桌面个数固定\n- DESKTOP_ASSIGN_USER_PRIORITY: 桌面维度-用户优先\n- DESKTOP_ASSIGN_FIXED_USER: 桌面维度-固定用户\n- DESKTOP_ASSIGN_USERS_OR_GROUPS: 桌面维度-为每台桌面分配所选的所有用户(组)\n- FIXED_RELATION: 使用参数中的固定分配关系","enum":["USER_NO_DESKTOP","USER_FIXED_DESKTOP_NUM","DESKTOP_ASSIGN_USER_PRIORITY","DESKTOP_ASSIGN_FIXED_USER","DESKTOP_ASSIGN_USERS_OR_GROUPS","FIXED_RELATION"],"type":"string"},"user_assigin_desktop_num":{"default":1,"description":"每个用户自动分配桌面数,当子策略为 USER_NO_DESKTOP、USER_FIXED_DESKTOP_NUM必填。","format":"int32","maximum":100,"minimum":0,"type":"integer"}}},"AttachInstancesDesktopInfo":{"description":"分配用户请求桌面信息,单人专属桌面只能分配给一个用户;多人共享桌面可以分配给多个用户或用户组,具体分配信息见字段attach_user_infos说明。","properties":{"attach_user_infos":{"description":"待分配的用户信息列表,只有多用户桌面分配多人时有效。","items":{"$ref":"#/definitions/AttachInstancesUserInfo"},"maxItems":500,"minItems":0,"type":"array","x-maxLength":500,"x-minLength":0},"computer_name":{"description":"桌面名,桌面名必须保证唯一。只允许输入大写字母、小写字母、数字、中划线(-)和下划线(_);以字母开头且不允许以中划线(-)结尾;长度范围为[1-15]。","maxLength":15,"minLength":1,"type":"string"},"desktop_id":{"description":"待分配的桌面ID。","maxLength":255,"minLength":0,"type":"string"},"is_clear_data":{"default":true,"description":"该字段只有当解绑和绑定为同一个用户时生效。表示绑定时是否清理桌面数据,true:清理,false:不清理,默认值为true。","type":"boolean"},"user_email":{"description":"合法用户邮箱,桌面分配成功后系统会通过发送邮件的方式通知用户。","maxLength":255,"minLength":0,"type":"string","x-isSensitive":true},"user_group":{"description":"桌面用户所属的用户组,attach_user_infos为空时,必填,attach_user_infos优先级更高。\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-32]。Windows桌面用户最长支持20个字符,Linux桌面用户最长支持32个字符。用户名不能与分配的机器名重名。 attach_user_infos为空时,必填,attach_user_infos优先级更高","maxLength":64,"minLength":1,"type":"string","x-isSensitive":true}}},"AttachInstancesUserInfo":{"description":"桌面分配用户信息。","properties":{"type":{"default":"USER","description":"对象类型,可选值为:\n- USER:用户。\n- GROUP:用户组。","enum":["USER","GROUP"],"maxLength":20,"minLength":1,"type":"string"},"user_group":{"description":"桌面用户所属的用户组。\n- sudo:Linux管理员组。\n- default:Linux默认用户组。\n- administrators:Windows管理员组。管理员拥有对该桌面的完全访问权,可以做任何需要的更改(禁用操作除外)。\n- users:Windows标准用户组。标准用户可以使用大多数软件,并可以更改不影响其他用户的系统设置。","maxLength":255,"minLength":1,"type":"string"},"user_id":{"description":"当type字段为USER时,填写用户id;当type字段为GROUP时,填写用户组id,后端服务会校验组id是否存在;","maxLength":255,"minLength":1,"type":"string"},"user_name":{"description":"桌面分配对象的名称,当type类型USER时填写用户名字;当type类型GROUP时填写用户组名称。\n- 当type类型USER时:桌面所属的用户,当桌面分配成功后此用户可以登录该桌面。只允许输入大写字母、小写字母、数字、中划线(-)和下划线(_)。域类型为LITE_AD时,使用小写字母或者大写字母开头,长度范围为[1-20]。当域类型为LOCAL_AD时,用户名可以使用小写字母或者大写字母或者数字开头,长度范围为[1-64]。Windows桌面用户最长支持20个字符,Linux桌面用户最长支持64个字符。后端服务会校验用户名是否存在,并且用户名不能与机器名重复。\n- 当type类型GROUP时:只能为中文、字母、数字及特殊符号-_。","maxLength":64,"minLength":1,"type":"string","x-isSensitive":true}}},"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"}}},"BatchAttachInstancesReq":{"description":"分配用户请求。","properties":{"assign_model":{"$ref":"#/definitions/AssignModelInfo"},"desktops":{"description":"桌面信息列表。","items":{"$ref":"#/definitions/AttachInstancesDesktopInfo"},"maxItems":100,"minItems":1,"type":"array","x-maxLength":100,"x-minLength":1},"users":{"description":"用户信息列表。","items":{"$ref":"#/definitions/AttachInstancesUserInfo"},"maxItems":100,"minItems":0,"type":"array","x-maxLength":100,"x-minLength":0}}},"BatchAttachInstancesRsp":{"properties":{"job_id":{"description":"分配桌面总任务id。","maxLength":255,"minLength":1,"type":"string"}}}},"description":null,"group_id":"7383c32d5d5e4d0481c071faeb994404","host":"workspace.cn-north-4.myhuaweicloud.com","id":"09c7ea9b078b4bb38ae01e25e31232aa","info_version":"v2","method":"post","name":"BatchAttachInstances","parameters":{},"paths":{"/v2/{project_id}/desktops/batch-attach":{"post":{"description":"批量分配桌面给用户。","operationId":"BatchAttachInstances","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...","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":"BatchAttachInstancesRequestBody","required":true,"schema":{"$ref":"#/definitions/BatchAttachInstancesReq"}}],"responses":{"200":{"description":"批量分配云桌面响应。","examples":{"application/json":{"job_id":"3979904c-7beb-4f34-835f-2fa989a5550a"}},"schema":{"$ref":"#/definitions/BatchAttachInstancesRsp"}},"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-api-type":"open-api","x-apiexplorer-hide":"N","x-apig-group":"internal_token,public","x-apigateway-request-type":"public","x-is-registered":"Y","x-methodAnnotations":["@EnableAuth","@WksIamAuthMeta(resourceField = \"desktops.![desktopId]\")","@WksDependIamAuthMeta(resourceParamSpEL = {\"USER:name:desktops.![attachUserInfos.![userName]]\",\"USER:name:users.![userName]\"})","@IamAuthMeta(authLevel = IamAuthLevel.INSTANCE_LIST, abacAction = \"workspace:desktops:batchAttachUsers\",  needApigwJwtAuthCheck = false, authContextInitializerName = \"workspaceInstanceListAuthContextInitializer\", needRbacCheck = false, needAbacResourceCheck = true)","@CtsMeta(serviceType = \"Workspace\", resourceType = \"workspace\", traceName = \"batchAttachDesktops\")"],"x-request-examples-1":{"assign_model":{"assign_dimension":"USER","desktop_assigin_user_num":2,"priority_strategy":"USER_NO_DESKTOP"},"desktops":[{"desktop_id":"b41a8cc1-4813-47a0-bf3a-7800fcd5b581"},{"desktop_id":"5f4ed564-14eb-44fd-8ff7-0483725a532b"},{"desktop_id":"dfdddcf4-f943-43b4-987b-e5785022d6c5"}],"users":[{"user_id":"3f6cc4c5d1ff4a79ab826b7964e9ff5d","user_name":"user1"},{"user_id":"21bb9f13e6ff42fb96cd62489c446935","user_name":"user2"}]},"x-support-sdk":"Y"}}},"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"}