huawei-cloud-api-definitions-Workspace 0.1.20260425

Huawei Cloud API definitions, generated from OpenAPI spec
Documentation
1
{"base_path":null,"components":null,"consumes":"[\"application/json\",\"application/json;charset=utf-8\",\"application/json;charset=UTF-8\"]","definitions":{"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_detail":{"description":"错误详情。","maxLength":1000,"minLength":0,"type":"string"},"error_msg":{"description":"错误描述。","maxLength":1000,"minLength":0,"type":"string"}}},"BatchActionDesktopsRsp":{"description":"批量操作桌面响应。","properties":{"failed_operation_list":{"description":"操作失败桌面列表。","items":{"$ref":"#/definitions/VmOperateResult"},"maxItems":100,"minItems":0,"type":"array","x-maxLength":100,"x-minLength":0},"job_id":{"description":"任务ID,池桌面返回job_id,普通桌面job_id为空。","maxLength":255,"minLength":0,"type":"string"},"success_job_ids":{"description":"内部服务操作成功jobId","items":{"maxLength":255,"minLength":0,"type":"string"},"readOnly":true,"type":"array"}}},"BatchDetachInstancesReq":{"description":"批量解绑用户请求。","properties":{"desktops":{"description":"解绑的桌面信息列表。","items":{"$ref":"#/definitions/DetachInstancesDesktopInfo"},"maxItems":100,"minItems":1,"type":"array","x-maxLength":100,"x-minLength":1}}},"DetachInstancesDesktopInfo":{"description":"分配用户请求桌面信息。","properties":{"desktop_id":{"description":"分配的桌面ID。","maxLength":255,"minLength":1,"type":"string"},"detach_user_infos":{"description":"解分配的用户信息列表。","items":{"$ref":"#/definitions/DetachInstancesUserInfo"},"maxItems":500,"minItems":0,"type":"array","x-maxLength":500,"x-minLength":0},"is_detach_all_users":{"default":false,"description":"表示解关联所有用户:true,如果指定那么detach_user_infos会失效;指定解关联用户:false,通过detach_user_infos指定解关联的用户。","type":"boolean"}}},"DetachInstancesUserInfo":{"description":"桌面解分配用户信息。","properties":{"domain":{"description":"用户所属域。","type":"string"},"type":{"default":"USER","description":"对象类型,可选值为,默认值为USER:\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}},"required":["user_name"]},"VmOperateResult":{"description":"操作失败的桌面列表。","properties":{"desktop_id":{"description":"桌面ID。","maxLength":255,"minLength":0,"type":"string"},"desktop_name":{"description":"桌面名称。","maxLength":255,"minLength":0,"type":"string"},"error_code":{"description":"操作失败的错误码。","maxLength":255,"minLength":0,"type":"string"},"error_msg":{"description":"操作失败的原因描述。","maxLength":1000,"minLength":0,"type":"string"}}}},"description":null,"group_id":"7383c32d5d5e4d0481c071faeb994404","host":"workspace.cn-north-4.myhuaweicloud.com","id":"be6b1db32f7e4167b883cfd00bce2857","info_version":"v2","method":"post","name":"BatchDetachInstances","parameters":{},"paths":{"/v2/{project_id}/desktops/batch-detach":{"post":{"description":"批量将桌面和用户解绑。","operationId":"BatchDetachInstances","parameters":[{"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":"BatchDetachInstancesRequestBody","required":true,"schema":{"$ref":"#/definitions/BatchDetachInstancesReq"}}],"responses":{"200":{"description":"正常。","examples":{"application/json":{"failed_operation_list":[],"job_id":"string"}},"schema":{"$ref":"#/definitions/BatchActionDesktopsRsp"}},"400":{"description":"由于包含语法错误,当前请求无法被服务器理解。","schema":{"$ref":"#/definitions/BaseResponse"}},"401":{"description":"鉴权失败。","schema":{"$ref":"#/definitions/BaseResponse"}},"403":{"description":"没有操作权限。","schema":{"$ref":"#/definitions/BaseResponse"}},"404":{"description":"找不到资源。","schema":{"$ref":"#/definitions/BaseResponse"}},"409":{"description":"操作冲突。","schema":{"$ref":"#/definitions/BaseResponse"}},"500":{"description":"服务内部错误,具体返回错误码请参见错误码说明。","schema":{"$ref":"#/definitions/BaseResponse"}}},"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.![detachUserInfos.![userName]]\"})","@IamAuthMeta(authLevel = IamAuthLevel.INSTANCE_LIST, abacAction = \"workspace:desktops:batchDetach\",  needApigwJwtAuthCheck = false, authContextInitializerName = \"workspaceInstanceListAuthContextInitializer\", needRbacCheck = false, needAbacResourceCheck = true)","@CtsMeta(serviceType = \"Workspace\", resourceType = \"workspace\", traceName = \"batchDetachDesktops\")"],"x-request-examples-1":{"desktops":[{"desktop_id":"string","detach_user_infos":[{"type":"USER","user_group":"string","user_id":"string","user_name":"string"}],"is_detach_all_users":"false"}]},"x-request-examples-text-1":{"desktops":[{"desktop_id":"string","detach_user_infos":[{"type":"USER","user_group":"string","user_id":"string","user_name":"string"}],"is_detach_all_users":"false"}]},"x-request-examples-url-1":"POST /v2/0bec5db98280d2d02fd6c00c2de791ce/desktops/batch-detach","x-support-hcs":"Y","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"}