制定批量新增定时预热任务的计划。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
esa:CreateScheduledPreloadExecutions |
create |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| Id |
string |
否 |
预热任务 ID,通过调用 CreateScheduledPreloadJob 接口生成。 |
665d3af3621bccf3fe29e1a4 |
| Executions |
array<object> |
是 |
待添加的定时预热任务执行计划列表。 |
|
|
object |
否 |
执行计划信息。 |
||
| StartTime |
string |
否 |
定时预热计划开始时间,格式为 ISO 8601(如 2024-01-01T00:00:00+Z)。 |
2024-06-03T16:00:00Z |
| EndTime |
string |
否 |
定时预热计划结束时间,格式为 ISO 8601(如 2024-01-01T00:00:00+Z)。 |
2024-06-04T02:02:09Z |
| Interval |
integer |
是 |
定时预热计划每批执行间隔,单位秒。 |
30 |
| SliceLen |
integer |
是 |
每批定时预热 URL 个数。 |
10 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| RequestId |
string |
请求 ID。 |
F61CDR30-E83C-4FDA-BF73-9A94CDD44229 |
| FailedExecutions |
array<object> |
添加失败的预热计划信息。 |
|
|
object |
|||
| Id |
string |
预热计划 ID。 |
66599bd7397885b43804901c |
| StartTime |
string |
定时预热计划开始时间,格式为 ISO 8601(如 2024-01-01T00:00:00+Z)。 |
2024-06-02T02:43:35Z |
| EndTime |
string |
定时预热计划结束时间,格式为 ISO 8601(如 2024-01-01T00:00:00+Z)。 |
2024-06-03T02:43:35Z |
| Interval |
integer |
定时预热计划每批执行间隔,单位秒。 |
60 |
| SliceLen |
integer |
每批定时预热 URL 个数。 |
10 |
| Status |
string |
定时预热计划的状态,包括如下状态。
|
running |
| JobId |
string |
预热任务 ID。 |
665d3af3621bccf3fe29e1a4 |
| AliUid |
string |
阿里云账号 ID。 |
15685865xxx14622 |
| FailedMessages |
array |
计划添加失败信息列表。 |
|
|
string |
失败信息。 |
execution id: 66599bd7397885b43804921c, error: end time is before start time. |
|
| SuccessCount |
integer |
成功新增的预热计划个数。 |
12 |
| SuccessExecutions |
array<object> |
添加成功的预热计划信息 |
|
|
object |
|||
| Id |
string |
预热计划 ID。 |
66599bd7397885b43804901c |
| StartTime |
string |
定时预热计划开始时间,格式为 ISO 8601(如 2024-01-01T00:00:00+Z)。 |
2024-06-02T02:43:35Z |
| EndTime |
string |
定时预热计划结束时间,格式为 ISO 8601(如 2024-01-01T00:00:00+Z)。 |
2024-06-03T02:43:35Z |
| Interval |
integer |
定时预热计划每批执行间隔,单位秒。 |
60 |
| SliceLen |
integer |
每批定时预热 URL 个数。 |
10 |
| Status |
string |
定时预热计划的状态,包括如下状态。
|
failed |
| JobId |
string |
预热任务 ID。 |
665d3af3621bccf3fe29e1a4 |
| AliUid |
string |
阿里云账号 ID。 |
15685865xxx14622 |
| TotalCount |
integer |
总共请求新增的计划个数。 |
2 |
示例
正常返回示例
JSON格式
{
"RequestId": "F61CDR30-E83C-4FDA-BF73-9A94CDD44229",
"FailedExecutions": [
{
"Id": "66599bd7397885b43804901c",
"StartTime": "2024-06-02T02:43:35Z",
"EndTime": "2024-06-03T02:43:35Z",
"Interval": 60,
"SliceLen": 10,
"Status": "running",
"JobId": "665d3af3621bccf3fe29e1a4",
"AliUid": "15685865xxx14622"
}
],
"FailedMessages": [
"execution id: 66599bd7397885b43804921c, error: end time is before start time."
],
"SuccessCount": 12,
"SuccessExecutions": [
{
"Id": "66599bd7397885b43804901c",
"StartTime": "2024-06-02T02:43:35Z",
"EndTime": "2024-06-03T02:43:35Z",
"Interval": 60,
"SliceLen": 10,
"Status": "failed",
"JobId": "665d3af3621bccf3fe29e1a4",
"AliUid": "15685865xxx14622"
}
],
"TotalCount": 2
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidEndTime.Mismatch | The specified EndTime is earlier than the StartTime. | 您填入的结束时间早于开始时间,请检查后重试。 |
| 400 | InvalidJob.JobCountOfSiteFull | The maximum number of prefetch tasks for the website has been reached. Delete some unwanted ones and try again. | 站点预热任务已达上限,无法添加更多任务,请先清理多余任务后重试。 |
| 400 | InvalidParameter.ObjectId | Invalid task ID or execution plan ID. | 您提供的任务或执行计划ID不正确,请检查ID是否有效且输入无误。 |
| 400 | MissingOssUrl | OssUrl missing. Specify a valid URL of the OSS object that stores URLs to prefetch. | OssUrl字段缺失,请确保已提供有效的OSS预热任务链接。 |
| 400 | MissingUrlList | Enter the URLs you want to prefetch. | 预热的URL为空,请输入待预热的URL。 |
| 400 | TooManyRequests | Too many requests.Please try again later. | 请求过于频繁,请稍后重试。 |
| 403 | InvalidUid.PermissionDenied | You do not have the permissions to perform this operation on this resource. Check whether the specified UID is correct and has the required permissions. | 您无权操作此资源,请确认UID是否正确且具备相应权限。 |
| 404 | InvalidJob.NotFound | The task does not exist. Check whether the task ID is correct or whether the task has been deleted. | 任务不存在,请检查任务ID是否正确或该任务是否已被删除。 |
| 404 | LogNotFound | Failed to query the log. Check whether the task ID and execution ID are valid. | 未找到日志,请检查任务ID、执行ID等是否正确和有效。 |
| 404 | InvalidExecution.NotFound | The execution plan does not exist. Check whether the parameters such as the execution ID, start time, and end time are correct. | 执行计划不存在,请检查执行ID、开始时间或结束时间等参数是否准确无误。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。