@azure/arm-sqlvirtualmachine 5.0.0-alpha.20250717.1 → 5.0.0-alpha.20250718.2
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
|
@@ -18,6 +18,7 @@ const lroImpl_js_1 = require("../lroImpl.js");
|
|
|
18
18
|
/// <reference lib="esnext.asynciterable" />
|
|
19
19
|
/** Class containing SqlVirtualMachines operations. */
|
|
20
20
|
class SqlVirtualMachinesImpl {
|
|
21
|
+
client;
|
|
21
22
|
/**
|
|
22
23
|
* Initialize a new instance of the class SqlVirtualMachines class.
|
|
23
24
|
* @param client Reference to the service client
|
|
@@ -42,52 +43,35 @@ class SqlVirtualMachinesImpl {
|
|
|
42
43
|
return this;
|
|
43
44
|
},
|
|
44
45
|
byPage: (settings) => {
|
|
45
|
-
if (settings
|
|
46
|
+
if (settings?.maxPageSize) {
|
|
46
47
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
47
48
|
}
|
|
48
49
|
return this.listBySqlVmGroupPagingPage(resourceGroupName, sqlVirtualMachineGroupName, options, settings);
|
|
49
50
|
}
|
|
50
51
|
};
|
|
51
52
|
}
|
|
52
|
-
listBySqlVmGroupPagingPage(resourceGroupName, sqlVirtualMachineGroupName, options, settings) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
});
|
|
53
|
+
async *listBySqlVmGroupPagingPage(resourceGroupName, sqlVirtualMachineGroupName, options, settings) {
|
|
54
|
+
let result;
|
|
55
|
+
let continuationToken = settings?.continuationToken;
|
|
56
|
+
if (!continuationToken) {
|
|
57
|
+
result = await this._listBySqlVmGroup(resourceGroupName, sqlVirtualMachineGroupName, options);
|
|
58
|
+
let page = result.value || [];
|
|
59
|
+
continuationToken = result.nextLink;
|
|
60
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
61
|
+
yield page;
|
|
62
|
+
}
|
|
63
|
+
while (continuationToken) {
|
|
64
|
+
result = await this._listBySqlVmGroupNext(resourceGroupName, sqlVirtualMachineGroupName, continuationToken, options);
|
|
65
|
+
continuationToken = result.nextLink;
|
|
66
|
+
let page = result.value || [];
|
|
67
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
68
|
+
yield page;
|
|
69
|
+
}
|
|
71
70
|
}
|
|
72
|
-
listBySqlVmGroupPagingAll(resourceGroupName, sqlVirtualMachineGroupName, options) {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listBySqlVmGroupPagingPage(resourceGroupName, sqlVirtualMachineGroupName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
77
|
-
_c = _f.value;
|
|
78
|
-
_d = false;
|
|
79
|
-
const page = _c;
|
|
80
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
84
|
-
finally {
|
|
85
|
-
try {
|
|
86
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
87
|
-
}
|
|
88
|
-
finally { if (e_1) throw e_1.error; }
|
|
89
|
-
}
|
|
90
|
-
});
|
|
71
|
+
async *listBySqlVmGroupPagingAll(resourceGroupName, sqlVirtualMachineGroupName, options) {
|
|
72
|
+
for await (const page of this.listBySqlVmGroupPagingPage(resourceGroupName, sqlVirtualMachineGroupName, options)) {
|
|
73
|
+
yield* page;
|
|
74
|
+
}
|
|
91
75
|
}
|
|
92
76
|
/**
|
|
93
77
|
* Gets all SQL virtual machines in a subscription.
|
|
@@ -103,52 +87,35 @@ class SqlVirtualMachinesImpl {
|
|
|
103
87
|
return this;
|
|
104
88
|
},
|
|
105
89
|
byPage: (settings) => {
|
|
106
|
-
if (settings
|
|
90
|
+
if (settings?.maxPageSize) {
|
|
107
91
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
108
92
|
}
|
|
109
93
|
return this.listPagingPage(options, settings);
|
|
110
94
|
}
|
|
111
95
|
};
|
|
112
96
|
}
|
|
113
|
-
listPagingPage(options, settings) {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
});
|
|
97
|
+
async *listPagingPage(options, settings) {
|
|
98
|
+
let result;
|
|
99
|
+
let continuationToken = settings?.continuationToken;
|
|
100
|
+
if (!continuationToken) {
|
|
101
|
+
result = await this._list(options);
|
|
102
|
+
let page = result.value || [];
|
|
103
|
+
continuationToken = result.nextLink;
|
|
104
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
105
|
+
yield page;
|
|
106
|
+
}
|
|
107
|
+
while (continuationToken) {
|
|
108
|
+
result = await this._listNext(continuationToken, options);
|
|
109
|
+
continuationToken = result.nextLink;
|
|
110
|
+
let page = result.value || [];
|
|
111
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
112
|
+
yield page;
|
|
113
|
+
}
|
|
132
114
|
}
|
|
133
|
-
listPagingAll(options) {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listPagingPage(options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
138
|
-
_c = _f.value;
|
|
139
|
-
_d = false;
|
|
140
|
-
const page = _c;
|
|
141
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
145
|
-
finally {
|
|
146
|
-
try {
|
|
147
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
148
|
-
}
|
|
149
|
-
finally { if (e_2) throw e_2.error; }
|
|
150
|
-
}
|
|
151
|
-
});
|
|
115
|
+
async *listPagingAll(options) {
|
|
116
|
+
for await (const page of this.listPagingPage(options)) {
|
|
117
|
+
yield* page;
|
|
118
|
+
}
|
|
152
119
|
}
|
|
153
120
|
/**
|
|
154
121
|
* Gets all SQL virtual machines in a resource group.
|
|
@@ -166,52 +133,35 @@ class SqlVirtualMachinesImpl {
|
|
|
166
133
|
return this;
|
|
167
134
|
},
|
|
168
135
|
byPage: (settings) => {
|
|
169
|
-
if (settings
|
|
136
|
+
if (settings?.maxPageSize) {
|
|
170
137
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
171
138
|
}
|
|
172
139
|
return this.listByResourceGroupPagingPage(resourceGroupName, options, settings);
|
|
173
140
|
}
|
|
174
141
|
};
|
|
175
142
|
}
|
|
176
|
-
listByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
}
|
|
194
|
-
});
|
|
143
|
+
async *listByResourceGroupPagingPage(resourceGroupName, options, settings) {
|
|
144
|
+
let result;
|
|
145
|
+
let continuationToken = settings?.continuationToken;
|
|
146
|
+
if (!continuationToken) {
|
|
147
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
148
|
+
let page = result.value || [];
|
|
149
|
+
continuationToken = result.nextLink;
|
|
150
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
151
|
+
yield page;
|
|
152
|
+
}
|
|
153
|
+
while (continuationToken) {
|
|
154
|
+
result = await this._listByResourceGroupNext(resourceGroupName, continuationToken, options);
|
|
155
|
+
continuationToken = result.nextLink;
|
|
156
|
+
let page = result.value || [];
|
|
157
|
+
(0, pagingHelper_js_1.setContinuationToken)(page, continuationToken);
|
|
158
|
+
yield page;
|
|
159
|
+
}
|
|
195
160
|
}
|
|
196
|
-
listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
201
|
-
_c = _f.value;
|
|
202
|
-
_d = false;
|
|
203
|
-
const page = _c;
|
|
204
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(page)));
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
208
|
-
finally {
|
|
209
|
-
try {
|
|
210
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
|
211
|
-
}
|
|
212
|
-
finally { if (e_3) throw e_3.error; }
|
|
213
|
-
}
|
|
214
|
-
});
|
|
161
|
+
async *listByResourceGroupPagingAll(resourceGroupName, options) {
|
|
162
|
+
for await (const page of this.listByResourceGroupPagingPage(resourceGroupName, options)) {
|
|
163
|
+
yield* page;
|
|
164
|
+
}
|
|
215
165
|
}
|
|
216
166
|
/**
|
|
217
167
|
* Gets the list of sql virtual machines in a SQL virtual machine group.
|
|
@@ -253,14 +203,19 @@ class SqlVirtualMachinesImpl {
|
|
|
253
203
|
return this.client.sendOperationRequest(args, spec);
|
|
254
204
|
};
|
|
255
205
|
const sendOperationFn = async (args, spec) => {
|
|
256
|
-
var _a;
|
|
257
206
|
let currentRawResponse = undefined;
|
|
258
|
-
const providedCallback =
|
|
207
|
+
const providedCallback = args.options?.onResponse;
|
|
259
208
|
const callback = (rawResponse, flatResponse) => {
|
|
260
209
|
currentRawResponse = rawResponse;
|
|
261
|
-
providedCallback
|
|
210
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
211
|
+
};
|
|
212
|
+
const updatedArgs = {
|
|
213
|
+
...args,
|
|
214
|
+
options: {
|
|
215
|
+
...args.options,
|
|
216
|
+
onResponse: callback
|
|
217
|
+
}
|
|
262
218
|
};
|
|
263
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
264
219
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
265
220
|
return {
|
|
266
221
|
flatResponse,
|
|
@@ -277,8 +232,8 @@ class SqlVirtualMachinesImpl {
|
|
|
277
232
|
spec: createOrUpdateOperationSpec
|
|
278
233
|
});
|
|
279
234
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
280
|
-
restoreFrom: options
|
|
281
|
-
intervalInMs: options
|
|
235
|
+
restoreFrom: options?.resumeFrom,
|
|
236
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
282
237
|
resourceLocationConfig: "azure-async-operation"
|
|
283
238
|
});
|
|
284
239
|
await poller.poll();
|
|
@@ -308,14 +263,19 @@ class SqlVirtualMachinesImpl {
|
|
|
308
263
|
return this.client.sendOperationRequest(args, spec);
|
|
309
264
|
};
|
|
310
265
|
const sendOperationFn = async (args, spec) => {
|
|
311
|
-
var _a;
|
|
312
266
|
let currentRawResponse = undefined;
|
|
313
|
-
const providedCallback =
|
|
267
|
+
const providedCallback = args.options?.onResponse;
|
|
314
268
|
const callback = (rawResponse, flatResponse) => {
|
|
315
269
|
currentRawResponse = rawResponse;
|
|
316
|
-
providedCallback
|
|
270
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
271
|
+
};
|
|
272
|
+
const updatedArgs = {
|
|
273
|
+
...args,
|
|
274
|
+
options: {
|
|
275
|
+
...args.options,
|
|
276
|
+
onResponse: callback
|
|
277
|
+
}
|
|
317
278
|
};
|
|
318
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
319
279
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
320
280
|
return {
|
|
321
281
|
flatResponse,
|
|
@@ -332,8 +292,8 @@ class SqlVirtualMachinesImpl {
|
|
|
332
292
|
spec: deleteOperationSpec
|
|
333
293
|
});
|
|
334
294
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
335
|
-
restoreFrom: options
|
|
336
|
-
intervalInMs: options
|
|
295
|
+
restoreFrom: options?.resumeFrom,
|
|
296
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
337
297
|
resourceLocationConfig: "location"
|
|
338
298
|
});
|
|
339
299
|
await poller.poll();
|
|
@@ -363,14 +323,19 @@ class SqlVirtualMachinesImpl {
|
|
|
363
323
|
return this.client.sendOperationRequest(args, spec);
|
|
364
324
|
};
|
|
365
325
|
const sendOperationFn = async (args, spec) => {
|
|
366
|
-
var _a;
|
|
367
326
|
let currentRawResponse = undefined;
|
|
368
|
-
const providedCallback =
|
|
327
|
+
const providedCallback = args.options?.onResponse;
|
|
369
328
|
const callback = (rawResponse, flatResponse) => {
|
|
370
329
|
currentRawResponse = rawResponse;
|
|
371
|
-
providedCallback
|
|
330
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
331
|
+
};
|
|
332
|
+
const updatedArgs = {
|
|
333
|
+
...args,
|
|
334
|
+
options: {
|
|
335
|
+
...args.options,
|
|
336
|
+
onResponse: callback
|
|
337
|
+
}
|
|
372
338
|
};
|
|
373
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
374
339
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
375
340
|
return {
|
|
376
341
|
flatResponse,
|
|
@@ -387,8 +352,8 @@ class SqlVirtualMachinesImpl {
|
|
|
387
352
|
spec: updateOperationSpec
|
|
388
353
|
});
|
|
389
354
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
390
|
-
restoreFrom: options
|
|
391
|
-
intervalInMs: options
|
|
355
|
+
restoreFrom: options?.resumeFrom,
|
|
356
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
392
357
|
resourceLocationConfig: "azure-async-operation"
|
|
393
358
|
});
|
|
394
359
|
await poller.poll();
|
|
@@ -427,14 +392,19 @@ class SqlVirtualMachinesImpl {
|
|
|
427
392
|
return this.client.sendOperationRequest(args, spec);
|
|
428
393
|
};
|
|
429
394
|
const sendOperationFn = async (args, spec) => {
|
|
430
|
-
var _a;
|
|
431
395
|
let currentRawResponse = undefined;
|
|
432
|
-
const providedCallback =
|
|
396
|
+
const providedCallback = args.options?.onResponse;
|
|
433
397
|
const callback = (rawResponse, flatResponse) => {
|
|
434
398
|
currentRawResponse = rawResponse;
|
|
435
|
-
providedCallback
|
|
399
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
400
|
+
};
|
|
401
|
+
const updatedArgs = {
|
|
402
|
+
...args,
|
|
403
|
+
options: {
|
|
404
|
+
...args.options,
|
|
405
|
+
onResponse: callback
|
|
406
|
+
}
|
|
436
407
|
};
|
|
437
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
438
408
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
439
409
|
return {
|
|
440
410
|
flatResponse,
|
|
@@ -451,8 +421,8 @@ class SqlVirtualMachinesImpl {
|
|
|
451
421
|
spec: startAssessmentOperationSpec
|
|
452
422
|
});
|
|
453
423
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
454
|
-
restoreFrom: options
|
|
455
|
-
intervalInMs: options
|
|
424
|
+
restoreFrom: options?.resumeFrom,
|
|
425
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
456
426
|
resourceLocationConfig: "location"
|
|
457
427
|
});
|
|
458
428
|
await poller.poll();
|
|
@@ -481,14 +451,19 @@ class SqlVirtualMachinesImpl {
|
|
|
481
451
|
return this.client.sendOperationRequest(args, spec);
|
|
482
452
|
};
|
|
483
453
|
const sendOperationFn = async (args, spec) => {
|
|
484
|
-
var _a;
|
|
485
454
|
let currentRawResponse = undefined;
|
|
486
|
-
const providedCallback =
|
|
455
|
+
const providedCallback = args.options?.onResponse;
|
|
487
456
|
const callback = (rawResponse, flatResponse) => {
|
|
488
457
|
currentRawResponse = rawResponse;
|
|
489
|
-
providedCallback
|
|
458
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
459
|
+
};
|
|
460
|
+
const updatedArgs = {
|
|
461
|
+
...args,
|
|
462
|
+
options: {
|
|
463
|
+
...args.options,
|
|
464
|
+
onResponse: callback
|
|
465
|
+
}
|
|
490
466
|
};
|
|
491
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
492
467
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
493
468
|
return {
|
|
494
469
|
flatResponse,
|
|
@@ -505,8 +480,8 @@ class SqlVirtualMachinesImpl {
|
|
|
505
480
|
spec: redeployOperationSpec
|
|
506
481
|
});
|
|
507
482
|
const poller = await (0, core_lro_1.createHttpPoller)(lro, {
|
|
508
|
-
restoreFrom: options
|
|
509
|
-
intervalInMs: options
|
|
483
|
+
restoreFrom: options?.resumeFrom,
|
|
484
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
510
485
|
resourceLocationConfig: "location"
|
|
511
486
|
});
|
|
512
487
|
await poller.poll();
|