获取一个域名的解析记录列表。
请求频率:每秒最多调用 100 次。
除了以下参数,您还需要 对请求进行鉴权。
const columns = [
{
width: '20%',
title: '参数',
dataIndex: 'Name',
className: 'openapi-doc-parameter-table-name'
},
{
width: 130,
title: '类型',
dataIndex: 'DataType',
className: 'openapi-doc-parameter-table-type'
},
{
width: 90,
title: '是否必填',
dataIndex: 'IsRequired',
className: 'openapi-doc-parameter-table-required'
},
{
width: '20%',
title: '示例值',
dataIndex: 'Example',
className: 'openapi-doc-parameter-table-example'
},
{
title: '描述',
dataIndex: 'Description',
className: 'openapi-doc-parameter-table-description'
},
];
const data = [
{
rowKey: '->Action',
Name: 'Action',
DataType: 'String',
IsRequired: '是',
Example: <RenderMd content={"ListRecords"} />,
Description: <RenderMd content={"要执行的操作,取值:ListRecords。"} />,
children: [
]
},
{
rowKey: '->Version',
Name: 'Version',
DataType: 'String',
IsRequired: '是',
Example: <RenderMd content={"2022-06-01"} />,
Description: <RenderMd content={"API的版本,取值:2022-06-01。"} />,
children: [
]
},
{
rowKey: '->ZID',
Name: 'ZID',
DataType: 'Long',
IsRequired: '否',
Example: <RenderMd content={"1234"} />,
Description: <RenderMd content={"域名的 ID。您可以通过以下 API 获取:\n- [CreatePrivateZone API](https://www.volcengine.com/docs/6758/163105)\n- [ListPrivateZones API](https://www.volcengine.com/docs/6758/163111)\n:::warning\n您必须传入 `ZID` 或 `RecordIDs` 至少一个参数,否则返回的 `Records` 将为空。\n:::"} />,
children: [
]
},
{
rowKey: '->ProjectName',
Name: 'ProjectName',
DataType: 'String',
IsRequired: '否',
Example: <RenderMd content={"default"} />,
Description: <RenderMd content={"项目名称。如果您不传入该参数,该参数不会作为查询条件。"} />,
children: [
]
},
{
rowKey: '->Host',
Name: 'Host',
DataType: 'String',
IsRequired: '否',
Example: <RenderMd content={"abc"} />,
Description: <RenderMd content={"主机记录(域名前缀)。如果您不传入该参数,该参数不会作为查询条件。"} />,
children: [
]
},
{
rowKey: '->Name',
Name: 'Name',
DataType: 'String',
IsRequired: '否',
Example: <RenderMd content={"abc.example.com"} />,
Description: <RenderMd content={"域名。如果您不传入该参数,该参数不会作为查询条件。"} />,
children: [
]
},
{
rowKey: '->PageNumber',
Name: 'PageNumber',
DataType: 'Integer',
IsRequired: '否',
Example: <RenderMd content={"1"} />,
Description: <RenderMd content={"页码。页数由获取的解析记录总数和 `PageSize` 确定。默认为 1。"} />,
children: [
]
},
{
rowKey: '->PageSize',
Name: 'PageSize',
DataType: 'String',
IsRequired: '否',
Example: <RenderMd content={"500"} />,
Description: <RenderMd content={"每页包含的解析记录的数量。最大值为 500。默认为 10。"} />,
children: [
]
},
{
rowKey: '->SearchMode',
Name: 'SearchMode',
DataType: 'String',
IsRequired: '否',
Example: <RenderMd content={"EXACT"} />,
Description: <RenderMd content={"查询模式,用于搜索 `Host` 参数。包括以下模式:\n\n- LIKE(默认):模糊查询。\n- EXACT:精确查询。\n\n如果您不传入该参数,该参数不会作为查询条件。"} />,
children: [
]
},
{
rowKey: '->Type',
Name: 'Type',
DataType: 'String',
IsRequired: '否',
Example: <RenderMd content={"A"} />,
Description: <RenderMd content={"记录类型。\n\n- A:A 记录。\n- AAAA:AAAA 记录。\n- CNAME:CNAME 记录。\n- TXT:TXT 记录。\n- MX:MX 记录。\n- PTR:PTR 记录。\n\n记录类型的详细信息参考 [解析记录类型](https://www.volcengine.com/docs/6758/162499)。如果您不传入该参数,该参数不会作为查询条件。"} />,
children: [
]
},
{
rowKey: '->Value',
Name: 'Value',
DataType: 'String',
IsRequired: '否',
Example: <RenderMd content={"10.0.0.1"} />,
Description: <RenderMd content={"记录值。如果您不传入该参数,该参数不会作为查询条件。"} />,
children: [
]
},
{
rowKey: '->LastOperator',
Name: 'LastOperator',
DataType: 'String',
IsRequired: '否',
Example: <RenderMd content={"210000041"} />,
Description: <RenderMd content={"表示最近一次更新解析记录的火山引擎账号的 ID。如果是子账号更新了解析记录,该参数的值是子账号的 ID。如果您不传入该参数,该参数不会作为查询条件。"} />,
children: [
]
},
{
rowKey: '->Line',
Name: 'Line',
DataType: 'String',
IsRequired: '否',
Example: <RenderMd content={"default"} />,
Description: <RenderMd content={"解析记录的线路。如果您不传入该参数,该参数不会作为查询条件。"} />,
children: [
]
},
{
rowKey: '->RecordIDs',
Name: 'RecordIDs',
DataType: 'Array of String',
IsRequired: '否',
Example: <RenderMd content={"RecordIDs.1=1234567&RecordIDs.2=2345678"} />,
Description: <RenderMd content={"解析记录 ID。您可以通过 [添加解析记录 API](https://www.volcengine.com/docs/6758/163682) 获取解析记录 ID。您可以输入多个解析记录 ID,例如 `RecordIDs.1=1234567&RecordIDs.2=2345678`。您最多输入 100 个解析记录 ID。您需要确保 RecordIDs 后的数字 N 从小到大且是连续的。<br>\n:::warning\n您必须传入 `ZID` 或 `RecordIDs` 至少一个参数,否则返回的 `Records` 将为空。\n:::"} />,
children: [
]
},
];
return (<Table
rowKey="rowKey"
className="openapi-doc-parameter-table"
columns={columns}
data={data}
border={ { cell: true, wrapper: true } }
scroll={ { x: "auto" } }
pagination={false}
/>);
下表仅列出本接口特有的返回参数。更多信息请参见返回结构。
const columns = [
{
width: '25%',
title: '参数',
dataIndex: 'Name',
className: 'openapi-doc-parameter-table-name',
},
{
width: 130,
title: '类型',
dataIndex: 'DataType',
className: 'openapi-doc-parameter-table-type'
},
{
width: '25%',
title: '示例值',
dataIndex: 'Example',
className: 'openapi-doc-parameter-table-example'
},
{
title: '描述',
dataIndex: 'Description',
className: 'openapi-doc-parameter-table-description'
},
];
const data = [
{
rowKey: "->PageNumber",
Name: "PageNumber",
DataType: "Integer",
Example: <RenderMd content={"1"} />,
Description: <RenderMd content={"`Records` 展示的解析记录所在的页码。"} />,
children: [
]
},
{
rowKey: "->PageSize",
Name: "PageSize",
DataType: "Integer",
Example: <RenderMd content={"10"} />,
Description: <RenderMd content={"每页包含的解析记录的数量。"} />,
children: [
]
},
{
rowKey: "->Records",
Name: "Records",
DataType: "Array of Object",
Example: <RenderMd content={"无"} />,
Description: <RenderMd content={"域名的解析记录列表。"} />,
children: [
{
rowKey: "->Records->ZID",
Name: "ZID",
DataType: "Integer",
Example: <RenderMd content={"1234"} />,
Description: <RenderMd content={"域名 ID。"} />,
children: [
]
},
{
rowKey: "->Records->RecordID",
Name: "RecordID",
DataType: "String",
Example: <RenderMd content={"9079256848785222159"} />,
Description: <RenderMd content={"解析记录 ID。"} />,
children: [
]
},
{
rowKey: "->Records->Host",
Name: "Host",
DataType: "String",
Example: <RenderMd content={"abc"} />,
Description: <RenderMd content={"主机记录(域名前缀)。"} />,
children: [
]
},
{
rowKey: "->Records->Value",
Name: "Value",
DataType: "String",
Example: <RenderMd content={"10.0.0.1"} />,
Description: <RenderMd content={"解析记录的记录值。"} />,
children: [
]
},
{
rowKey: "->Records->Type",
Name: "Type",
DataType: "String",
Example: <RenderMd content={"A"} />,
Description: <RenderMd content={"解析记录类型。"} />,
children: [
]
},
{
rowKey: "->Records->TTL",
Name: "TTL",
DataType: "Integer",
Example: <RenderMd content={"600"} />,
Description: <RenderMd content={"解析记录的过期时间。单位为妙。"} />,
children: [
]
},
{
rowKey: "->Records->Line",
Name: "Line",
DataType: "String",
Example: <RenderMd content={"default"} />,
Description: <RenderMd content={"解析记录的线路。"} />,
children: [
]
},
{
rowKey: "->Records->Weight",
Name: "Weight",
DataType: "Integer",
Example: <RenderMd content={"1"} />,
Description: <RenderMd content={"解析记录的权重。如果您没有开启负载均衡,则该参数不会被返回。"} />,
children: [
]
},
{
rowKey: "->Records->Remark",
Name: "Remark",
DataType: "String",
Example: <RenderMd content={"remark"} />,
Description: <RenderMd content={"解析记录的备注。"} />,
children: [
]
},
{
rowKey: "->Records->CreatedAt",
Name: "CreatedAt",
DataType: "String",
Example: <RenderMd content={"2023-09-14T16:54:51+08:00"} />,
Description: <RenderMd content={"解析记录的创建时间。"} />,
children: [
]
},
{
rowKey: "->Records->UpdatedAt",
Name: "UpdatedAt",
DataType: "String",
Example: <RenderMd content={"2023-09-14T16:54:51+08:00"} />,
Description: <RenderMd content={"解析记录最近一次的更新时间。"} />,
children: [
]
},
{
rowKey: "->Records->LastOperator",
Name: "LastOperator",
DataType: "String",
Example: <RenderMd content={"210xxxxxx41"} />,
Description: <RenderMd content={"最近一次更新解析记录的火山引擎账号的 ID。如果是子账号更新了解析记录,该参数的值是子账号的 ID。"} />,
children: [
]
},
{
rowKey: "->Records->Enable",
Name: "Enable",
DataType: "Boolean",
Example: <RenderMd content={"true"} />,
Description: <RenderMd content={"解析记录是否被启用。"} />,
children: [
]
},
]
},
{
rowKey: "->Total",
Name: "Total",
DataType: "Integer",
Example: <RenderMd content={"10"} />,
Description: <RenderMd content={"解析记录数量。"} />,
children: [
]
},
];
return (<Table
rowKey="rowKey"
className="openapi-doc-parameter-table"
columns={columns}
data={data}
border={ { cell: true, wrapper: true } }
scroll={ { x: "auto" } }
pagination={false}
/>);
GET https://open.volcengineapi.com/?Action=ListRecords&Version=2022-06-01&PageNumber=1&PageSize=10&ZID=367
{
"ResponseMetadata": {
"RequestId": "20230914165514D4521DF8471E96DA581A",
"Action": "ListRecords",
"Version": "2022-06-01",
"Service": "private_zone",
"Region": "cn-north-1"
},
"Result": {
"page_size": 10,
"page_number": 1,
"total": 1,
"PageSize": 10,
"PageNumber": 1,
"Total": 1,
"Records": [
{
"ZID": 37424,
"RecordID": "9079256848785222159",
"Host": "www",
"Value": "10.0.0.1",
"Type": "A",
"TTL": 600,
"Enable": false,
"Remark": "",
"CreatedAt": "2023-09-14T16:54:51+08:00",
"UpdatedAt": "2023-09-14T16:54:51+08:00",
"LastOperator": "210xxxxxx41"
}
]
}
}
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。
const columns = [
{
title: '状态码',
dataIndex: 'HttpCode',
width: '12%',
className: 'openapi-doc-errorcode-table-httpcode'
},
{
title: '错误码',
dataIndex: 'ErrorCode',
width: '22%',
className: 'openapi-doc-errorcode-table-errorcode'
},
{
title: '错误信息',
dataIndex: 'ErrorMessage',
width: '33%',
className: 'openapi-doc-errorcode-table-errormessage'
},
{
title: '说明',
dataIndex: 'Description',
width: '33%',
className: 'openapi-doc-errorcode-table-description'
},
];
const data = [
{
HttpCode: 400,
ErrorCode: 'ErrDBNotFound',
ErrorMessage: <RenderMd content={"db not found"} />,
Description: <RenderMd content={"数据条目未找到"} />,
},
{
HttpCode: 400,
ErrorCode: 'ErrZoneNotFound',
ErrorMessage: <RenderMd content={"zone not found"} />,
Description: <RenderMd content={"未找到域名"} />,
},
{
HttpCode: 400,
ErrorCode: 'ErrAccountInArrears',
ErrorMessage: <RenderMd content={"this account in arrears, you cannot open this service. Please recharge your account"} />,
Description: <RenderMd content={"账户欠费,无法开通服务"} />,
},
{
HttpCode: 400,
ErrorCode: 'AccountInArrears',
ErrorMessage: <RenderMd content={"您的账户已欠费,无法开通此服务!请前往账户充值"} />,
Description: <RenderMd content={"账户欠费,无法开通服务"} />,
},
{
HttpCode: 500,
ErrorCode: 'ErrInternalServer',
ErrorMessage: <RenderMd content={"server internal error"} />,
Description: <RenderMd content={"服务内部错误"} />,
},
];
return (<Table
columns={columns}
data={data}
border={ { cell: true, wrapper: true } }
scroll={ { x: "auto" } }
pagination={false}
/>);