开发者社区> 问答> 正文

云解析怎么批量添加域名解析记录



AddBatchDomainRecords



描述


根据传入参数批量添加域名和解析记录。使用HTTP POST请求。

请求参数

名称类型是否必须描述
ActionString操作接口名,系统规定参数,取值:AddBatchDomainRecords
RecordsString要添加的域名和解析, 以JSON字符串的形式提交(不包含回车换行符),最多支持5,000个解析记录。


返回参数


公共返回参数,详见 公共返回参数
名称类型描述
RequestIdString唯一请求识别码
TraceIdString批量任务ID


错误码


对于所有接口的通用性错误,请参考 错误代码表
错误代码描述HTTP 状态码语义
IllegalUserThe user ID is illegal.400未被授权的用户ID
QuotaExceeded.BatchNumberYou Can’t finish this operation because the batch number has been out of MAX count.400批量操作的数量超过限制
OperationThreadInUsedYou Can’t finish this operation because the thread of operation has been in used.400批量操作的线程被其他用户占用
DataFormatErrorThe data format is error.400数据格式不正确


示例



请求示例

  1. [backcolor=transparent]http[backcolor=transparent]:[backcolor=transparent]//alidns.aliyuncs.com/?Action=AddBatchDomainRecords  HTTP 1.1
  2. [backcolor=transparent]Records[backcolor=transparent]={
  3. [backcolor=transparent]    [backcolor=transparent]"RR"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"www"[backcolor=transparent],
  4. [backcolor=transparent]    [backcolor=transparent]"Type"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"A"[backcolor=transparent],
  5. [backcolor=transparent]    [backcolor=transparent]"priority"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"10"[backcolor=transparent],[backcolor=transparent]//注释:非MX记录不需要;
  6. [backcolor=transparent]    [backcolor=transparent]"Value"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"1.1.1.1"[backcolor=transparent],
  7. [backcolor=transparent]    [backcolor=transparent]"Domains"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent][
  8. [backcolor=transparent]        [backcolor=transparent]{
  9. [backcolor=transparent]            [backcolor=transparent]"Index"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"1"[backcolor=transparent],
  10. [backcolor=transparent]            [backcolor=transparent]"Domain"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"abc.com"
  11. [backcolor=transparent]        [backcolor=transparent]},
  12. [backcolor=transparent]        [backcolor=transparent]{
  13. [backcolor=transparent]            [backcolor=transparent]"Index"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"2"[backcolor=transparent],
  14. [backcolor=transparent]            [backcolor=transparent]"Domain"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"example.com"
  15. [backcolor=transparent]        [backcolor=transparent]},
  16. [backcolor=transparent]        [backcolor=transparent]{
  17. [backcolor=transparent]            [backcolor=transparent]"Index"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"10000"[backcolor=transparent],
  18. [backcolor=transparent]            [backcolor=transparent]"Domain"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"news.com"
  19. [backcolor=transparent]        [backcolor=transparent]}
  20. [backcolor=transparent]    [backcolor=transparent]]
  21. [backcolor=transparent]}&<公共请求参数>


返回示例



XML格式

  1. [backcolor=transparent]<AddBatchDomainRecordsResponse>
  2. [backcolor=transparent]    [backcolor=transparent]<RequestId>[backcolor=transparent]536E9CAD-DB30-4647-AC87-AA5CC38C5382[backcolor=transparent]</RequestId>
  3. [backcolor=transparent]    [backcolor=transparent]<TraceId>[backcolor=transparent]10001[backcolor=transparent]</TraceId>
  4. [backcolor=transparent]</AddBatchDomainRecordsResponse>


JSON示例

  1. [backcolor=transparent]{
  2. [backcolor=transparent]    [backcolor=transparent]"RequestId"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"536E9CAD-DB30-4647-AC87-AA5CC38C5382"[backcolor=transparent],
  3. [backcolor=transparent]    [backcolor=transparent]"TraceId"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"10001"
  4. [backcolor=transparent]}

展开
收起
boxti 2017-10-18 11:17:23 2094 0
0 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
创业公司的域名想象 立即下载
“域”见更美好的未来——域名筑梦互联网+ 立即下载
“域”感——《域名投资从入门到精通》 立即下载

相关镜像