Creates a real-time log delivery project.

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

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 CreateDcdnSLSRealTimeLogDelivery

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

DataCenter String Yes cn

The region from which logs are collected.

DomainName String Yes example.com

The domain names from which logs are collected. You can specify one or more domain names. Separate multiple domain names with commas (,).

ProjectName String Yes example

The name of the real-time log delivery project.

SLSLogStore String Yes demo

The name of the Log Service Logstore.

SLSProject String Yes aliyundoc

The name of the Log Service project.

SLSRegion String Yes cn-hangzhou

The region to which real-time logs are delivered.

SamplingRate String No 1.0

The sampling rate.

BusinessType String No cdn_log_access_l1

The type of logs that you collect. Default value: cdn_log_access_l1. Valid values:

  • cdn_log_access_l1: access logs of L1 Dynamic Route for CDN (DCDN) nodes
  • cdn_log_origin: back-to-origin logs
  • cdn_log_er: EdgeRoutine logs

Response parameters

Parameter Type Example Description
Content Array of Domains

The configuration results of the domain name.

Domains
Desc String ok

The description of the returned result.

DomainName String example.com

The domain name from which real-time logs were collected.

Region String cn

The region to which real-time logs were delivered.

Status String success

The status of real-time logs.

RequestId String F32C57AA-7BF8-49AE-A2CC-9F42390F5A19

The ID of the request.

Examples

Sample requests

https://dcdn.aliyuncs.com?Action=CreateDcdnSLSRealTimeLogDelivery
&DataCenter=cn
&DomainName=example.com
&ProjectName=example
&SLSLogStore=demo
&SLSProject=aliyundoc
&SLSRegion=cn-hangzhou
&<Common request parameters>

Sample success responses

XML format

<CreateDcdnSLSRealTimeLogDeliveryResponse>
  <RequestId>F32C57AA-7BF8-49AE-A2CC-9F42390F5A19</RequestId>
  <Content>
        <Domains>
              <DomainName>example.com</DomainName>
              <Region>cn</Region>
              <Status>success</Status>
              <Desc>ok</Desc>
        </Domains>
        <Domains>
              <DomainName>example.org</DomainName>
              <Region>sg</Region>
              <Status>success</Status>
              <Desc>ok</Desc>
        </Domains>
  </Content>
</CreateDcdnSLSRealTimeLogDeliveryResponse>

JSON format

{
    "RequestId": "F32C57AA-7BF8-49AE-A2CC-9F42390F5A19",
    "Content": {
        "Domains": [
            {
                "DomainName": "example.com",
                "Region": "cn",
                "Status": "success",
                "Desc": "ok"
            },
            {
                "DomainName": "example.org",
                "Region": "sg",
                "Status": "success",
                "Desc": "ok"
            }
        ]
    }
}

Error codes

HttpCode Error codes Error message Description
400 Unauthorized RealtimeLogDelivery service is not authorized. The error message returned because you are not authorized to use real-time log delivery.

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