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