All Products
Search
Document Center

Edge Security Acceleration:GetRecord

Last Updated:Apr 16, 2025

Queries the configuration of a single DNS record, such as the record value, priority, and origin authentication setting (exclusive to CNAME records).

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:GetRecordget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RecordIdlongYes

The record ID, which can be obtained by calling ListRecords .

1234567890123

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

F32C57AA-7BF8-49AE-A2CC-9F42390F5A19
RecordModelobject

The information about the queried record.

BizNamestring

The business scenario of the record for acceleration. Leave this parameter empty if your record is not proxied. Valid values:

  • image_video
  • api
  • web
image_video
Dataobject

The DNS record information. The content returned by this parameter varies based on the record type.

Valuestring

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

  • A/AAAA: the IP address. Multiple IP addresses are separated with commas (,). There is at least one IPv4 address.
  • CNAME: the target domain name.
  • NS: the nameserver for the domain name.
  • MX: a valid domain name of the target 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.
example.com
Priorityinteger

The priority of the record. Valid values: 0 to 65535. A smaller value indicates a higher priority. This parameter is required when you add MX, SRV, and URI records.

10
Flaginteger

The flag bit of the record. The Flag for a CAA record indicates its priority and how it is processed, specified within the range of 0 to 255. This parameter is required when you add a CAA record.

128
Tagstring

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

issue
Weightinteger

The weight of the record, specified within the range of 0 to 65535. This parameter is required when you add SRV or URI records.

0
Portinteger

The port of the record. Valid values: 0 to 65535. This parameter is required when you add an SRV record.

8707
Typeinteger

The certificate type of the record (in CERT records), or the public key type (in SSHFP records). This parameter is required when you add CERT or SSHFP records.

RSA
KeyTaginteger

The public key identification for the record. Valid values: 0 to 65535. This parameter is required when you add a CAA record.

1
Algorithminteger

The encryption algorithm used for the record, specified within the range from 0 to 255. This parameter is required when you add CERT or SSHFP records.

1
Certificatestring

The public key of the certificate. This parameter is required when you add CERT, SMIMEA, or TLSA records.

dGVzdGFkYWxrcw==
Usageinteger

The usage identifier of the record, specified within the range of 0 to 255. This parameter is required when you add SMIMEA or TLSA records.

0
Selectorinteger

The type of the certificate or public key, specified within the range of 0 to 255. This parameter is required when you add SMIMEA or TLSA records.

1
MatchingTypeinteger

The algorithm policy used to match or validate the certificate, specified within the range 0 to 255. This parameter is required when you add SMIMEA or TLSA records.

1
Fingerprintstring

The public key fingerprint of the record. This parameter is required when you add a SSHFP record.

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-03-10T13:30:39Z
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-01-27T02:26:22Z
Proxiedboolean

Indicates whether the record is proxied. Only CNAME and A/AAAA records can be proxied. Valid values:

  • true
  • false
true
RecordIdlong

The record ID.

1234567890123
RecordNamestring

The record name.

a.example.com
RecordTypestring

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

A/AAAA
SiteIdlong

The website ID.

1234567890123
SiteNamestring

The website name.

example.com
Ttlinteger

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

20
RecordSourceTypestring

The origin type for the CNAME record. This parameter is required 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
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 comment.
AuthConfobject

The origin authentication information of the CNAME record.

AuthTypestring

The authentication type of the origin server. Different origins support different authentication types. The origin type refers to the SourceType parameter in this operation. This parameter is returned if the origin type is OSS or S3Valid 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 in the same account. This value is returned when the origin is a private OSS bucket in your 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.
public
SecretKeystring

The secret access key of the account to which the origin server belongs. This parameter is returned if the origin type is OSS and AuthType is set to private_cross_account, or the origin type is S3 and AuthType is set to private.SecretKey

u0Nkg5gBK*******QF5wvKMM504JUHt
AccessKeystring

The access key ID of the account to which the origin server belongs. This parameter is returned if the origin type is OSS and AuthType is set to private_cross_account, or the origin type is S3 and AuthType is set to private.

VIxuvJSA2S03f******kp208dy5w7
Versionstring

The version of the signature algorithm. This parameter is returned when the origin type is S3 and AuthType is private. The following two types are supported:

  • v2
  • v4

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

v2
Regionstring

The region of the origin. If the origin type is S3, you must specify this value. You can obtain the region information from the official website of 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": "F32C57AA-7BF8-49AE-A2CC-9F42390F5A19",
  "RecordModel": {
    "BizName": "image_video",
    "Data": {
      "Value": "example.com",
      "Priority": 10,
      "Flag": 128,
      "Tag": "issue",
      "Weight": 0,
      "Port": 8707,
      "Type": 0,
      "KeyTag": 1,
      "Algorithm": 1,
      "Certificate": "dGVzdGFkYWxrcw==",
      "Usage": 0,
      "Selector": 1,
      "MatchingType": 1,
      "Fingerprint": "abcdef1234567890"
    },
    "CreateTime": "2023-03-10T13:30:39Z",
    "UpdateTime": "2023-01-27T02:26:22Z",
    "Proxied": true,
    "RecordId": 1234567890123,
    "RecordName": "a.example.com",
    "RecordType": "A/AAAA",
    "SiteId": 1234567890123,
    "SiteName": "example.com",
    "Ttl": 20,
    "RecordSourceType": "OSS ",
    "RecordCname": "a.example.com.cnamezone.com",
    "Comment": "This is a comment.",
    "AuthConf": {
      "AuthType": "public",
      "SecretKey": "u0Nkg5gBK*******QF5wvKMM504JUHt",
      "AccessKey": "VIxuvJSA2S03f******kp208dy5w7",
      "Version": "v2",
      "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.
404Record.NotFoundThe record does not exist. Check your configurations and try again.The record does not exist. Check your configurations and try again.

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

Change history

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