All Products
Search
Document Center

Edge Security Acceleration:ListRecords

Last Updated:Apr 16, 2025

Queries a list of Domain Name System (DNS) records of a website, including the record value, priority, and authentication configurations. Supports filtering by specifying parameters such as RecordName and RecordMatchType.

Operation description

The DNS records related to Edge Container, Edge Routine, and TCP/UDP proxy are not returned in this operation.

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

Request parameters

ParameterTypeRequiredDescriptionExample
SiteIdlongYes

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

1234567890123
RecordNamestringNo

The record name. This parameter specifies a filter condition for the query.

www.example.com
RecordMatchTypestringNo

The match mode to search for the record name. Default value: exact. Valid values:

  • prefix: match by prefix.
  • suffix: match by suffix.
  • exact: exact match.
  • fuzzy: fuzzy match.
fuzzy
PageNumberintegerNo

The page number. Default value: 1.

1
PageSizeintegerNo

The number of entries per page. Default value: 500.

10
SourceTypestringNo

The origin type of the record. Only CNAME records can be filtered by using this field. Valid values:

  • OSS: OSS bucket.
  • S3: S3 bucket.
  • LB: load balancer.
  • OP: origin pool.
  • Domain: domain name.
OSS
BizNamestringNo

The business scenario of the record for acceleration. Valid values:

  • image_video: video and image.
  • api: API.
  • web: web page.
web
ProxiedstringNo

Filters by whether the record is proxied. Valid values:

  • true
  • false
true
TypestringNo

The DNS record type.

CNAME

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

15C66C7B-671A-4297-9187-2C4477247A74
PageNumberinteger

The page number returned.

1
PageSizeinteger

The number of entries per page.

10
TotalCountinteger

The total number of records returned.

20
Recordsarray<object>

The DNS record information. The format of this field varies based on the record type. For more information, see Add DNS records.

recordPageDataobject

The queried record.

BizNamestring

The business scenario of the record for acceleration. Valid values:

  • image_video: video and image.
  • api: API.
  • web: web page.
web
Dataobject

The DNS record information. Different types of records contain different information.

Valuestring

Record value or part of the record content. This value is returned when the record is A/AAAA, CNAME, NS, MX, TXT, CAA, SRV, or URI. It has different meanings based on types of records:

  • A/AAAA: the IP addresses. IP addresses are separated by commas (,). There is at least one IPv4 address.
  • CNAME: the pointed/mapped domain name.
  • NS: the nameservers for the domain name.
  • MX: a valid domain name of the mail server.
  • TXT: a valid text string.
  • CAA: a valid domain name of the certificate authority.
  • SRV: a valid domain name of the target host.
  • URI: a valid URI string.
CNAME
Priorityinteger

The priority of the record. Valid values: 0 to 65535. A smaller value indicates a higher priority. Exclusive to MX, SRV, and URI records.

0
Flaginteger

The flag bit of the record. The Flag for a CAA record indicates its priority and how it is processed. Valid values: 0 to 255. Exclusive to CAA records.

128
Tagstring

The tag of the record. The Tag of a CAA record indicate its specific type and usage. Exclusive to CAA records.

issue
Weightinteger

The weight of the record. Valid values: 0 to 65535. Exclusive to SRV and URI records.

0
Portinteger

The port of the record. Valid values: 0 to 65535. Exclusive to SRV records.

80
Typeinteger

The certificate type of the record (in CERT records), or the public key type (in SSHFP records).

0
KeyTaginteger

The public key identification for the record. Valid values: 0 to 65535. Exclusive to CERT records.

0
Algorithminteger

The encryption algorithm used for the record. Valid values: 0 to 255. Exclusive to CERT and SSHFP records.

0
Certificatestring

The public key of the certificate. Exclusive to CERT, SMIMEA, and TLSA records.

dGVzdGFkYWxrcw==
Usageinteger

The usage identifier of the record. Valid values: 0 to 255. Exclusive to SMIMEA, and TLSA records.

0
Selectorinteger

The type of certificate or public key. Valid values: 0 to 255. Exclusive to SMIMEA, and TLSA records.

0
MatchingTypeinteger

The algorithm policy used to match or validate the certificate. Valid values: 0 to 255. Exclusive to SMIMEA and TLSA records.

0
Fingerprintstring

The public key fingerprint of the record. Exclusive to SSHFP records.

abcdef1234567890
CreateTimestring

The time when the record was created. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2023-12-24T02:01:11Z
UpdateTimestring

The time when the record was updated. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2023-06-07T10:02:59Z
Proxiedboolean

Indicates whether the record is proxied. Valid values:

  • true
  • false
true
RecordIdlong

The record ID.

1234567890123
RecordSourceTypestring

The origin type for the CNAME record. This parameter is returned when you add a CNAME record. Valid values:

  • OSS: OSS bucket.
  • S3: S3 bucket.
  • LB: load balancer.
  • OP: origin pool.
  • Domain: domain name.

If you do not pass this parameter or if you leave its value empty, Domain is returned by default.

OSS
RecordNamestring

The record name.

a.example.com
RecordTypestring

The DNS type of the record, such as A/AAAA, CNAME, and TXT.

A/AAAA
SiteIdlong

The website ID.

1234567890123
SiteNamestring

The website name.

example.com
Ttllong

The TTL of the record. Unit: seconds. If the value is 1, the TTL of the record is determined by the system.

30
RecordCnamestring

The CNAME. If you use CNAME setup when you add your website to ESA, the value is the CNAME that you configured then.

a.example.com.cnamezone.com
Commentstring

The comments of the record.

this is a remark.
AuthConfobject

The origin authentication information of the CNAME record.

AuthTypestring

The authentication type of the origin server. Different origins support different authentication types. The type of origin refers to the SourceType parameter in this operation. If the type of origin is OSS or S3, the authentication type of the origin must be specified. Valid values:

  • public: public read. This value is returned when the origin is a public OSS or S3 bucket.
  • private: private read. This value is returned when the origin is a private S3 bucket.
  • private_same_account: private read under the same account. This value is returned when the origin is a private OSS bucket in your Alibaba Cloud account.
  • private_cross_account: private read across accounts. This value is returned when the origin is a private OSS bucket in a different Alibaba Cloud account.
private
AccessKeystring

The access key of the account to which the origin server belongs. This value is returned when the SourceType is OSS, and AuthType is private_cross_account, or when the SourceType is S3 and AuthType is private.

u0Nkg5gBK***QF5wvKMM504JUHt
SecretKeystring

The secret access key of the account to which the origin server belongs. This value is returned when the SourceType is OSS, and AuthType is private_same_account, or when the SourceType is S3 and AuthType is private.

VIxuvJSA2S03f***kp208dy5w7
Versionstring

The version of the signature algorithm. This value is returned when the origin type is S3 and AuthType is private. Valid values:

  • v2
  • v4

If this parameter is left empty, the default value v4 is used.

v4
Regionstring

The region of the origin. This parameter is returned if the origin type is S3. You can get the region information from the official website of Amazon S3.

us-east-1
HostPolicystring

The origin host policy. This policy takes effect when the record type is CNAME. Valid values:

  • follow_hostname: matches the requested domain name.
  • follow_origin_domain: matches the origin's domain name.
follow_origin_domain

Examples

Sample success responses

JSONformat

{
  "RequestId": "15C66C7B-671A-4297-9187-2C4477247A74",
  "PageNumber": 1,
  "PageSize": 10,
  "TotalCount": 20,
  "Records": [
    {
      "BizName": "web",
      "Data": {
        "Value": "CNAME",
        "Priority": 0,
        "Flag": 128,
        "Tag": "issue",
        "Weight": 0,
        "Port": 80,
        "Type": 0,
        "KeyTag": 0,
        "Algorithm": 0,
        "Certificate": "dGVzdGFkYWxrcw==",
        "Usage": 0,
        "Selector": 0,
        "MatchingType": 0,
        "Fingerprint": "abcdef1234567890"
      },
      "CreateTime": "2023-12-24T02:01:11Z",
      "UpdateTime": "2023-06-07T10:02:59Z",
      "Proxied": true,
      "RecordId": 1234567890123,
      "RecordSourceType": "OSS",
      "RecordName": "a.example.com",
      "RecordType": "A/AAAA",
      "SiteId": 1234567890123,
      "SiteName": "example.com",
      "Ttl": 30,
      "RecordCname": "a.example.com.cnamezone.com",
      "Comment": "this is a remark.",
      "AuthConf": {
        "AuthType": "private",
        "AccessKey": "u0Nkg5gBK***QF5wvKMM504JUHt",
        "SecretKey": "VIxuvJSA2S03f***kp208dy5w7",
        "Version": "v4",
        "Region": "us-east-1"
      },
      "HostPolicy": "follow_origin_domain"
    }
  ]
}

Error codes

HTTP status codeError codeError messageDescription
400InternalExceptionFailed to call the service. Try again later or contact technical support.Failed to call the service. Try again later or contact technical support.

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

Change history

Change timeSummary of changesOperation
2024-11-19The Error code has changedView Change Details
2024-09-23The Error code has changed. The response structure of the API has changedView Change Details