You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/dns/dns-operations-recordsets-cli.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,16 +45,16 @@ The record set name given must be a *relative* name, meaning it must exclude the
45
45
46
46
If a new record set is created, a default time-to-live (TTL) of 3600 is used. For instructions on how to use different TTLs, see [Create a DNS record set](#create-a-dns-record-set).
47
47
48
-
The following example creates an A record called *www* in the zone *contoso.com* in the resource group *MyResourceGroup*. The IP address of the A record is *1.2.3.4*.
48
+
The following example creates an A record called *www* in the zone *contoso.com* in the resource group *MyResourceGroup*. The IP address of the A record is *203.0.113.11*.
49
49
50
50
```azurecli-interactive
51
-
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
51
+
az network dns record-set a add-record --resource-group myresourcegroup --zone-name contoso.com --record-set-name www --ipv4-address 203.0.113.11
52
52
```
53
53
54
54
To create a record set in the apex of the zone (in this case, "contoso.com"), use the record name "\@", including the quotation marks:
55
55
56
56
```azurecli-interactive
57
-
az network dns record-set a add-record --resource-group myresourcegroup --zone-name contoso.com --record-set-name "@" --ipv4-address 1.2.3.4
57
+
az network dns record-set a add-record --resource-group myresourcegroup --zone-name contoso.com --record-set-name "@" --ipv4-address 203.0.113.11
58
58
```
59
59
60
60
## Create a DNS record set
@@ -92,7 +92,7 @@ There's no example for create an SOA record set, since SOAs are created and dele
92
92
### Create an AAAA record
93
93
94
94
```azurecli-interactive
95
-
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
95
+
az network dns record-set aaaa add-record --resource-group myresourcegroup --zone-name contoso.com --record-set-name test-aaaa --ipv6-address FD00::1
96
96
```
97
97
98
98
### Create a CAA record
@@ -123,7 +123,7 @@ az network dns record-set mx add-record --resource-group myresourcegroup --zone-
123
123
### Create an NS record
124
124
125
125
```azurecli-interactive
126
-
az network dns record-set ns add-record --resource-group myresourcegroup --zone-name contoso.com --record-set-name test-ns --nsdname ns1.contoso.com
126
+
az network dns record-set ns add-record --resource-group myresourcegroup --zone-name contoso.com --record-set-name test-ns --nsdname ns1.fabrikam.com
127
127
```
128
128
129
129
### Create a PTR record
@@ -192,10 +192,10 @@ This command deletes a DNS record from a record set. If the last record in a rec
192
192
193
193
When you use the `az network dns record-set <record-type> add-record` command, you need to specify the record getting deleted and the zone to delete from. These parameters are described in [Create a DNS record](#create-a-dns-record) and [Create records of other types](#create-records-of-other-types) above.
194
194
195
-
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*.
195
+
The following example deletes the A record with value '203.0.113.11' from the record set named *www* in the zone *contoso.com*, in the resource group *MyResourceGroup*.
196
196
197
197
```azurecli-interactive
198
-
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
198
+
az network dns record-set a remove-record --resource-group myresourcegroup --zone-name contoso.com --record-set-name "www" --ipv4-address 203.0.113.11
199
199
```
200
200
201
201
## Modify an existing record set
@@ -206,11 +206,11 @@ Each record set contains a [time-to-live (TTL)](dns-zones-records.md#time-to-liv
206
206
207
207
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.
208
208
209
-
The following example shows how to modify an 'A' record, from IP address 1.2.3.4 to IP address 5.6.7.8:
209
+
The following example shows how to modify an 'A' record, from IP address 203.0.113.11 to IP address 203.0.113.22:
210
210
211
211
```azurecli-interactive
212
-
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
213
-
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
212
+
az network dns record-set a add-record --resource-group myresourcegroup --zone-name contoso.com --record-set-name www --ipv4-address 203.0.113.22
213
+
az network dns record-set a remove-record --resource-group myresourcegroup --zone-name contoso.com --record-set-name www --ipv4-address 203.0.113.11
214
214
```
215
215
216
216
You can't add, remove, or modify the records in the automatically created NS record set at the zone apex (`--Name "@"`, including quote marks). For this record set, the only changes permitted are to modify the record set TTL and metadata.
@@ -250,7 +250,7 @@ This restriction applies only to the NS record set at the zone apex. Other NS re
250
250
The following example shows how to add another name server to the NS record set at the zone apex:
251
251
252
252
```azurecli-interactive
253
-
az network dns record-set ns add-record --resource-group myresourcegroup --zone-name contoso.com --record-set-name "@" --nsdname ns1.myotherdnsprovider.com
253
+
az network dns record-set ns add-record --resource-group myresourcegroup --zone-name contoso.com --record-set-name "@" --nsdname ns1.fabrikam.com
0 commit comments