All Products
Search
Document Center

CDN:DescribeDomainCname

Last Updated:Nov 29, 2024

Detects the CNAME for an accelerated domain name. You can check the resolution result to determine whether the CNAME is configured.

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:
    • The required resource types are displayed in bold characters.
    • 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
cdn:DescribeDomainCnameget
*Domain
acs:cdn:*:{#accountId}:domain/{#DomainName}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DomainNamestringYes

The accelerated domain name that you want to query. Separate multiple domain names with commas (,). This parameter cannot be left empty.

pay.slci6c.mbolsos.com,mch.b7r2v7.mbolsos.com,p.h99e.mbolsos.com,p.xmko.mbolsos.com,p.f2kd.mbolsos.com

Response parameters

ParameterTypeDescriptionExample
object

The detection results.

RequestIdstring

The ID of the request.

06D29681-B7CD-4034-A8CC-28AFFA213539
CnameDatasarray<object>

Details about the CNAME detection results.

Dataobject

The CNAME information.

Statusinteger

The CNAME detection result. Valid values:

  • 0: The DNS can detect the CNAME assigned to the domain name.
  • Value other than 0: The DNS cannot detect the CNAME assigned to the domain name.
0
Domainstring

The accelerated domain name.

a.com
Cnamestring

The CNAME assigned to the domain name by Alibaba Cloud CDN.

a.com.w.alikunlun.net

Examples

Sample success responses

JSONformat

{
  "RequestId": "06D29681-B7CD-4034-A8CC-28AFFA213539",
  "CnameDatas": {
    "Data": [
      {
        "Status": 0,
        "Domain": "a.com",
        "Cname": "a.com.w.alikunlun.net"
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400DomainNameOverLimitA maximum of 30 domains are supported for each request.-
403InvaildParameterThe parameter you provided is invalid.The format of the domain name is invalid. Correct the format and try again.

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

Change history

Change timeSummary of changesOperation
2023-07-20The Error code has changedView Change Details