@azure/arm-dns 5.1.1-alpha.20241024.1 → 5.2.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +44 -10
- package/LICENSE +1 -1
- package/README.md +1 -1
- package/dist/index.js +1371 -579
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/dnsResourceReferenceGetByTargetResourcesSample.js +15 -8
- package/dist-esm/samples-dev/dnsResourceReferenceGetByTargetResourcesSample.js.map +1 -1
- package/dist-esm/samples-dev/dnssecConfigsCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/dnssecConfigsCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/dnssecConfigsCreateOrUpdateSample.js +38 -0
- package/dist-esm/samples-dev/dnssecConfigsCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/dnssecConfigsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/dnssecConfigsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/dnssecConfigsDeleteSample.js +38 -0
- package/dist-esm/samples-dev/dnssecConfigsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/dnssecConfigsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/dnssecConfigsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/dnssecConfigsGetSample.js +38 -0
- package/dist-esm/samples-dev/dnssecConfigsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/dnssecConfigsListByDnsZoneSample.d.ts +2 -0
- package/dist-esm/samples-dev/dnssecConfigsListByDnsZoneSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/dnssecConfigsListByDnsZoneSample.js +54 -0
- package/dist-esm/samples-dev/dnssecConfigsListByDnsZoneSample.js.map +1 -0
- package/dist-esm/samples-dev/recordSetsCreateOrUpdateSample.js +213 -79
- package/dist-esm/samples-dev/recordSetsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/recordSetsDeleteSample.js +124 -57
- package/dist-esm/samples-dev/recordSetsDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/recordSetsGetSample.js +107 -40
- package/dist-esm/samples-dev/recordSetsGetSample.js.map +1 -1
- package/dist-esm/samples-dev/recordSetsListAllByDnsZoneSample.js +12 -5
- package/dist-esm/samples-dev/recordSetsListAllByDnsZoneSample.js.map +1 -1
- package/dist-esm/samples-dev/recordSetsListByDnsZoneSample.js +11 -4
- package/dist-esm/samples-dev/recordSetsListByDnsZoneSample.js.map +1 -1
- package/dist-esm/samples-dev/recordSetsListByTypeSample.js +166 -54
- package/dist-esm/samples-dev/recordSetsListByTypeSample.js.map +1 -1
- package/dist-esm/samples-dev/recordSetsUpdateSample.js +110 -40
- package/dist-esm/samples-dev/recordSetsUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/zonesCreateOrUpdateSample.js +11 -4
- package/dist-esm/samples-dev/zonesCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/zonesDeleteSample.js +11 -4
- package/dist-esm/samples-dev/zonesDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/zonesGetSample.js +11 -4
- package/dist-esm/samples-dev/zonesGetSample.js.map +1 -1
- package/dist-esm/samples-dev/zonesListByResourceGroupSample.js +11 -4
- package/dist-esm/samples-dev/zonesListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/zonesListSample.js +10 -3
- package/dist-esm/samples-dev/zonesListSample.js.map +1 -1
- package/dist-esm/samples-dev/zonesUpdateSample.js +11 -4
- package/dist-esm/samples-dev/zonesUpdateSample.js.map +1 -1
- package/dist-esm/src/dnsManagementClient.d.ts +3 -3
- package/dist-esm/src/dnsManagementClient.d.ts.map +1 -1
- package/dist-esm/src/dnsManagementClient.js +13 -12
- package/dist-esm/src/dnsManagementClient.js.map +1 -1
- package/dist-esm/src/lroImpl.d.ts +6 -11
- package/dist-esm/src/lroImpl.d.ts.map +1 -1
- package/dist-esm/src/lroImpl.js +12 -20
- package/dist-esm/src/lroImpl.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +256 -32
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +12 -1
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +13 -2
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +692 -262
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts +6 -6
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +106 -96
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/dnsResourceReferenceOperations.d.ts.map +1 -1
- package/dist-esm/src/operations/dnsResourceReferenceOperations.js +5 -5
- package/dist-esm/src/operations/dnsResourceReferenceOperations.js.map +1 -1
- package/dist-esm/src/operations/dnssecConfigs.d.ts +74 -0
- package/dist-esm/src/operations/dnssecConfigs.d.ts.map +1 -0
- package/dist-esm/src/operations/dnssecConfigs.js +348 -0
- package/dist-esm/src/operations/dnssecConfigs.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +1 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -1
- package/dist-esm/src/operations/index.js +1 -0
- package/dist-esm/src/operations/index.js.map +1 -1
- package/dist-esm/src/operations/recordSets.d.ts +22 -22
- package/dist-esm/src/operations/recordSets.js +87 -102
- package/dist-esm/src/operations/recordSets.js.map +1 -1
- package/dist-esm/src/operations/zones.d.ts +10 -10
- package/dist-esm/src/operations/zones.d.ts.map +1 -1
- package/dist-esm/src/operations/zones.js +66 -64
- package/dist-esm/src/operations/zones.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/dnssecConfigs.d.ts +49 -0
- package/dist-esm/src/operationsInterfaces/dnssecConfigs.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/dnssecConfigs.js +9 -0
- package/dist-esm/src/operationsInterfaces/dnssecConfigs.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.js +1 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/recordSets.d.ts +14 -14
- package/dist-esm/src/operationsInterfaces/zones.d.ts +8 -8
- package/dist-esm/src/operationsInterfaces/zones.d.ts.map +1 -1
- package/dist-esm/src/pagingHelper.d.ts +4 -4
- package/dist-esm/src/pagingHelper.js +4 -4
- package/dist-esm/test/dns_operations_test.spec.d.ts +4 -0
- package/dist-esm/test/dns_operations_test.spec.d.ts.map +1 -0
- package/dist-esm/test/dns_operations_test.spec.js +114 -0
- package/dist-esm/test/dns_operations_test.spec.js.map +1 -0
- package/package.json +31 -31
- package/review/arm-dns.api.md +157 -12
- package/src/dnsManagementClient.ts +25 -22
- package/src/lroImpl.ts +31 -23
- package/src/models/index.ts +290 -44
- package/src/models/mappers.ts +706 -263
- package/src/models/parameters.ts +113 -103
- package/src/operations/dnsResourceReferenceOperations.ts +11 -11
- package/src/operations/dnssecConfigs.ts +468 -0
- package/src/operations/index.ts +1 -0
- package/src/operations/recordSets.ts +138 -160
- package/src/operations/zones.ts +107 -111
- package/src/operationsInterfaces/dnsResourceReferenceOperations.ts +2 -2
- package/src/operationsInterfaces/dnssecConfigs.ts +95 -0
- package/src/operationsInterfaces/index.ts +1 -0
- package/src/operationsInterfaces/recordSets.ts +22 -22
- package/src/operationsInterfaces/zones.ts +15 -15
- package/src/pagingHelper.ts +5 -5
- package/types/arm-dns.d.ts +338 -46
- package/dist-esm/test/sampleTest.d.ts +0 -2
- package/dist-esm/test/sampleTest.d.ts.map +0 -1
- package/dist-esm/test/sampleTest.js +0 -42
- package/dist-esm/test/sampleTest.js.map +0 -1
|
@@ -10,16 +10,18 @@ import { __awaiter } from "tslib";
|
|
|
10
10
|
// Licensed under the MIT License.
|
|
11
11
|
import { DnsManagementClient } from "@azure/arm-dns";
|
|
12
12
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
13
15
|
/**
|
|
14
|
-
* This sample demonstrates how to Deletes a record set from a DNS zone. This operation cannot be undone.
|
|
16
|
+
* This sample demonstrates how to Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).
|
|
15
17
|
*
|
|
16
|
-
* @summary Deletes a record set from a DNS zone. This operation cannot be undone.
|
|
17
|
-
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/
|
|
18
|
+
* @summary Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).
|
|
19
|
+
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DeleteARecordset.json
|
|
18
20
|
*/
|
|
19
21
|
function deleteARecordset() {
|
|
20
22
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const subscriptionId = "subid";
|
|
22
|
-
const resourceGroupName = "rg1";
|
|
23
|
+
const subscriptionId = process.env["DNS_SUBSCRIPTION_ID"] || "subid";
|
|
24
|
+
const resourceGroupName = process.env["DNS_RESOURCE_GROUP"] || "rg1";
|
|
23
25
|
const zoneName = "zone1";
|
|
24
26
|
const relativeRecordSetName = "record1";
|
|
25
27
|
const recordType = "A";
|
|
@@ -29,17 +31,16 @@ function deleteARecordset() {
|
|
|
29
31
|
console.log(result);
|
|
30
32
|
});
|
|
31
33
|
}
|
|
32
|
-
deleteARecordset().catch(console.error);
|
|
33
34
|
/**
|
|
34
|
-
* This sample demonstrates how to Deletes a record set from a DNS zone. This operation cannot be undone.
|
|
35
|
+
* This sample demonstrates how to Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).
|
|
35
36
|
*
|
|
36
|
-
* @summary Deletes a record set from a DNS zone. This operation cannot be undone.
|
|
37
|
-
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/
|
|
37
|
+
* @summary Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).
|
|
38
|
+
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DeleteAAAARecordset.json
|
|
38
39
|
*/
|
|
39
40
|
function deleteAaaaRecordset() {
|
|
40
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
const subscriptionId = "subid";
|
|
42
|
-
const resourceGroupName = "rg1";
|
|
42
|
+
const subscriptionId = process.env["DNS_SUBSCRIPTION_ID"] || "subid";
|
|
43
|
+
const resourceGroupName = process.env["DNS_RESOURCE_GROUP"] || "rg1";
|
|
43
44
|
const zoneName = "zone1";
|
|
44
45
|
const relativeRecordSetName = "record1";
|
|
45
46
|
const recordType = "AAAA";
|
|
@@ -49,17 +50,16 @@ function deleteAaaaRecordset() {
|
|
|
49
50
|
console.log(result);
|
|
50
51
|
});
|
|
51
52
|
}
|
|
52
|
-
deleteAaaaRecordset().catch(console.error);
|
|
53
53
|
/**
|
|
54
|
-
* This sample demonstrates how to Deletes a record set from a DNS zone. This operation cannot be undone.
|
|
54
|
+
* This sample demonstrates how to Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).
|
|
55
55
|
*
|
|
56
|
-
* @summary Deletes a record set from a DNS zone. This operation cannot be undone.
|
|
57
|
-
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/
|
|
56
|
+
* @summary Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).
|
|
57
|
+
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DeleteCaaRecordset.json
|
|
58
58
|
*/
|
|
59
59
|
function deleteCaaRecordset() {
|
|
60
60
|
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
-
const subscriptionId = "subid";
|
|
62
|
-
const resourceGroupName = "rg1";
|
|
61
|
+
const subscriptionId = process.env["DNS_SUBSCRIPTION_ID"] || "subid";
|
|
62
|
+
const resourceGroupName = process.env["DNS_RESOURCE_GROUP"] || "rg1";
|
|
63
63
|
const zoneName = "zone1";
|
|
64
64
|
const relativeRecordSetName = "record1";
|
|
65
65
|
const recordType = "CAA";
|
|
@@ -69,77 +69,111 @@ function deleteCaaRecordset() {
|
|
|
69
69
|
console.log(result);
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
-
deleteCaaRecordset().catch(console.error);
|
|
73
72
|
/**
|
|
74
|
-
* This sample demonstrates how to Deletes a record set from a DNS zone. This operation cannot be undone.
|
|
73
|
+
* This sample demonstrates how to Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).
|
|
75
74
|
*
|
|
76
|
-
* @summary Deletes a record set from a DNS zone. This operation cannot be undone.
|
|
77
|
-
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/
|
|
75
|
+
* @summary Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).
|
|
76
|
+
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DeleteCNAMERecordset.json
|
|
78
77
|
*/
|
|
79
78
|
function deleteCnameRecordset() {
|
|
80
79
|
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
-
const subscriptionId = "subid";
|
|
82
|
-
const resourceGroupName = "rg1";
|
|
80
|
+
const subscriptionId = process.env["DNS_SUBSCRIPTION_ID"] || "subid";
|
|
81
|
+
const resourceGroupName = process.env["DNS_RESOURCE_GROUP"] || "rg1";
|
|
83
82
|
const zoneName = "zone1";
|
|
84
83
|
const relativeRecordSetName = "record1";
|
|
85
|
-
const recordType = "
|
|
84
|
+
const recordType = "CNAME";
|
|
86
85
|
const credential = new DefaultAzureCredential();
|
|
87
86
|
const client = new DnsManagementClient(credential, subscriptionId);
|
|
88
87
|
const result = yield client.recordSets.delete(resourceGroupName, zoneName, relativeRecordSetName, recordType);
|
|
89
88
|
console.log(result);
|
|
90
89
|
});
|
|
91
90
|
}
|
|
92
|
-
deleteCnameRecordset().catch(console.error);
|
|
93
91
|
/**
|
|
94
|
-
* This sample demonstrates how to Deletes a record set from a DNS zone. This operation cannot be undone.
|
|
92
|
+
* This sample demonstrates how to Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).
|
|
95
93
|
*
|
|
96
|
-
* @summary Deletes a record set from a DNS zone. This operation cannot be undone.
|
|
97
|
-
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/
|
|
94
|
+
* @summary Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).
|
|
95
|
+
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DeleteDSRecordset.json
|
|
96
|
+
*/
|
|
97
|
+
function deleteDsRecordset() {
|
|
98
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
const subscriptionId = process.env["DNS_SUBSCRIPTION_ID"] || "subid";
|
|
100
|
+
const resourceGroupName = process.env["DNS_RESOURCE_GROUP"] || "rg1";
|
|
101
|
+
const zoneName = "zone1";
|
|
102
|
+
const relativeRecordSetName = "record1";
|
|
103
|
+
const recordType = "DS";
|
|
104
|
+
const credential = new DefaultAzureCredential();
|
|
105
|
+
const client = new DnsManagementClient(credential, subscriptionId);
|
|
106
|
+
const result = yield client.recordSets.delete(resourceGroupName, zoneName, relativeRecordSetName, recordType);
|
|
107
|
+
console.log(result);
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* This sample demonstrates how to Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).
|
|
112
|
+
*
|
|
113
|
+
* @summary Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).
|
|
114
|
+
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DeleteMXRecordset.json
|
|
98
115
|
*/
|
|
99
116
|
function deleteMxRecordset() {
|
|
100
117
|
return __awaiter(this, void 0, void 0, function* () {
|
|
101
|
-
const subscriptionId = "subid";
|
|
102
|
-
const resourceGroupName = "rg1";
|
|
118
|
+
const subscriptionId = process.env["DNS_SUBSCRIPTION_ID"] || "subid";
|
|
119
|
+
const resourceGroupName = process.env["DNS_RESOURCE_GROUP"] || "rg1";
|
|
103
120
|
const zoneName = "zone1";
|
|
104
121
|
const relativeRecordSetName = "record1";
|
|
105
|
-
const recordType = "
|
|
122
|
+
const recordType = "MX";
|
|
123
|
+
const credential = new DefaultAzureCredential();
|
|
124
|
+
const client = new DnsManagementClient(credential, subscriptionId);
|
|
125
|
+
const result = yield client.recordSets.delete(resourceGroupName, zoneName, relativeRecordSetName, recordType);
|
|
126
|
+
console.log(result);
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* This sample demonstrates how to Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).
|
|
131
|
+
*
|
|
132
|
+
* @summary Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).
|
|
133
|
+
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DeleteNAPTRRecordset.json
|
|
134
|
+
*/
|
|
135
|
+
function deleteNaptrRecordset() {
|
|
136
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
137
|
+
const subscriptionId = process.env["DNS_SUBSCRIPTION_ID"] || "subid";
|
|
138
|
+
const resourceGroupName = process.env["DNS_RESOURCE_GROUP"] || "rg1";
|
|
139
|
+
const zoneName = "zone1";
|
|
140
|
+
const relativeRecordSetName = "record1";
|
|
141
|
+
const recordType = "NAPTR";
|
|
106
142
|
const credential = new DefaultAzureCredential();
|
|
107
143
|
const client = new DnsManagementClient(credential, subscriptionId);
|
|
108
144
|
const result = yield client.recordSets.delete(resourceGroupName, zoneName, relativeRecordSetName, recordType);
|
|
109
145
|
console.log(result);
|
|
110
146
|
});
|
|
111
147
|
}
|
|
112
|
-
deleteMxRecordset().catch(console.error);
|
|
113
148
|
/**
|
|
114
|
-
* This sample demonstrates how to Deletes a record set from a DNS zone. This operation cannot be undone.
|
|
149
|
+
* This sample demonstrates how to Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).
|
|
115
150
|
*
|
|
116
|
-
* @summary Deletes a record set from a DNS zone. This operation cannot be undone.
|
|
117
|
-
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/
|
|
151
|
+
* @summary Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).
|
|
152
|
+
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DeleteNSRecordset.json
|
|
118
153
|
*/
|
|
119
154
|
function deleteNsRecordset() {
|
|
120
155
|
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
-
const subscriptionId = "subid";
|
|
122
|
-
const resourceGroupName = "rg1";
|
|
156
|
+
const subscriptionId = process.env["DNS_SUBSCRIPTION_ID"] || "subid";
|
|
157
|
+
const resourceGroupName = process.env["DNS_RESOURCE_GROUP"] || "rg1";
|
|
123
158
|
const zoneName = "zone1";
|
|
124
159
|
const relativeRecordSetName = "record1";
|
|
125
|
-
const recordType = "
|
|
160
|
+
const recordType = "NS";
|
|
126
161
|
const credential = new DefaultAzureCredential();
|
|
127
162
|
const client = new DnsManagementClient(credential, subscriptionId);
|
|
128
163
|
const result = yield client.recordSets.delete(resourceGroupName, zoneName, relativeRecordSetName, recordType);
|
|
129
164
|
console.log(result);
|
|
130
165
|
});
|
|
131
166
|
}
|
|
132
|
-
deleteNsRecordset().catch(console.error);
|
|
133
167
|
/**
|
|
134
|
-
* This sample demonstrates how to Deletes a record set from a DNS zone. This operation cannot be undone.
|
|
168
|
+
* This sample demonstrates how to Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).
|
|
135
169
|
*
|
|
136
|
-
* @summary Deletes a record set from a DNS zone. This operation cannot be undone.
|
|
137
|
-
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/
|
|
170
|
+
* @summary Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).
|
|
171
|
+
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DeletePTRRecordset.json
|
|
138
172
|
*/
|
|
139
173
|
function deletePtrRecordset() {
|
|
140
174
|
return __awaiter(this, void 0, void 0, function* () {
|
|
141
|
-
const subscriptionId = "subid";
|
|
142
|
-
const resourceGroupName = "rg1";
|
|
175
|
+
const subscriptionId = process.env["DNS_SUBSCRIPTION_ID"] || "subid";
|
|
176
|
+
const resourceGroupName = process.env["DNS_RESOURCE_GROUP"] || "rg1";
|
|
143
177
|
const zoneName = "0.0.127.in-addr.arpa";
|
|
144
178
|
const relativeRecordSetName = "1";
|
|
145
179
|
const recordType = "PTR";
|
|
@@ -149,17 +183,16 @@ function deletePtrRecordset() {
|
|
|
149
183
|
console.log(result);
|
|
150
184
|
});
|
|
151
185
|
}
|
|
152
|
-
deletePtrRecordset().catch(console.error);
|
|
153
186
|
/**
|
|
154
|
-
* This sample demonstrates how to Deletes a record set from a DNS zone. This operation cannot be undone.
|
|
187
|
+
* This sample demonstrates how to Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).
|
|
155
188
|
*
|
|
156
|
-
* @summary Deletes a record set from a DNS zone. This operation cannot be undone.
|
|
157
|
-
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/
|
|
189
|
+
* @summary Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).
|
|
190
|
+
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DeleteSRVRecordset.json
|
|
158
191
|
*/
|
|
159
192
|
function deleteSrvRecordset() {
|
|
160
193
|
return __awaiter(this, void 0, void 0, function* () {
|
|
161
|
-
const subscriptionId = "subid";
|
|
162
|
-
const resourceGroupName = "rg1";
|
|
194
|
+
const subscriptionId = process.env["DNS_SUBSCRIPTION_ID"] || "subid";
|
|
195
|
+
const resourceGroupName = process.env["DNS_RESOURCE_GROUP"] || "rg1";
|
|
163
196
|
const zoneName = "zone1";
|
|
164
197
|
const relativeRecordSetName = "record1";
|
|
165
198
|
const recordType = "SRV";
|
|
@@ -169,17 +202,35 @@ function deleteSrvRecordset() {
|
|
|
169
202
|
console.log(result);
|
|
170
203
|
});
|
|
171
204
|
}
|
|
172
|
-
deleteSrvRecordset().catch(console.error);
|
|
173
205
|
/**
|
|
174
|
-
* This sample demonstrates how to Deletes a record set from a DNS zone. This operation cannot be undone.
|
|
206
|
+
* This sample demonstrates how to Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).
|
|
175
207
|
*
|
|
176
|
-
* @summary Deletes a record set from a DNS zone. This operation cannot be undone.
|
|
177
|
-
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/
|
|
208
|
+
* @summary Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).
|
|
209
|
+
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DeleteTLSARecordset.json
|
|
210
|
+
*/
|
|
211
|
+
function deleteTlsaRecordset() {
|
|
212
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
213
|
+
const subscriptionId = process.env["DNS_SUBSCRIPTION_ID"] || "subid";
|
|
214
|
+
const resourceGroupName = process.env["DNS_RESOURCE_GROUP"] || "rg1";
|
|
215
|
+
const zoneName = "zone1";
|
|
216
|
+
const relativeRecordSetName = "record1";
|
|
217
|
+
const recordType = "TLSA";
|
|
218
|
+
const credential = new DefaultAzureCredential();
|
|
219
|
+
const client = new DnsManagementClient(credential, subscriptionId);
|
|
220
|
+
const result = yield client.recordSets.delete(resourceGroupName, zoneName, relativeRecordSetName, recordType);
|
|
221
|
+
console.log(result);
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* This sample demonstrates how to Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).
|
|
226
|
+
*
|
|
227
|
+
* @summary Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).
|
|
228
|
+
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/DeleteTXTRecordset.json
|
|
178
229
|
*/
|
|
179
230
|
function deleteTxtRecordset() {
|
|
180
231
|
return __awaiter(this, void 0, void 0, function* () {
|
|
181
|
-
const subscriptionId = "subid";
|
|
182
|
-
const resourceGroupName = "rg1";
|
|
232
|
+
const subscriptionId = process.env["DNS_SUBSCRIPTION_ID"] || "subid";
|
|
233
|
+
const resourceGroupName = process.env["DNS_RESOURCE_GROUP"] || "rg1";
|
|
183
234
|
const zoneName = "zone1";
|
|
184
235
|
const relativeRecordSetName = "record1";
|
|
185
236
|
const recordType = "TXT";
|
|
@@ -189,5 +240,21 @@ function deleteTxtRecordset() {
|
|
|
189
240
|
console.log(result);
|
|
190
241
|
});
|
|
191
242
|
}
|
|
192
|
-
|
|
243
|
+
function main() {
|
|
244
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
245
|
+
deleteARecordset();
|
|
246
|
+
deleteAaaaRecordset();
|
|
247
|
+
deleteCaaRecordset();
|
|
248
|
+
deleteCnameRecordset();
|
|
249
|
+
deleteDsRecordset();
|
|
250
|
+
deleteMxRecordset();
|
|
251
|
+
deleteNaptrRecordset();
|
|
252
|
+
deleteNsRecordset();
|
|
253
|
+
deletePtrRecordset();
|
|
254
|
+
deleteSrvRecordset();
|
|
255
|
+
deleteTlsaRecordset();
|
|
256
|
+
deleteTxtRecordset();
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
main().catch(console.error);
|
|
193
260
|
//# sourceMappingURL=recordSetsDeleteSample.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recordSetsDeleteSample.js","sourceRoot":"","sources":["../../samples-dev/recordSetsDeleteSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"recordSetsDeleteSample.js","sourceRoot":"","sources":["../../samples-dev/recordSetsDeleteSample.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB;;;;;GAKG;AACH,SAAe,gBAAgB;;QAC7B,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,IAAI,OAAO,CAAC;QACrE,MAAM,iBAAiB,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAoB,CA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EAAE,CAAC;QACnB,mBAAmB,EAAE,CAAC;QACtB,kBAAkB,EAAE,CAAC;QACrB,oBAAoB,EAAE,CAAC;QACvB,iBAAiB,EAAE,CAAC;QACpB,iBAAiB,EAAE,CAAC;QACpB,oBAAoB,EAAE,CAAC;QACvB,iBAAiB,EAAE,CAAC;QACpB,kBAAkB,EAAE,CAAC;QACrB,kBAAkB,EAAE,CAAC;QACrB,mBAAmB,EAAE,CAAC;QACtB,kBAAkB,EAAE,CAAC;IACvB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -10,16 +10,18 @@ import { __awaiter } from "tslib";
|
|
|
10
10
|
// Licensed under the MIT License.
|
|
11
11
|
import { DnsManagementClient } from "@azure/arm-dns";
|
|
12
12
|
import { DefaultAzureCredential } from "@azure/identity";
|
|
13
|
+
import * as dotenv from "dotenv";
|
|
14
|
+
dotenv.config();
|
|
13
15
|
/**
|
|
14
16
|
* This sample demonstrates how to Gets a record set.
|
|
15
17
|
*
|
|
16
18
|
* @summary Gets a record set.
|
|
17
|
-
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/
|
|
19
|
+
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/GetARecordset.json
|
|
18
20
|
*/
|
|
19
21
|
function getARecordset() {
|
|
20
22
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
const subscriptionId = "subid";
|
|
22
|
-
const resourceGroupName = "rg1";
|
|
23
|
+
const subscriptionId = process.env["DNS_SUBSCRIPTION_ID"] || "subid";
|
|
24
|
+
const resourceGroupName = process.env["DNS_RESOURCE_GROUP"] || "rg1";
|
|
23
25
|
const zoneName = "zone1";
|
|
24
26
|
const relativeRecordSetName = "record1";
|
|
25
27
|
const recordType = "A";
|
|
@@ -29,17 +31,16 @@ function getARecordset() {
|
|
|
29
31
|
console.log(result);
|
|
30
32
|
});
|
|
31
33
|
}
|
|
32
|
-
getARecordset().catch(console.error);
|
|
33
34
|
/**
|
|
34
35
|
* This sample demonstrates how to Gets a record set.
|
|
35
36
|
*
|
|
36
37
|
* @summary Gets a record set.
|
|
37
|
-
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/
|
|
38
|
+
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/GetAAAARecordset.json
|
|
38
39
|
*/
|
|
39
40
|
function getAaaaRecordset() {
|
|
40
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
const subscriptionId = "subid";
|
|
42
|
-
const resourceGroupName = "rg1";
|
|
42
|
+
const subscriptionId = process.env["DNS_SUBSCRIPTION_ID"] || "subid";
|
|
43
|
+
const resourceGroupName = process.env["DNS_RESOURCE_GROUP"] || "rg1";
|
|
43
44
|
const zoneName = "zone1";
|
|
44
45
|
const relativeRecordSetName = "record1";
|
|
45
46
|
const recordType = "AAAA";
|
|
@@ -49,17 +50,16 @@ function getAaaaRecordset() {
|
|
|
49
50
|
console.log(result);
|
|
50
51
|
});
|
|
51
52
|
}
|
|
52
|
-
getAaaaRecordset().catch(console.error);
|
|
53
53
|
/**
|
|
54
54
|
* This sample demonstrates how to Gets a record set.
|
|
55
55
|
*
|
|
56
56
|
* @summary Gets a record set.
|
|
57
|
-
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/
|
|
57
|
+
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/GetCaaRecordset.json
|
|
58
58
|
*/
|
|
59
59
|
function getCaaRecordset() {
|
|
60
60
|
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
-
const subscriptionId = "subid";
|
|
62
|
-
const resourceGroupName = "rg1";
|
|
61
|
+
const subscriptionId = process.env["DNS_SUBSCRIPTION_ID"] || "subid";
|
|
62
|
+
const resourceGroupName = process.env["DNS_RESOURCE_GROUP"] || "rg1";
|
|
63
63
|
const zoneName = "zone1";
|
|
64
64
|
const relativeRecordSetName = "record1";
|
|
65
65
|
const recordType = "CAA";
|
|
@@ -69,17 +69,16 @@ function getCaaRecordset() {
|
|
|
69
69
|
console.log(result);
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
|
-
getCaaRecordset().catch(console.error);
|
|
73
72
|
/**
|
|
74
73
|
* This sample demonstrates how to Gets a record set.
|
|
75
74
|
*
|
|
76
75
|
* @summary Gets a record set.
|
|
77
|
-
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/
|
|
76
|
+
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/GetCNAMERecordset.json
|
|
78
77
|
*/
|
|
79
78
|
function getCnameRecordset() {
|
|
80
79
|
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
-
const subscriptionId = "subid";
|
|
82
|
-
const resourceGroupName = "rg1";
|
|
80
|
+
const subscriptionId = process.env["DNS_SUBSCRIPTION_ID"] || "subid";
|
|
81
|
+
const resourceGroupName = process.env["DNS_RESOURCE_GROUP"] || "rg1";
|
|
83
82
|
const zoneName = "zone1";
|
|
84
83
|
const relativeRecordSetName = "record1";
|
|
85
84
|
const recordType = "CNAME";
|
|
@@ -89,17 +88,35 @@ function getCnameRecordset() {
|
|
|
89
88
|
console.log(result);
|
|
90
89
|
});
|
|
91
90
|
}
|
|
92
|
-
getCnameRecordset().catch(console.error);
|
|
93
91
|
/**
|
|
94
92
|
* This sample demonstrates how to Gets a record set.
|
|
95
93
|
*
|
|
96
94
|
* @summary Gets a record set.
|
|
97
|
-
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/
|
|
95
|
+
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/GetDSRecordset.json
|
|
96
|
+
*/
|
|
97
|
+
function getDsRecordset() {
|
|
98
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
const subscriptionId = process.env["DNS_SUBSCRIPTION_ID"] || "subid";
|
|
100
|
+
const resourceGroupName = process.env["DNS_RESOURCE_GROUP"] || "rg1";
|
|
101
|
+
const zoneName = "zone1";
|
|
102
|
+
const relativeRecordSetName = "record1";
|
|
103
|
+
const recordType = "DS";
|
|
104
|
+
const credential = new DefaultAzureCredential();
|
|
105
|
+
const client = new DnsManagementClient(credential, subscriptionId);
|
|
106
|
+
const result = yield client.recordSets.get(resourceGroupName, zoneName, relativeRecordSetName, recordType);
|
|
107
|
+
console.log(result);
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* This sample demonstrates how to Gets a record set.
|
|
112
|
+
*
|
|
113
|
+
* @summary Gets a record set.
|
|
114
|
+
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/GetMXRecordset.json
|
|
98
115
|
*/
|
|
99
116
|
function getMxRecordset() {
|
|
100
117
|
return __awaiter(this, void 0, void 0, function* () {
|
|
101
|
-
const subscriptionId = "subid";
|
|
102
|
-
const resourceGroupName = "rg1";
|
|
118
|
+
const subscriptionId = process.env["DNS_SUBSCRIPTION_ID"] || "subid";
|
|
119
|
+
const resourceGroupName = process.env["DNS_RESOURCE_GROUP"] || "rg1";
|
|
103
120
|
const zoneName = "zone1";
|
|
104
121
|
const relativeRecordSetName = "record1";
|
|
105
122
|
const recordType = "MX";
|
|
@@ -109,17 +126,35 @@ function getMxRecordset() {
|
|
|
109
126
|
console.log(result);
|
|
110
127
|
});
|
|
111
128
|
}
|
|
112
|
-
getMxRecordset().catch(console.error);
|
|
113
129
|
/**
|
|
114
130
|
* This sample demonstrates how to Gets a record set.
|
|
115
131
|
*
|
|
116
132
|
* @summary Gets a record set.
|
|
117
|
-
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/
|
|
133
|
+
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/GetNAPTRRecordset.json
|
|
134
|
+
*/
|
|
135
|
+
function getNaptrRecordset() {
|
|
136
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
137
|
+
const subscriptionId = process.env["DNS_SUBSCRIPTION_ID"] || "subid";
|
|
138
|
+
const resourceGroupName = process.env["DNS_RESOURCE_GROUP"] || "rg1";
|
|
139
|
+
const zoneName = "zone1";
|
|
140
|
+
const relativeRecordSetName = "record1";
|
|
141
|
+
const recordType = "NAPTR";
|
|
142
|
+
const credential = new DefaultAzureCredential();
|
|
143
|
+
const client = new DnsManagementClient(credential, subscriptionId);
|
|
144
|
+
const result = yield client.recordSets.get(resourceGroupName, zoneName, relativeRecordSetName, recordType);
|
|
145
|
+
console.log(result);
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* This sample demonstrates how to Gets a record set.
|
|
150
|
+
*
|
|
151
|
+
* @summary Gets a record set.
|
|
152
|
+
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/GetNSRecordset.json
|
|
118
153
|
*/
|
|
119
154
|
function getNsRecordset() {
|
|
120
155
|
return __awaiter(this, void 0, void 0, function* () {
|
|
121
|
-
const subscriptionId = "subid";
|
|
122
|
-
const resourceGroupName = "rg1";
|
|
156
|
+
const subscriptionId = process.env["DNS_SUBSCRIPTION_ID"] || "subid";
|
|
157
|
+
const resourceGroupName = process.env["DNS_RESOURCE_GROUP"] || "rg1";
|
|
123
158
|
const zoneName = "zone1";
|
|
124
159
|
const relativeRecordSetName = "record1";
|
|
125
160
|
const recordType = "NS";
|
|
@@ -129,17 +164,16 @@ function getNsRecordset() {
|
|
|
129
164
|
console.log(result);
|
|
130
165
|
});
|
|
131
166
|
}
|
|
132
|
-
getNsRecordset().catch(console.error);
|
|
133
167
|
/**
|
|
134
168
|
* This sample demonstrates how to Gets a record set.
|
|
135
169
|
*
|
|
136
170
|
* @summary Gets a record set.
|
|
137
|
-
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/
|
|
171
|
+
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/GetPTRRecordset.json
|
|
138
172
|
*/
|
|
139
173
|
function getPtrRecordset() {
|
|
140
174
|
return __awaiter(this, void 0, void 0, function* () {
|
|
141
|
-
const subscriptionId = "subid";
|
|
142
|
-
const resourceGroupName = "rg1";
|
|
175
|
+
const subscriptionId = process.env["DNS_SUBSCRIPTION_ID"] || "subid";
|
|
176
|
+
const resourceGroupName = process.env["DNS_RESOURCE_GROUP"] || "rg1";
|
|
143
177
|
const zoneName = "0.0.127.in-addr.arpa";
|
|
144
178
|
const relativeRecordSetName = "1";
|
|
145
179
|
const recordType = "PTR";
|
|
@@ -149,17 +183,16 @@ function getPtrRecordset() {
|
|
|
149
183
|
console.log(result);
|
|
150
184
|
});
|
|
151
185
|
}
|
|
152
|
-
getPtrRecordset().catch(console.error);
|
|
153
186
|
/**
|
|
154
187
|
* This sample demonstrates how to Gets a record set.
|
|
155
188
|
*
|
|
156
189
|
* @summary Gets a record set.
|
|
157
|
-
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/
|
|
190
|
+
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/GetSOARecordset.json
|
|
158
191
|
*/
|
|
159
192
|
function getSoaRecordset() {
|
|
160
193
|
return __awaiter(this, void 0, void 0, function* () {
|
|
161
|
-
const subscriptionId = "subid";
|
|
162
|
-
const resourceGroupName = "rg1";
|
|
194
|
+
const subscriptionId = process.env["DNS_SUBSCRIPTION_ID"] || "subid";
|
|
195
|
+
const resourceGroupName = process.env["DNS_RESOURCE_GROUP"] || "rg1";
|
|
163
196
|
const zoneName = "zone1";
|
|
164
197
|
const relativeRecordSetName = "@";
|
|
165
198
|
const recordType = "SOA";
|
|
@@ -169,17 +202,16 @@ function getSoaRecordset() {
|
|
|
169
202
|
console.log(result);
|
|
170
203
|
});
|
|
171
204
|
}
|
|
172
|
-
getSoaRecordset().catch(console.error);
|
|
173
205
|
/**
|
|
174
206
|
* This sample demonstrates how to Gets a record set.
|
|
175
207
|
*
|
|
176
208
|
* @summary Gets a record set.
|
|
177
|
-
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/
|
|
209
|
+
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/GetSRVRecordset.json
|
|
178
210
|
*/
|
|
179
211
|
function getSrvRecordset() {
|
|
180
212
|
return __awaiter(this, void 0, void 0, function* () {
|
|
181
|
-
const subscriptionId = "subid";
|
|
182
|
-
const resourceGroupName = "rg1";
|
|
213
|
+
const subscriptionId = process.env["DNS_SUBSCRIPTION_ID"] || "subid";
|
|
214
|
+
const resourceGroupName = process.env["DNS_RESOURCE_GROUP"] || "rg1";
|
|
183
215
|
const zoneName = "zone1";
|
|
184
216
|
const relativeRecordSetName = "record1";
|
|
185
217
|
const recordType = "SRV";
|
|
@@ -189,17 +221,35 @@ function getSrvRecordset() {
|
|
|
189
221
|
console.log(result);
|
|
190
222
|
});
|
|
191
223
|
}
|
|
192
|
-
getSrvRecordset().catch(console.error);
|
|
193
224
|
/**
|
|
194
225
|
* This sample demonstrates how to Gets a record set.
|
|
195
226
|
*
|
|
196
227
|
* @summary Gets a record set.
|
|
197
|
-
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/
|
|
228
|
+
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/GetTLSARecordset.json
|
|
229
|
+
*/
|
|
230
|
+
function getTlsaRecordset() {
|
|
231
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
232
|
+
const subscriptionId = process.env["DNS_SUBSCRIPTION_ID"] || "subid";
|
|
233
|
+
const resourceGroupName = process.env["DNS_RESOURCE_GROUP"] || "rg1";
|
|
234
|
+
const zoneName = "zone1";
|
|
235
|
+
const relativeRecordSetName = "record1";
|
|
236
|
+
const recordType = "TLSA";
|
|
237
|
+
const credential = new DefaultAzureCredential();
|
|
238
|
+
const client = new DnsManagementClient(credential, subscriptionId);
|
|
239
|
+
const result = yield client.recordSets.get(resourceGroupName, zoneName, relativeRecordSetName, recordType);
|
|
240
|
+
console.log(result);
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* This sample demonstrates how to Gets a record set.
|
|
245
|
+
*
|
|
246
|
+
* @summary Gets a record set.
|
|
247
|
+
* x-ms-original-file: specification/dns/resource-manager/Microsoft.Network/preview/2023-07-01-preview/examples/GetTXTRecordset.json
|
|
198
248
|
*/
|
|
199
249
|
function getTxtRecordset() {
|
|
200
250
|
return __awaiter(this, void 0, void 0, function* () {
|
|
201
|
-
const subscriptionId = "subid";
|
|
202
|
-
const resourceGroupName = "rg1";
|
|
251
|
+
const subscriptionId = process.env["DNS_SUBSCRIPTION_ID"] || "subid";
|
|
252
|
+
const resourceGroupName = process.env["DNS_RESOURCE_GROUP"] || "rg1";
|
|
203
253
|
const zoneName = "zone1";
|
|
204
254
|
const relativeRecordSetName = "record1";
|
|
205
255
|
const recordType = "TXT";
|
|
@@ -209,5 +259,22 @@ function getTxtRecordset() {
|
|
|
209
259
|
console.log(result);
|
|
210
260
|
});
|
|
211
261
|
}
|
|
212
|
-
|
|
262
|
+
function main() {
|
|
263
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
264
|
+
getARecordset();
|
|
265
|
+
getAaaaRecordset();
|
|
266
|
+
getCaaRecordset();
|
|
267
|
+
getCnameRecordset();
|
|
268
|
+
getDsRecordset();
|
|
269
|
+
getMxRecordset();
|
|
270
|
+
getNaptrRecordset();
|
|
271
|
+
getNsRecordset();
|
|
272
|
+
getPtrRecordset();
|
|
273
|
+
getSoaRecordset();
|
|
274
|
+
getSrvRecordset();
|
|
275
|
+
getTlsaRecordset();
|
|
276
|
+
getTxtRecordset();
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
main().catch(console.error);
|
|
213
280
|
//# sourceMappingURL=recordSetsGetSample.js.map
|