{"base_path":"/","components":null,"consumes":"[\"application/json;charset=UTF-8\"]","definitions":{"CreateScheduledTaskOption":{"properties":{"instance_number":{"$ref":"#/definitions/IntegerRange"},"name":{"description":"计划任务名称","maxLength":64,"minLength":1,"type":"string"},"scheduled_policy":{"$ref":"#/definitions/ScheduledTaskPolicy"}},"required":["instance_number","name","scheduled_policy"],"type":"object"},"IntegerRange":{"properties":{"desire":{"description":"伸缩组期望实例数","format":"int32","type":"integer"},"max":{"description":"伸缩组最大实例数","example":1,"format":"int32","type":"integer"},"min":{"description":"伸缩组最小实例数","example":1,"format":"int32","type":"integer"}},"type":"object"},"ScheduledTaskId":{"properties":{"task_id":{"description":"计划任务ID","example":"0h327883-324n-4dzd-9c61-68d03ee191dd","pattern":"[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}","type":"string"}},"type":"object"},"ScheduledTaskPolicy":{"properties":{"end_time":{"description":"仅当recurrence_type不为空时生效且必选,表示计划任务的生效结束时间,格式为yyyy-MM-ddTHH:mmZ","type":"string"},"launch_time":{"description":"必选,执行时间,采用UTC时间,recurrence_type不填写或为空时,格式为yyyy-MM-ddTHH:mmZ, recurrence_type不为空时,格式为 HH:mm","type":"string"},"recurrence_type":{"description":"非必选,不填写时计划任务为定时执行, 填写时,为周期执行,且只能填写DAILY,WEEKLY,MONTHLY 中的一种,分别为按天,按周,按月周期执行","enum":["DAILY","WEEKLY","MONTHLY"],"type":"string"},"recurrence_value":{"description":"仅当recurrence_type为WEEKLY,MONTHLY时必选,表示周期执行的具体日期,多个日期用,分割。recurrence_type为WEEKLY时,可填入1-7, recurrence_type为MONTHLY时,可填入1-31","maxLength":64,"minLength":1,"type":"string"},"start_time":{"description":"非必选,仅当recurrence_type不为空时生效,表示计划任务的生效开始时间,格式为yyyy-MM-ddTHH:mmZ,不填写时默认为任务创建成功的时间","type":"string"}},"required":["launch_time"],"type":"object"}},"description":null,"group_id":"c14e7adea4354f78bb333ea8451df077","host":"as.cn-north-4.myhuaweicloud.com","id":"ca2ae3299e714fb28420b098668666e6","info_version":"v1","method":"post","name":"CreateGroupScheduledTask","parameters":{},"paths":{"/autoscaling-api/v1/{project_id}/scaling-groups/{scaling_group_id}/scheduled-tasks":{"post":{"description":"创建计划任务","operationId":"CreateGroupScheduledTask","parameters":[{"description":"租户ID","in":"path","name":"project_id","required":true,"type":"string","x-example":"0513757xxxxxd5eb2f08xxxb93ef4f0f","x-order":1},{"description":"伸缩组ID","in":"path","name":"scaling_group_id","required":true,"type":"string"},{"description":"用户Token","in":"header","name":"X-Auth-Token","required":true,"type":"string","x-example":"MIIDkgYJKoZIhvcNAQcCoIIDgzCCXXXXXX...","x-order":2},{"in":"body","name":"bodyparam","required":true,"schema":{"$ref":"#/definitions/CreateScheduledTaskOption"}}],"responses":{"200":{"description":"Normal","examples":{"application/json":{"task_id":"0h327883-324n-4dzd-9c61-68d03ee191dd"}},"schema":{"$ref":"#/definitions/ScheduledTaskId"}},"400":{"description":"Bad Request 服务器未能处理请求。"},"401":{"description":"Unauthorized 被请求的页面需要用户名和密码。"},"403":{"description":"Forbidden 对被请求的页面访问禁止。"},"404":{"description":"Not Found 服务器无法找到被请求的页面。"},"405":{"description":"Method Not Allowed 请求中指定的方法不被允许。"},"406":{"description":"Not Acceptable 服务器生成的响应无法被客户端所接受。"},"407":{"description":"Proxy Authentication 用户必须首先使用代理服务器进行验证,这样请求才会被处理"},"408":{"description":"Request Timeout 请求超出了服务器的等待时间。"},"409":{"description":"Conflict 由于冲突,请求无法被完成。"},"500":{"description":"Internal Server Error 请求未完成。服务异常。"},"501":{"description":"Not Implemented 请求未完成。服务器不支持所请求的功能。"},"502":{"description":"Bad Gateway 请求未完成。服务器从上游服务器收到一个无效的响应。"},"503":{"description":"Service Unavailable 请求未完成。系统暂时异常。"},"504":{"description":"Gateway Timeout 网关超时。"}},"summary":"创建计划任务","tags":["计划任务"],"x-apiErrorCodes":"","x-apigateway-auth-type":"","x-apigateway-match-mode":"","x-apigateway-request-type":"","x-call_frequency":"","x-constraint":"","x-ctc":"Y","x-first_open_time":"2016-06-30","x-flow_control_group":"as","x-hc":"Y","x-hk":"Y","x-hybridcloud":"true","x-iftype":"Public Api","x-in_cli":"","x-is-registered":"Y","x-is_calling":"Y","x-multi_tenant_flow_time":"1","x-multi_tenant_flow_value":"520","x-name":"Creating an AS Scheduled Task","x-obc":"Y","x-order":1,"x-otc":"Y","x-request-examples-1":{"instance_number":{"max":10,"min":5},"name":"as-scheduled-task-7a75","scheduled_policy":{"end_time":"2033-12-27T03:34Z","launch_time":"16:00","recurrence_type":"DAILY","start_time":"2015-12-14T03:34Z"}},"x-request-examples-description-1":"本示例为伸缩组5bc3aa02-b83e-454c-aba1-4d2095c68f8b,创建了一个每天16:00执行的计划任务,将伸缩组的最大实例数设置为10,最小实例数设置为5","x-request-examples-text-1":{"instance_number":{"max":10,"min":5},"name":"as-scheduled-task-7a75","scheduled_policy":{"end_time":"2033-12-27T03:34Z","launch_time":"16:00","recurrence_type":"DAILY","start_time":"2015-12-14T03:34Z"}},"x-request-examples-url-1":"POST https://{Endpoint}/autoscaling-api/v1/{project_id}/scaling-groups/5bc3aa02-b83e-454c-aba1-4d2095c68f8b/scheduled-tasks","x-scope":"Commercial","x-source":"SelfDeveloped","x-source_url":"","x-support-sdk":"Y","x-tenant_flow_time":"1","x-tenant_flow_value":"52","x-timeout":"10s","x-tlf":"Y","x-un_cli":"","x-version":"v1"}}},"product_short":"AS","region_id":"cn-north-4","schemes":["HTTPS"],"security_definitions":null,"summary":"创建计划任务","tags":"计划任务","uri":null,"version":"2.0"}