@azure/arm-sqlvirtualmachine 5.0.0-beta.5 → 5.0.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/dist/index.js +236 -83
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/dist-esm/src/models/index.d.ts +136 -26
  7. package/dist-esm/src/models/index.d.ts.map +1 -1
  8. package/dist-esm/src/models/index.js +70 -0
  9. package/dist-esm/src/models/index.js.map +1 -1
  10. package/dist-esm/src/models/mappers.d.ts +1 -0
  11. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  12. package/dist-esm/src/models/mappers.js +78 -1
  13. package/dist-esm/src/models/mappers.js.map +1 -1
  14. package/dist-esm/src/models/parameters.js +1 -1
  15. package/dist-esm/src/operations/sqlVirtualMachines.d.ts +17 -17
  16. package/dist-esm/src/operations/sqlVirtualMachines.d.ts.map +1 -1
  17. package/dist-esm/src/operations/sqlVirtualMachines.js +66 -66
  18. package/dist-esm/src/operations/sqlVirtualMachines.js.map +1 -1
  19. package/dist-esm/src/operationsInterfaces/sqlVirtualMachines.d.ts +17 -17
  20. package/dist-esm/src/operationsInterfaces/sqlVirtualMachines.d.ts.map +1 -1
  21. package/dist-esm/src/sqlVirtualMachineManagementClient.d.ts.map +1 -1
  22. package/dist-esm/src/sqlVirtualMachineManagementClient.js +20 -15
  23. package/dist-esm/src/sqlVirtualMachineManagementClient.js.map +1 -1
  24. package/package.json +5 -14
  25. package/review/arm-sqlvirtualmachine.api.md +63 -86
  26. package/src/models/index.ts +142 -28
  27. package/src/models/mappers.ts +83 -1
  28. package/src/models/parameters.ts +1 -1
  29. package/src/operations/sqlVirtualMachines.ts +99 -99
  30. package/src/operationsInterfaces/sqlVirtualMachines.ts +26 -26
  31. package/src/sqlVirtualMachineManagementClient.ts +25 -18
  32. package/tsconfig.json +2 -8
  33. package/types/arm-sqlvirtualmachine.d.ts +150 -35
  34. package/types/tsdoc-metadata.json +1 -1
  35. package/dist-esm/samples-dev/availabilityGroupListenersCreateOrUpdateSample.d.ts +0 -2
  36. package/dist-esm/samples-dev/availabilityGroupListenersCreateOrUpdateSample.d.ts.map +0 -1
  37. package/dist-esm/samples-dev/availabilityGroupListenersCreateOrUpdateSample.js +0 -50
  38. package/dist-esm/samples-dev/availabilityGroupListenersCreateOrUpdateSample.js.map +0 -1
  39. package/dist-esm/samples-dev/availabilityGroupListenersDeleteSample.d.ts +0 -2
  40. package/dist-esm/samples-dev/availabilityGroupListenersDeleteSample.d.ts.map +0 -1
  41. package/dist-esm/samples-dev/availabilityGroupListenersDeleteSample.js +0 -32
  42. package/dist-esm/samples-dev/availabilityGroupListenersDeleteSample.js.map +0 -1
  43. package/dist-esm/samples-dev/availabilityGroupListenersGetSample.d.ts +0 -2
  44. package/dist-esm/samples-dev/availabilityGroupListenersGetSample.d.ts.map +0 -1
  45. package/dist-esm/samples-dev/availabilityGroupListenersGetSample.js +0 -32
  46. package/dist-esm/samples-dev/availabilityGroupListenersGetSample.js.map +0 -1
  47. package/dist-esm/samples-dev/availabilityGroupListenersListByGroupSample.d.ts +0 -2
  48. package/dist-esm/samples-dev/availabilityGroupListenersListByGroupSample.d.ts.map +0 -1
  49. package/dist-esm/samples-dev/availabilityGroupListenersListByGroupSample.js +0 -45
  50. package/dist-esm/samples-dev/availabilityGroupListenersListByGroupSample.js.map +0 -1
  51. package/dist-esm/samples-dev/operationsListSample.d.ts +0 -2
  52. package/dist-esm/samples-dev/operationsListSample.d.ts.map +0 -1
  53. package/dist-esm/samples-dev/operationsListSample.js +0 -43
  54. package/dist-esm/samples-dev/operationsListSample.js.map +0 -1
  55. package/dist-esm/samples-dev/sqlVirtualMachineGroupsCreateOrUpdateSample.d.ts +0 -2
  56. package/dist-esm/samples-dev/sqlVirtualMachineGroupsCreateOrUpdateSample.d.ts.map +0 -1
  57. package/dist-esm/samples-dev/sqlVirtualMachineGroupsCreateOrUpdateSample.js +0 -46
  58. package/dist-esm/samples-dev/sqlVirtualMachineGroupsCreateOrUpdateSample.js.map +0 -1
  59. package/dist-esm/samples-dev/sqlVirtualMachineGroupsDeleteSample.d.ts +0 -2
  60. package/dist-esm/samples-dev/sqlVirtualMachineGroupsDeleteSample.d.ts.map +0 -1
  61. package/dist-esm/samples-dev/sqlVirtualMachineGroupsDeleteSample.js +0 -31
  62. package/dist-esm/samples-dev/sqlVirtualMachineGroupsDeleteSample.js.map +0 -1
  63. package/dist-esm/samples-dev/sqlVirtualMachineGroupsGetSample.d.ts +0 -2
  64. package/dist-esm/samples-dev/sqlVirtualMachineGroupsGetSample.d.ts.map +0 -1
  65. package/dist-esm/samples-dev/sqlVirtualMachineGroupsGetSample.js +0 -31
  66. package/dist-esm/samples-dev/sqlVirtualMachineGroupsGetSample.js.map +0 -1
  67. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListByResourceGroupSample.d.ts +0 -2
  68. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListByResourceGroupSample.d.ts.map +0 -1
  69. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListByResourceGroupSample.js +0 -44
  70. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListByResourceGroupSample.js.map +0 -1
  71. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListSample.d.ts +0 -2
  72. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListSample.d.ts.map +0 -1
  73. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListSample.js +0 -43
  74. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListSample.js.map +0 -1
  75. package/dist-esm/samples-dev/sqlVirtualMachineGroupsUpdateSample.d.ts +0 -2
  76. package/dist-esm/samples-dev/sqlVirtualMachineGroupsUpdateSample.d.ts.map +0 -1
  77. package/dist-esm/samples-dev/sqlVirtualMachineGroupsUpdateSample.js +0 -32
  78. package/dist-esm/samples-dev/sqlVirtualMachineGroupsUpdateSample.js.map +0 -1
  79. package/dist-esm/samples-dev/sqlVirtualMachinesCreateOrUpdateSample.d.ts +0 -2
  80. package/dist-esm/samples-dev/sqlVirtualMachinesCreateOrUpdateSample.d.ts.map +0 -1
  81. package/dist-esm/samples-dev/sqlVirtualMachinesCreateOrUpdateSample.js +0 -269
  82. package/dist-esm/samples-dev/sqlVirtualMachinesCreateOrUpdateSample.js.map +0 -1
  83. package/dist-esm/samples-dev/sqlVirtualMachinesDeleteSample.d.ts +0 -2
  84. package/dist-esm/samples-dev/sqlVirtualMachinesDeleteSample.d.ts.map +0 -1
  85. package/dist-esm/samples-dev/sqlVirtualMachinesDeleteSample.js +0 -31
  86. package/dist-esm/samples-dev/sqlVirtualMachinesDeleteSample.js.map +0 -1
  87. package/dist-esm/samples-dev/sqlVirtualMachinesGetSample.d.ts +0 -2
  88. package/dist-esm/samples-dev/sqlVirtualMachinesGetSample.d.ts.map +0 -1
  89. package/dist-esm/samples-dev/sqlVirtualMachinesGetSample.js +0 -31
  90. package/dist-esm/samples-dev/sqlVirtualMachinesGetSample.js.map +0 -1
  91. package/dist-esm/samples-dev/sqlVirtualMachinesListByResourceGroupSample.d.ts +0 -2
  92. package/dist-esm/samples-dev/sqlVirtualMachinesListByResourceGroupSample.d.ts.map +0 -1
  93. package/dist-esm/samples-dev/sqlVirtualMachinesListByResourceGroupSample.js +0 -44
  94. package/dist-esm/samples-dev/sqlVirtualMachinesListByResourceGroupSample.js.map +0 -1
  95. package/dist-esm/samples-dev/sqlVirtualMachinesListBySqlVMGroupSample.d.ts +0 -2
  96. package/dist-esm/samples-dev/sqlVirtualMachinesListBySqlVMGroupSample.d.ts.map +0 -1
  97. package/dist-esm/samples-dev/sqlVirtualMachinesListBySqlVMGroupSample.js +0 -45
  98. package/dist-esm/samples-dev/sqlVirtualMachinesListBySqlVMGroupSample.js.map +0 -1
  99. package/dist-esm/samples-dev/sqlVirtualMachinesListSample.d.ts +0 -2
  100. package/dist-esm/samples-dev/sqlVirtualMachinesListSample.d.ts.map +0 -1
  101. package/dist-esm/samples-dev/sqlVirtualMachinesListSample.js +0 -43
  102. package/dist-esm/samples-dev/sqlVirtualMachinesListSample.js.map +0 -1
  103. package/dist-esm/samples-dev/sqlVirtualMachinesRedeploySample.d.ts +0 -2
  104. package/dist-esm/samples-dev/sqlVirtualMachinesRedeploySample.d.ts.map +0 -1
  105. package/dist-esm/samples-dev/sqlVirtualMachinesRedeploySample.js +0 -31
  106. package/dist-esm/samples-dev/sqlVirtualMachinesRedeploySample.js.map +0 -1
  107. package/dist-esm/samples-dev/sqlVirtualMachinesStartAssessmentSample.d.ts +0 -2
  108. package/dist-esm/samples-dev/sqlVirtualMachinesStartAssessmentSample.d.ts.map +0 -1
  109. package/dist-esm/samples-dev/sqlVirtualMachinesStartAssessmentSample.js +0 -31
  110. package/dist-esm/samples-dev/sqlVirtualMachinesStartAssessmentSample.js.map +0 -1
  111. package/dist-esm/samples-dev/sqlVirtualMachinesUpdateSample.d.ts +0 -2
  112. package/dist-esm/samples-dev/sqlVirtualMachinesUpdateSample.d.ts.map +0 -1
  113. package/dist-esm/samples-dev/sqlVirtualMachinesUpdateSample.js +0 -32
  114. package/dist-esm/samples-dev/sqlVirtualMachinesUpdateSample.js.map +0 -1
@@ -24,6 +24,7 @@ import {
24
24
  SqlVirtualMachinesListByResourceGroupOptionalParams,
25
25
  SqlVirtualMachinesListBySqlVmGroupResponse,
26
26
  SqlVirtualMachinesListResponse,
27
+ SqlVirtualMachinesStartAssessmentOptionalParams,
27
28
  SqlVirtualMachinesRedeployOptionalParams,
28
29
  SqlVirtualMachinesGetOptionalParams,
29
30
  SqlVirtualMachinesGetResponse,
@@ -34,7 +35,6 @@ import {
34
35
  SqlVirtualMachinesUpdateOptionalParams,
35
36
  SqlVirtualMachinesUpdateResponse,
36
37
  SqlVirtualMachinesListByResourceGroupResponse,
37
- SqlVirtualMachinesStartAssessmentOptionalParams,
38
38
  SqlVirtualMachinesListBySqlVmGroupNextResponse,
39
39
  SqlVirtualMachinesListNextResponse,
40
40
  SqlVirtualMachinesListByResourceGroupNextResponse
@@ -249,6 +249,90 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
249
249
  return this.client.sendOperationRequest({ options }, listOperationSpec);
250
250
  }
251
251
 
252
+ /**
253
+ * Starts Assessment on SQL virtual machine.
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 beginStartAssessment(
260
+ resourceGroupName: string,
261
+ sqlVirtualMachineName: string,
262
+ options?: SqlVirtualMachinesStartAssessmentOptionalParams
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
+ startAssessmentOperationSpec
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
+ * Starts Assessment on SQL virtual machine.
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 beginStartAssessmentAndWait(
324
+ resourceGroupName: string,
325
+ sqlVirtualMachineName: string,
326
+ options?: SqlVirtualMachinesStartAssessmentOptionalParams
327
+ ): Promise<void> {
328
+ const poller = await this.beginStartAssessment(
329
+ resourceGroupName,
330
+ sqlVirtualMachineName,
331
+ options
332
+ );
333
+ return poller.pollUntilDone();
334
+ }
335
+
252
336
  /**
253
337
  * Uninstalls and reinstalls the SQL Iaas Extension.
254
338
  * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
@@ -639,90 +723,6 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
639
723
  );
640
724
  }
641
725
 
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
-
726
726
  /**
727
727
  * ListBySqlVmGroupNext
728
728
  * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
@@ -814,6 +814,20 @@ const listOperationSpec: coreClient.OperationSpec = {
814
814
  headerParameters: [Parameters.accept],
815
815
  serializer
816
816
  };
817
+ const startAssessmentOperationSpec: coreClient.OperationSpec = {
818
+ path:
819
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/startAssessment",
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
+ };
817
831
  const redeployOperationSpec: coreClient.OperationSpec = {
818
832
  path:
819
833
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/redeploy",
@@ -943,20 +957,6 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
943
957
  headerParameters: [Parameters.accept],
944
958
  serializer
945
959
  };
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
- };
960
960
  const listBySqlVmGroupNextOperationSpec: coreClient.OperationSpec = {
961
961
  path: "{nextLink}",
962
962
  httpMethod: "GET",
@@ -13,6 +13,7 @@ import {
13
13
  SqlVirtualMachinesListBySqlVmGroupOptionalParams,
14
14
  SqlVirtualMachinesListOptionalParams,
15
15
  SqlVirtualMachinesListByResourceGroupOptionalParams,
16
+ SqlVirtualMachinesStartAssessmentOptionalParams,
16
17
  SqlVirtualMachinesRedeployOptionalParams,
17
18
  SqlVirtualMachinesGetOptionalParams,
18
19
  SqlVirtualMachinesGetResponse,
@@ -21,8 +22,7 @@ import {
21
22
  SqlVirtualMachinesDeleteOptionalParams,
22
23
  SqlVirtualMachineUpdate,
23
24
  SqlVirtualMachinesUpdateOptionalParams,
24
- SqlVirtualMachinesUpdateResponse,
25
- SqlVirtualMachinesStartAssessmentOptionalParams
25
+ SqlVirtualMachinesUpdateResponse
26
26
  } from "../models";
27
27
 
28
28
  /// <reference lib="esnext.asynciterable" />
@@ -57,6 +57,30 @@ export interface SqlVirtualMachines {
57
57
  resourceGroupName: string,
58
58
  options?: SqlVirtualMachinesListByResourceGroupOptionalParams
59
59
  ): PagedAsyncIterableIterator<SqlVirtualMachine>;
60
+ /**
61
+ * Starts Assessment on SQL virtual machine.
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
+ beginStartAssessment(
68
+ resourceGroupName: string,
69
+ sqlVirtualMachineName: string,
70
+ options?: SqlVirtualMachinesStartAssessmentOptionalParams
71
+ ): Promise<PollerLike<PollOperationState<void>, void>>;
72
+ /**
73
+ * Starts Assessment on SQL virtual machine.
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
+ beginStartAssessmentAndWait(
80
+ resourceGroupName: string,
81
+ sqlVirtualMachineName: string,
82
+ options?: SqlVirtualMachinesStartAssessmentOptionalParams
83
+ ): Promise<void>;
60
84
  /**
61
85
  * Uninstalls and reinstalls the SQL Iaas Extension.
62
86
  * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
@@ -183,28 +207,4 @@ export interface SqlVirtualMachines {
183
207
  parameters: SqlVirtualMachineUpdate,
184
208
  options?: SqlVirtualMachinesUpdateOptionalParams
185
209
  ): 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>;
210
210
  }
@@ -60,7 +60,7 @@ export class SqlVirtualMachineManagementClient extends coreClient.ServiceClient
60
60
  credential: credentials
61
61
  };
62
62
 
63
- const packageDetails = `azsdk-js-arm-sqlvirtualmachine/5.0.0-beta.5`;
63
+ const packageDetails = `azsdk-js-arm-sqlvirtualmachine/5.0.0-beta.6`;
64
64
  const userAgentPrefix =
65
65
  options.userAgentOptions && options.userAgentOptions.userAgentPrefix
66
66
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
@@ -80,34 +80,41 @@ export class SqlVirtualMachineManagementClient extends coreClient.ServiceClient
80
80
  };
81
81
  super(optionsWithDefaults);
82
82
 
83
+ let bearerTokenAuthenticationPolicyFound: boolean = false;
83
84
  if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
84
85
  const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
85
- const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
86
+ bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
86
87
  (pipelinePolicy) =>
87
88
  pipelinePolicy.name ===
88
89
  coreRestPipeline.bearerTokenAuthenticationPolicyName
89
90
  );
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
- }
91
+ }
92
+ if (
93
+ !options ||
94
+ !options.pipeline ||
95
+ options.pipeline.getOrderedPolicies().length == 0 ||
96
+ !bearerTokenAuthenticationPolicyFound
97
+ ) {
98
+ this.pipeline.removePolicy({
99
+ name: coreRestPipeline.bearerTokenAuthenticationPolicyName
100
+ });
101
+ this.pipeline.addPolicy(
102
+ coreRestPipeline.bearerTokenAuthenticationPolicy({
103
+ credential: credentials,
104
+ scopes: `${optionsWithDefaults.credentialScopes}`,
105
+ challengeCallbacks: {
106
+ authorizeRequestOnChallenge:
107
+ coreClient.authorizeRequestOnClaimChallenge
108
+ }
109
+ })
110
+ );
104
111
  }
105
112
  // Parameter assignments
106
113
  this.subscriptionId = subscriptionId;
107
114
 
108
115
  // Assigning values to Constant parameters
109
116
  this.$host = options.$host || "https://management.azure.com";
110
- this.apiVersion = options.apiVersion || "2021-11-01-preview";
117
+ this.apiVersion = options.apiVersion || "2022-07-01-preview";
111
118
  this.availabilityGroupListeners = new AvailabilityGroupListenersImpl(this);
112
119
  this.operations = new OperationsImpl(this);
113
120
  this.sqlVirtualMachineGroups = new SqlVirtualMachineGroupsImpl(this);
@@ -130,7 +137,7 @@ export class SqlVirtualMachineManagementClient extends coreClient.ServiceClient
130
137
  if (param.length > 1) {
131
138
  const newParams = param[1].split("&").map((item) => {
132
139
  if (item.indexOf("api-version") > -1) {
133
- return item.replace(/(?<==).*$/, apiVersion);
140
+ return "api-version=" + apiVersion;
134
141
  } else {
135
142
  return item;
136
143
  }
package/tsconfig.json CHANGED
@@ -15,17 +15,11 @@
15
15
  ],
16
16
  "declaration": true,
17
17
  "outDir": "./dist-esm",
18
- "importHelpers": true,
19
- "paths": {
20
- "@azure/arm-sqlvirtualmachine": [
21
- "./src/index"
22
- ]
23
- }
18
+ "importHelpers": true
24
19
  },
25
20
  "include": [
26
21
  "./src/**/*.ts",
27
- "./test/**/*.ts",
28
- "samples-dev/**/*.ts"
22
+ "./test/**/*.ts"
29
23
  ],
30
24
  "exclude": [
31
25
  "node_modules"