Refreshes cached content on CDN points of presence (POPs) based on cache tags.
Debugging
Run this operation directly in OpenAPI Explorer without calculating signatures. After a successful run, OpenAPI Explorer generates SDK code samples automatically.
Authorization information
The following table lists the authorization information for this operation. Use the values in the Operation column in Action policy elements to grant RAM users or RAM roles permission to call this operation.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| cdn:RefreshObjectCacheByCacheTag | none | \*All Resources* | none | none |
Column descriptions:
Operation: The value to use in the
Actionelement to specify the operation on a resource.Access level: The access level of the operation. Valid values: read, write, list.
Resource type: The resource type on which you can grant permissions to a RAM user or RAM role. Required resource types are displayed in bold. If permissions cannot be granted at the resource level, the column shows
All Resources.Condition key: The condition key defined by the cloud service.
Associated operation: Other operations the RAM user or RAM role must have permission to perform to complete this operation.
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| DomainName | string | Yes | The accelerated domain name. | example.com |
| CacheTag | string | Yes | The cache tags to use for the refresh. To specify multiple tags, separate them with commas (,). | tag1,tag2 |
| Force | boolean | No | Specifies whether to force an origin fetch for all matching resources, regardless of whether the cached version is still valid. Default value: false. Valid values: <br>- true: The nearest POP fetches all resources from the origin server, delivers them to the client, and updates the cache with the new version.<br>- false: The nearest POP checks the Last-Modified header of the resource on the origin server. If the value matches the cached resource, the POP serves the cached version. If the value differs, the POP fetches the latest version from the origin server, delivers it to the client, and updates the cache. | true |
Response parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
| (root) | object | Schema of Response | — |
| RequestId | string | The request ID. | 2E5AD83F-BD7B-462E-8319-2E30E305519A |
| RefreshTaskId | string | The ID of the refresh task. If multiple task IDs are returned, they are separated by commas (,). Task IDs are merged according to the following rules:<br>- Tasks for the same accelerated domain name, submitted within the same second, and targeting URLs (not directories) are merged into a single task ID.<br>- If more than 2,000 such tasks exist, every 2,000 task IDs are merged into one task ID. | 17772470184 |
Examples
Sample success response in JSON format:
{
"RequestId": "2E5AD83F-BD7B-462E-8319-2E30E305519A",
"RefreshTaskId": "17772470184"
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | SingleRequest.OverLimit | A maximum of 1000 URLs are supported for each request. | — |
| 400 | InvalidObjectType.Malformed | The specified ObjectType is invalid. | — |
| 400 | InvalidObjectPath.Malformed | The specified ObjectPath is invalid. | — |
| 400 | InvalidObjectPath.Size.Malformed | The size of ObjectPath is bigger than 1000. | The number of URLs to prefetch cannot exceed 1,000. |
| 400 | QuotaExceeded.Refresh | You've exceeded the prescribed refresh limits. | — |
| 400 | QuotaExceeded.Refresh | Your refresh attempts have exceeded the daily limit. | Refresh quantity exceeds the daily quota. |
| 400 | InvalidExtensiveDomain.ValueNotSupported | The specified ExtensiveDomain is not supported. | — |
| 400 | QuotaPerMinuteExceeded.Refresh | You tried to refresh too frequently; please try again later. | — |
| 400 | TooMany.Refresh | The refresh queue is full; please try again later. | — |
| 400 | InvalidExtensiveDomain.ValueNotSupported | Extensive domain not supported. | This operation is not supported for wildcard domain names. |
| 400 | PreloadQueueFull | Preload queue is full, please try again later! | Preload queue is full, please try again later. |
| 400 | QuotaPerMinuteExceeded.Refresh | You've exceeded the prescribed refresh limits per minute. | — |
| 400 | InvalidStations.Malformed | The specified Stations is invalid. | — |
| 400 | InvalidParameters | The parameters you provided are invalid. | — |
For a full list of error codes, see Service error codes.