All Products
Search
Document Center

Edge Security Acceleration:CreateSiteDeliveryTask

Last Updated:Nov 15, 2025

Creates a real-time log delivery task.

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:CreateSiteDeliveryTasknone
*Site
acs:esa:{#regionId}:{#accountId}:site/{#SiteId}
    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
SiteIdlongYes

The website ID, which can be obtained by calling the ListSites operation.

12312312112***
DataCenterstringYes

The data center. Valid values:

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

The name of the delivery task.

dcdn-test-task
FieldNamestringYes

The log fields, which are separated by commas (,).

user_agent,ip_adress,ip_port
DeliveryTypestringYes

The destination of the delivery. Valid values:

  • sls: Alibaba Cloud Simple Log Service (SLS).
  • http: HTTP server.
  • aws3: Amazon Simple Storage Service (S3).
  • oss: Alibaba Cloud Object Storage Service (OSS).
  • kafka: Kafka.
  • aws3cmpt: S3-compatible storage service.
sls
DiscardRatefloatNo

The discard rate. Default value: 0.

0.0
S3DeliveryobjectNo

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

RegionstringNo

The region ID of the service.

cn-beijing
BucketPathstringNo

The directory in the bucket.

logriver-test/log
AccessKeystringNo

The access key ID of your Amazon S3 account.

yourAccessKeyID
SecretKeystringNo

The secret access key of your Amazon S3 account.

LDSIKh***
EndpointstringNo

The endpoint. This parameter is required when the S3Cmpt parameter is set to true.

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-beijing
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.

***
ExpiredTimeintegerNo

The validity period of the signature.

Note The value must be greater than 0. We recommend that you specify a value that is greater than 300.
300
UrlPathstringNo

The URI path for server authentication.

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
CompressstringNo

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

gzip
HeaderParamobjectNo

The custom headers.

objectNo

The header field.

StaticValuestringNo

The static variable.

alicdn
QueryParamobjectNo

The custom query parameters.

objectNo

The name of the custom request parameter.

StaticValuestringNo

The static variable.

alicdn
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.

***
BrokersarrayNo

The brokers.

stringNo

The Kafka brokers.

192.168.xxx.xxx:9902
CompressstringNo

The compression method.

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 Logstore.

accesslog-test

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

9358E852-992D-5BC7-8BD7-975CA02773A8
TaskNamestring

The name of the delivery task.

er-oss
SiteIdstring

The website ID.

123456****
DataCenterstring

The data center. Valid values:

  • cn: the Chinese mainland.
  • oversea: outside the Chinese mainland.
cn

Examples

Sample success responses

JSONformat

{
  "RequestId": "9358E852-992D-5BC7-8BD7-975CA02773A8",
  "TaskName": "er-oss",
  "SiteId": "123456****",
  "DataCenter": "cn"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameterThe specified parameter is invalid.The specified parameter is invalid.
400RealTimeLog.ProjectExistErrorThe real-time log delivery task name already exists. Check the task name and try again.The real-time log delivery task name already exists. Check the task name and try again.
400InternalErrorAn internal exception occurred, please try again later.An inner exception was triggered. Please try again later.
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.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.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
2025-02-28The Error code has changed. The response structure 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