Creates a tracking task that generates operations reports. The tracking task sends operations reports to a specified email address based on a specified schedule.

Note The maximum number of times that each user can call this operation per second is 3. 

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateCdnDeliverTask

The operation that you want to perform. Set the value to CreateCdnDeliverTask.

Deliver Json Yes {"email":{"subject":"the email subject","to":["username@example.com","username@example1.com"]}}

The method by which operations reports are sent. Operations reports are sent to you only through emails. The report content must be escaped in JSON.

Name String Yes Domain name report

The name of the operations report.

Reports String Yes [{\"reportId\":1,\"conditions\":[{\"field\":\"prov\",\"op\":\"in\",\"value\":[\"Heilongjiang\",\"Beijing\"]}]}]

The information about the operations report. The information must be escaped in JSON.

Schedule Json Yes {"schedName":"the name of the tracking task","the description":"description","crontab":"000**?","frequency":"d","status":"enable","effectiveFrom":"2020-09-17T00:00:00Z","effectiveEnd":"2020-11-17T00:00:00Z"}

The parameters that specify the time interval at which the tracking task sends operations reports. The settings must be escaped in JSON.

Status String No enable

The status of the tracking task. Valid values:

  • enable: enabled
  • disable: disabled
Note The Status parameter is reserved. You do not need to set it.
DomainName String No www.example1.com,www.example2.com

The domain names that you want to include in the operations report. Separate domain names with commas (,). If you do not specify a domain name, all domain names that belong to your Alibaba Cloud account are included.

Fields of the Reports parameter

Filed

Type

Required

Description

reportId

String

Yes

The ID of the report.

conditions

ConDatas[]

No

The filter conditions for the report.

Fields of the conditions parameter

Field

Type

Required

Description

field

String

No

The filter fields.

op

String

No

The filter action. Only in is supported.

value

String[]

No

An array of fields values.

Fields of the Deliver parameter

Field

Type

Required

Description

subject

String

Yes

The email subject.

to

String[]

Yes

The email addresses to which operations reports are sent.

Fields of the Schedule parameter

Field

Type

Required

Description

schedName

String

Yes

The name of the tracking task.

description

String

Yes

The description of the tracking task.

crontab

String

Yes

The time interval at which the tracking task runs.

frequency

String

Yes

The time interval at which the tracking task sends reports. Valid values:

h: every hour

d: every day

w: every week

status

String

Yes

The status of the tracking task. Valid values:

enable: enabled

disable: disabled

effectiveFrom

String

Yes

The time when the tracking task starts.

effectiveEnd

String

Yes

The time when the tracking task ends.

Response parameters

Parameter Type Example Description
RequestId String 04F0F334-1335-436C-A1D7-6C044FE73368

The ID of the request.

Examples

Sample requests

http(s)://cdn.aliyuncs.com/?Action=CreateCdnDeliverTask
&Deliver={"email":{"subject":"the email subject","to":["username@example.com","username@example1.com"]}}
&Name=Domain name report
&Reports=[{\"reportId\":1,\"conditions\":[{\"field\":\"prov\",\"op\":\"in\",\"value\":[\"Heilongjiang\",\"Beijing\"]}]}]
&Schedule={"schedName":"the name of the tracking task","the description":"description","crontab":"000**?","frequency":"d","status":"enable","effectiveFrom":"2020-09-17T00:00:00Z","effectiveEnd":"2020-11-17T00:00:00Z"}
&<Common request parameters>

Sample success responses

XML format

<CreateCdnDeliverTaskResponse>
  <RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
</CreateCdnDeliverTaskResponse>

JSON format

{
    "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368"
}

Error codes

For a list of error codes, visit the API Error Center.