跳转到内容
搜索文档

高级 DNS 防护 (Advanced DNS Protection)

最后更新 查看 MarkdownAgent 设置

使用 Cloudflare API 配置高级 DNS 防护规则和设置。

使用 Cloudflare API 通过 API 配置高级 DNS 防护。

有关 API 调用的示例,请参阅常用 API 调用

端点 (Endpoints)

要获取完整的端点,请将下面列出的高级 DNS 防护 API 端点附加到 Cloudflare API 基础 URL:

https://api.cloudflare.com/client/v4

{account_id} 参数是账户 ID(十六进制字符串)。您可以在 Cloudflare 仪表板中找到此值。

下表总结了可用的操作。

操作 方法 + 端点
获取 DNS 防护规则列表

GET accounts/{account_id}/magic/advanced_dns_protection/configs/dns_protection/rules

获取账户中的所有 DNS 防护规则。
添加一条 DNS 防护规则

POST accounts/{account_id}/magic/advanced_dns_protection/configs/dns_protection/rules

向账户中添加一条 DNS 防护规则。
获取单条 DNS 防护规则

GET accounts/{account_id}/magic/advanced_dns_protection/configs/dns_protection/rules/{rule_id}

获取账户中现有 DNS 防护规则的详细信息。
更新一条 DNS 防护规则

PATCH accounts/{account_id}/magic/advanced_dns_protection/configs/dns_protection/rules/{rule_id}

更新账户中现有的 DNS 防护规则。
删除一条 DNS 防护规则

DELETE accounts/{account_id}/magic/advanced_dns_protection/configs/dns_protection/rules/{rule_id}

从账户中删除现有的 DNS 防护规则。
删除所有 DNS 防护规则

DELETE accounts/{account_id}/magic/advanced_dns_protection/configs/dns_protection/rules

从账户中删除所有现有的 DNS 防护规则。

这篇文档对您有帮助吗?