All Products
Search
Document Center

ApsaraVideo VOD:PreloadVodObjectCaches

Last Updated:Dec 19, 2024

Prefetches resources from an origin server to L2 nodes. Users can directly hit the cache upon their first visits. This way, workloads on the origin server can be reduced.

Operation description

Note
  • This operation is available only in the China (Shanghai) region.
  • You can submit a maximum of 500 requests to prefetch resources based on URLs each day by using an Alibaba Cloud account. You cannot prefetch resources based on directories.
  • You can call the RefreshVodObjectCaches operation to refresh content and the PreloadVodObjectCaches operation to prefetch content.
  • Debugging

    You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

    Authorization information

    The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

    • Operation: the value that you can use in the Action element to specify the operation on a resource.
    • Access level: the access level of each operation. The levels are read, write, and list.
    • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
      • The required resource types are displayed in bold characters.
      • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
    • Condition Key: the condition key that is defined by the cloud service.
    • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
    OperationAccess levelResource typeCondition keyAssociated operation
    vod:PreloadVodObjectCachesupdate
    *All Resources
    *
      none
    none

    Request parameters

    ParameterTypeRequiredDescriptionExample
    ObjectPathstringYes

    The URL of the file to be prefetched. Separate multiple URLs with line breaks (\n or \r\n).

    vod.test.com/test.txt
    AreastringNo

    The acceleration region in which you want to prefetch content. If you do not specify a region, the value overseas is used.

    • domestic: Chinese mainland
    • overseas: outside the Chinese mainland
    domestic
    L2PreloadbooleanNo

    Specifies whether to prefetch content to POPs. Valid values:

    • true: prefetches content to nodes that include L2 DCDN nodes.
    • false: prefetches content to L2 POPs or L3 POPs.
    true
    WithHeaderstringNo

    The custom header for prefetch in the JSON format.

    { "Accept-Encoding": [ "gzip, deflate, br" ] }

    Response parameters

    ParameterTypeDescriptionExample
    object
    PreloadTaskIdstring

    The ID of the prefetch task. Separate multiple task IDs with commas (,).

    9524****
    RequestIdstring

    The ID of the request.

    E5BD4B50-7A02-493A-*****-97B9024B4135

    Examples

    Sample success responses

    JSONformat

    {
      "PreloadTaskId": "9524****",
      "RequestId": "E5BD4B50-7A02-493A-*****-97B9024B4135"
    }

    Error codes

    For a list of error codes, visit the Service error codes.

    Change history

    Change timeSummary of changesOperation
    2024-07-03The Error code has changed. The request parameters of the API has changedView Change Details

    Common errors

    The following table describes the common errors that this operation can return.

    Error codeError messageHTTP status codeDescription
    ThrottlingRequest was denied due to request throttling.503The error message returned because the request was denied due to throttling.
    IllegalOperationIllegal domain operate is not permitted.403The error message returned because the domain name is invalid.
    OperationDeniedYour account does not open VOD service yet.403The error message returned because ApsaraVideo VOD has not been activated for your Alibaba Cloud account.
    OperationDenied.SuspendedYour VOD service is suspended.403The error message returned because your Alibaba Cloud account has overdue payments. Add funds to your account. If you do not settle your overdue payments within 15 days, you must re-activate ApsaraVideo VOD after you settle all the overdue payments.
    InvalidDomain.NotFoundThe domain provided does not belong to you.404The error message returned because the domain name does not exist or does not belong to you.
    InvalidDomain.OfflineThe domain provided is offline.404The error message returned because the domain name has been disabled.
    QuotaExceeded.RefreshYou’ve exceeded the prescribed refresh limits.400The error message returned because the number of requests to refresh or prefetch the content exceeds the upper limit on the current day.
    PreloadQueueFullPreload queue is full, please try again later!403The error message returned because the number of URLs of the files being prefetched has reached the upper limit. Try again later.
    InvalidDomain.Configure_failedFailed to configure the provided domain.500The error message returned because the system failed to configure the domain name and cannot refresh or prefetch the content.
    MissingParameterThe input parameter “ObjectPath” that is mandatory for processing this request is not supplied.400The error message returned because the ObjectPath parameter is not specified.
    InvalidObjectPath.MalformedThe specific value of parameter ObjectPath is malformed.400The error message returned because the value of the ObjectPath parameter is in an invalid format.
    InvalidExtensiveDomain.ValueNotSupportedExtensive domain not supported.400The error message returned because the domain name contains a wildcard character.
    InvalidObjectPath.Size.MalformedThe size of ObjectPath is bigger than 1000.400The error message returned because a maximum of 1,000 URLs of files can be prefetched at a time.