All Products
Search
Document Center

Edge Security Acceleration:CreateRecord

Last Updated:Nov 07, 2025

Creates a DNS record for a specific website.

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:CreateRecordcreate
*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
RecordNamestringYes

The record name.

www.example.com
ProxiedbooleanNo

Specifies whether to proxy the record. Only CNAME and A/AAAA records can be proxied. Valid values:

  • true
  • false
true
TypestringYes

The type of the DNS record. For example, A/AAAA, TXT, MX, or CNAME.

A/AAAA
SourceTypestringNo

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 used by default.

OSS
BizNamestringNo

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

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

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

30
DataobjectYes

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

ValuestringNo

Record value or part of the record content. This parameter is required 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(es). Separate IP addresses with commas (,). You must have at least one IPv4 address.
  • CNAME: the target domain name.
  • NS: the name servers 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
PriorityintegerNo

The priority of the record, specified within the range of 0 to 65,535. A smaller value indicates a higher priority. This parameter is required when you add MX, SRV, and URI records.

10
FlagintegerNo

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
TagstringNo

The label of the record. The Tag of a CAA record indicate its specific type and usage. This parameter is required when you add a CAA record. Valid values:

  • issue: indicates that a CA is authorized to issue a certificate for the domain name. This is usually followed by the domain name of the CA.
  • issuewild: indicates that a CA is authorized to issue a wildcard certificate (such as *.example.com) for the domain name.
  • iodef: specifies a URI to receive reports about CAA record violations.
issue
WeightintegerNo

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

0
PortintegerNo

The port of the record, specified within the range of 0 to 65,535. This parameter is required when you add an SRV record.

0
TypeintegerNo

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
KeyTagintegerNo

The public key identification for the record, specified within the range of 0 to 65,535. This parameter is required when you add a CAA record.

0
AlgorithmintegerNo

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
CertificatestringNo

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

dGVzdGFkYWxrcw==
UsageintegerNo

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.

1
SelectorintegerNo

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

1
MatchingTypeintegerNo

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
FingerprintstringNo

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

abcdef1234567890
CommentstringNo

The comment of the record. The maximum length is 100 characters.

This is a remark.
AuthConfobjectNo

The origin authentication information of the CNAME record.

AuthTypestringNo

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, you must specify the authentication type of the origin. Valid values:

  • public: public read. Select this value when the origin type is OSS or S3 and the origin access is public read.
  • private: private read. Select this value when the origin type is S3 and the origin access is private read.
  • private_same_account: private read under the same account. Select this value when the origin type is OSS, the origins belong to the same Alibaba Cloud account, and the origins have private read access.
  • private_cross_account: private read cross accounts. Select this value when the origin type is OSS, the origins belong to different Alibaba Cloud accounts, and the origins have private read access.
private
AccessKeystringNo

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

u0Nkg5gBK*******QF5wvKMM504JUHt
SecretKeystringNo

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

VIxuvJSA2S03f******kp208dy5w7
VersionstringNo

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

  • v2
  • v4

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

v4
RegionstringNo

The region of the origin. If the origin type is S3, you must specify this value. You can get the region information from the official website of S3.

us-east-1
HostPolicystringNo

The origin host policy. This policy takes effect when the record type is CNAME. You can set the policy in two modes:

  • follow_hostname: Follow the host record.
  • follow_origin_domain: match the origin's domain name.
follow_origin_domain

The Data field of a record contains the DNS information for the record. The format of this field varies based on the record type. For more information, see References .

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

F61CDR30-E83C-4FDA-BF73-9A94CDD44229
RecordIdlong

The record ID.

1234567890123

Examples

Sample success responses

JSONformat

{
  "RequestId": "F61CDR30-E83C-4FDA-BF73-9A94CDD44229",
  "RecordId": 1234567890123
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameterThe specified parameter is invalid.The specified parameter is invalid.
400InvalidParameter.InvalidRecordNameThe record name you entered does not meet the specifications. Change the record name according to the product documentation.The record name you entered does not meet the specifications. Please adjust the record name according to the product documentation.
400ServiceInvokeFailedThe call to the internal service failed. The engineer is resolving the problem. Please wait a moment before trying, or contact customer service for details.Failed to call the service. Please try again later or contact customer service for details.
400InternalExceptionFailed to call the service. Try again later or contact technical support.Failed to call the service. Try again later or contact technical support.
400InvalidParameter.RecordDataInvalid record content. Adjust your configurations based on the API documentation.Invalid record content. Adjust your configurations based on the API documentation.
400InvalidParameter.RecordTypeInvalid record type. Adjust your configurations based on the API documentation.Invalid record type. Adjust your configurations based on the API documentation.
400Instance.NotOnlineYour plan is unavailable due to an overdue payment. Complete the payment first.Your plan is unavailable due to an overdue payment. Complete the payment first.
400QuotaExceed.RecordCountThe maximum number of records has been reached. Delete some and try again or upgrade your plan.The maximum number of records has been reached. Delete some and try again or upgrade your plan.
400Record.ConflictThe specified record content conflicts with existing records. Adjust your configurations based on the related product documentation.The specified record content conflicts with existing records. Adjust your configurations based on the related product documentation.
400Site.ServiceBusyThis website is being configured. Try again later.This website is being configured. Try again later.
400SourceCircleExistThe host record of the resource to be operated on is already the source station of another resource, or the source station of the current resource has been added as a host record. To avoid loopback, modify the host record or source station and retry.The host record of the resource to be operated on is already the source station of another resource, or the source station of the current resource has been added as a host record. To avoid loopback, modify the host record or source station and retry.
400QuotaExceed.WildCardRecordThe maximum number of wildcard records has been reached. Delete some and try again.The maximum number of wildcard records has been reached. Delete some and try again.
400WildcardRecordsExceedLimitThe number of pan records currently added has exceeded the system limit. If you want to add more pan records, please contact the background with a work order.The number of pan records currently added has exceeded the system limit. If you want to add more pan records, please contact the background with a work order.

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

Change history

Change timeSummary of changesOperation
2025-02-18The Error code has changedView Change Details
2024-11-05The Error code has changedView Change Details
2024-10-10The Error code has changedView Change Details
2024-09-24The Error code has changedView Change Details
2024-09-23The Error code has changed. The request parameters of the API has changedView Change Details