@azure/arm-privatedns 1.0.0 → 3.0.0

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.
Files changed (146) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/LICENSE.txt +21 -21
  4. package/README.md +98 -100
  5. package/dist/index.js +2295 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/index.min.js +1 -0
  8. package/dist/index.min.js.map +1 -0
  9. package/dist-esm/src/index.d.ts +5 -0
  10. package/dist-esm/src/index.d.ts.map +1 -0
  11. package/dist-esm/src/index.js +12 -0
  12. package/dist-esm/src/index.js.map +1 -0
  13. package/dist-esm/src/lroImpl.d.ts +16 -0
  14. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  15. package/dist-esm/src/lroImpl.js +29 -0
  16. package/dist-esm/src/lroImpl.js.map +1 -0
  17. package/dist-esm/src/models/index.d.ts +470 -0
  18. package/dist-esm/src/models/index.d.ts.map +1 -0
  19. package/dist-esm/src/models/index.js +24 -0
  20. package/dist-esm/src/models/index.js.map +1 -0
  21. package/dist-esm/src/models/mappers.d.ts +22 -0
  22. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  23. package/{esm → dist-esm/src}/models/mappers.js +234 -205
  24. package/dist-esm/src/models/mappers.js.map +1 -0
  25. package/dist-esm/src/models/parameters.d.ts +20 -0
  26. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  27. package/{esm → dist-esm/src}/models/parameters.js +91 -77
  28. package/dist-esm/src/models/parameters.js.map +1 -0
  29. package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
  30. package/dist-esm/src/operations/index.d.ts.map +1 -0
  31. package/{esm → dist-esm/src}/operations/index.js +3 -5
  32. package/dist-esm/src/operations/index.js.map +1 -0
  33. package/dist-esm/src/operations/privateZones.d.ts +114 -0
  34. package/dist-esm/src/operations/privateZones.d.ts.map +1 -0
  35. package/dist-esm/src/operations/privateZones.js +516 -0
  36. package/dist-esm/src/operations/privateZones.js.map +1 -0
  37. package/dist-esm/src/operations/recordSets.d.ts +105 -0
  38. package/dist-esm/src/operations/recordSets.d.ts.map +1 -0
  39. package/dist-esm/src/operations/recordSets.js +451 -0
  40. package/dist-esm/src/operations/recordSets.js.map +1 -0
  41. package/dist-esm/src/operations/virtualNetworkLinks.d.ts +103 -0
  42. package/dist-esm/src/operations/virtualNetworkLinks.d.ts.map +1 -0
  43. package/dist-esm/src/operations/virtualNetworkLinks.js +442 -0
  44. package/dist-esm/src/operations/virtualNetworkLinks.js.map +1 -0
  45. package/dist-esm/src/operationsInterfaces/index.d.ts +4 -0
  46. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  47. package/dist-esm/src/operationsInterfaces/index.js +11 -0
  48. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  49. package/dist-esm/src/operationsInterfaces/privateZones.d.ts +78 -0
  50. package/dist-esm/src/operationsInterfaces/privateZones.d.ts.map +1 -0
  51. package/dist-esm/src/operationsInterfaces/privateZones.js +9 -0
  52. package/dist-esm/src/operationsInterfaces/privateZones.js.map +1 -0
  53. package/dist-esm/src/operationsInterfaces/recordSets.d.ts +61 -0
  54. package/dist-esm/src/operationsInterfaces/recordSets.d.ts.map +1 -0
  55. package/dist-esm/src/operationsInterfaces/recordSets.js +9 -0
  56. package/dist-esm/src/operationsInterfaces/recordSets.js.map +1 -0
  57. package/dist-esm/src/operationsInterfaces/virtualNetworkLinks.d.ts +78 -0
  58. package/dist-esm/src/operationsInterfaces/virtualNetworkLinks.d.ts.map +1 -0
  59. package/dist-esm/src/operationsInterfaces/virtualNetworkLinks.js +9 -0
  60. package/dist-esm/src/operationsInterfaces/virtualNetworkLinks.js.map +1 -0
  61. package/dist-esm/src/privateDnsManagementClient.d.ts +21 -0
  62. package/dist-esm/src/privateDnsManagementClient.d.ts.map +1 -0
  63. package/dist-esm/src/privateDnsManagementClient.js +54 -0
  64. package/dist-esm/src/privateDnsManagementClient.js.map +1 -0
  65. package/dist-esm/test/sampleTest.d.ts +2 -0
  66. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  67. package/dist-esm/test/sampleTest.js +40 -0
  68. package/dist-esm/test/sampleTest.js.map +1 -0
  69. package/package.json +86 -26
  70. package/review/arm-privatedns.api.md +435 -0
  71. package/rollup.config.js +181 -30
  72. package/src/index.ts +12 -0
  73. package/src/lroImpl.ts +34 -0
  74. package/src/models/index.ts +567 -0
  75. package/{lib → src}/models/mappers.ts +248 -214
  76. package/src/models/parameters.ts +201 -0
  77. package/{lib → src}/operations/index.ts +3 -5
  78. package/src/operations/privateZones.ts +686 -0
  79. package/src/operations/recordSets.ts +602 -0
  80. package/src/operations/virtualNetworkLinks.ts +624 -0
  81. package/src/operationsInterfaces/index.ts +11 -0
  82. package/src/operationsInterfaces/privateZones.ts +145 -0
  83. package/src/operationsInterfaces/recordSets.ts +117 -0
  84. package/src/operationsInterfaces/virtualNetworkLinks.ts +150 -0
  85. package/src/privateDnsManagementClient.ts +88 -0
  86. package/tsconfig.json +20 -7
  87. package/types/arm-privatedns.d.ts +768 -0
  88. package/types/tsdoc-metadata.json +11 -0
  89. package/dist/arm-privatedns.js +0 -1944
  90. package/dist/arm-privatedns.js.map +0 -1
  91. package/dist/arm-privatedns.min.js +0 -1
  92. package/dist/arm-privatedns.min.js.map +0 -1
  93. package/esm/models/index.d.ts +0 -1031
  94. package/esm/models/index.d.ts.map +0 -1
  95. package/esm/models/index.js +0 -8
  96. package/esm/models/index.js.map +0 -1
  97. package/esm/models/mappers.d.ts +0 -22
  98. package/esm/models/mappers.d.ts.map +0 -1
  99. package/esm/models/mappers.js.map +0 -1
  100. package/esm/models/parameters.d.ts +0 -15
  101. package/esm/models/parameters.d.ts.map +0 -1
  102. package/esm/models/parameters.js.map +0 -1
  103. package/esm/models/privateZonesMappers.d.ts +0 -2
  104. package/esm/models/privateZonesMappers.d.ts.map +0 -1
  105. package/esm/models/privateZonesMappers.js +0 -9
  106. package/esm/models/privateZonesMappers.js.map +0 -1
  107. package/esm/models/recordSetsMappers.d.ts +0 -2
  108. package/esm/models/recordSetsMappers.d.ts.map +0 -1
  109. package/esm/models/recordSetsMappers.js +0 -9
  110. package/esm/models/recordSetsMappers.js.map +0 -1
  111. package/esm/models/virtualNetworkLinksMappers.d.ts +0 -2
  112. package/esm/models/virtualNetworkLinksMappers.d.ts.map +0 -1
  113. package/esm/models/virtualNetworkLinksMappers.js +0 -9
  114. package/esm/models/virtualNetworkLinksMappers.js.map +0 -1
  115. package/esm/operations/index.d.ts.map +0 -1
  116. package/esm/operations/index.js.map +0 -1
  117. package/esm/operations/privateZones.d.ts +0 -165
  118. package/esm/operations/privateZones.d.ts.map +0 -1
  119. package/esm/operations/privateZones.js +0 -347
  120. package/esm/operations/privateZones.js.map +0 -1
  121. package/esm/operations/recordSets.d.ts +0 -229
  122. package/esm/operations/recordSets.d.ts.map +0 -1
  123. package/esm/operations/recordSets.js +0 -304
  124. package/esm/operations/recordSets.js.map +0 -1
  125. package/esm/operations/virtualNetworkLinks.d.ts +0 -139
  126. package/esm/operations/virtualNetworkLinks.d.ts.map +0 -1
  127. package/esm/operations/virtualNetworkLinks.js +0 -305
  128. package/esm/operations/virtualNetworkLinks.js.map +0 -1
  129. package/esm/privateDnsManagementClient.d.ts +0 -21
  130. package/esm/privateDnsManagementClient.d.ts.map +0 -1
  131. package/esm/privateDnsManagementClient.js +0 -36
  132. package/esm/privateDnsManagementClient.js.map +0 -1
  133. package/esm/privateDnsManagementClientContext.d.ts +0 -17
  134. package/esm/privateDnsManagementClientContext.d.ts.map +0 -1
  135. package/esm/privateDnsManagementClientContext.js +0 -57
  136. package/esm/privateDnsManagementClientContext.js.map +0 -1
  137. package/lib/models/index.ts +0 -1123
  138. package/lib/models/parameters.ts +0 -162
  139. package/lib/models/privateZonesMappers.ts +0 -28
  140. package/lib/models/recordSetsMappers.ts +0 -28
  141. package/lib/models/virtualNetworkLinksMappers.ts +0 -28
  142. package/lib/operations/privateZones.ts +0 -490
  143. package/lib/operations/recordSets.ts +0 -568
  144. package/lib/operations/virtualNetworkLinks.ts +0 -410
  145. package/lib/privateDnsManagementClient.ts +0 -47
  146. package/lib/privateDnsManagementClientContext.ts +0 -63
@@ -0,0 +1,624 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { VirtualNetworkLinks } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
13
+ import * as Parameters from "../models/parameters";
14
+ import { PrivateDnsManagementClient } from "../privateDnsManagementClient";
15
+ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
+ import { LroImpl } from "../lroImpl";
17
+ import {
18
+ VirtualNetworkLink,
19
+ VirtualNetworkLinksListNextOptionalParams,
20
+ VirtualNetworkLinksListOptionalParams,
21
+ VirtualNetworkLinksCreateOrUpdateOptionalParams,
22
+ VirtualNetworkLinksCreateOrUpdateResponse,
23
+ VirtualNetworkLinksUpdateOptionalParams,
24
+ VirtualNetworkLinksUpdateResponse,
25
+ VirtualNetworkLinksDeleteOptionalParams,
26
+ VirtualNetworkLinksGetOptionalParams,
27
+ VirtualNetworkLinksGetResponse,
28
+ VirtualNetworkLinksListResponse,
29
+ VirtualNetworkLinksListNextResponse
30
+ } from "../models";
31
+
32
+ /// <reference lib="esnext.asynciterable" />
33
+ /** Class containing VirtualNetworkLinks operations. */
34
+ export class VirtualNetworkLinksImpl implements VirtualNetworkLinks {
35
+ private readonly client: PrivateDnsManagementClient;
36
+
37
+ /**
38
+ * Initialize a new instance of the class VirtualNetworkLinks class.
39
+ * @param client Reference to the service client
40
+ */
41
+ constructor(client: PrivateDnsManagementClient) {
42
+ this.client = client;
43
+ }
44
+
45
+ /**
46
+ * Lists the virtual network links to the specified Private DNS zone.
47
+ * @param resourceGroupName The name of the resource group.
48
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
49
+ * @param options The options parameters.
50
+ */
51
+ public list(
52
+ resourceGroupName: string,
53
+ privateZoneName: string,
54
+ options?: VirtualNetworkLinksListOptionalParams
55
+ ): PagedAsyncIterableIterator<VirtualNetworkLink> {
56
+ const iter = this.listPagingAll(
57
+ resourceGroupName,
58
+ privateZoneName,
59
+ options
60
+ );
61
+ return {
62
+ next() {
63
+ return iter.next();
64
+ },
65
+ [Symbol.asyncIterator]() {
66
+ return this;
67
+ },
68
+ byPage: () => {
69
+ return this.listPagingPage(resourceGroupName, privateZoneName, options);
70
+ }
71
+ };
72
+ }
73
+
74
+ private async *listPagingPage(
75
+ resourceGroupName: string,
76
+ privateZoneName: string,
77
+ options?: VirtualNetworkLinksListOptionalParams
78
+ ): AsyncIterableIterator<VirtualNetworkLink[]> {
79
+ let result = await this._list(resourceGroupName, privateZoneName, options);
80
+ yield result.value || [];
81
+ let continuationToken = result.nextLink;
82
+ while (continuationToken) {
83
+ result = await this._listNext(
84
+ resourceGroupName,
85
+ privateZoneName,
86
+ continuationToken,
87
+ options
88
+ );
89
+ continuationToken = result.nextLink;
90
+ yield result.value || [];
91
+ }
92
+ }
93
+
94
+ private async *listPagingAll(
95
+ resourceGroupName: string,
96
+ privateZoneName: string,
97
+ options?: VirtualNetworkLinksListOptionalParams
98
+ ): AsyncIterableIterator<VirtualNetworkLink> {
99
+ for await (const page of this.listPagingPage(
100
+ resourceGroupName,
101
+ privateZoneName,
102
+ options
103
+ )) {
104
+ yield* page;
105
+ }
106
+ }
107
+
108
+ /**
109
+ * Creates or updates a virtual network link to the specified Private DNS zone.
110
+ * @param resourceGroupName The name of the resource group.
111
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
112
+ * @param virtualNetworkLinkName The name of the virtual network link.
113
+ * @param parameters Parameters supplied to the CreateOrUpdate operation.
114
+ * @param options The options parameters.
115
+ */
116
+ async beginCreateOrUpdate(
117
+ resourceGroupName: string,
118
+ privateZoneName: string,
119
+ virtualNetworkLinkName: string,
120
+ parameters: VirtualNetworkLink,
121
+ options?: VirtualNetworkLinksCreateOrUpdateOptionalParams
122
+ ): Promise<
123
+ PollerLike<
124
+ PollOperationState<VirtualNetworkLinksCreateOrUpdateResponse>,
125
+ VirtualNetworkLinksCreateOrUpdateResponse
126
+ >
127
+ > {
128
+ const directSendOperation = async (
129
+ args: coreClient.OperationArguments,
130
+ spec: coreClient.OperationSpec
131
+ ): Promise<VirtualNetworkLinksCreateOrUpdateResponse> => {
132
+ return this.client.sendOperationRequest(args, spec);
133
+ };
134
+ const sendOperation = async (
135
+ args: coreClient.OperationArguments,
136
+ spec: coreClient.OperationSpec
137
+ ) => {
138
+ let currentRawResponse:
139
+ | coreClient.FullOperationResponse
140
+ | undefined = undefined;
141
+ const providedCallback = args.options?.onResponse;
142
+ const callback: coreClient.RawResponseCallback = (
143
+ rawResponse: coreClient.FullOperationResponse,
144
+ flatResponse: unknown
145
+ ) => {
146
+ currentRawResponse = rawResponse;
147
+ providedCallback?.(rawResponse, flatResponse);
148
+ };
149
+ const updatedArgs = {
150
+ ...args,
151
+ options: {
152
+ ...args.options,
153
+ onResponse: callback
154
+ }
155
+ };
156
+ const flatResponse = await directSendOperation(updatedArgs, spec);
157
+ return {
158
+ flatResponse,
159
+ rawResponse: {
160
+ statusCode: currentRawResponse!.status,
161
+ body: currentRawResponse!.parsedBody,
162
+ headers: currentRawResponse!.headers.toJSON()
163
+ }
164
+ };
165
+ };
166
+
167
+ const lro = new LroImpl(
168
+ sendOperation,
169
+ {
170
+ resourceGroupName,
171
+ privateZoneName,
172
+ virtualNetworkLinkName,
173
+ parameters,
174
+ options
175
+ },
176
+ createOrUpdateOperationSpec
177
+ );
178
+ return new LroEngine(lro, {
179
+ resumeFrom: options?.resumeFrom,
180
+ intervalInMs: options?.updateIntervalInMs
181
+ });
182
+ }
183
+
184
+ /**
185
+ * Creates or updates a virtual network link to the specified Private DNS zone.
186
+ * @param resourceGroupName The name of the resource group.
187
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
188
+ * @param virtualNetworkLinkName The name of the virtual network link.
189
+ * @param parameters Parameters supplied to the CreateOrUpdate operation.
190
+ * @param options The options parameters.
191
+ */
192
+ async beginCreateOrUpdateAndWait(
193
+ resourceGroupName: string,
194
+ privateZoneName: string,
195
+ virtualNetworkLinkName: string,
196
+ parameters: VirtualNetworkLink,
197
+ options?: VirtualNetworkLinksCreateOrUpdateOptionalParams
198
+ ): Promise<VirtualNetworkLinksCreateOrUpdateResponse> {
199
+ const poller = await this.beginCreateOrUpdate(
200
+ resourceGroupName,
201
+ privateZoneName,
202
+ virtualNetworkLinkName,
203
+ parameters,
204
+ options
205
+ );
206
+ return poller.pollUntilDone();
207
+ }
208
+
209
+ /**
210
+ * Updates a virtual network link to the specified Private DNS zone.
211
+ * @param resourceGroupName The name of the resource group.
212
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
213
+ * @param virtualNetworkLinkName The name of the virtual network link.
214
+ * @param parameters Parameters supplied to the Update operation.
215
+ * @param options The options parameters.
216
+ */
217
+ async beginUpdate(
218
+ resourceGroupName: string,
219
+ privateZoneName: string,
220
+ virtualNetworkLinkName: string,
221
+ parameters: VirtualNetworkLink,
222
+ options?: VirtualNetworkLinksUpdateOptionalParams
223
+ ): Promise<
224
+ PollerLike<
225
+ PollOperationState<VirtualNetworkLinksUpdateResponse>,
226
+ VirtualNetworkLinksUpdateResponse
227
+ >
228
+ > {
229
+ const directSendOperation = async (
230
+ args: coreClient.OperationArguments,
231
+ spec: coreClient.OperationSpec
232
+ ): Promise<VirtualNetworkLinksUpdateResponse> => {
233
+ return this.client.sendOperationRequest(args, spec);
234
+ };
235
+ const sendOperation = async (
236
+ args: coreClient.OperationArguments,
237
+ spec: coreClient.OperationSpec
238
+ ) => {
239
+ let currentRawResponse:
240
+ | coreClient.FullOperationResponse
241
+ | undefined = undefined;
242
+ const providedCallback = args.options?.onResponse;
243
+ const callback: coreClient.RawResponseCallback = (
244
+ rawResponse: coreClient.FullOperationResponse,
245
+ flatResponse: unknown
246
+ ) => {
247
+ currentRawResponse = rawResponse;
248
+ providedCallback?.(rawResponse, flatResponse);
249
+ };
250
+ const updatedArgs = {
251
+ ...args,
252
+ options: {
253
+ ...args.options,
254
+ onResponse: callback
255
+ }
256
+ };
257
+ const flatResponse = await directSendOperation(updatedArgs, spec);
258
+ return {
259
+ flatResponse,
260
+ rawResponse: {
261
+ statusCode: currentRawResponse!.status,
262
+ body: currentRawResponse!.parsedBody,
263
+ headers: currentRawResponse!.headers.toJSON()
264
+ }
265
+ };
266
+ };
267
+
268
+ const lro = new LroImpl(
269
+ sendOperation,
270
+ {
271
+ resourceGroupName,
272
+ privateZoneName,
273
+ virtualNetworkLinkName,
274
+ parameters,
275
+ options
276
+ },
277
+ updateOperationSpec
278
+ );
279
+ return new LroEngine(lro, {
280
+ resumeFrom: options?.resumeFrom,
281
+ intervalInMs: options?.updateIntervalInMs
282
+ });
283
+ }
284
+
285
+ /**
286
+ * Updates a virtual network link to the specified Private DNS zone.
287
+ * @param resourceGroupName The name of the resource group.
288
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
289
+ * @param virtualNetworkLinkName The name of the virtual network link.
290
+ * @param parameters Parameters supplied to the Update operation.
291
+ * @param options The options parameters.
292
+ */
293
+ async beginUpdateAndWait(
294
+ resourceGroupName: string,
295
+ privateZoneName: string,
296
+ virtualNetworkLinkName: string,
297
+ parameters: VirtualNetworkLink,
298
+ options?: VirtualNetworkLinksUpdateOptionalParams
299
+ ): Promise<VirtualNetworkLinksUpdateResponse> {
300
+ const poller = await this.beginUpdate(
301
+ resourceGroupName,
302
+ privateZoneName,
303
+ virtualNetworkLinkName,
304
+ parameters,
305
+ options
306
+ );
307
+ return poller.pollUntilDone();
308
+ }
309
+
310
+ /**
311
+ * Deletes a virtual network link to the specified Private DNS zone. WARNING: In case of a registration
312
+ * virtual network, all auto-registered DNS records in the zone for the virtual network will also be
313
+ * deleted. This operation cannot be undone.
314
+ * @param resourceGroupName The name of the resource group.
315
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
316
+ * @param virtualNetworkLinkName The name of the virtual network link.
317
+ * @param options The options parameters.
318
+ */
319
+ async beginDelete(
320
+ resourceGroupName: string,
321
+ privateZoneName: string,
322
+ virtualNetworkLinkName: string,
323
+ options?: VirtualNetworkLinksDeleteOptionalParams
324
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
325
+ const directSendOperation = async (
326
+ args: coreClient.OperationArguments,
327
+ spec: coreClient.OperationSpec
328
+ ): Promise<void> => {
329
+ return this.client.sendOperationRequest(args, spec);
330
+ };
331
+ const sendOperation = async (
332
+ args: coreClient.OperationArguments,
333
+ spec: coreClient.OperationSpec
334
+ ) => {
335
+ let currentRawResponse:
336
+ | coreClient.FullOperationResponse
337
+ | undefined = undefined;
338
+ const providedCallback = args.options?.onResponse;
339
+ const callback: coreClient.RawResponseCallback = (
340
+ rawResponse: coreClient.FullOperationResponse,
341
+ flatResponse: unknown
342
+ ) => {
343
+ currentRawResponse = rawResponse;
344
+ providedCallback?.(rawResponse, flatResponse);
345
+ };
346
+ const updatedArgs = {
347
+ ...args,
348
+ options: {
349
+ ...args.options,
350
+ onResponse: callback
351
+ }
352
+ };
353
+ const flatResponse = await directSendOperation(updatedArgs, spec);
354
+ return {
355
+ flatResponse,
356
+ rawResponse: {
357
+ statusCode: currentRawResponse!.status,
358
+ body: currentRawResponse!.parsedBody,
359
+ headers: currentRawResponse!.headers.toJSON()
360
+ }
361
+ };
362
+ };
363
+
364
+ const lro = new LroImpl(
365
+ sendOperation,
366
+ { resourceGroupName, privateZoneName, virtualNetworkLinkName, options },
367
+ deleteOperationSpec
368
+ );
369
+ return new LroEngine(lro, {
370
+ resumeFrom: options?.resumeFrom,
371
+ intervalInMs: options?.updateIntervalInMs
372
+ });
373
+ }
374
+
375
+ /**
376
+ * Deletes a virtual network link to the specified Private DNS zone. WARNING: In case of a registration
377
+ * virtual network, all auto-registered DNS records in the zone for the virtual network will also be
378
+ * deleted. This operation cannot be undone.
379
+ * @param resourceGroupName The name of the resource group.
380
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
381
+ * @param virtualNetworkLinkName The name of the virtual network link.
382
+ * @param options The options parameters.
383
+ */
384
+ async beginDeleteAndWait(
385
+ resourceGroupName: string,
386
+ privateZoneName: string,
387
+ virtualNetworkLinkName: string,
388
+ options?: VirtualNetworkLinksDeleteOptionalParams
389
+ ): Promise<void> {
390
+ const poller = await this.beginDelete(
391
+ resourceGroupName,
392
+ privateZoneName,
393
+ virtualNetworkLinkName,
394
+ options
395
+ );
396
+ return poller.pollUntilDone();
397
+ }
398
+
399
+ /**
400
+ * Gets a virtual network link to the specified Private DNS zone.
401
+ * @param resourceGroupName The name of the resource group.
402
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
403
+ * @param virtualNetworkLinkName The name of the virtual network link.
404
+ * @param options The options parameters.
405
+ */
406
+ get(
407
+ resourceGroupName: string,
408
+ privateZoneName: string,
409
+ virtualNetworkLinkName: string,
410
+ options?: VirtualNetworkLinksGetOptionalParams
411
+ ): Promise<VirtualNetworkLinksGetResponse> {
412
+ return this.client.sendOperationRequest(
413
+ { resourceGroupName, privateZoneName, virtualNetworkLinkName, options },
414
+ getOperationSpec
415
+ );
416
+ }
417
+
418
+ /**
419
+ * Lists the virtual network links to the specified Private DNS zone.
420
+ * @param resourceGroupName The name of the resource group.
421
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
422
+ * @param options The options parameters.
423
+ */
424
+ private _list(
425
+ resourceGroupName: string,
426
+ privateZoneName: string,
427
+ options?: VirtualNetworkLinksListOptionalParams
428
+ ): Promise<VirtualNetworkLinksListResponse> {
429
+ return this.client.sendOperationRequest(
430
+ { resourceGroupName, privateZoneName, options },
431
+ listOperationSpec
432
+ );
433
+ }
434
+
435
+ /**
436
+ * ListNext
437
+ * @param resourceGroupName The name of the resource group.
438
+ * @param privateZoneName The name of the Private DNS zone (without a terminating dot).
439
+ * @param nextLink The nextLink from the previous successful call to the List method.
440
+ * @param options The options parameters.
441
+ */
442
+ private _listNext(
443
+ resourceGroupName: string,
444
+ privateZoneName: string,
445
+ nextLink: string,
446
+ options?: VirtualNetworkLinksListNextOptionalParams
447
+ ): Promise<VirtualNetworkLinksListNextResponse> {
448
+ return this.client.sendOperationRequest(
449
+ { resourceGroupName, privateZoneName, nextLink, options },
450
+ listNextOperationSpec
451
+ );
452
+ }
453
+ }
454
+ // Operation Specifications
455
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
456
+
457
+ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
458
+ path:
459
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/virtualNetworkLinks/{virtualNetworkLinkName}",
460
+ httpMethod: "PUT",
461
+ responses: {
462
+ 200: {
463
+ bodyMapper: Mappers.VirtualNetworkLink
464
+ },
465
+ 201: {
466
+ bodyMapper: Mappers.VirtualNetworkLink
467
+ },
468
+ 202: {
469
+ bodyMapper: Mappers.VirtualNetworkLink
470
+ },
471
+ 204: {
472
+ bodyMapper: Mappers.VirtualNetworkLink
473
+ },
474
+ default: {
475
+ bodyMapper: Mappers.CloudError
476
+ }
477
+ },
478
+ requestBody: Parameters.parameters1,
479
+ queryParameters: [Parameters.apiVersion],
480
+ urlParameters: [
481
+ Parameters.$host,
482
+ Parameters.resourceGroupName,
483
+ Parameters.privateZoneName,
484
+ Parameters.subscriptionId,
485
+ Parameters.virtualNetworkLinkName
486
+ ],
487
+ headerParameters: [
488
+ Parameters.contentType,
489
+ Parameters.accept,
490
+ Parameters.ifMatch,
491
+ Parameters.ifNoneMatch
492
+ ],
493
+ mediaType: "json",
494
+ serializer
495
+ };
496
+ const updateOperationSpec: coreClient.OperationSpec = {
497
+ path:
498
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/virtualNetworkLinks/{virtualNetworkLinkName}",
499
+ httpMethod: "PATCH",
500
+ responses: {
501
+ 200: {
502
+ bodyMapper: Mappers.VirtualNetworkLink
503
+ },
504
+ 201: {
505
+ bodyMapper: Mappers.VirtualNetworkLink
506
+ },
507
+ 202: {
508
+ bodyMapper: Mappers.VirtualNetworkLink
509
+ },
510
+ 204: {
511
+ bodyMapper: Mappers.VirtualNetworkLink
512
+ },
513
+ default: {
514
+ bodyMapper: Mappers.CloudError
515
+ }
516
+ },
517
+ requestBody: Parameters.parameters1,
518
+ queryParameters: [Parameters.apiVersion],
519
+ urlParameters: [
520
+ Parameters.$host,
521
+ Parameters.resourceGroupName,
522
+ Parameters.privateZoneName,
523
+ Parameters.subscriptionId,
524
+ Parameters.virtualNetworkLinkName
525
+ ],
526
+ headerParameters: [
527
+ Parameters.contentType,
528
+ Parameters.accept,
529
+ Parameters.ifMatch
530
+ ],
531
+ mediaType: "json",
532
+ serializer
533
+ };
534
+ const deleteOperationSpec: coreClient.OperationSpec = {
535
+ path:
536
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/virtualNetworkLinks/{virtualNetworkLinkName}",
537
+ httpMethod: "DELETE",
538
+ responses: {
539
+ 200: {},
540
+ 201: {},
541
+ 202: {},
542
+ 204: {},
543
+ default: {
544
+ bodyMapper: Mappers.CloudError
545
+ }
546
+ },
547
+ queryParameters: [Parameters.apiVersion],
548
+ urlParameters: [
549
+ Parameters.$host,
550
+ Parameters.resourceGroupName,
551
+ Parameters.privateZoneName,
552
+ Parameters.subscriptionId,
553
+ Parameters.virtualNetworkLinkName
554
+ ],
555
+ headerParameters: [Parameters.accept, Parameters.ifMatch],
556
+ serializer
557
+ };
558
+ const getOperationSpec: coreClient.OperationSpec = {
559
+ path:
560
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/virtualNetworkLinks/{virtualNetworkLinkName}",
561
+ httpMethod: "GET",
562
+ responses: {
563
+ 200: {
564
+ bodyMapper: Mappers.VirtualNetworkLink
565
+ },
566
+ default: {
567
+ bodyMapper: Mappers.CloudError
568
+ }
569
+ },
570
+ queryParameters: [Parameters.apiVersion],
571
+ urlParameters: [
572
+ Parameters.$host,
573
+ Parameters.resourceGroupName,
574
+ Parameters.privateZoneName,
575
+ Parameters.subscriptionId,
576
+ Parameters.virtualNetworkLinkName
577
+ ],
578
+ headerParameters: [Parameters.accept],
579
+ serializer
580
+ };
581
+ const listOperationSpec: coreClient.OperationSpec = {
582
+ path:
583
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/virtualNetworkLinks",
584
+ httpMethod: "GET",
585
+ responses: {
586
+ 200: {
587
+ bodyMapper: Mappers.VirtualNetworkLinkListResult
588
+ },
589
+ default: {
590
+ bodyMapper: Mappers.CloudError
591
+ }
592
+ },
593
+ queryParameters: [Parameters.apiVersion, Parameters.top],
594
+ urlParameters: [
595
+ Parameters.$host,
596
+ Parameters.resourceGroupName,
597
+ Parameters.privateZoneName,
598
+ Parameters.subscriptionId
599
+ ],
600
+ headerParameters: [Parameters.accept],
601
+ serializer
602
+ };
603
+ const listNextOperationSpec: coreClient.OperationSpec = {
604
+ path: "{nextLink}",
605
+ httpMethod: "GET",
606
+ responses: {
607
+ 200: {
608
+ bodyMapper: Mappers.VirtualNetworkLinkListResult
609
+ },
610
+ default: {
611
+ bodyMapper: Mappers.CloudError
612
+ }
613
+ },
614
+ queryParameters: [Parameters.apiVersion, Parameters.top],
615
+ urlParameters: [
616
+ Parameters.$host,
617
+ Parameters.resourceGroupName,
618
+ Parameters.privateZoneName,
619
+ Parameters.subscriptionId,
620
+ Parameters.nextLink
621
+ ],
622
+ headerParameters: [Parameters.accept],
623
+ serializer
624
+ };
@@ -0,0 +1,11 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ export * from "./privateZones";
10
+ export * from "./virtualNetworkLinks";
11
+ export * from "./recordSets";