Description
You can call this operation to preload the specified content from the origin to multiple L2 cache nodes. When accessing the content for the first time, users can directly obtain the content from the cache, reducing the workload on the origin. This operation supports POST requests in which parameters are sent as a form.
Restrictions:
- With an Alibaba Cloud account, you can submit a maximum of 2,000 requests to refresh or preload URLs every day. Currently, you cannot preload directories.
- You can call the
RefreshVodObjectCaches
operation to refresh content of a specific URL and call thePreloadVodObjectCaches
operation to preload resources from a URL to a node.
Request parameters
Parameter | Type | Required | Description |
---|---|---|---|
Action | String | Yes | The operation that you want to perform. Set this parameter to PreloadVodObjectCaches. |
ObjectPath | String | Yes | The URL of the content to be preloaded, for example, a.com/image/1.png. Separate multiple URLs with line breaks (\n or \r\n). |
Area | String | No | The preload region. Valid values:
|
Response parameters
Parameter | Type | Description |
---|---|---|
PreloadTaskId | String | The ID of the preload task. Multiple task IDs are separated with commas (,). |
Examples
Sample request
https://vod.cn-shanghai.aliyuncs.com?&Action=PreloadVodObjectCaches&ObjectPath=vod.test.com/test.txt&ObjectType=File&<Common request parameters>
Sample response
JSON format
{
"PreloadTaskId": "95248880",
"RequestId": "E5BD4B50-7A02-493A-AE0B-97B9024B4135"
}
XML format
<PreloadVodObjectCachesResponse>
<PreloadTaskId>95250421</PreloadTaskId>
<RequestId>5FF9B16E-FBAC-48E5-9052-65B5F0184DB3</RequestId>
</PreloadVodObjectCachesResponse>
Error codes
Error code | Error message | HTTP status code | Description |
---|---|---|---|
Throttling | Request was denied due to request throttling. | 503 | The error message returned because the request is denied due to throttling. |
IllegalOperation | Illegal domain operate is not permitted. | 403 | The error message returned because the specified domain name is invalid. |
OperationDenied | Your account does not open VOD service yet. | 403 | The error message returned because ApsaraVideo for VOD has not been activated for your account. |
OperationDenied.Suspended | Your VOD service is suspended. | 403 | The error message returned because your account has overdue payments. Recharge your account. |
InvalidDomain.NotFound | The domain provided does not belong to you. | 404 | The error message returned because the specified domain name does not exist or does not belong to you. |
InvalidDomain.Offline | The domain provided is offline. | 404 | The error message returned because the specified domain name has been discontinued. |
QuotaExceeded.Refresh | You've exceeded the prescribed refresh limits. | 400 | The error message returned because the number of requests to refresh or preload the content exceeds the upper limit on the current day. |
PreloadQueueFull | Preload queue is full, please try again later! | 403 | The error message returned because the queue of preload tasks is full, which means that the number of requests to preload URLs has reached the upper limit. Try again later. |
InvalidDomain.Configure_failed | Failed to configure the provided domain. | 500 | The error message returned because the system failed to configure the specified domain name and cannot refresh or preload the content. |
MissingParameter | The input parameter "ObjectPath" that is mandatory for processing this request is not supplied. | 400 | The error message returned because the ObjectPath parameter is not set. |
InvalidObjectPath.Malformed | The specific value of parameter ObjectPath is malformed. | 400 | The error message returned because the format of the specified ObjectPath parameter is invalid. |
InvalidExtensiveDomain.ValueNotSupported | Extensive domain not supported. | 400 | The error message returned because the specified domain name contains a wildcard character. |
InvalidObjectPath.Size.Malformed | The size of ObjectPath is bigger than 1000. | 400 | The error message returned because you attempt to preload more than 1,000 URLs at a time. |