阅读583 返回首页    go 微软 go windows


添加解析记录__解析管理接口_API文档_云解析-阿里云

描述

根据传入参数添加解析记录。 参见解析记录类型格式解析记录类型约束解析记录冲通判断规则

请求参数

名称 类型 是否必须 描述
Action String 操作接口名,系统规定参数,取值:AddDomainRecord
DomainName String 域名名称
RR String 主机记录,如果要解析@.exmaple.com,主机记录要填写"@”,而不是空
Type String 解析记录类型,参见解析记录类型格式
Value String 记录值
TTL Long 生存时间,默认为600秒(10分钟),参见TTL定义说明
Priority Long MX记录的优先级,取值范围[1,10],记录类型为MX记录时,此参数必须
Line String 解析线路,默认为default。参见解析线路枚举

返回参数

公共返回参数,详见公共返回参数

名称 类型 描述
RequestId String 唯一请求识别码
RecordId String 解析记录的ID

错误码

对于所有接口的通用性错误,请参考错误代码表

错误代码 描述 HTTP 状态码 语义
IncorrectDomainUser The domain name does not belong to this user. 400 域名在本账户下不存在
DomainRecordDuplicate The domain record is duplicated. 400 解析记录已存在
DomainRecordConflict The domain record is conflict with other records. 400 解析记录冲突
QuotaExceeded.Record You Can’t add this domain record because the {“Type RR Line”} record has been out of MAX count (90). 400 超出解析记录类型最大值90
QuotaExceeded.ARecord You Can’t add this domain record because the {“Type RR Line”} record has been out of MAX count. 400 超出A(AAAA)记录类型最大值
RecordForbidden.BlackHole The action could not be completed because there are some reords have been into black hole. 400 域名解析防护进入黑洞
DomainForbidden The action could not be completed because the domain has been forbidden. 400 禁止解析操作的域名
UnKnownError There is an unknown error in system. 400 未知错误
URLForwardError.PanRecord The Pan-record is not supported in url forward record. 400 URL转发不支持泛解析记录
URLForwardError.NotDefaultLine The url forward record only support default line. 400 URL转发不是默认线路
URLForwardError. ChineseChar The Chinese char is not supported in url forward record. 400 URL转发目标域名为中文域名
URLForwardError.NotVerifyDomain The domain name must be verified in Hichina in url forward record. 400 URL转发域名未备案
QuotaExceeded.URLRecord The URL record has been out of MAX count. 400 URL转发数量超过限制
QuotaExceeded.SubDomain The sub domain levels have been out of MAX count. 400 子域名级别超过限制
QuotaExceeded.TTL The TTL parameter has been out of range. 400 TTL时间超出限制
UnsupportedLine This line is not be supported in this DNS version. 400 当前版本不支持的解析线路
RecordForbidden.DNSChange The action could not be completed because DNS is changing. 400 DNS迁移过程禁止操作

示例

请求示例

https://alidns.aliyuncs.com/?Action=AddDomainRecord
&DomainName=example.com
&RR=www
&Type=A
&Value=202.106.0.20
&TTL=600
&Line=default
&<公共请求参数>

返回示例

XML格式

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

JSON示例

{
    "RequestId": "536E9CAD-DB30-4647-AC87-AA5CC38C5382",
    "RecordId": "9999985"
}

最后更新:2016-11-23 17:16:06

  上一篇:go 检测解析记录是否生效__域名找回接口_API文档_云解析-阿里云
  下一篇:go 删除解析记录__解析管理接口_API文档_云解析-阿里云