使用 Azure CLI 管理 Azure DNS 中的 DNS 记录和记录集Manage DNS records and recordsets in Azure DNS using the Azure CLI

本文介绍如何使用适用于 Windows、Mac 和 Linux 的跨平台 Azure CLI 管理 DNS 区域的 DNS 记录。This article shows you how to manage DNS records for your DNS zone by using the cross-platform Azure CLI, which is available for Windows, Mac and Linux. 也可以使用 Azure PowerShellAzure 门户管理 DNS 记录。You can also manage your DNS records using Azure PowerShell or the Azure portal.

本文中的示例假设读者已安装 Azure CLI、已登录,并且已创建一个 DNS 区域The examples in this article assume you have already installed the Azure CLI, signed in, and created a DNS zone.

简介Introduction

在 Azure DNS 中创建 DNS 记录之前,首先需了解 Azure DNS 如何将 DNS 记录组织到 DNS 记录集中。Before creating DNS records in Azure DNS, you first need to understand how Azure DNS organizes DNS records into DNS record sets.

记录名称Record names

在 Azure DNS 中,记录使用相对名称指定。In Azure DNS, records are specified by using relative names. 完全限定的 域名 (FQDN) 包括区域名称,而相对 域名则不包括。A fully qualified domain name (FQDN) includes the zone name, whereas a relative name does not. 例如,contoso.com 区域中的相对记录名称 www 会提供完全限定的记录名称 www.contoso.comFor example, the relative record name www in the zone contoso.com gives the fully qualified record name www.contoso.com.

顶点 记录是位于 DNS 区域的根(或顶点 )中的 DNS 记录。An apex record is a DNS record at the root (or apex) of a DNS zone. 例如,在 DNS 区域 contoso.com 中,顶点记录还具有完全限定的名称 contoso.com(有时称为裸域)。For example, in the DNS zone contoso.com, an apex record also has the fully qualified name contoso.com (this is sometimes called a naked domain). 按照惯例,相对名称“@”用于表示顶点记录。By convention, the relative name '@' is used to represent apex records.

记录类型Record types

每个 DNS 记录都有一个名称和类型。Each DNS record has a name and a type. 这些记录根据其所包含的数据分为各种类型。Records are organized into various types according to the data they contain. 最常见的类型为“A”记录,这种记录将名称映射到 IPv4 地址。The most common type is an 'A' record, which maps a name to an IPv4 address. 另一种常见类型是“MX”记录,这种记录将名称映射到邮件服务器。Another common type is an 'MX' record, which maps a name to a mail server.

Azure DNS 支持所有常见 DNS 记录类型:A、AAAA、CAA、CNAME、MX、NS、PTR、SOA、SRV 和 TXT。Azure DNS supports all common DNS record types: A, AAAA, CAA, CNAME, MX, NS, PTR, SOA, SRV, and TXT. 请注意,SPF 记录使用 TXT 记录表示Note that SPF records are represented using TXT records.

记录集Record sets

有时,需要创建具有给定名称和类型的多个 DNS 记录。Sometimes you need to create more than one DNS record with a given name and type. 例如,假设在两个不同的 IP 地址上托管“www.contoso.com”网站。For example, suppose the 'www.contoso.com' web site is hosted on two different IP addresses. 该网站需要两个不同的 A 记录,每个 IP 地址一个。The website requires two different A records, one for each IP address. 这就是记录集的示例:Here is an example of a record set:

www.contoso.com.        3600    IN    A    134.170.185.46
www.contoso.com.        3600    IN    A    134.170.188.221

Azure DNS 使用记录集 管理所有 DNS 记录。Azure DNS manages all DNS records using record sets. 记录集(也称为资源 记录集)是某个区域中具有相同名称、相同类型的 DNS 记录的集合。A record set (also known as a resource record set) is the collection of DNS records in a zone that have the same name and are of the same type. 大多数记录集包含单个记录。Most record sets contain a single record. 但是,上面所示的示例一个记录集包含多个记录,这并不少见。However, examples like the one above, in which a record set contains more than one record, are not uncommon.

例如,假设已在区域“contoso.com”中创建 A 记录“www”,指向 IP 地址“134.170.185.46”(上述第一条记录)。For example, suppose you have already created an A record 'www' in the zone 'contoso.com', pointing to the IP address '134.170.185.46' (the first record above). 要创建第二条记录,应将此记录添加到现有记录集而非创建其他记录集。To create the second record you would add that record to the existing record set, rather than create an additional record set.

SOA 和 CNAME 记录类型例外。The SOA and CNAME record types are exceptions. 对于这些类型,DNS 标准不允许多个记录具有相同的名称,因此这些记录集仅可包含单个记录。The DNS standards don't permit multiple records with the same name for these types, therefore these record sets can only contain a single record.

有关 Azure DNS 中的 DNS 记录的详细信息,请参阅 DNS 区域和记录For more information about DNS records in Azure DNS, see DNS zones and records.

创建 DNS 记录Create a DNS record

请使用 az network dns record-set <record-type> add-record 命令创建 DNS 记录(其中 <record-type> 为一种记录类型,即To create a DNS record, use the az network dns record-set <record-type> add-record command (where <record-type> is the type of record, i.e a、srv、txt 等)有关帮助,请参阅 az network dns record-set --helpa, srv, txt, etc.) For help, see az network dns record-set --help.

创建记录时,需指定资源组名称、区域名称、记录集名称、记录类型,以及要创建的记录的详细信息。When creating a record, you need to specify the resource group name, zone name, record set name, the record type, and the details of the record being created. 给定的记录集名称必须是相对名称,这意味着它必须排除区域名称。The record set name given must be a relative name, meaning it must exclude the zone name.

如果记录集不存在,此命令会创建。If the record set does not already exist, this command creates it for you. 如果记录集已存在,此命令会将指定的记录添加到现有记录集。If the record set already exists, this command adds the record you specify to the existing record set.

如果创建了新记录集,将使用默认生存时间 (TTL) 3600。If a new record set is created, a default time-to-live (TTL) of 3600 is used. 有关如何使用不同 TTL 的说明,请参阅创建 DNS 记录集For instructions on how to use different TTLs, see Create a DNS record set.

以下示例在区域 contoso.com 中的资源组 MyResourceGroup 内创建名为 www 的 A 记录。The following example creates an A record called www in the zone contoso.com in the resource group MyResourceGroup. 该 A 记录的 IP 地址为 1.2.3.4The IP address of the A record is 1.2.3.4.

az network dns record-set a add-record --resource-group myresourcegroup --zone-name contoso.com --record-set-name www --ipv4-address 1.2.3.4

若要在区域(在本例中为“contoso.com”)顶点中创建记录集,请使用记录名称“@”(包括引号):To create a record set in the apex of the zone (in this case, "contoso.com"), use the record name "@", including the quotation marks:

az network dns record-set a add-record --resource-group myresourcegroup --zone-name contoso.com --record-set-name "@" --ipv4-address 1.2.3.4

创建 DNS 记录集Create a DNS record set

在上面的示例中,已将 DNS 记录添加到现有记录集,或者隐式创建了记录集。In the above examples, the DNS record was either added to an existing record set, or the record set was created implicitly. 也可以显式创建记录集,并在其中添加记录。You can also create the record set explicitly before adding records to it. Azure DNS 支持“空”记录集,此类记录集可充当占位符,用于在创建 DNS 记录之前保留某个 DNS 名称。Azure DNS supports 'empty' record sets, which can act as a placeholder to reserve a DNS name before creating DNS records. 空记录集在 Azure DNS 控制平面可见,但不会显示在 Azure DNS 名称服务器上。Empty record sets are visible in the Azure DNS control plane, but do not appear on the Azure DNS name servers.

记录集是使用 az network dns record-set <record-type> create 命令创建的。Record sets are created using the az network dns record-set <record-type> create command. 有关帮助,请参阅 az network dns record-set <record-type> create --helpFor help, see az network dns record-set <record-type> create --help.

显式创建记录集可以指定生存时间 (TTL) 等记录集属性以及元数据。Creating the record set explicitly allows you to specify record set properties such as the Time-To-Live (TTL) and metadata. 可以使用记录集元数据,以键-值对的形式将特定于应用程序的数据与每个记录集相关联。Record set metadata can be used to associate application-specific data with each record set, as key-value pairs.

以下示例使用 --ttl 参数(简短格式为 -l)创建 TTL 为 60 秒的类型为“A”的空记录集:The following example creates an empty record set of type 'A' with a 60-second TTL, by using the --ttl parameter (short form -l):

az network dns record-set a create --resource-group myresourcegroup --zone-name contoso.com --name www --ttl 60

以下示例使用 --metadata 参数创建包含两个元数据项(“dept=finance”和“environment=production”)的记录集:The following example creates a record set with two metadata entries, "dept=finance" and "environment=production", by using the --metadata parameter :

az network dns record-set a create --resource-group myresourcegroup --zone-name contoso.com --name www --metadata "dept=finance" "environment=production"

创建空记录集后,可根据创建 DNS 记录中所述,使用 azure network dns record-set <record-type> add-record 添加记录。Having created an empty record set, records can be added using azure network dns record-set <record-type> add-record as described in Create a DNS record.

创建其他类型的记录Create records of other types

详细了解如何创建“A”记录以后,还可通过以下示例了解如何创建 Azure DNS 支持的其他记录类型的记录。Having seen in detail how to create 'A' records, the following examples show how to create record of other record types supported by Azure DNS.

用于指定记录数据的参数根据记录类型的不同而异。The parameters used to specify the record data vary depending on the type of the record. 例如,对于“A”类型的记录,应使用参数 --ipv4-address <IPv4 address> 指定 IPv4 地址。For example, for a record of type "A", you specify the IPv4 address with the parameter --ipv4-address <IPv4 address>. 可以使用 az network dns record-set <record-type> add-record --help 列出每个记录类型的参数。The parameters for each record type can be listed using az network dns record-set <record-type> add-record --help.

在每种情况下,我们都演示了如何创建单个记录。In each case, we show how to create a single record. 记录将添加到现有记录集或隐式创建的记录集。The record is added to the existing record set, or a record set created implicitly. 有关创建记录集和显式定义记录集参数的详细信息,请参阅创建 DNS 记录集For more information on creating record sets and defining record set parameter explicitly, see Create a DNS record set.

我们没有提供创建 SOA 记录集的示例,因为 SOA 是随每个 DNS 区域一起创建和删除的,不能单独创建或删除。We do not give an example to create an SOA record set, since SOAs are created and deleted with each DNS zone and cannot be created or deleted separately. 但是,可以修改 SOA,如后面的示例所示However, the SOA can be modified, as shown in a later example.

创建 AAAA 记录Create an AAAA record

az network dns record-set aaaa add-record --resource-group myresourcegroup --zone-name contoso.com --record-set-name test-aaaa --ipv6-address 2607:f8b0:4009:1803::1005

创建 CAA 记录Create an CAA record

az network dns record-set caa add-record --resource-group myresourcegroup --zone-name contoso.com --record-set-name test-caa --flags 0 --tag "issue" --value "ca1.contoso.com"

创建 CNAME 记录Create a CNAME record

备注

DNS 标准不允许在区域的顶点创建 CNAME 记录 (--Name "@"),也不允许记录集包含多个记录。The DNS standards do not permit CNAME records at the apex of a zone (--Name "@"), nor do they permit record sets containing more than one record.

有关详细信息,请参阅 CNAME 记录For more information, see CNAME records.

az network dns record-set cname set-record --resource-group myresourcegroup --zone-name contoso.com --record-set-name test-cname --cname www.contoso.com

创建 MX 记录Create an MX record

在此示例中,使用记录集名称“@”在区域顶端(在本例中为“contoso.com”)创建 MX 记录。In this example, we use the record set name "@" to create the MX record at the zone apex (in this case, "contoso.com").

az network dns record-set mx add-record --resource-group myresourcegroup --zone-name contoso.com --record-set-name "@" --exchange mail.contoso.com --preference 5

创建 NS 记录Create an NS record

az network dns record-set ns add-record --resource-group myresourcegroup --zone-name contoso.com --record-set-name test-ns --nsdname ns1.contoso.com

创建 PTR 记录Create a PTR record

在此示例中,“my-arpa-zone.com”表示代表用户 IP 范围的 ARPA 区域。In this case, 'my-arpa-zone.com' represents the ARPA zone representing your IP range. 此区域中的每个 PTR 记录集对应于此 IP 范围内的一个 IP 地址。Each PTR record set in this zone corresponds to an IP address within this IP range. 记录名称“10”是此 IP 范围内由此记录表示的 IP 地址的最后一个八位字节。The record name '10' is the last octet of the IP address within this IP range represented by this record.

az network dns record-set ptr add-record --resource-group myresourcegroup --zone-name contoso.com --record-set-name my-arpa.zone.com --ptrdname myservice.contoso.com

创建 SRV 记录Create an SRV record

创建 SRV 记录集时,请在记录集名称中指定 _service_protocolWhen creating an SRV record set, specify the _service and _protocol in the record set name. 在区域顶点创建 SRV 记录集时,无需在记录集名称中包括“@”。There is no need to include "@" in the record set name when creating an SRV record set at the zone apex.

az network dns record-set srv add-record --resource-group myresourcegroup --zone-name contoso.com --record-set-name _sip._tls --priority 10 --weight 5 --port 8080 --target sip.contoso.com

创建 TXT 记录Create a TXT record

以下示例说明如何创建 TXT 记录。The following example shows how to create a TXT record. 如需详细了解 TXT 记录中支持的最大字符串长度,请参阅 TXT 记录For more information about the maximum string length supported in TXT records, see TXT records.

az network dns record-set txt add-record --resource-group myresourcegroup --zone-name contoso.com --record-set-name test-txt --value "This is a TXT record"

获取记录集Get a record set

若要检索现有的记录集,请使用 az network dns record-set <record-type> showTo retrieve an existing record set, use az network dns record-set <record-type> show. 有关帮助,请参阅 az network dns record-set <record-type> show --helpFor help, see az network dns record-set <record-type> show --help.

由于在创建记录或记录集时,给定的记录集名称必须是相对名称,因此,该名称必须排除区域名称。As when creating a record or record set, the record set name given must be a relative name, meaning it must exclude the zone name. 此外,需要指定记录类型、包含该记录集的区域,以及包含该区域的资源组。You also need to specify the record type, the zone containing the record set, and the resource group containing the zone.

以下示例从资源组 MyResourceGroup 中的区域 contoso.com 检索 A 类型的 www 记录。The following example retrieves the record www of type A from zone contoso.com in resource group MyResourceGroup:

az network dns record-set a show --resource-group myresourcegroup --zone-name contoso.com --name www

列出记录集List record sets

可以通过使用 az network dns record-set list 命令列出 DNS 区域中的所有记录。You can list all records in a DNS zone by using the az network dns record-set list command. 有关帮助,请参阅 az network dns record-set list --helpFor help, see az network dns record-set list --help.

不管名称或记录类型为何,此示例都会返回资源组 MyResourceGroup 中区域 contoso.com 内的所有记录集:This example returns all record sets in the zone contoso.com, in resource group MyResourceGroup, regardless of name or record type:

az network dns record-set list --resource-group myresourcegroup --zone-name contoso.com

此示例返回与给定的记录类型(在此例中为“A”记录)匹配的所有记录集:This example returns all record sets that match the given record type (in this case, 'A' records):

az network dns record-set a list --resource-group myresourcegroup --zone-name contoso.com 

将记录添加到现有记录集Add a record to an existing record set

可以使用 az network dns record-set <record-type> add-record 在新记录集中创建记录,或者将记录添加到现有记录集。You can use az network dns record-set <record-type> add-record both to create a record in a new record set, or to add a record to an existing record set.

有关详细信息,请参阅创建 DNS 记录和前面的创建其他类型的记录For more information, see Create a DNS record and Create records of other types above.

从现有记录集中删除记录。Remove a record from an existing record set.

若从现有记录集中删除 DNS 记录,请使用 az network dns record-set <record-type> remove-recordTo remove a DNS record from an existing record set, use az network dns record-set <record-type> remove-record. 有关帮助,请参阅 az network dns record-set <record-type> remove-record -hFor help, see az network dns record-set <record-type> remove-record -h.

此命令从记录集中删除 DNS 记录。This command deletes a DNS record from a record set. 如果删除了记录集中的最后一条记录,也会同时删除记录集本身。If the last record in a record set is deleted, the record set itself is also deleted. 若要保留空记录集,请使用 --keep-empty-record-set 选项。To keep the empty record set instead, use the --keep-empty-record-set option.

需使用通过 az network dns record-set <record-type> add-record 创建记录时所用的相同参数,指定要删除的记录以及要从中删除记录的区域。You need to specify the record to be deleted and the zone it should be deleted from, using the same parameters as when creating a record using az network dns record-set <record-type> add-record. 创建 DNS 记录和前面的创建其他类型的记录中介绍了这些参数。These parameters are described in Create a DNS record and Create records of other types above.

以下示例从资源组 MyResourceGroup 中的区域 contoso.com 内的名为 www 的记录集中,删除值为“1.2.3.4”的 A 记录。The following example deletes the A record with value '1.2.3.4' from the record set named www in the zone contoso.com, in the resource group MyResourceGroup.

az network dns record-set a remove-record --resource-group myresourcegroup --zone-name contoso.com --record-set-name "www" --ipv4-address 1.2.3.4

修改现有记录集Modify an existing record set

每个记录集包含生存时间 (TTL)元数据和 DNS 记录。Each record set contains a time-to-live (TTL), metadata, and DNS records. 以下部分介绍如何修改其中的每个属性。The following sections explain how to modify each of these properties.

修改 A、AAAA、CAA、MX、NS、PTR、SRV 或 TXT 记录To modify an A, AAAA, CAA, MX, NS, PTR, SRV, or TXT record

若要修改现有的 A、AAAA、CAA、MX、NS、PTR、SRV 或 TXT 类型的记录,应先添加一条新记录,再删除现有记录。To modify an existing record of type A, AAAA, CAA, MX, NS, PTR, SRV, or TXT, you should first add a new record and then delete the existing record. 有关如何删除和添加记录的详细说明,请参阅本文中前面的部分。For detailed instructions on how to delete and add records, see the earlier sections of this article.

以下示例演示如何将一条“A”记录中的 IP 地址 1.2.3.4 修改为 IP 地址 5.6.7.8:The following example shows how to modify an 'A' record, from IP address 1.2.3.4 to IP address 5.6.7.8:

az network dns record-set a add-record --resource-group myresourcegroup --zone-name contoso.com --record-set-name www --ipv4-address 5.6.7.8
az network dns record-set a remove-record --resource-group myresourcegroup --zone-name contoso.com --record-set-name www --ipv4-address 1.2.3.4

不能在区域顶点的自动创建的 NS 记录集(--Name "@",包括引号)中添加、删除或修改记录。You cannot add, remove, or modify the records in the automatically created NS record set at the zone apex (--Name "@", including quote marks). 对于此记录集,允许的更改仅限修改记录集 TTL 和元数据。For this record set, the only changes permitted are to modify the record set TTL and metadata.

修改 CNAME 记录To modify a CNAME record

与大多数其他记录类型不同,一个 CNAME 记录集只能包含一条记录。Unlike most other record types, a CNAME record set can only contain a single record. 因此,无法像其他记录类型一样通过添加新记录并删除现有记录来替换当前值。Therefore, you cannot replace the current value by adding a new record and removing the existing record, as for other record types.

相反,若要修改 CNAME 记录,请使用 az network dns record-set cname set-recordInstead, to modify a CNAME record, use az network dns record-set cname set-record. 有关帮助,请参阅 az network dns record-set cname set-record --helpFor help, see az network dns record-set cname set-record --help

该示例将修改资源组 MyResourceGroup 中的区域 contoso.com 内的 CNAME 记录集 www,使其指向“www.fabrikam.net”而不是现有值:The example modifies the CNAME record set www in the zone contoso.com, in resource group MyResourceGroup, to point to 'www.fabrikam.net' instead of its existing value:

az network dns record-set cname set-record --resource-group myresourcegroup --zone-name contoso.com --record-set-name test-cname --cname www.fabrikam.net

修改 SOA 记录To modify an SOA record

与大多数其他记录类型不同,一个 CNAME 记录集只能包含一条记录。Unlike most other record types, a CNAME record set can only contain a single record. 因此,无法像其他记录类型一样通过添加新记录并删除现有记录来替换当前值。Therefore, you cannot replace the current value by adding a new record and removing the existing record, as for other record types.

相反,若要修改 SOA 记录,请使用 az network dns record-set soa updateInstead, to modify the SOA record, use az network dns record-set soa update. 有关帮助,请参阅 az network dns record-set soa update --helpFor help, see az network dns record-set soa update --help.

以下示例演示如何设置资源组 MyResourceGroup 中区域 contoso.com 的 SOA 记录的“email”属性:The following example shows how to set the 'email' property of the SOA record for the zone contoso.com in the resource group MyResourceGroup:

az network dns record-set soa update --resource-group myresourcegroup --zone-name contoso.com --email admin.contoso.com

修改区域顶点处的 NS 记录To modify NS records at the zone apex

在每个 DNS 区域自动创建区域顶点处的 NS 记录集。The NS record set at the zone apex is automatically created with each DNS zone. 其中包含分配给该区域的 Azure DNS 名称服务器名称。It contains the names of the Azure DNS name servers assigned to the zone.

可向此 NS 记录集添加其他名称服务器,从而支持与多个 DNS 提供商共同托管域。You can add additional name servers to this NS record set, to support co-hosting domains with more than one DNS provider. 还可修改此记录集的 TTL 和元数据。You can also modify the TTL and metadata for this record set. 但是,无法删除或修改预填充的 Azure DNS 名称服务器。However, you cannot remove or modify the pre-populated Azure DNS name servers.

请注意,这仅适用于区域顶点处的 NS 记录集。Note that this applies only to the NS record set at the zone apex. 区域中的其他 NS 记录集(用于委派子区域)不受约束,可进行修改。Other NS record sets in your zone (as used to delegate child zones) can be modified without constraint.

以下示例展示如何向区域顶点处的 NS 记录集添加其他名称服务器:The following example shows how to add an additional name server to the NS record set at the zone apex:

az network dns record-set ns add-record --resource-group myresourcegroup --zone-name contoso.com --record-set-name "@" --nsdname ns1.myotherdnsprovider.cn

修改现有记录集的 TTLTo modify the TTL of an existing record set

若要修改现有记录集的 TTL,请使用 azure network dns record-set <record-type> updateTo modify the TTL of an existing record set, use azure network dns record-set <record-type> update. 有关帮助,请参阅 azure network dns record-set <record-type> update --helpFor help, see azure network dns record-set <record-type> update --help.

以下示例演示如何修改记录集的 TTL(在本例中,将修改为 60 秒):The following example shows how to modify a record set TTL, in this case to 60 seconds:

az network dns record-set a update --resource-group myresourcegroup --zone-name contoso.com --name www --set ttl=60

修改现有记录集的元数据To modify the metadata of an existing record set

可以使用记录集元数据,以键-值对的形式将特定于应用程序的数据与每个记录集相关联。Record set metadata can be used to associate application-specific data with each record set, as key-value pairs. 若要修改现有记录集的元数据,请使用 az network dns record-set <record-type> updateTo modify the metadata of an existing record set, use az network dns record-set <record-type> update. 有关帮助,请参阅 az network dns record-set <record-type> update --helpFor help, see az network dns record-set <record-type> update --help.

以下示例说明如何使用“dept=finance”和“environment=production”这两个元数据条目修改记录集。The following example shows how to modify a record set with two metadata entries, "dept=finance" and "environment=production". 请注意,所有现有元数据会被给定的值替换Note that any existing metadata is replaced by the values given.

az network dns record-set a update --resource-group myresourcegroup --zone-name contoso.com --name www --set metadata.dept=finance metadata.environment=production

删除记录集Delete a record set

可以使用 az network dns record-set <record-type> delete 命令删除记录集。Record sets can be deleted by using the az network dns record-set <record-type> delete command. 有关帮助,请参阅 azure network dns record-set <record-type> delete --helpFor help, see azure network dns record-set <record-type> delete --help. 删除记录集也会删除记录集内的所有记录。Deleting a record set also deletes all records within the record set.

备注

无法删除区域顶点的 SOA 和 NS 记录集 (--name "@")。You cannot delete the SOA and NS record sets at the zone apex (--name "@"). 这些记录集是在创建区域时自动创建的,会在删除区域时自动删除。These are created automatically when the zone was created, and are deleted automatically when the zone is deleted.

以下示例从资源组 MyResourceGroup 中的区域 contoso.com 内删除 A 类型的、名为 www 的记录集:The following example deletes the record set named www of type A from the zone contoso.com in resource group MyResourceGroup:

az network dns record-set a delete --resource-group myresourcegroup --zone-name contoso.com --name www

系统会提示用户确认删除操作。You are prompted to confirm the delete operation. 若要禁止显示此提示,请使用 --yes 开关。To suppress this prompt, use the --yes switch.

后续步骤Next steps

详细了解 Azure DNS 中的区域和记录Learn more about zones and records in Azure DNS.
了解如何在使用 Azure DNS 时保护区域和记录Learn how to protect your zones and records when using Azure DNS.