Adding Resolution Records

Last Updated: May 27, 2016

Description

Resolution records are added based on input parameters. Refer to Resolution Record Type Formats, Resolution Record Type Constraints, and Rules for Determinining Conflicting Resolution Records.

Request Parameters

Name Type Required? Description
Action String Yes Operator interface name, required parameter, value:AddDomainRecord
DomainName String Yes Domain name
RR String Yes A host record. To resolve @.example.com, you must add "@" to the host record. It cannot be blank
Type String Yes The resolution record type, refer to Resolution Record Type Formats
Value String Yes The record value
TTL Long No Time to live, default value: 600 seconds (10 minutes). Refer to TTL Definition Description
Priority Long No The MX record priority, value range: [1,10]. This parameter is required when the record type is MX record
Line String No The resolution line, default value: default. Refer to Resolution Line Enumeration

Return Parameters

Public return parameters. For details, see Public Return Parameters

Name Type Description
RequestId String The unique request identifier
RecordId String The resolution record ID

Error Codes

For errors common to all interfaces, please refer to the Error Code Table.

Error Code Description HTTP Status Code Meaning
IncorrectDomainUser The domain name does not belong to this user. 400 The domain name does not exist under this account
DomainRecordDuplicate The domain record is duplicated. 400 The resolution record does not exist
DomainRecordConflict The domain record is conflict with other records. 400 Resolution record conflict
QuotaExceeded.Record You Can’t add this domain record because the {“Type RR Line”} record has been out of MAX count (90). 400 Exceeds the maximum of 90 resolution records per type
QuotaExceeded.ARecord You Can’t add this domain record because the {“Type RR Line”} record has been out of MAX count. 400 Exceeds the maximum for the A(AAAA) record type
RecordForbidden.BlackHole The action could not be completed because there are some reords have been into black hole. 400 Protection of the domain name resolution has entered a black hole
DomainForbidden The action could not be completed because the domain has been forbidden. 400 The resolution operation is forbidden on this domain name
UnKnownError There is an unknown error in system. 400 Unknown error
URLForwardError.PanRecord The Pan-record is not supported in url forward record. 400 URL forwarding does not support pan resolution records
URLForwardError.NotDefaultLine The url forward record only support default line. 400 URL forwarding is not default line
URLForwardError. ChineseChar The Chinese char is not supported in url forward record. 400 The target domain name for URL forwarding is a Chinese domain name
URLForwardError.NotVerifyDomain The domain name must be verified in Hichina in url forward record. 400 The URL forwarding domain name has not been filed
QuotaExceeded.URLRecord The URL record has been out of MAX count. 400 The URL forwarding quantity exceeds the limit
QuotaExceeded.SubDomain The sub domain levels have been out of MAX count. 400 The subdomain name levels exceed the limit
QuotaExceeded.TTL The TTL parameter has been out of range. 400 The TTL time exceeds the limit
UnsupportedLine This line is not be supported in this DNS version. 400 The current version does not support resolution lines
RecordForbidden.DNSChange The action could not be completed because DNS is changing. 400 This operation is forbidden due to DNS migration

Example

Request Example

http://dns.aliyuncs.com/?Action=AddDomainRecord
&DomainName=example.com
&RR=www
&Type=A
&Value=202.106.0.20
&TTL=600
&Line=default
&<Public Request Parameters>

Return Example

XML Format

<AddDomainRecordResponse>
    <RequestId>536E9CAD-DB30-4647-AC87-AA5CC38C5382</RequestId>
    <RecordId>9999985</RecordId>
</AddDomainRecordResponse>

JSON Example

{
    "RequestId": "536E9CAD-DB30-4647-AC87-AA5CC38C5382",
    "RecordId": "9999985"
}
Thank you! We've received your feedback.