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":{"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}}},"AttachInstancesReq":{"description":"分配用户请求。","properties":{"desktop_name_policy_id":{"description":"策略id,用于指定生成桌面名称策略,如果指定了桌面名称则优先使用指定的桌面名称。","maxLength":36,"minLength":0,"type":"string"},"desktops":{"description":"桌面信息列表。","items":{"$ref":"#/definitions/AttachInstancesDesktopInfo"},"maxItems":50,"minItems":1,"type":"array","x-maxLength":50,"x-minLength":1},"image_id":{"description":"模板ID,涉及变更镜像时需传(可选)。","maxLength":255,"minLength":1,"type":"string"},"image_type":{"description":"镜像类型,涉及变更镜像时需传(可选)。","maxLength":255,"minLength":0,"type":"string"}}},"AttachInstancesRsp":{"description":"分配用户响应。","properties":{"job_id":{"description":"创建分配桌面总任务id。","maxLength":255,"minLength":1,"type":"string"}}},"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"}}}},"description":null,"group_id":"7383c32d5d5e4d0481c071faeb994404","host":"workspace.cn-north-4.myhuaweicloud.com","id":"ef151ca9ed6045c2ae088dc153b7b725","info_version":"v2","method":"post","name":"AttachInstances","parameters":{},"paths":{"/v2/{project_id}/desktops/attach":{"post":{"description":"将桌面分配给用户。","operationId":"AttachInstances","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":"AttachInstancesRequestBody","required":true,"schema":{"$ref":"#/definitions/AttachInstancesReq"}}],"responses":{"200":{"description":"正常。","examples":{"application/json":{"job_id":"string"}},"schema":{"$ref":"#/definitions/AttachInstancesRsp"}},"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,internal_appcode,public","x-apigateway-request-type":"public","x-is-registered":"Y","x-methodAnnotations":["@EnableAuth","@WksIamAuthMeta(resourceField = \"desktops.![desktopId]\")","@WksDependIamAuthMeta(resourceParamSpEL = {\"USER:name:desktops.![userName]\",\"USER:name:desktops.![attachUserInfos.![userName]]\"})","@IamAuthMeta(authLevel = IamAuthLevel.INSTANCE_LIST, abacAction = \"workspace:desktops:attach\",  needApigwJwtAuthCheck = false, authContextInitializerName = \"workspaceInstanceListAuthContextInitializer\", needRbacCheck = false, needAbacResourceCheck = true)","@CtsMeta(serviceType = \"Workspace\", resourceType = \"workspace\", traceName = \"attachDesktops\")"],"x-request-examples-1":{"desktop_name_policy_id":"string","desktops":[{"computer_name":"string","desktop_id":"string","is_clear_data":"true","user_group":"string","user_name":"string"}],"image_id":"string","image_type":"string"},"x-request-examples-text-1":{"desktop_name_policy_id":"string","desktops":[{"computer_name":"string","desktop_id":"string","is_clear_data":"true","user_group":"string","user_name":"string"}],"image_id":"string","image_type":"string"},"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"}