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\"]","definitions":{"BaseResponse":{"description":"API响应基类","properties":{"error_code":{"description":"错误码。","maxLength":12,"minLength":0,"type":"string"},"error_msg":{"description":"错误描述。","maxLength":1000,"minLength":0,"type":"string"}}},"ResizeDesktopData":{"description":"变更规格的桌面对象。","properties":{"desktop_id":{"description":"桌面ID。","maxLength":255,"minLength":0,"type":"string"}}},"ResizeDesktopJobResponse":{"description":"变更桌面规格Job响应。","properties":{"desktop_id":{"description":"桌面ID。","maxLength":255,"minLength":0,"type":"string"},"job_id":{"description":"任务ID。","maxLength":255,"minLength":0,"type":"string"}}},"ResizeDesktopReq":{"description":"变更规格请求。","properties":{"desktops":{"description":"桌面数据。支持批量按需类型桌面变更为同一规格。","items":{"$ref":"#/definitions/ResizeDesktopData"},"maxItems":100,"minItems":1,"type":"array","x-maxLength":100},"mode":{"description":"是否支持开机状态下执行变更规格操作。固定传值STOP_DESKTOP,如果桌面处于开机状态,会先关机再变更规格。","maxLength":255,"minLength":0,"type":"string"},"product_id":{"description":"套餐id。批量变更时,则变更为同一规格的虚拟机。","maxLength":255,"minLength":0,"type":"string"}},"required":["desktops","mode","product_id"]},"ResizeDesktopRsp":{"description":"变更规格响应。","properties":{"job_id":{"description":"变更规格任务id。","readOnly":true,"type":"string"},"jobs":{"description":"按需桌面变更规格返回的任务信息(jobs字段后续会下线,请使用job_id字段)。","items":{"$ref":"#/definitions/ResizeDesktopJobResponse"},"maxItems":2147483647,"minItems":0,"type":"array"}}}},"description":null,"group_id":"7383c32d5d5e4d0481c071faeb994404","host":"workspace.cn-north-4.myhuaweicloud.com","id":"8c575773c44f4a728c95f41d0c14880a","info_version":"v2","method":"post","name":"ResizeDesktop","parameters":{},"paths":{"/v2/{project_id}/desktops/resize":{"post":{"description":"变更云桌面规格,只支持变更CPU和内存,不支持变更磁盘,不支持同规格互相变更。","operationId":"ResizeDesktop","parameters":[{"description":"用户Token。\n\n通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。","in":"header","maxLength":40000,"minLength":1,"name":"X-Auth-Token","required":true,"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":"ResizeDesktopRequestBody","required":true,"schema":{"$ref":"#/definitions/ResizeDesktopReq"}}],"responses":{"200":{"description":"变更规格响应。","examples":{"application/json":{"job_id":"c566b960-69d1-44ec-9397-2172fdd01xxx","jobs":[{"desktop_id":"c566b960-69d1-44ec-9397-2172fdd015d9","job_id":"41162624-ba52-42f3-bdda-15c6d345ff60"}]}},"schema":{"$ref":"#/definitions/ResizeDesktopRsp"}},"202":{"description":"变更规格响应。","examples":{"application/json":{"job_id":"c566b960-69d1-44ec-9397-2172fdd01xxx","jobs":[{"desktop_id":"c566b960-69d1-44ec-9397-2172fdd015d9","job_id":"41162624-ba52-42f3-bdda-15c6d345ff60"}]}},"schema":{"$ref":"#/definitions/ResizeDesktopRsp"}},"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"}}},"schemes":["https"],"summary":"变更规格","tags":["Desktop"],"x-apiexplorer-hide":"N","x-apig-group":"public,internal_token,internal_appcode","x-apigateway-request-type":"public","x-is-registered":"Y","x-request-examples-1":{"desktops":[{"desktop_id":"538946c2-7ff8-4444-b1bd-e9a1f8137b81"}],"mode":"STOP_DESKTOP","product_id":"workspace.k.xlarge.2.linux"},"x-request-examples-text-1":{"desktops":[{"desktop_id":"538946c2-7ff8-4444-b1bd-e9a1f8137b81"}],"mode":"STOP_DESKTOP","product_id":"workspace.k.xlarge.2.linux"},"x-request-examples-url-1":"POST /v2/0bec5db98280d2d02fd6c00c2de791ce/desktops/resize","x-support-sdk":"Y","x-workspace-api-auth":"CBC"}}},"product_short":"Workspace","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"变更规格","tags":"桌面","uri":null,"version":"2.0"}