All Products
Search
Document Center

Edge Security Acceleration:CreateUserDeliveryTask

Last Updated:Nov 07, 2025

Creates a log delivery task to ship logs to the specified destination.

Operation description

This API operation allows you to deliver logs to destinations such as Simple Log Service (SLS), HTTP servers, Object Storage Service (OSS), Amazon Simple Storage Service (S3), and Kafka. You can specify the task name, log fields to deliver, data center, discard rate, delivery type, and delivery details.

  • Field filtering: Use the FieldName parameter to specify log fields to deliver.
  • Filtering rules: Use the FilterRules parameter to pre-process and filter log data.
  • Diverse delivery destinations: Logs can be delivered to different destinations. Configuration parameters vary with delivery destinations.

Precautions

  • Make sure that you have sufficient permissions to perform delivery tasks.
  • If you enable encryption or authentication, properly configure corresponding parameters.
  • Verify the syntax of FilterRules to make sure that filtering logic works as expected.
  • Specify advanced settings such as the number of retries and timeout period based on your needs to have optimal delivery efficiency and stability.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
esa:CreateUserDeliveryTaskcreate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
BusinessTypestringYes

The log category. Valid values:

  • dcdn_log_access_l1 (default): access logs.
  • dcdn_log_er: Edge Routine logs.
  • dcdn_log_waf: firewall logs.
  • dcdn_log_ipa: TCP/UDP proxy logs.
dcdn_log_access_l1
DataCenterstringYes

The data center. Valid values:

  • cn: the Chinese mainland.
  • sg: outside the Chinese mainland.
cn
TaskNamestringYes

The task name.

test_project
FieldNamestringYes

The log field. If you specify multiple fields, separate them with commas (,).

user_agent,ip_address,ip_port
DeliveryTypestringYes

The destination of the delivery. Valid values:

  1. sls: Alibaba Cloud SLS.
  2. http: HTTP server.
  3. aws3: Amazon S3.
  4. oss: Alibaba Cloud OSS.
  5. kafka: Kafka.
  6. aws3cmpt: S3-compatible storage service.
sls
DiscardRatefloatNo

The discard rate. Default value: 0.

0
S3DeliveryobjectNo

The configurations for delivery to Amazon S3 or an S3-compatible service.

RegionstringNo

The region ID of the service.

cn-shanghai
BucketPathstringNo

The directory in the bucket.

logriver-test/log
AccessKeystringNo

The access key ID of your Amazon S3 account.

g0f46623ll0g0
SecretKeystringNo

The secret access key of your Amazon S3 account.

***
EndpointstringNo

The endpoint.

https://s3.oss-cn-hangzhou.aliyuncs.com
PrefixPathstringNo

The prefix of the path in which you want to store logs.

logriver-test/log
S3CmptbooleanNo

Specifies whether the service is compatible with Amazon S3.

true
OssDeliveryobjectNo

The configurations for delivery to OSS.

RegionstringNo

The region in which the bucket is located.

cn-shanghai
AliuidstringNo

The ID of your Alibaba Cloud account.

1234***
BucketNamestringNo

The name of the OSS bucket.

test_rlog
PrefixPathstringNo

The prefix of the path in which you want to store logs.

logriver-test/log
HttpDeliveryobjectNo

The configurations for delivery to an HTTP server.

DestUrlstringNo

The address of the HTTP server.

http://xxx.aliyun.com/v1/log/upload
StandardAuthOnbooleanNo

Specifies whether to use server authentication.

true
StandardAuthParamobjectNo

The authentication configurations.

PrivateKeystringNo

The private key.

xxxx
ExpiredTimeintegerNo

The validity period of the signature.

300
UrlPathstringNo

The URL path.

v1/log/upload
MaxBatchSizelongNo

The maximum number of entries for each delivery.

1000
MaxBatchMBlongNo

The maximum size of data for each delivery. Unit: MB.

5
MaxRetrylongNo

The maximum number of retries.

3
TransformTimeoutlongNo

The timeout period. Unit: seconds.

10
LogBodyPrefixstringNo

The prefix of the log delivery package.

cdnVersion:1.0
LogBodySuffixstringNo

The suffix of the log delivery package.

cdnVersion:1.0
MinBackoffMSlongNo

The minimum backoff time. Unit: milliseconds.

100
MaxBackoffMSlongNo

The maximum backoff time. Unit: milliseconds.

1000
CompressstringNo

The compression method.

gzip
LogSplitstringNo

Specifies whether to enable log splitting. Default value: true.

true
LastLogSplitstringNo

The ending separator.

\n
LogSplitWordsstringNo

The log separator.

\n
ResponseBodyKeystringNo

The response field key used for success check.

err_code
SuccessCodelongNo

The custom code for a success.

200
HeaderParamobjectNo

The custom headers.

objectNo

The name of the custom header.

StaticValuestringNo

The value of the custom header.

aliyun
QueryParamobjectNo

The custom query parameters.

objectNo

The name of the custom query parameter.

StaticValuestringNo

The value of the custom query parameter.

v1.1
KafkaDeliveryobjectNo

The configurations for delivery to Kafka.

TopicstringNo

The topic.

dqc_test2
UserAuthbooleanNo

Specifies whether to enable authentication.

true
MachanismTypestringNo

The encryption method.

plain
UserNamestringNo

The username.

xxx
PasswordstringNo

The password.

xxx
BrokersarrayNo

The brokers.

stringNo

The Kafka brokers.

192.168.0.1:9902
CompressstringNo

The compression method. By default, data is not compressed.

gzip
BalancerstringNo

The load balancing method.

kafka.LeastBytes
SlsDeliveryobjectNo

The configurations for delivery to SLS.

SLSRegionstringNo

The region in which the SLS project resides.

cn-hangzhou
SLSProjectstringNo

The name of the SLS project.

dcdn-test20240417
SLSLogStorestringNo

The name of the SLS Logstore.

accesslog-test

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

2CCD40B1-3F20-5FF0-8A67-E3F34B87744F
TaskNamestring

The name of the delivery task.

er-http
DataCenterstring

The data center. Valid values:

  • cn: the Chinese mainland.
  • sg: outside the Chinese mainland.
cn
Statusstring

The status of the delivery task.

online

Examples

Sample success responses

JSONformat

{
  "RequestId": "2CCD40B1-3F20-5FF0-8A67-E3F34B87744F",
  "TaskName": "er-http",
  "DataCenter": "cn",
  "Status": "online"
}

Error codes

HTTP status codeError codeError messageDescription
400InternalErrorAn internal exception occurred, please try again later.An inner exception was triggered. Please try again later.
400InvalidParameterInvalid parameter. Check the parameter configuration.Invalid parameter. Check the parameter configuration.
403ErService.NotOpenEr service has not opend.Er service has not opend.
403RealTimeLog.S3EndpointInvalidErrorInvalid S3 information for the delivery task. Check your configurations and try again.Invalid S3 information for the delivery task. Check your configurations and try again.
403RealTimeLog.KafkaBrokersExceedErrorThe number of Kafka Broker addresses for real-time log delivery has reached the upper limit (50).The number of Kafka Broker addresses for real-time log delivery has reached the upper limit (50).
403RealTimeLog.StatusQuotaErrorThe maximum number of real-time log delivery tasks has been reached. Check your plan quota and upgrade the plan to request a quota increase.The maximum number of real-time log delivery tasks has been reached. Check your plan quota and upgrade the plan to request a quota increase.
403EsaService.NotOpenESA service has not opend.Edge Security Accelerator (ESA) is not turned on

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-12-26The Error code has changed. The request parameters of the API has changedView Change Details
2024-10-18The Error code has changedView Change Details
2024-09-27The Error code has changedView Change Details
2024-09-24The Error code has changedView Change Details