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":{"ApplySharedVpcDedicatedParam":{"description":"共享Vpc专线入参。","properties":{"address":{"description":"租户指定的共享Vpc专线地址。","maxLength":255,"minLength":0,"type":"string"},"availability_zone":{"description":"开通服务资源使用的可用分区,默认随机使用2个可用区。","items":{"maxLength":255,"minLength":0,"type":"string"},"maxItems":10,"minItems":0,"type":"array","x-maxLength":10,"x-minLength":0},"port":{"description":"租户指定共享Vpc专线地址端口。","maximum":65535,"minimum":1025,"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"}}},"CreateDesktopOrderRequestBody":{"description":"创建桌面订单请求体。","properties":{"enterprise_project_id":{"default":"0","description":"企业项目ID,默认\"0。\"","maxLength":36,"minLength":0,"pattern":"^[a-zA-Z0-9_-]+$","type":"string"},"extend_param":{"$ref":"#/definitions/OrderExtendParam"},"hour_package_resources":{"description":"小时包资源。","items":{"$ref":"#/definitions/HourPackageResource"},"maxItems":50,"minItems":1,"type":"array","x-maxLength":50,"x-minLength":1}},"required":["hour_package_resources"]},"CreateDesktopReq":{"description":"创建桌面请求。","properties":{"apply_shared_vpc_dedicated_param":{"$ref":"#/definitions/ApplySharedVpcDedicatedParam"},"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_ips":{"description":"桌面指定分配的ip地址列表,最小为0,最大为100。","items":{"maxLength":255,"minLength":0,"type":"string"},"maxItems":100,"minItems":0,"type":"array","x-maxLength":100,"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"},"hour_package_offering_id":{"description":"桌面小时包offeringID。","maxLength":255,"minLength":1,"type":"string"},"hour_package_product_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"},"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/SecurityGroup"},"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","image_id","image_type","product_id","root_volume"]},"CreateOrderRsp":{"description":"创建订单响应体。","properties":{"order_id":{"description":"订单号,下单成功时返回订单ID。","readOnly":true,"type":"string"}}},"Desktop":{"properties":{"computer_name":{"description":"桌面名,桌面名必须保证唯一。桌面名称只允许输入大写字母、小写字母、中文、数字、中划线,以字母或数字开头、不能以中划线结尾,长度范围为1~15(中文字符长度为2,数字及英文字符长度为1)。","maxLength":15,"minLength":1,"type":"string"},"desktop_name_prefix":{"description":"桌面名称前缀,不指定\"computer_name\"时生效。","maxLength":5,"minLength":0,"type":"string"},"os_host_name":{"description":"系统计算机名。","maxLength":15,"minLength":1,"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-32]。Windows桌面用户最长支持20个字符,Linux桌面用户最长支持32个字符。","maxLength":32,"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"}}},"HourPackageResource":{"description":"桌面小时包资源。","properties":{"create_desktops":{"$ref":"#/definitions/CreateDesktopReq"},"is_auto_renew":{"description":"是否自动续订。","format":"int32","maximum":255,"minimum":0,"type":"integer"},"period_num":{"description":"订购周期数。","format":"int32","maximum":2147483647,"minimum":0,"type":"integer"},"period_type":{"description":"订购周期类型:2:月;3:年;必填。","format":"int32","maximum":255,"minimum":0,"type":"integer"},"used_up_policy":{"description":"时长用尽策略:  \n- SHUTDOWN_OR_HIBERNATE:自动关机/休眠。\n- PAY_PER_USE:自动按需计费。","enum":["SHUTDOWN_OR_HIBERNATE","PAY_PER_USE"],"maxLength":10,"minLength":0,"type":"string"}}},"Nic":{"properties":{"subnet_id":{"description":"网卡对应的子网ID。","maxLength":255,"minLength":0,"type":"string"}},"required":["subnet_id"]},"OrderExtendParam":{"description":"订单的扩展参数。","properties":{"is_auto_pay":{"description":"是否自动付款。true:自动支付; false:不自动支付;默认false。","maxLength":255,"minLength":0,"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"]},"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。\n-GPSSD:通用型SSD。","maxLength":255,"minLength":1,"type":"string"}},"required":["size","type"]}},"description":null,"group_id":"7383c32d5d5e4d0481c071faeb994404","host":"workspace.cn-north-4.myhuaweicloud.com","id":"49acfaa55ef842498a485fd9254e353d","info_version":"v2","method":"post","name":"CreateDesktopOrder","parameters":{},"paths":{"/v2/{project_id}/desktops/orders/subscribe":{"post":{"consumes":["application/json"],"description":"创建桌面订单。","operationId":"CreateDesktopOrder","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":"用户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":"创建桌面订单请求体。","in":"body","name":"CreateDesktopOrderRequestBody","required":true,"schema":{"$ref":"#/definitions/CreateDesktopOrderRequestBody"}}],"produces":["application/json"],"responses":{"200":{"description":"下单响应体。","examples":{"application/json":{"order_id":"string"}},"schema":{"$ref":"#/definitions/CreateOrderRsp"}},"400":{"description":"由于包含语法错误,当前请求无法被服务器理解。","schema":{"$ref":"#/definitions/BaseResponse"}},"409":{"description":"操作冲突。","schema":{"$ref":"#/definitions/BaseResponse"}},"500":{"description":"服务器内部错误。","schema":{"$ref":"#/definitions/BaseResponse"}}},"summary":"创建桌面订单","tags":["Order"],"x-api-type":"open-api","x-apiexplorer-hide":"N","x-apig-group":"public,internal_token","x-apigateway-request-type":"public","x-is-registered":"Y","x-methodAnnotations":["@EnableAuth","@IamAuthMeta(authLevel = IamAuthLevel.PROJECT,  authContextInitializerName = \"workspaceCommonAuthContextInitializer\", abacAction = \"workspace:orders:createDesktopOrder\",  needApigwJwtAuthCheck = false, needRbacCheck = false)","@CtsMeta(serviceType = \"Workspace\", resourceType = \"workspace\", traceName = \"CreateDesktopOrder\")"],"x-request-examples-1":{"enterprise_project_id":"0","hour_package_resources":[{"create_desktops":{"data_volumes":[{"size":10,"type":"SAS"}],"desktop_type":"DEDICATED","desktops":[{"user_group":"administrators","user_name":"hzh"}],"email_notification":true,"enterprise_project_id":"0","hour_package_product_id":"workspace.x86.flexus.xlarge2.120hours","image_id":"4e8aebc3-f4dc-4789-a785-0a1769d44c0d","image_type":"market","nics":[{"subnet_id":"624afebf-bb07-4b20-89b1-e0a02f1137cd"}],"product_id":"workspace.x86.flexus.xlarge2","root_volume":{"size":80,"type":"SAS"},"tenantId":"60ec8cdfb5974ddb8f75ba30952d52eb"},"is_auto_renew":0,"period_num":1,"period_type":2,"used_up_policy":"SHUTDOWN_OR_HIBERNATE"}]},"x-request-examples-text-1":{"enterprise_project_id":"0","hour_package_resources":[{"create_desktops":{"data_volumes":[{"size":10,"type":"SAS"}],"desktop_type":"DEDICATED","desktops":[{"user_group":"administrators","user_name":"hzh"}],"email_notification":true,"enterprise_project_id":"0","hour_package_product_id":"workspace.x86.flexus.xlarge2.120hours","image_id":"4e8aebc3-f4dc-4789-a785-0a1769d44c0d","image_type":"market","nics":[{"subnet_id":"624afebf-bb07-4b20-89b1-e0a02f1137cd"}],"product_id":"workspace.x86.flexus.xlarge2","root_volume":{"size":80,"type":"SAS"},"tenantId":"60ec8cdfb5974ddb8f75ba30952d52eb"},"is_auto_renew":0,"period_num":1,"period_type":2,"used_up_policy":"SHUTDOWN_OR_HIBERNATE"}]},"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"}