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