@azure/arm-sqlvirtualmachine 5.0.0-alpha.20250717.1 → 5.0.0-alpha.20250730.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/dist/browser/lroImpl.js +7 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/mappers.js +91 -43
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/availabilityGroupListeners.js +45 -52
- package/dist/browser/operations/availabilityGroupListeners.js.map +1 -1
- package/dist/browser/operations/operations.js +23 -40
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operations/sqlVirtualMachineGroups.js +78 -97
- package/dist/browser/operations/sqlVirtualMachineGroups.js.map +1 -1
- package/dist/browser/operations/sqlVirtualMachineTroubleshoot.js +12 -6
- package/dist/browser/operations/sqlVirtualMachineTroubleshoot.js.map +1 -1
- package/dist/browser/operations/sqlVirtualMachines.js +122 -148
- package/dist/browser/operations/sqlVirtualMachines.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/browser/sqlVirtualMachineManagementClient.js +18 -5
- package/dist/browser/sqlVirtualMachineManagementClient.js.map +1 -1
- package/dist/commonjs/lroImpl.js +7 -3
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/mappers.js +91 -43
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/availabilityGroupListeners.js +45 -51
- package/dist/commonjs/operations/availabilityGroupListeners.js.map +1 -1
- package/dist/commonjs/operations/operations.js +23 -39
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operations/sqlVirtualMachineGroups.js +78 -96
- package/dist/commonjs/operations/sqlVirtualMachineGroups.js.map +1 -1
- package/dist/commonjs/operations/sqlVirtualMachineTroubleshoot.js +12 -6
- package/dist/commonjs/operations/sqlVirtualMachineTroubleshoot.js.map +1 -1
- package/dist/commonjs/operations/sqlVirtualMachines.js +122 -147
- package/dist/commonjs/operations/sqlVirtualMachines.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/sqlVirtualMachineManagementClient.js +18 -5
- package/dist/commonjs/sqlVirtualMachineManagementClient.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/lroImpl.js +7 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/mappers.js +91 -43
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/availabilityGroupListeners.js +45 -52
- package/dist/esm/operations/availabilityGroupListeners.js.map +1 -1
- package/dist/esm/operations/operations.js +23 -40
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operations/sqlVirtualMachineGroups.js +78 -97
- package/dist/esm/operations/sqlVirtualMachineGroups.js.map +1 -1
- package/dist/esm/operations/sqlVirtualMachineTroubleshoot.js +12 -6
- package/dist/esm/operations/sqlVirtualMachineTroubleshoot.js.map +1 -1
- package/dist/esm/operations/sqlVirtualMachines.js +122 -148
- package/dist/esm/operations/sqlVirtualMachines.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/esm/sqlVirtualMachineManagementClient.js +18 -5
- package/dist/esm/sqlVirtualMachineManagementClient.js.map +1 -1
- package/dist/react-native/lroImpl.js +7 -3
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/mappers.js +91 -43
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/availabilityGroupListeners.js +45 -52
- package/dist/react-native/operations/availabilityGroupListeners.js.map +1 -1
- package/dist/react-native/operations/operations.js +23 -40
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operations/sqlVirtualMachineGroups.js +78 -97
- package/dist/react-native/operations/sqlVirtualMachineGroups.js.map +1 -1
- package/dist/react-native/operations/sqlVirtualMachineTroubleshoot.js +12 -6
- package/dist/react-native/operations/sqlVirtualMachineTroubleshoot.js.map +1 -1
- package/dist/react-native/operations/sqlVirtualMachines.js +122 -148
- package/dist/react-native/operations/sqlVirtualMachines.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/dist/react-native/sqlVirtualMachineManagementClient.js +18 -5
- package/dist/react-native/sqlVirtualMachineManagementClient.js.map +1 -1
- package/package.json +2 -2
- package/review/arm-sqlvirtualmachine-node.api.md +949 -949
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import { setContinuationToken } from "../pagingHelper.js";
|
|
10
9
|
import * as coreClient from "@azure/core-client";
|
|
11
10
|
import * as Mappers from "../models/mappers.js";
|
|
@@ -15,6 +14,7 @@ import { createLroSpec } from "../lroImpl.js";
|
|
|
15
14
|
/// <reference lib="esnext.asynciterable" />
|
|
16
15
|
/** Class containing SqlVirtualMachines operations. */
|
|
17
16
|
export class SqlVirtualMachinesImpl {
|
|
17
|
+
client;
|
|
18
18
|
/**
|
|
19
19
|
* Initialize a new instance of the class SqlVirtualMachines class.
|
|
20
20
|
* @param client Reference to the service client
|
|
@@ -39,52 +39,35 @@ export class SqlVirtualMachinesImpl {
|
|
|
39
39
|
return this;
|
|
40
40
|
},
|
|
41
41
|
byPage: (settings) => {
|
|
42
|
-
if (settings
|
|
42
|
+
if (settings?.maxPageSize) {
|
|
43
43
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
44
44
|
}
|
|
45
45
|
return this.listBySqlVmGroupPagingPage(resourceGroupName, sqlVirtualMachineGroupName, options, settings);
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
|
-
listBySqlVmGroupPagingPage(resourceGroupName, sqlVirtualMachineGroupName, options, settings) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
});
|
|
49
|
+
async *listBySqlVmGroupPagingPage(resourceGroupName, sqlVirtualMachineGroupName, options, settings) {
|
|
50
|
+
let result;
|
|
51
|
+
let continuationToken = settings?.continuationToken;
|
|
52
|
+
if (!continuationToken) {
|
|
53
|
+
result = await this._listBySqlVmGroup(resourceGroupName, sqlVirtualMachineGroupName, options);
|
|
54
|
+
let page = result.value || [];
|
|
55
|
+
continuationToken = result.nextLink;
|
|
56
|
+
setContinuationToken(page, continuationToken);
|
|
57
|
+
yield page;
|
|
58
|
+
}
|
|
59
|
+
while (continuationToken) {
|
|
60
|
+
result = await this._listBySqlVmGroupNext(resourceGroupName, sqlVirtualMachineGroupName, continuationToken, options);
|
|
61
|
+
continuationToken = result.nextLink;
|
|
62
|
+
let page = result.value || [];
|
|
63
|
+
setContinuationToken(page, continuationToken);
|
|
64
|
+
yield page;
|
|
65
|
+
}
|
|
68
66
|
}
|
|
69
|
-
listBySqlVmGroupPagingAll(resourceGroupName, sqlVirtualMachineGroupName, options) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
for (var _d = true, _e = __asyncValues(this.listBySqlVmGroupPagingPage(resourceGroupName, sqlVirtualMachineGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
74
|
-
_c = _f.value;
|
|
75
|
-
_d = false;
|
|
76
|
-
const page = _c;
|
|
77
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
81
|
-
finally {
|
|
82
|
-
try {
|
|
83
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
84
|
-
}
|
|
85
|
-
finally { if (e_1) throw e_1.error; }
|
|
86
|
-
}
|
|
87
|
-
});
|
|
67
|
+
async *listBySqlVmGroupPagingAll(resourceGroupName, sqlVirtualMachineGroupName, options) {
|
|
68
|
+
for await (const page of this.listBySqlVmGroupPagingPage(resourceGroupName, sqlVirtualMachineGroupName, options)) {
|
|
69
|
+
yield* page;
|
|
70
|
+
}
|
|
88
71
|
}
|
|
89
72
|
/**
|
|
90
73
|
* Gets all SQL virtual machines in a subscription.
|
|
@@ -100,52 +83,35 @@ export class SqlVirtualMachinesImpl {
|
|
|
100
83
|
return this;
|
|
101
84
|
},
|
|
102
85
|
byPage: (settings) => {
|
|
103
|
-
if (settings
|
|
86
|
+
if (settings?.maxPageSize) {
|
|
104
87
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
105
88
|
}
|
|
106
89
|
return this.listPagingPage(options, settings);
|
|
107
90
|
}
|
|
108
91
|
};
|
|
109
92
|
}
|
|
110
|
-
listPagingPage(options, settings) {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
});
|
|
93
|
+
async *listPagingPage(options, settings) {
|
|
94
|
+
let result;
|
|
95
|
+
let continuationToken = settings?.continuationToken;
|
|
96
|
+
if (!continuationToken) {
|
|
97
|
+
result = await this._list(options);
|
|
98
|
+
let page = result.value || [];
|
|
99
|
+
continuationToken = result.nextLink;
|
|
100
|
+
setContinuationToken(page, continuationToken);
|
|
101
|
+
yield page;
|
|
102
|
+
}
|
|
103
|
+
while (continuationToken) {
|
|
104
|
+
result = await this._listNext(continuationToken, options);
|
|
105
|
+
continuationToken = result.nextLink;
|
|
106
|
+
let page = result.value || [];
|
|
107
|
+
setContinuationToken(page, continuationToken);
|
|
108
|
+
yield page;
|
|
109
|
+
}
|
|
129
110
|
}
|
|
130
|
-
listPagingAll(options) {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
for (var _d = true, _e = __asyncValues(this.listPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
135
|
-
_c = _f.value;
|
|
136
|
-
_d = false;
|
|
137
|
-
const page = _c;
|
|
138
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
142
|
-
finally {
|
|
143
|
-
try {
|
|
144
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
145
|
-
}
|
|
146
|
-
finally { if (e_2) throw e_2.error; }
|
|
147
|
-
}
|
|
148
|
-
});
|
|
111
|
+
async *listPagingAll(options) {
|
|
112
|
+
for await (const page of this.listPagingPage(options)) {
|
|
113
|
+
yield* page;
|
|
114
|
+
}
|
|
149
115
|
}
|
|
150
116
|
/**
|
|
151
117
|
* Gets all SQL virtual machines in a resource group.
|
|
@@ -163,52 +129,35 @@ export class SqlVirtualMachinesImpl {
|
|
|
163
129
|
return this;
|
|
164
130
|
},
|
|
165
131
|
byPage: (settings) => {
|
|
166
|
-
if (settings
|
|
132
|
+
if (settings?.maxPageSize) {
|
|
167
133
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
168
134
|
}
|
|
169
135
|
return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
|
|
170
136
|
}
|
|
171
137
|
};
|
|
172
138
|
}
|
|
173
|
-
listByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}
|
|
191
|
-
});
|
|
139
|
+
async *listByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
|
140
|
+
let result;
|
|
141
|
+
let continuationToken = settings?.continuationToken;
|
|
142
|
+
if (!continuationToken) {
|
|
143
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
144
|
+
let page = result.value || [];
|
|
145
|
+
continuationToken = result.nextLink;
|
|
146
|
+
setContinuationToken(page, continuationToken);
|
|
147
|
+
yield page;
|
|
148
|
+
}
|
|
149
|
+
while (continuationToken) {
|
|
150
|
+
result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options);
|
|
151
|
+
continuationToken = result.nextLink;
|
|
152
|
+
let page = result.value || [];
|
|
153
|
+
setContinuationToken(page, continuationToken);
|
|
154
|
+
yield page;
|
|
155
|
+
}
|
|
192
156
|
}
|
|
193
|
-
listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
for (var _d = true, _e = __asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
198
|
-
_c = _f.value;
|
|
199
|
-
_d = false;
|
|
200
|
-
const page = _c;
|
|
201
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
205
|
-
finally {
|
|
206
|
-
try {
|
|
207
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
208
|
-
}
|
|
209
|
-
finally { if (e_3) throw e_3.error; }
|
|
210
|
-
}
|
|
211
|
-
});
|
|
157
|
+
async *listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
158
|
+
for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
|
|
159
|
+
yield* page;
|
|
160
|
+
}
|
|
212
161
|
}
|
|
213
162
|
/**
|
|
214
163
|
* Gets the list of sql virtual machines in a SQL virtual machine group.
|
|
@@ -250,14 +199,19 @@ export class SqlVirtualMachinesImpl {
|
|
|
250
199
|
return this.client.sendOperationRequest(args, spec);
|
|
251
200
|
};
|
|
252
201
|
const sendOperationFn = async (args, spec) => {
|
|
253
|
-
var _a;
|
|
254
202
|
let currentRawResponse = undefined;
|
|
255
|
-
const providedCallback =
|
|
203
|
+
const providedCallback = args.options?.onResponse;
|
|
256
204
|
const callback = (rawResponse, flatResponse) => {
|
|
257
205
|
currentRawResponse = rawResponse;
|
|
258
|
-
providedCallback
|
|
206
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
207
|
+
};
|
|
208
|
+
const updatedArgs = {
|
|
209
|
+
...args,
|
|
210
|
+
options: {
|
|
211
|
+
...args.options,
|
|
212
|
+
onResponse: callback
|
|
213
|
+
}
|
|
259
214
|
};
|
|
260
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
261
215
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
262
216
|
return {
|
|
263
217
|
flatResponse,
|
|
@@ -274,8 +228,8 @@ export class SqlVirtualMachinesImpl {
|
|
|
274
228
|
spec: createOrUpdateOperationSpec
|
|
275
229
|
});
|
|
276
230
|
const poller = await createHttpPoller(lro, {
|
|
277
|
-
restoreFrom: options
|
|
278
|
-
intervalInMs: options
|
|
231
|
+
restoreFrom: options?.resumeFrom,
|
|
232
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
279
233
|
resourceLocationConfig: "azure-async-operation"
|
|
280
234
|
});
|
|
281
235
|
await poller.poll();
|
|
@@ -305,14 +259,19 @@ export class SqlVirtualMachinesImpl {
|
|
|
305
259
|
return this.client.sendOperationRequest(args, spec);
|
|
306
260
|
};
|
|
307
261
|
const sendOperationFn = async (args, spec) => {
|
|
308
|
-
var _a;
|
|
309
262
|
let currentRawResponse = undefined;
|
|
310
|
-
const providedCallback =
|
|
263
|
+
const providedCallback = args.options?.onResponse;
|
|
311
264
|
const callback = (rawResponse, flatResponse) => {
|
|
312
265
|
currentRawResponse = rawResponse;
|
|
313
|
-
providedCallback
|
|
266
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
267
|
+
};
|
|
268
|
+
const updatedArgs = {
|
|
269
|
+
...args,
|
|
270
|
+
options: {
|
|
271
|
+
...args.options,
|
|
272
|
+
onResponse: callback
|
|
273
|
+
}
|
|
314
274
|
};
|
|
315
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
316
275
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
317
276
|
return {
|
|
318
277
|
flatResponse,
|
|
@@ -329,8 +288,8 @@ export class SqlVirtualMachinesImpl {
|
|
|
329
288
|
spec: deleteOperationSpec
|
|
330
289
|
});
|
|
331
290
|
const poller = await createHttpPoller(lro, {
|
|
332
|
-
restoreFrom: options
|
|
333
|
-
intervalInMs: options
|
|
291
|
+
restoreFrom: options?.resumeFrom,
|
|
292
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
334
293
|
resourceLocationConfig: "location"
|
|
335
294
|
});
|
|
336
295
|
await poller.poll();
|
|
@@ -360,14 +319,19 @@ export class SqlVirtualMachinesImpl {
|
|
|
360
319
|
return this.client.sendOperationRequest(args, spec);
|
|
361
320
|
};
|
|
362
321
|
const sendOperationFn = async (args, spec) => {
|
|
363
|
-
var _a;
|
|
364
322
|
let currentRawResponse = undefined;
|
|
365
|
-
const providedCallback =
|
|
323
|
+
const providedCallback = args.options?.onResponse;
|
|
366
324
|
const callback = (rawResponse, flatResponse) => {
|
|
367
325
|
currentRawResponse = rawResponse;
|
|
368
|
-
providedCallback
|
|
326
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
327
|
+
};
|
|
328
|
+
const updatedArgs = {
|
|
329
|
+
...args,
|
|
330
|
+
options: {
|
|
331
|
+
...args.options,
|
|
332
|
+
onResponse: callback
|
|
333
|
+
}
|
|
369
334
|
};
|
|
370
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
371
335
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
372
336
|
return {
|
|
373
337
|
flatResponse,
|
|
@@ -384,8 +348,8 @@ export class SqlVirtualMachinesImpl {
|
|
|
384
348
|
spec: updateOperationSpec
|
|
385
349
|
});
|
|
386
350
|
const poller = await createHttpPoller(lro, {
|
|
387
|
-
restoreFrom: options
|
|
388
|
-
intervalInMs: options
|
|
351
|
+
restoreFrom: options?.resumeFrom,
|
|
352
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
389
353
|
resourceLocationConfig: "azure-async-operation"
|
|
390
354
|
});
|
|
391
355
|
await poller.poll();
|
|
@@ -424,14 +388,19 @@ export class SqlVirtualMachinesImpl {
|
|
|
424
388
|
return this.client.sendOperationRequest(args, spec);
|
|
425
389
|
};
|
|
426
390
|
const sendOperationFn = async (args, spec) => {
|
|
427
|
-
var _a;
|
|
428
391
|
let currentRawResponse = undefined;
|
|
429
|
-
const providedCallback =
|
|
392
|
+
const providedCallback = args.options?.onResponse;
|
|
430
393
|
const callback = (rawResponse, flatResponse) => {
|
|
431
394
|
currentRawResponse = rawResponse;
|
|
432
|
-
providedCallback
|
|
395
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
396
|
+
};
|
|
397
|
+
const updatedArgs = {
|
|
398
|
+
...args,
|
|
399
|
+
options: {
|
|
400
|
+
...args.options,
|
|
401
|
+
onResponse: callback
|
|
402
|
+
}
|
|
433
403
|
};
|
|
434
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
435
404
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
436
405
|
return {
|
|
437
406
|
flatResponse,
|
|
@@ -448,8 +417,8 @@ export class SqlVirtualMachinesImpl {
|
|
|
448
417
|
spec: startAssessmentOperationSpec
|
|
449
418
|
});
|
|
450
419
|
const poller = await createHttpPoller(lro, {
|
|
451
|
-
restoreFrom: options
|
|
452
|
-
intervalInMs: options
|
|
420
|
+
restoreFrom: options?.resumeFrom,
|
|
421
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
453
422
|
resourceLocationConfig: "location"
|
|
454
423
|
});
|
|
455
424
|
await poller.poll();
|
|
@@ -478,14 +447,19 @@ export class SqlVirtualMachinesImpl {
|
|
|
478
447
|
return this.client.sendOperationRequest(args, spec);
|
|
479
448
|
};
|
|
480
449
|
const sendOperationFn = async (args, spec) => {
|
|
481
|
-
var _a;
|
|
482
450
|
let currentRawResponse = undefined;
|
|
483
|
-
const providedCallback =
|
|
451
|
+
const providedCallback = args.options?.onResponse;
|
|
484
452
|
const callback = (rawResponse, flatResponse) => {
|
|
485
453
|
currentRawResponse = rawResponse;
|
|
486
|
-
providedCallback
|
|
454
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
455
|
+
};
|
|
456
|
+
const updatedArgs = {
|
|
457
|
+
...args,
|
|
458
|
+
options: {
|
|
459
|
+
...args.options,
|
|
460
|
+
onResponse: callback
|
|
461
|
+
}
|
|
487
462
|
};
|
|
488
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
489
463
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
490
464
|
return {
|
|
491
465
|
flatResponse,
|
|
@@ -502,8 +476,8 @@ export class SqlVirtualMachinesImpl {
|
|
|
502
476
|
spec: redeployOperationSpec
|
|
503
477
|
});
|
|
504
478
|
const poller = await createHttpPoller(lro, {
|
|
505
|
-
restoreFrom: options
|
|
506
|
-
intervalInMs: options
|
|
479
|
+
restoreFrom: options?.resumeFrom,
|
|
480
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
507
481
|
resourceLocationConfig: "location"
|
|
508
482
|
});
|
|
509
483
|
await poller.poll();
|