Creates a service-linked role (SLR) and a Log Service project.

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


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 CreateSlrAndSlsProject

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

Region String Yes cn-shanghai

The region where Log Service resides. Valid values:

  • cn-hangzhou
  • cn-shanghai
  • cn-qingdao
  • cn-beijing
  • cn-zhangjiakou
  • cn-shenzhen
  • eu-central-1
  • us-west-1
  • ap-south-1
  • ap-southeast-1

Response parameters

Parameter Type Example Description
RequestId String fe33a379-5053-4f22-a73c-826e2b44355d

The ID of the request.

SlsInfo Struct

The information about Log Service.

EndPoint String cn-shanghai.log.*.com

The endpoint of Log Service.

LogStore String dcdn-edge-trlog

The Logstore of Log Service.

Project String dcdn-edge-rtlog-cn-cfc7****

The project of Log Service.

Region String cn-shanghai

The region where Log Service resides.


Sample requests
&<Common request parameters>

Sample success responses

XML format


JSON format

    "SlsInfo": {
        "Project": "dcdn-edge-rtlog-cn-cfc7****",
        "LogStore": "dcdn-edge-trlog",
        "EndPoint": "cn-shanghai.log.*.com",
        "Region": "cn-shanghai"
    "RequestId": "fe33a379-5053-4f22-a73c-826e2b44355d"

Error codes

HttpCode Error code 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.
400 CreateSlr.PermissionDenied You are not authorized to create service-linked roles. Contact your Alibaba Cloud account or an administrator to grant you the AliyunDCDNFullAccess policy or the custom policy used to create service-linked roles. Service name: Action: ram:CreateServiceLinkedRole. The error message returned because you do not have permissions to create SLRs. You must contact the owner of the Alibaba Cloud account or permission administrator to acquire the AliyunDCDNFullAccess permission or attach a custom permission policy to the SLR. The information about the custom permission policy: The service name is, the name of the SLR is AliyunServiceRoleForDCDNRealTimeLogDelivery, and the required permission is ram:CreateServiceLinkedRole.
400 CreateSlsProjectError Failed to create a Log Service project. Make sure that you have activated Log Service and the service is in the available state. The error message returned because the creation of a Log Service project failed. Make sure that Log Service is activated and available.

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