You can call the ListDomainsByLogConfigId operation to query all CDN domains associated with a custom log configuration.

Debugging

Alibaba Cloud provides OpenAPI Explorer to simplify API usage. You can use OpenAPI Explorer to search for APIs, call APIs, and dynamically generate SDK example code.

Request parameters

Parameter Type Required Description
Action String Yes The operation that you want to perform. Set this parameter to ListDomainsByLogConfigId.
ConfigId String Yes The ID of the custom log configuration.

Response parameters

Parameter Type Description
RequestId String The ID of the request.
Domains List The CDN domain names.

Examples

Sample request

https://cdn.aliyuncs.com?Action=ListDomainsByLogConfigId&ConfigId=9732E117-8A37-49FD-A36F-ABBB87556CA7&<Common request parameters>

Sample success response

JSON format

{
    "RequestId": "9732E117-8A37-49FD-A36F-ABBB87556CA7",
    "Domains": {
        "Domain": [
            "example1.com",
            "example.com",
             ...
        ]
    }
}

Error codes

Error code Error message HTTP status code Description
Domains.NotFound No domain used in this log config or the configId provided does not belong to you. 404 The error message returned because the specified log configuration is not applied to any CDN domains.
InvalidConfigId Illegal ConfigId 403 The error message returned because the specified ConfigId parameter is invalid.