域域域域域

records.set()

domain.records.set({ type, name, content, priority?, ttl?, replace? }) → Promise<Record>

写入记录: 它替换了相同类型和名称的记录, 或者创建了它。 合法重复的类型处理方式不同 。

PUTreplace or createNS refused
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

await domain.records.set({ type: "CNAME", name: "docs", content: "example.pages.dev" });
await domain.records.set({ type: "MX", name: "@", content: "mx.example.net", priority: 10 });
domain.records.set({"type": "CNAME", "name": "docs", "content": "example.pages.dev"})
domain.records.set({"type": "MX", "name": "@", "content": "mx.example.net", "priority": 10})
typestring必填

A, AAAA, CNAME, TXT, MX, SRV, CAA. NS 被拒绝。

namestring必填

与该区相对 @ 顶点的

contentstring必填

价值。

prioritynumber

MX 和 SRV.

ttlnumber

秒数 默认自动

replaceboolean

替换每一记录 类型和名称, 而不仅仅是匹配的 。

某些类型的合法重复

摩托军 TXT 和 CAA 能够以一个名字共存

所以只有内容相同的服务器才能被替换, 否则写第二个邮件服务器就会删除第一个。 接通替换: 真正正确的时候您的意思是“ 现在这个名字有这个 ” 。

NSNS被拒绝

授权删除名字的记录正是子域接管的外观。 不接受该类型, 无法强制 。

记录不能离开区域

名称是相对的,所以无法写入不是这个区域。

记录不提供名称服务

对于一个必须实际回答的主机名, (服务) 写下记录 和 注册姓名。 仅记录就给出了解决和拒绝的地址 。