DescribeDcdnRefreshTasks - 查询刷新预热任务

调用DescribeDcdnRefreshTasks查询刷新、预热状态是否在全网生效,支持查询3天内的数据。

接口说明

  • 您可以根据任务 ID 或 URL 进行查询。

  • 支持同时指定 TaskIdObjectPath,如果 TaskIdObjectPath 都不指定,默认查询 3 天内第一页的数据(20 条)。

  • 只可查询最近 3 天内的数据。

  • 当您指定 DomainNameStatus 时,必须填写 ObjectType

  • 单用户调用频率:5 次/秒。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

dcdn:DescribeDcdnRefreshTasks

get

domain

acs:dcdn:*:{#accountId}:domain/{#domainName}

请求参数

名称

类型

必填

描述

示例值

TaskId

string

任务 ID,当您创建刷新或预热任务,会返回任务 ID。

704225667

ObjectPath

string

按路径查询,准确匹配。

http://example.com/examplefile.txt

PageNumber

integer

取得页数。取值范围为:1~100000

2

ObjectType

string

任务类型。

  • file:刷新 URL。

  • directory:刷新目录。

  • regex:正则刷新。

  • preload:预热 URL。

当指定 DomainNameStatus 时,该参数必填。

file

DomainName

string

加速域名,仅支持单个查询,默认查询所有加速域名。

example.com

Status

string

任务状态。

  • Complete:完成。

  • Refreshing:刷新中。

  • Failed:刷新失败。

Complete

PageSize

integer

分页大小。默认值:20,最大值:50,取值范围:1~50

20

StartTime

string

开始时间。日期格式按照 ISO8601 表示法,并使用 UTC 时间,格式为 yyyy-MM-ddTHH:mm:ssZ。

2017-01-01T12:12:20Z

EndTime

string

结束时间。日期格式按照 ISO8601 表示法,并使用 UTC 时间,格式为 yyyy-MM-ddTHH:mm:ssZ。

说明

结束时间需大于起始时间。

2017-01-01T12:13:20Z

返回参数

名称

类型

描述

示例值

object

RequestId

string

请求 ID。

174F6032-AA26-470D-B90E-36F0EB205BEE

PageNumber

integer

页码。

2

PageSize

integer

整页大小。

2

TotalCount

integer

任务数量。

20

Tasks

object

Task

array<object>

任务列表。

object

Status

string

状态。

  • Complete:完成。

  • Refreshing:刷新中。

  • Failed:刷新失败。

Complete

CreationTime

string

任务对象创建时间。为 UTC 时间。

2014-11-27T08:23:22Z

ObjectType

string

任务类型。

  • file:刷新 URL。

  • path:刷新目录。

  • regex:正则刷新。

  • preload:预热 URL。

file

Process

string

进度百分比。

10

Description

string

刷新预热失败返回错误描述。

  • InternalError:内部错误。

  • OriginTimeout:源站响应超时。

  • OriginReturn StatusCode 5XX:源站响应 5xx 错误码。

InternalError

ObjectPath

string

刷新对象路径。

http://example.com/examplefile.txt

TaskId

string

任务 ID。

123

示例

正常返回示例

JSON格式

{
  "RequestId": "174F6032-AA26-470D-B90E-36F0EB205BEE",
  "PageNumber": 2,
  "PageSize": 2,
  "TotalCount": 20,
  "Tasks": {
    "Task": [
      {
        "Status": "Complete",
        "CreationTime": "2014-11-27T08:23:22Z",
        "ObjectType": "file",
        "Process": "10",
        "Description": "InternalError",
        "ObjectPath": "http://example.com/examplefile.txt",
        "TaskId": "123"
      }
    ]
  }
}

错误码

HTTP status code

错误码

错误信息

描述

400 InvalidTaskId.Malformed The specified TaskId is invalid. TaskId错误,请填写正确的TaskId。
400 MissingParameter.ObjectType The ObjectType parameter is required if DomainName or ObjectType is specified. 请填写ObjectType。
400 MissingTimeParameter The StartTime and EndTime must be both specified. 请同时提供开始时间和结束时间。
400 InvalidEndTime.Mismatch The specified EndTime is earlier than the StartTime. 结束时间早于开始时间,请检查。
400 DomainNameOverLimit A maximum of 500 domains are supported for each request. 一次最多只支持500个域名,请减少域名重新请求。
400 InvalidTime The query time cannot exceed the last 3 days. 查询时间不能超过最近3天。
400 InvalidStartTime.Malformed The specified StartTime parameter is invalid. 请提供正确的开始时间格式。日期格式按照ISO8601表示法,并使用UTC时间,格式为:yyyy-MM-ddTHH:mm:ssZ。
400 InvalidEndTime.Malformed The specified EndTime is invalid. 请提供正确的结束时间格式。日期格式按照ISO8601表示法,并使用UTC时间。 格式为:yyyy-MM-ddTHH:mm:ssZ。
400 InvalidStartTime.ValueNotSupported The specified StartTime is invalid. 不支持该开始时间,请重新填写。
400 InvalidObjectType.ValueNotSupported The specified ObjectType is not supported. ObjectType错误,请重新填写ObjectType。
400 InvalidStatus.ValueNotSupported The specified Status is not supported. Status错误,请填写正确的Status。
429 TooManyRequests The server is busy. Please try again later. 服务器忙,请稍后再试

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情