huawei-cloud-api-definitions-WorkspaceApp 0.1.20260612

Huawei Cloud API definitions, generated from OpenAPI spec
Documentation
1
{"base_path":null,"components":null,"consumes":"[\"application/json\"]","definitions":{"BadRequestErrorResp":{"description":"API错误响应。","properties":{"error_code":{"description":"错误码,失败时返回。","example":"WKS.00211102","readOnly":true,"type":"string"},"error_msg":{"description":"错误描述。","example":"The parameter is invalid.","readOnly":true,"type":"string"}}},"CreateScheduleTaskReq":{"allOf":[{"$ref":"#/definitions/ScheduledTaskConfig"},{"required":["scheduled_type","target_infos","task_name","task_type"]},{"properties":{"description":{"description":"任务描述。","example":"用于开关机","maxLength":255,"minLength":0,"type":"string"},"schedule_task_policy":{"$ref":"#/definitions/ScheduleTaskPolicy"},"scheduled_type":{"$ref":"#/definitions/ScheduledTypeEnum"},"target_infos":{"description":"定时任务对象列表。","items":{"$ref":"#/definitions/TargetInfo"},"maxItems":1000,"minItems":1,"type":"array"},"task_name":{"description":"任务名称,名称需满足如下规则:\n1. 由中文,英文大小写,数字,_-组成,不能有空格。\n2. 长度范围1~64个字符。","example":"定时开机任务","maxLength":64,"minLength":1,"pattern":"^(?! +$)[\\w\\u4e00-\\u9fa5\\u002d_][\\w\\u4e00-\\u9fa5\\u002d_]{0,63}$","type":"string"},"task_type":{"$ref":"#/definitions/ScheduleTaskTypeEnum"}},"type":"object"}],"description":"新增定时任务。"},"ForbiddenErrorResp":{"description":"API错误响应。","properties":{"error_code":{"description":"错误码,失败时返回。","example":"WKS.00081102","readOnly":true,"type":"string"},"error_msg":{"description":"错误描述。","example":"User does not have permission to access this resource.","readOnly":true,"type":"string"}}},"InternalServerErrorResp":{"description":"API错误响应。","properties":{"error_code":{"description":"错误码,失败时返回。","example":"WKS.00211401","readOnly":true,"type":"string"},"error_msg":{"description":"错误描述。","example":"The requested operation failed. Please try again later.","readOnly":true,"type":"string"}}},"MethodNotAllowedErrorResp":{"description":"API错误响应。","properties":{"error_code":{"description":"错误码,失败时返回。","example":"WKS.00000405","readOnly":true,"type":"string"},"error_msg":{"description":"错误描述。","example":"The method specified in the request is not allowed for this resource.","readOnly":true,"type":"string"}}},"NotFoundErrorResp":{"description":"API错误响应。","properties":{"error_code":{"description":"错误码,失败时返回。","example":"WKS.00211902","readOnly":true,"type":"string"},"error_msg":{"description":"错误描述。","example":"The application does not exist","readOnly":true,"type":"string"}}},"ScheduleTask":{"description":"定时任务对象信息。","properties":{"create_time":{"description":"创建时间。","example":"2022-03-07T10:40:43.858Z","format":"date-time","readOnly":true,"type":"string"},"date_list":{"description":"周期按月时:取值1~31及L(代表当月最后一天),英文逗号分隔,如1,2,28,L。","example":"1,2,28,L","readOnly":true,"type":"string"},"day_interval":{"description":"周期按天时:按x天间隔执行。","example":1,"format":"int32","readOnly":true,"type":"integer"},"description":{"description":"任务描述。","example":"用于开关机","readOnly":true,"type":"string"},"expire_time":{"description":"到期时间。","example":"2022-03-07T10:40:43.858Z","format":"date-time","readOnly":true,"type":"string"},"id":{"description":"定时任务主键id。","example":"62f48b59-0ebb-4b1e-ad35-f64948a0591b","readOnly":true,"type":"string"},"is_enable":{"description":"是否是开启状态。","example":false,"readOnly":true,"type":"boolean"},"last_status":{"$ref":"#/definitions/ScheduleTaskStatus","description":"最后一次执行状态。","readOnly":true},"month_list":{"description":"周期按月时:取值1~12,英文逗号分隔,如1,3,12。","example":"1,3,12","readOnly":true,"type":"string"},"next_execution_time":{"description":"下一次执行时间。","example":"2022-12-23 09:00:00","readOnly":true,"type":"string"},"schedule_task_policy":{"$ref":"#/definitions/ScheduleTaskPolicy"},"scheduled_date":{"description":"周期指定时间时:表示指定的日期,格式为yyyy-MM-dd。","example":"2022-12-23","readOnly":true,"type":"string"},"scheduled_time":{"description":"指定的执行时间点,格式为HH:mm:ss。","example":"09:00:00","readOnly":true,"type":"string"},"scheduled_type":{"$ref":"#/definitions/ScheduledTypeEnum"},"task_cron":{"description":"定时任务表达式。","example":"*/10 * * * * ?","readOnly":true,"type":"string"},"task_name":{"description":"任务名称。","example":"定时开机任务","readOnly":true,"type":"string"},"task_type":{"$ref":"#/definitions/ScheduleTaskTypeEnum"},"time_zone":{"description":"时区。","example":"Asia/Shanghai","readOnly":true,"type":"string"},"update_time":{"description":"更新时间。","format":"date-time","readOnly":true,"type":"string"},"week_list":{"description":"周期按周时:取值1~7,英文逗号分隔,如1,2,7。","example":"1,2,7","readOnly":true,"type":"string"}}},"ScheduleTaskPolicy":{"description":"定时任务策略。","properties":{"enforcement_enable":{"default":false,"description":"当存在会话的时候,是否强制执行,强制执行开关。取值为:\n* false:表示关闭。\n* true:表示开启。","example":false,"type":"boolean"}}},"ScheduleTaskStatus":{"description":"job状态:\n* `WAITING` - 等待\n* `RUNNING` - 运行中\n* `SUCCESS` - 完成\n* `FAILED` - 失败","enum":["WAITING","RUNNING","SUCCESS","FAILED"],"example":"WAITING","type":"string"},"ScheduleTaskTargetTypeEnum":{"description":"定时任务对象类型:\n* `SERVER` - 服务器\n* `SERVER_GROUP` - 服务器组","enum":["SERVER","SERVER_GROUP"],"example":"SERVER","type":"string"},"ScheduleTaskTypeEnum":{"description":"定时任务类型:\n* `RESTART_SERVER` - 定时重启服务器\n* `START_SERVER` - 定时开机\n* `STOP_SERVER` - 定时关机\n* `REINSTALL_OS` - 定时重装操作系统","enum":["RESTART_SERVER","START_SERVER","STOP_SERVER","REINSTALL_OS"],"example":"RESTART_SERVER","type":"string"},"ScheduledTaskConfig":{"description":"定时任务时间配置。","properties":{"date_list":{"description":"周期按月时:取值1~31及L(代表当月最后一天),英文逗号分隔,如1,2,28,L。","example":"1,2,28,L","maxLength":255,"minLength":0,"type":"string"},"day_interval":{"description":"周期按天时:按x天间隔执行。","example":1,"format":"int32","maximum":31,"minimum":1,"type":"integer"},"expire_time":{"description":"到期时间。","example":"2022-03-07T10:40:43.858Z","format":"date-time","type":"string"},"month_list":{"description":"周期按月时:取值1~12,英文逗号分隔,如1,3,12。","example":"1,3,12","maxLength":255,"minLength":0,"type":"string"},"scheduled_date":{"description":"周期指定时间时:表示指定的日期,格式为yyyy-MM-dd。","example":"2022-12-23","maxLength":255,"minLength":0,"type":"string"},"scheduled_time":{"description":"指定的执行时间点,格式为HH:mm:ss。","example":"09:00:00","maxLength":255,"minLength":0,"type":"string"},"scheduled_type":{"description":"执行周期类型,可选值为:\n- FIXED_TIME:指定时间。\n- DAY:按天。\n- WEEK:按周。\n- MONTH:按月。","enum":["FIXED_TIME","DAY","WEEK","MONTH"],"example":"FIXED_TIME","type":"string"},"time_zone":{"description":"时区。","example":"Asia/Shanghai","maxLength":64,"minLength":1,"type":"string"},"week_list":{"description":"周期按周时:取值1~7,英文逗号分隔,如1,2,7。","example":"1,2,7","maxLength":255,"minLength":0,"type":"string"}},"type":"object"},"ScheduledTypeEnum":{"description":"执行周期:\n* `FIXED_TIME` - 指定时间\n* `DAY` - 按天\n* `WEEK` - 按周\n* `MONTH` - 按月","enum":["FIXED_TIME","DAY","WEEK","MONTH"],"example":"day","type":"string"},"ServiceUnavailableErrorResp":{"description":"API错误响应。","properties":{"error_code":{"description":"错误码,失败时返回。","example":"WKS.00050902","readOnly":true,"type":"string"},"error_msg":{"description":"错误描述。","example":"The service is now unavailable to process the request.","readOnly":true,"type":"string"}}},"TargetInfo":{"properties":{"target_id":{"description":"对象id。","example":"","maxLength":128,"minLength":1,"type":"string"},"target_name":{"description":"对象名称。","example":"测试桌面","type":"string"},"target_type":{"$ref":"#/definitions/ScheduleTaskTargetTypeEnum"}},"required":["target_id","target_type"],"type":"object"},"UnauthorizedErrorResp":{"description":"API错误响应。","properties":{"error_code":{"description":"错误码,失败时返回。","example":"WKS.00211302","readOnly":true,"type":"string"},"error_msg":{"description":"错误描述。","example":"User authorization error.","readOnly":true,"type":"string"}}}},"description":null,"group_id":"fe7dbee2e20f4aa589be7dce935a38ad","host":"appstream.cn-north-4.myhuaweicloud.com","id":"d5ada41b49b8456582c099385d42eda4","info_version":"v1","method":"post","name":"CreateScheduleTask","parameters":{},"paths":{"/v1/{project_id}/schedule-task":{"post":{"description":"新增定时任务。","operationId":"CreateScheduleTask","parameters":[{"description":"用户Token。\n通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。","in":"header","maxLength":2147483647,"minLength":1,"name":"X-Auth-Token","required":false,"type":"string","x-example":"MIIDkgYJKoZIhvcNAQcCoIIDgzCCXXXXXX..."},{"description":"项目唯一标识。","in":"path","maxLength":128,"minLength":1,"name":"project_id","required":true,"type":"string","x-example":"2b31ed520xxxxxxebedb6e57xxxxxxxx"},{"description":"新增定时任务请求参数。","in":"body","name":"CreateScheduleTaskRequestBody","required":true,"schema":{"$ref":"#/definitions/CreateScheduleTaskReq"}}],"responses":{"200":{"description":"成功响应。","examples":{"application/json":{"create_time":"2022-03-07T10:40:43.858Z","date_list":"1,2,28,L","day_interval":1,"description":"用于开关机。","expire_time":"2022-03-07T10:40:43.858Z","id":"62f48b59-0ebb-4b1e-ad35-f64948a0591b","is_enable":false,"last_status":"WAITING","month_list":"1,3,12","next_execution_time":"2022-12-23 09:00:00","schedule_task_policy":{"enforcement_enable":false},"scheduled_date":"2022-12-23","scheduled_time":"09:00:00","scheduled_type":"day","task_cron":"*/10 * * * * ?","task_name":"定时开机任务","task_type":"RESTART_SERVER","time_zone":"Asia/Shanghai","update_time":"2024-12-25T12:37:28.715Z","week_list":"1,2,7"}},"schema":{"$ref":"#/definitions/ScheduleTask"}},"400":{"description":"由于包含语法错误,当前请求无法被服务器理解。","schema":{"$ref":"#/definitions/BadRequestErrorResp"}},"401":{"description":"鉴权失败。","schema":{"$ref":"#/definitions/UnauthorizedErrorResp"}},"403":{"description":"没有操作权限。","schema":{"$ref":"#/definitions/ForbiddenErrorResp"}},"404":{"description":"找不到资源。","schema":{"$ref":"#/definitions/NotFoundErrorResp"}},"405":{"description":"请求中指定的方法不被允许。","schema":{"$ref":"#/definitions/MethodNotAllowedErrorResp"}},"500":{"description":"服务内部错误,具体返回错误码请参见错误码说明。","schema":{"$ref":"#/definitions/InternalServerErrorResp"}},"503":{"description":"服务不可用。","schema":{"$ref":"#/definitions/ServiceUnavailableErrorResp"}}},"schemes":["https"],"security":[{"apig-auth-iam-used-authn5":[]}],"summary":"新增定时任务","tags":["ScheduleTask"],"x-api-type":"open-api","x-apiexplorer-hide":"N","x-apig-group":"internal,public","x-apigateway-backend":{"httpVpcEndpoints":{"description":"","method":"post","name":"wks-apsmanager-lb","path":"/v1/{project_id}/schedule-task","scheme":"https","timeout":30000},"parameters":[{"description":"","in":"header","name":"X-Auth-Token","origin":"request","value":"X-Auth-Token"},{"description":"","in":"path","name":"project_id","origin":"request","value":"project_id"}],"type":"HTTP-VPC"},"x-apigateway-cors":false,"x-apigateway-match-mode":"NORMAL","x-apigateway-ratelimit":"workspace_default_operate","x-apigateway-request-type":"public","x-is-registered":"N","x-request-examples-1":{"date_list":"1,2,28,L","day_interval":1,"description":"用于开关机。","expire_time":"2022-03-07T10:40:43.858Z","month_list":"1,3,12","schedule_task_policy":{"enforcement_enable":false},"scheduled_date":"2022-12-23","scheduled_time":"09:00:00","scheduled_type":"day","target_infos":[{"target_id":["3f791197-d166-4c8e-81e4-38c40ffc1989"],"target_type":"SERVER"}],"task_name":"定时开机任务","task_type":"RESTART_SERVER","time_zone":"Asia/Shanghai","week_list":"1,2,7"},"x-request-examples-text-1":{"date_list":"1,2,28,L","day_interval":1,"description":"用于开关机。","expire_time":"2022-03-07T10:40:43.858Z","month_list":"1,3,12","schedule_task_policy":{"enforcement_enable":false},"scheduled_date":"2022-12-23","scheduled_time":"09:00:00","scheduled_type":"day","target_infos":[{"target_id":["3f791197-d166-4c8e-81e4-38c40ffc1989"],"target_type":"SERVER"}],"task_name":"定时开机任务","task_type":"RESTART_SERVER","time_zone":"Asia/Shanghai","week_list":"1,2,7"},"x-support-sdk":"Y"}}},"product_short":"WorkspaceApp","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"}