Creates a tracking task. After you create a tracking task, the system periodically sends operations reports to you by email.

Note You can call this operation up to three times per second.

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 CreateDcdnDeliverTask

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

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

The method that is used to send operations reports. Operations reports are sent to you only by email. The settings must be escaped in JSON.

Name String Yes Domain name report

The name of the tracking task.

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

The operations reports that are tracked by the task. The data must be escaped in JSON.

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

The parameters of the tracking task. The settings must be escaped in JSON.

DomainName String No example.com,example.org

The domain names to be tracked. Separate multiple domain names with commas (,). You can specify up to 500 domain names. If you want to specify more than 500 domain names, submit a ticket.

Note If you do not specify a domain name, a tracking task is created for operations reports of all domain names that belong to your Alibaba Cloud account.
Fields of the Reports parameter

Field

Type

Required

Description

reportId

String

Yes

The ID of the operations 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

The array of field 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 period during which the operations reports are tracked.

frequency

String

Yes

The interval at which the reports are sent. Valid values:

h: every hour

d: every day

w: every week

status

String

Yes

The status of the tracking task. Valid values:

enable

disable

effectiveFrom

String

Yes

The start time of the tracking task.

effectiveEnd

String

Yes

The end time of the tracking task.

Response parameters

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

The ID of the request.

Examples

Sample requests

http(s)://dcdn.aliyuncs.com/?Action=CreateDcdnDeliverTask
&Deliver={"email":{"subject":"the email subject","to":["username@example.com","username@example.org"]}}
&Name=Domain name report
&Reports=[{\"reportId\":2,\"conditions\":[{\"field\":\"prov\",\"op\":\"in\",\"value\":[\"Heilongjiang\",\"Beijing\"]}]}]
&Schedule={"schedName":"The name of the tracking task","description":"the 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

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

JSON format

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

Error codes

HttpCode Error code Error message Description
400 InvalidParameter The specified parameter is invalid. The error message returned because the specified parameter is invalid.
400 TimeParseFailed Failed to parse the time parameter. The error message returned because the time parameter failed to be parsed.
400 SubscriptionAlreadyExists The subscription already exists. The error message returned because the tracking task already exists.
400 SubscriptionNotFound The subscription is not found. The error message returned because the tracking task does not exist.
400 NameAlreadyExists The name already exists. The error message returned because the name of the tracking task already exists.
400 DeliverExceedLimit The maximum number of subscribed tasks is exceeded. The error message returned because the maximum number of tracking tasks has been reached.

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