阿里云解析 DNS获取解析记录列表

.icms-tree-table-trigger {
display: inline-block;
width: 17px;
height: 17px;
margin-right: 3px;
line-height: 14px;
text-align: center;
background: #fff;
border: 1px solid #e8e8e8;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}

.icms-tree-table-trigger::after {
content: ‘+’;
}

.icms-tree-table-trigger-expanded::after {
content: ‘-‘
}

调用DescribeDomainRecords根据传入参数获取指定主域名的所有解析记录列表。

  • 查询可以指定域名(DomainName)、页码(PageNumber)和每页的数量(PageSize)来获取域名的解析列表。
  • 查询可以指定解析记录的主机记录关键字(RRKeyWord)、解析类型关键字(TypeKeyWord)或者记录值的关键字(ValueKeyWord)来查询含有该关键字的解析列表。
  • 解析列表的默认排序方式是按照解析添加的时间从新到旧排序的。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String DescribeDomainRecords

系统规定参数。取值:DescribeDomainRecords。

DomainName String example.com

域名名称。

Direction String 描述

域名描述。

GroupId Long 2223

域名分组ID。

KeyWord String test

关键字。

Lang String en

语言。

Line String default

解析线路,默认为default。

参见解析线路枚举。

OrderBy String default

排序方式。按照解析添加的时间从新到旧排序。

PageNumber Long 1

当前页数,起始值为1,默认为1。

PageSize Long 20

分页查询时设置的每页行数,最大值500,默认为20。

RRKeyWord String www

主机记录的关键字,按照“%RRKeyWord%”模式搜索,不区分大小写。

SearchMode String LIKE

搜索模式,取值:LIKE/EXACT/ADVANCED,其中LIKE(模糊)/EXACT(精确)搜索支持KeyWord字段,ADVANCED(高级)模式支持其他字段。

Status String Enable

解析记录状态,取值:Enable/Disable。

Type String A

解析记录类型,参见解析记录类型格式。

TypeKeyWord String MX

解析类型的关键字,按照全匹配搜索,不区分大小写。

ValueKeyWord String com

记录值的关键字,按照“%ValueKeyWord%”模式搜索,不区分大小写。

返回数据

名称 类型 示例值 描述
DomainRecords Array

解析记录列表。

Record

解析记录列表。

DomainName String example.com

域名名称。

Line String default

解析线路。

Locked Boolean false

当前解析记录锁定状态。

Priority Long 5

MX记录的优先级。

RR String www

主机记录。

RecordId String 9999985

解析记录ID。

Remark String 备注

备注。

Status String Enable

当前的解析记录状态。

TTL Long 600

生存时间。

Type String MX

记录类型。

Value String mail1.hichina.com

记录值。

Weight Integer 2

负载均衡权重。

PageNumber Long 1

当前页码。

PageSize Long 2

本次查询获取的解析数量。

RequestId String 536E9CAD-DB30-4647-AC87-AA5CC38C5382

请求ID。

TotalCount Long 2

解析记录总数。

示例

请求示例


http(s)://alidns.aliyuncs.com/?Action=DescribeDomainRecords
&DomainName=example.com
&<公共请求参数>

正常返回示例

XML 格式

<DescribeDomainRecordsResponse>
      <RequestId>536E9CAD-DB30-4647-AC87-AA5CC38C5382</RequestId>
      <TotalCount>2</TotalCount>
      <PageNumber>1</PageNumber>
      <PageSize>2</PageSize>
      <DomainRecords>
            <Record>
                  <DomainName>example.com</DomainName>
                  <RecordId>9999985</RecordId>
                  <RR>www</RR>
                  <Type>MX</Type>
                  <Value>mail1.hichina.com</Value>
                  <Line>default</Line>
                  <Priority>5</Priority>
                  <TTL>600</TTL>
                  <Status>Enable</Status>
                  <Locked>false</Locked>
            </Record>
            <Record>
                  <DomainName>example.com</DomainName>
                  <RecordId>9999986</RecordId>
                  <RR>www</RR>
                  <Type>MX</Type>
                  <Value>mail2.hichina.com</Value>
                  <Line>default</Line>
                  <Priority>10</Priority>
                  <TTL>600</TTL>
                  <Status>Enable</Status>
                  <Locked>false</Locked>
            </Record>
      </DomainRecords>
</DescribeDomainRecordsResponse>

JSON 格式

{
	"PageNumber":1,
	"TotalCount":2,
	"PageSize":2,
	"RequestId":"536E9CAD-DB30-4647-AC87-AA5CC38C5382",
	"DomainRecords":{
		"Record":[
			{
				"RR":"www",
				"Status":"Enable",
				"Value":"mail1.hichina.com",
				"RecordId":"9999985",
				"Type":"MX",
				"DomainName":"example.com",
				"Locked":false,
				"Line":"default",
				"TTL":600,
				"Priority":5
			},
			{
				"RR":"www",
				"Status":"Enable",
				"Value":"mail2.hichina.com",
				"RecordId":"9999986",
				"Type":"MX",
				"DomainName":"example.com",
				"Locked":false,
				"Line":"default",
				"TTL":600,
				"Priority":10
			}
		]
	}
}

错误码

访问错误中心查看更多错误码。

原创文章,作者:网友投稿,如若转载,请注明出处:https://www.cloudads.cn/archives/33863.html

发表评论

登录后才能评论