@azure/arm-sqlvirtualmachine 5.0.0-beta.2 → 5.0.0-beta.5
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 +2 -2
- package/LICENSE +1 -1
- package/README.md +11 -0
- package/dist/index.js +719 -91
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/availabilityGroupListenersCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/availabilityGroupListenersCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/availabilityGroupListenersCreateOrUpdateSample.js +50 -0
- package/dist-esm/samples-dev/availabilityGroupListenersCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/availabilityGroupListenersDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/availabilityGroupListenersDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/availabilityGroupListenersDeleteSample.js +32 -0
- package/dist-esm/samples-dev/availabilityGroupListenersDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/availabilityGroupListenersGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/availabilityGroupListenersGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/availabilityGroupListenersGetSample.js +32 -0
- package/dist-esm/samples-dev/availabilityGroupListenersGetSample.js.map +1 -0
- package/dist-esm/samples-dev/availabilityGroupListenersListByGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/availabilityGroupListenersListByGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/availabilityGroupListenersListByGroupSample.js +45 -0
- package/dist-esm/samples-dev/availabilityGroupListenersListByGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.js +43 -0
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsCreateOrUpdateSample.js +46 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsDeleteSample.js +31 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsGetSample.js +31 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsListByResourceGroupSample.js +44 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsListSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsListSample.js +43 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsListSample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsUpdateSample.js +32 -0
- package/dist-esm/samples-dev/sqlVirtualMachineGroupsUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesCreateOrUpdateSample.js +269 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesDeleteSample.js +31 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesGetSample.js +31 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesListByResourceGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesListByResourceGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesListByResourceGroupSample.js +44 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesListByResourceGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesListBySqlVMGroupSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesListBySqlVMGroupSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesListBySqlVMGroupSample.js +45 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesListBySqlVMGroupSample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesListSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesListSample.js +43 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesListSample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesRedeploySample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesRedeploySample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesRedeploySample.js +31 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesRedeploySample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesStartAssessmentSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesStartAssessmentSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesStartAssessmentSample.js +31 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesStartAssessmentSample.js.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesUpdateSample.js +32 -0
- package/dist-esm/samples-dev/sqlVirtualMachinesUpdateSample.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +237 -4
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +45 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +7 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +334 -3
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts +1 -1
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +10 -10
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/availabilityGroupListeners.d.ts.map +1 -1
- package/dist-esm/src/operations/availabilityGroupListeners.js +7 -3
- package/dist-esm/src/operations/availabilityGroupListeners.js.map +1 -1
- package/dist-esm/src/operations/operations.d.ts +2 -2
- package/dist-esm/src/operations/operations.js +2 -2
- package/dist-esm/src/operations/sqlVirtualMachineGroups.d.ts.map +1 -1
- package/dist-esm/src/operations/sqlVirtualMachineGroups.js +9 -3
- package/dist-esm/src/operations/sqlVirtualMachineGroups.js.map +1 -1
- package/dist-esm/src/operations/sqlVirtualMachines.d.ts +33 -1
- package/dist-esm/src/operations/sqlVirtualMachines.d.ts.map +1 -1
- package/dist-esm/src/operations/sqlVirtualMachines.js +142 -4
- package/dist-esm/src/operations/sqlVirtualMachines.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/operations.d.ts +1 -1
- package/dist-esm/src/operationsInterfaces/sqlVirtualMachines.d.ts +33 -1
- package/dist-esm/src/operationsInterfaces/sqlVirtualMachines.d.ts.map +1 -1
- package/dist-esm/src/sqlVirtualMachineManagementClient.d.ts +2 -0
- package/dist-esm/src/sqlVirtualMachineManagementClient.d.ts.map +1 -1
- package/dist-esm/src/sqlVirtualMachineManagementClient.js +50 -3
- package/dist-esm/src/sqlVirtualMachineManagementClient.js.map +1 -1
- package/dist-esm/test/sampleTest.js +11 -13
- package/dist-esm/test/sampleTest.js.map +1 -1
- package/package.json +48 -18
- package/review/arm-sqlvirtualmachine.api.md +176 -3
- package/rollup.config.js +6 -72
- package/src/models/index.ts +269 -4
- package/src/models/mappers.ts +344 -1
- package/src/models/parameters.ts +11 -11
- package/src/operations/availabilityGroupListeners.ts +7 -3
- package/src/operations/operations.ts +2 -2
- package/src/operations/sqlVirtualMachineGroups.ts +9 -3
- package/src/operations/sqlVirtualMachines.ts +208 -4
- package/src/operationsInterfaces/operations.ts +1 -1
- package/src/operationsInterfaces/sqlVirtualMachines.ts +51 -1
- package/src/sqlVirtualMachineManagementClient.ts +62 -3
- package/tsconfig.json +19 -5
- package/types/arm-sqlvirtualmachine.d.ts +294 -5
- package/types/tsdoc-metadata.json +1 -1
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
SqlVirtualMachinesListByResourceGroupOptionalParams,
|
|
25
25
|
SqlVirtualMachinesListBySqlVmGroupResponse,
|
|
26
26
|
SqlVirtualMachinesListResponse,
|
|
27
|
+
SqlVirtualMachinesRedeployOptionalParams,
|
|
27
28
|
SqlVirtualMachinesGetOptionalParams,
|
|
28
29
|
SqlVirtualMachinesGetResponse,
|
|
29
30
|
SqlVirtualMachinesCreateOrUpdateOptionalParams,
|
|
@@ -33,6 +34,7 @@ import {
|
|
|
33
34
|
SqlVirtualMachinesUpdateOptionalParams,
|
|
34
35
|
SqlVirtualMachinesUpdateResponse,
|
|
35
36
|
SqlVirtualMachinesListByResourceGroupResponse,
|
|
37
|
+
SqlVirtualMachinesStartAssessmentOptionalParams,
|
|
36
38
|
SqlVirtualMachinesListBySqlVmGroupNextResponse,
|
|
37
39
|
SqlVirtualMachinesListNextResponse,
|
|
38
40
|
SqlVirtualMachinesListByResourceGroupNextResponse
|
|
@@ -247,6 +249,90 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
|
|
|
247
249
|
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
248
250
|
}
|
|
249
251
|
|
|
252
|
+
/**
|
|
253
|
+
* Uninstalls and reinstalls the SQL Iaas Extension.
|
|
254
|
+
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
255
|
+
* value from the Azure Resource Manager API or the portal.
|
|
256
|
+
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
257
|
+
* @param options The options parameters.
|
|
258
|
+
*/
|
|
259
|
+
async beginRedeploy(
|
|
260
|
+
resourceGroupName: string,
|
|
261
|
+
sqlVirtualMachineName: string,
|
|
262
|
+
options?: SqlVirtualMachinesRedeployOptionalParams
|
|
263
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
264
|
+
const directSendOperation = async (
|
|
265
|
+
args: coreClient.OperationArguments,
|
|
266
|
+
spec: coreClient.OperationSpec
|
|
267
|
+
): Promise<void> => {
|
|
268
|
+
return this.client.sendOperationRequest(args, spec);
|
|
269
|
+
};
|
|
270
|
+
const sendOperation = async (
|
|
271
|
+
args: coreClient.OperationArguments,
|
|
272
|
+
spec: coreClient.OperationSpec
|
|
273
|
+
) => {
|
|
274
|
+
let currentRawResponse:
|
|
275
|
+
| coreClient.FullOperationResponse
|
|
276
|
+
| undefined = undefined;
|
|
277
|
+
const providedCallback = args.options?.onResponse;
|
|
278
|
+
const callback: coreClient.RawResponseCallback = (
|
|
279
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
280
|
+
flatResponse: unknown
|
|
281
|
+
) => {
|
|
282
|
+
currentRawResponse = rawResponse;
|
|
283
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
284
|
+
};
|
|
285
|
+
const updatedArgs = {
|
|
286
|
+
...args,
|
|
287
|
+
options: {
|
|
288
|
+
...args.options,
|
|
289
|
+
onResponse: callback
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
293
|
+
return {
|
|
294
|
+
flatResponse,
|
|
295
|
+
rawResponse: {
|
|
296
|
+
statusCode: currentRawResponse!.status,
|
|
297
|
+
body: currentRawResponse!.parsedBody,
|
|
298
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
const lro = new LroImpl(
|
|
304
|
+
sendOperation,
|
|
305
|
+
{ resourceGroupName, sqlVirtualMachineName, options },
|
|
306
|
+
redeployOperationSpec
|
|
307
|
+
);
|
|
308
|
+
const poller = new LroEngine(lro, {
|
|
309
|
+
resumeFrom: options?.resumeFrom,
|
|
310
|
+
intervalInMs: options?.updateIntervalInMs
|
|
311
|
+
});
|
|
312
|
+
await poller.poll();
|
|
313
|
+
return poller;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Uninstalls and reinstalls the SQL Iaas Extension.
|
|
318
|
+
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
319
|
+
* value from the Azure Resource Manager API or the portal.
|
|
320
|
+
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
321
|
+
* @param options The options parameters.
|
|
322
|
+
*/
|
|
323
|
+
async beginRedeployAndWait(
|
|
324
|
+
resourceGroupName: string,
|
|
325
|
+
sqlVirtualMachineName: string,
|
|
326
|
+
options?: SqlVirtualMachinesRedeployOptionalParams
|
|
327
|
+
): Promise<void> {
|
|
328
|
+
const poller = await this.beginRedeploy(
|
|
329
|
+
resourceGroupName,
|
|
330
|
+
sqlVirtualMachineName,
|
|
331
|
+
options
|
|
332
|
+
);
|
|
333
|
+
return poller.pollUntilDone();
|
|
334
|
+
}
|
|
335
|
+
|
|
250
336
|
/**
|
|
251
337
|
* Gets a SQL virtual machine.
|
|
252
338
|
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
@@ -328,10 +414,12 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
|
|
|
328
414
|
{ resourceGroupName, sqlVirtualMachineName, parameters, options },
|
|
329
415
|
createOrUpdateOperationSpec
|
|
330
416
|
);
|
|
331
|
-
|
|
417
|
+
const poller = new LroEngine(lro, {
|
|
332
418
|
resumeFrom: options?.resumeFrom,
|
|
333
419
|
intervalInMs: options?.updateIntervalInMs
|
|
334
420
|
});
|
|
421
|
+
await poller.poll();
|
|
422
|
+
return poller;
|
|
335
423
|
}
|
|
336
424
|
|
|
337
425
|
/**
|
|
@@ -413,10 +501,12 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
|
|
|
413
501
|
{ resourceGroupName, sqlVirtualMachineName, options },
|
|
414
502
|
deleteOperationSpec
|
|
415
503
|
);
|
|
416
|
-
|
|
504
|
+
const poller = new LroEngine(lro, {
|
|
417
505
|
resumeFrom: options?.resumeFrom,
|
|
418
506
|
intervalInMs: options?.updateIntervalInMs
|
|
419
507
|
});
|
|
508
|
+
await poller.poll();
|
|
509
|
+
return poller;
|
|
420
510
|
}
|
|
421
511
|
|
|
422
512
|
/**
|
|
@@ -502,10 +592,12 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
|
|
|
502
592
|
{ resourceGroupName, sqlVirtualMachineName, parameters, options },
|
|
503
593
|
updateOperationSpec
|
|
504
594
|
);
|
|
505
|
-
|
|
595
|
+
const poller = new LroEngine(lro, {
|
|
506
596
|
resumeFrom: options?.resumeFrom,
|
|
507
597
|
intervalInMs: options?.updateIntervalInMs
|
|
508
598
|
});
|
|
599
|
+
await poller.poll();
|
|
600
|
+
return poller;
|
|
509
601
|
}
|
|
510
602
|
|
|
511
603
|
/**
|
|
@@ -547,6 +639,90 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
|
|
|
547
639
|
);
|
|
548
640
|
}
|
|
549
641
|
|
|
642
|
+
/**
|
|
643
|
+
* Starts Assessment on SQL virtual machine.
|
|
644
|
+
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
645
|
+
* value from the Azure Resource Manager API or the portal.
|
|
646
|
+
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
647
|
+
* @param options The options parameters.
|
|
648
|
+
*/
|
|
649
|
+
async beginStartAssessment(
|
|
650
|
+
resourceGroupName: string,
|
|
651
|
+
sqlVirtualMachineName: string,
|
|
652
|
+
options?: SqlVirtualMachinesStartAssessmentOptionalParams
|
|
653
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
654
|
+
const directSendOperation = async (
|
|
655
|
+
args: coreClient.OperationArguments,
|
|
656
|
+
spec: coreClient.OperationSpec
|
|
657
|
+
): Promise<void> => {
|
|
658
|
+
return this.client.sendOperationRequest(args, spec);
|
|
659
|
+
};
|
|
660
|
+
const sendOperation = async (
|
|
661
|
+
args: coreClient.OperationArguments,
|
|
662
|
+
spec: coreClient.OperationSpec
|
|
663
|
+
) => {
|
|
664
|
+
let currentRawResponse:
|
|
665
|
+
| coreClient.FullOperationResponse
|
|
666
|
+
| undefined = undefined;
|
|
667
|
+
const providedCallback = args.options?.onResponse;
|
|
668
|
+
const callback: coreClient.RawResponseCallback = (
|
|
669
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
670
|
+
flatResponse: unknown
|
|
671
|
+
) => {
|
|
672
|
+
currentRawResponse = rawResponse;
|
|
673
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
674
|
+
};
|
|
675
|
+
const updatedArgs = {
|
|
676
|
+
...args,
|
|
677
|
+
options: {
|
|
678
|
+
...args.options,
|
|
679
|
+
onResponse: callback
|
|
680
|
+
}
|
|
681
|
+
};
|
|
682
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
683
|
+
return {
|
|
684
|
+
flatResponse,
|
|
685
|
+
rawResponse: {
|
|
686
|
+
statusCode: currentRawResponse!.status,
|
|
687
|
+
body: currentRawResponse!.parsedBody,
|
|
688
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
689
|
+
}
|
|
690
|
+
};
|
|
691
|
+
};
|
|
692
|
+
|
|
693
|
+
const lro = new LroImpl(
|
|
694
|
+
sendOperation,
|
|
695
|
+
{ resourceGroupName, sqlVirtualMachineName, options },
|
|
696
|
+
startAssessmentOperationSpec
|
|
697
|
+
);
|
|
698
|
+
const poller = new LroEngine(lro, {
|
|
699
|
+
resumeFrom: options?.resumeFrom,
|
|
700
|
+
intervalInMs: options?.updateIntervalInMs
|
|
701
|
+
});
|
|
702
|
+
await poller.poll();
|
|
703
|
+
return poller;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
/**
|
|
707
|
+
* Starts Assessment on SQL virtual machine.
|
|
708
|
+
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
709
|
+
* value from the Azure Resource Manager API or the portal.
|
|
710
|
+
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
711
|
+
* @param options The options parameters.
|
|
712
|
+
*/
|
|
713
|
+
async beginStartAssessmentAndWait(
|
|
714
|
+
resourceGroupName: string,
|
|
715
|
+
sqlVirtualMachineName: string,
|
|
716
|
+
options?: SqlVirtualMachinesStartAssessmentOptionalParams
|
|
717
|
+
): Promise<void> {
|
|
718
|
+
const poller = await this.beginStartAssessment(
|
|
719
|
+
resourceGroupName,
|
|
720
|
+
sqlVirtualMachineName,
|
|
721
|
+
options
|
|
722
|
+
);
|
|
723
|
+
return poller.pollUntilDone();
|
|
724
|
+
}
|
|
725
|
+
|
|
550
726
|
/**
|
|
551
727
|
* ListBySqlVmGroupNext
|
|
552
728
|
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
@@ -638,6 +814,20 @@ const listOperationSpec: coreClient.OperationSpec = {
|
|
|
638
814
|
headerParameters: [Parameters.accept],
|
|
639
815
|
serializer
|
|
640
816
|
};
|
|
817
|
+
const redeployOperationSpec: coreClient.OperationSpec = {
|
|
818
|
+
path:
|
|
819
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/redeploy",
|
|
820
|
+
httpMethod: "POST",
|
|
821
|
+
responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },
|
|
822
|
+
queryParameters: [Parameters.apiVersion],
|
|
823
|
+
urlParameters: [
|
|
824
|
+
Parameters.$host,
|
|
825
|
+
Parameters.resourceGroupName,
|
|
826
|
+
Parameters.subscriptionId,
|
|
827
|
+
Parameters.sqlVirtualMachineName
|
|
828
|
+
],
|
|
829
|
+
serializer
|
|
830
|
+
};
|
|
641
831
|
const getOperationSpec: coreClient.OperationSpec = {
|
|
642
832
|
path:
|
|
643
833
|
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}",
|
|
@@ -648,7 +838,7 @@ const getOperationSpec: coreClient.OperationSpec = {
|
|
|
648
838
|
},
|
|
649
839
|
default: {}
|
|
650
840
|
},
|
|
651
|
-
queryParameters: [Parameters.
|
|
841
|
+
queryParameters: [Parameters.expand, Parameters.apiVersion],
|
|
652
842
|
urlParameters: [
|
|
653
843
|
Parameters.$host,
|
|
654
844
|
Parameters.resourceGroupName,
|
|
@@ -753,6 +943,20 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
|
|
|
753
943
|
headerParameters: [Parameters.accept],
|
|
754
944
|
serializer
|
|
755
945
|
};
|
|
946
|
+
const startAssessmentOperationSpec: coreClient.OperationSpec = {
|
|
947
|
+
path:
|
|
948
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/startAssessment",
|
|
949
|
+
httpMethod: "POST",
|
|
950
|
+
responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },
|
|
951
|
+
queryParameters: [Parameters.apiVersion],
|
|
952
|
+
urlParameters: [
|
|
953
|
+
Parameters.$host,
|
|
954
|
+
Parameters.resourceGroupName,
|
|
955
|
+
Parameters.subscriptionId,
|
|
956
|
+
Parameters.sqlVirtualMachineName
|
|
957
|
+
],
|
|
958
|
+
serializer
|
|
959
|
+
};
|
|
756
960
|
const listBySqlVmGroupNextOperationSpec: coreClient.OperationSpec = {
|
|
757
961
|
path: "{nextLink}",
|
|
758
962
|
httpMethod: "GET",
|
|
@@ -13,7 +13,7 @@ import { Operation, OperationsListOptionalParams } from "../models";
|
|
|
13
13
|
/** Interface representing a Operations. */
|
|
14
14
|
export interface Operations {
|
|
15
15
|
/**
|
|
16
|
-
* Lists all of the available SQL Rest API operations.
|
|
16
|
+
* Lists all of the available SQL Virtual Machine Rest API operations.
|
|
17
17
|
* @param options The options parameters.
|
|
18
18
|
*/
|
|
19
19
|
list(
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
SqlVirtualMachinesListBySqlVmGroupOptionalParams,
|
|
14
14
|
SqlVirtualMachinesListOptionalParams,
|
|
15
15
|
SqlVirtualMachinesListByResourceGroupOptionalParams,
|
|
16
|
+
SqlVirtualMachinesRedeployOptionalParams,
|
|
16
17
|
SqlVirtualMachinesGetOptionalParams,
|
|
17
18
|
SqlVirtualMachinesGetResponse,
|
|
18
19
|
SqlVirtualMachinesCreateOrUpdateOptionalParams,
|
|
@@ -20,7 +21,8 @@ import {
|
|
|
20
21
|
SqlVirtualMachinesDeleteOptionalParams,
|
|
21
22
|
SqlVirtualMachineUpdate,
|
|
22
23
|
SqlVirtualMachinesUpdateOptionalParams,
|
|
23
|
-
SqlVirtualMachinesUpdateResponse
|
|
24
|
+
SqlVirtualMachinesUpdateResponse,
|
|
25
|
+
SqlVirtualMachinesStartAssessmentOptionalParams
|
|
24
26
|
} from "../models";
|
|
25
27
|
|
|
26
28
|
/// <reference lib="esnext.asynciterable" />
|
|
@@ -55,6 +57,30 @@ export interface SqlVirtualMachines {
|
|
|
55
57
|
resourceGroupName: string,
|
|
56
58
|
options?: SqlVirtualMachinesListByResourceGroupOptionalParams
|
|
57
59
|
): PagedAsyncIterableIterator<SqlVirtualMachine>;
|
|
60
|
+
/**
|
|
61
|
+
* Uninstalls and reinstalls the SQL Iaas Extension.
|
|
62
|
+
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
63
|
+
* value from the Azure Resource Manager API or the portal.
|
|
64
|
+
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
65
|
+
* @param options The options parameters.
|
|
66
|
+
*/
|
|
67
|
+
beginRedeploy(
|
|
68
|
+
resourceGroupName: string,
|
|
69
|
+
sqlVirtualMachineName: string,
|
|
70
|
+
options?: SqlVirtualMachinesRedeployOptionalParams
|
|
71
|
+
): Promise<PollerLike<PollOperationState<void>, void>>;
|
|
72
|
+
/**
|
|
73
|
+
* Uninstalls and reinstalls the SQL Iaas Extension.
|
|
74
|
+
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
75
|
+
* value from the Azure Resource Manager API or the portal.
|
|
76
|
+
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
77
|
+
* @param options The options parameters.
|
|
78
|
+
*/
|
|
79
|
+
beginRedeployAndWait(
|
|
80
|
+
resourceGroupName: string,
|
|
81
|
+
sqlVirtualMachineName: string,
|
|
82
|
+
options?: SqlVirtualMachinesRedeployOptionalParams
|
|
83
|
+
): Promise<void>;
|
|
58
84
|
/**
|
|
59
85
|
* Gets a SQL virtual machine.
|
|
60
86
|
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
@@ -157,4 +183,28 @@ export interface SqlVirtualMachines {
|
|
|
157
183
|
parameters: SqlVirtualMachineUpdate,
|
|
158
184
|
options?: SqlVirtualMachinesUpdateOptionalParams
|
|
159
185
|
): Promise<SqlVirtualMachinesUpdateResponse>;
|
|
186
|
+
/**
|
|
187
|
+
* Starts Assessment on SQL virtual machine.
|
|
188
|
+
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
189
|
+
* value from the Azure Resource Manager API or the portal.
|
|
190
|
+
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
191
|
+
* @param options The options parameters.
|
|
192
|
+
*/
|
|
193
|
+
beginStartAssessment(
|
|
194
|
+
resourceGroupName: string,
|
|
195
|
+
sqlVirtualMachineName: string,
|
|
196
|
+
options?: SqlVirtualMachinesStartAssessmentOptionalParams
|
|
197
|
+
): Promise<PollerLike<PollOperationState<void>, void>>;
|
|
198
|
+
/**
|
|
199
|
+
* Starts Assessment on SQL virtual machine.
|
|
200
|
+
* @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
|
|
201
|
+
* value from the Azure Resource Manager API or the portal.
|
|
202
|
+
* @param sqlVirtualMachineName Name of the SQL virtual machine.
|
|
203
|
+
* @param options The options parameters.
|
|
204
|
+
*/
|
|
205
|
+
beginStartAssessmentAndWait(
|
|
206
|
+
resourceGroupName: string,
|
|
207
|
+
sqlVirtualMachineName: string,
|
|
208
|
+
options?: SqlVirtualMachinesStartAssessmentOptionalParams
|
|
209
|
+
): Promise<void>;
|
|
160
210
|
}
|
|
@@ -7,6 +7,12 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import * as coreClient from "@azure/core-client";
|
|
10
|
+
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
|
11
|
+
import {
|
|
12
|
+
PipelineRequest,
|
|
13
|
+
PipelineResponse,
|
|
14
|
+
SendRequest
|
|
15
|
+
} from "@azure/core-rest-pipeline";
|
|
10
16
|
import * as coreAuth from "@azure/core-auth";
|
|
11
17
|
import {
|
|
12
18
|
AvailabilityGroupListenersImpl,
|
|
@@ -54,7 +60,7 @@ export class SqlVirtualMachineManagementClient extends coreClient.ServiceClient
|
|
|
54
60
|
credential: credentials
|
|
55
61
|
};
|
|
56
62
|
|
|
57
|
-
const packageDetails = `azsdk-js-arm-sqlvirtualmachine/5.0.0-beta.
|
|
63
|
+
const packageDetails = `azsdk-js-arm-sqlvirtualmachine/5.0.0-beta.5`;
|
|
58
64
|
const userAgentPrefix =
|
|
59
65
|
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
60
66
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
@@ -69,19 +75,72 @@ export class SqlVirtualMachineManagementClient extends coreClient.ServiceClient
|
|
|
69
75
|
userAgentOptions: {
|
|
70
76
|
userAgentPrefix
|
|
71
77
|
},
|
|
72
|
-
baseUri:
|
|
78
|
+
baseUri:
|
|
79
|
+
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
|
73
80
|
};
|
|
74
81
|
super(optionsWithDefaults);
|
|
82
|
+
|
|
83
|
+
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
84
|
+
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
|
|
85
|
+
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
|
|
86
|
+
(pipelinePolicy) =>
|
|
87
|
+
pipelinePolicy.name ===
|
|
88
|
+
coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
89
|
+
);
|
|
90
|
+
if (!bearerTokenAuthenticationPolicyFound) {
|
|
91
|
+
this.pipeline.removePolicy({
|
|
92
|
+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
93
|
+
});
|
|
94
|
+
this.pipeline.addPolicy(
|
|
95
|
+
coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
96
|
+
scopes: `${optionsWithDefaults.baseUri}/.default`,
|
|
97
|
+
challengeCallbacks: {
|
|
98
|
+
authorizeRequestOnChallenge:
|
|
99
|
+
coreClient.authorizeRequestOnClaimChallenge
|
|
100
|
+
}
|
|
101
|
+
})
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
75
105
|
// Parameter assignments
|
|
76
106
|
this.subscriptionId = subscriptionId;
|
|
77
107
|
|
|
78
108
|
// Assigning values to Constant parameters
|
|
79
109
|
this.$host = options.$host || "https://management.azure.com";
|
|
80
|
-
this.apiVersion = options.apiVersion || "
|
|
110
|
+
this.apiVersion = options.apiVersion || "2021-11-01-preview";
|
|
81
111
|
this.availabilityGroupListeners = new AvailabilityGroupListenersImpl(this);
|
|
82
112
|
this.operations = new OperationsImpl(this);
|
|
83
113
|
this.sqlVirtualMachineGroups = new SqlVirtualMachineGroupsImpl(this);
|
|
84
114
|
this.sqlVirtualMachines = new SqlVirtualMachinesImpl(this);
|
|
115
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
119
|
+
private addCustomApiVersionPolicy(apiVersion?: string) {
|
|
120
|
+
if (!apiVersion) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
const apiVersionPolicy = {
|
|
124
|
+
name: "CustomApiVersionPolicy",
|
|
125
|
+
async sendRequest(
|
|
126
|
+
request: PipelineRequest,
|
|
127
|
+
next: SendRequest
|
|
128
|
+
): Promise<PipelineResponse> {
|
|
129
|
+
const param = request.url.split("?");
|
|
130
|
+
if (param.length > 1) {
|
|
131
|
+
const newParams = param[1].split("&").map((item) => {
|
|
132
|
+
if (item.indexOf("api-version") > -1) {
|
|
133
|
+
return item.replace(/(?<==).*$/, apiVersion);
|
|
134
|
+
} else {
|
|
135
|
+
return item;
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
139
|
+
}
|
|
140
|
+
return next(request);
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
85
144
|
}
|
|
86
145
|
|
|
87
146
|
availabilityGroupListeners: AvailabilityGroupListeners;
|
package/tsconfig.json
CHANGED
|
@@ -9,11 +9,25 @@
|
|
|
9
9
|
"esModuleInterop": true,
|
|
10
10
|
"allowSyntheticDefaultImports": true,
|
|
11
11
|
"forceConsistentCasingInFileNames": true,
|
|
12
|
-
"lib": [
|
|
12
|
+
"lib": [
|
|
13
|
+
"es6",
|
|
14
|
+
"dom"
|
|
15
|
+
],
|
|
13
16
|
"declaration": true,
|
|
14
17
|
"outDir": "./dist-esm",
|
|
15
|
-
"importHelpers": true
|
|
18
|
+
"importHelpers": true,
|
|
19
|
+
"paths": {
|
|
20
|
+
"@azure/arm-sqlvirtualmachine": [
|
|
21
|
+
"./src/index"
|
|
22
|
+
]
|
|
23
|
+
}
|
|
16
24
|
},
|
|
17
|
-
"include": [
|
|
18
|
-
|
|
19
|
-
|
|
25
|
+
"include": [
|
|
26
|
+
"./src/**/*.ts",
|
|
27
|
+
"./test/**/*.ts",
|
|
28
|
+
"samples-dev/**/*.ts"
|
|
29
|
+
],
|
|
30
|
+
"exclude": [
|
|
31
|
+
"node_modules"
|
|
32
|
+
]
|
|
33
|
+
}
|