Creates a historical event delivery task.

Take note of the following limits:

  • You must have created and configured a single-account trail to deliver events to Log Service by calling the CreateTrail operation.
  • Only one historical event delivery task can be running at a time within an Alibaba Cloud account.

This topic shows you how to create a historical event delivery task for a sample trail named trail-name.


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 CreateDeliveryHistoryJob

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

TrailName String Yes trail-name

The name of the trail for which you want to create a historical event delivery task.

ClientToken String No 123e4567-e89b-12d3-a456-42665544****

The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that it is unique among different requests.

The token can contain only ASCII characters and can be up to 64 characters in length.

For more information, see How to ensure idempotence.

For more information about common request parameters, see Common parameters.

Response parameters

Parameter Type Example Description
RequestId String 9D356A34-D5A9-41CD-9915-837B7F9D8722

The ID of the request.

JobId Integer 16602

The ID of the historical event delivery task.


Sample requests

&<Common request parameters>

Sample success responses

JSON format

HTTP/1.1 200 OK

  "RequestId" : "9D356A34-D5A9-41CD-9915-837B7F9D8722",
  "JobId" : 16602

Error codes

HTTP status code Error code Error message Description
404 TrailNotFoundException The specified Trail does not exist. The error message returned because the specified trail does not exist.

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