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

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 (187) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/LICENSE +1 -1
  3. package/README.md +1 -1
  4. package/dist/index.js +1065 -306
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.js +1 -1
  7. package/dist/index.min.js.map +1 -1
  8. package/dist-esm/samples-dev/availabilityGroupListenersCreateOrUpdateSample.d.ts +2 -0
  9. package/dist-esm/samples-dev/availabilityGroupListenersCreateOrUpdateSample.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/availabilityGroupListenersCreateOrUpdateSample.js +98 -0
  11. package/dist-esm/samples-dev/availabilityGroupListenersCreateOrUpdateSample.js.map +1 -0
  12. package/dist-esm/samples-dev/availabilityGroupListenersDeleteSample.d.ts +2 -0
  13. package/dist-esm/samples-dev/availabilityGroupListenersDeleteSample.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/availabilityGroupListenersDeleteSample.js +40 -0
  15. package/dist-esm/samples-dev/availabilityGroupListenersDeleteSample.js.map +1 -0
  16. package/dist-esm/samples-dev/availabilityGroupListenersGetSample.d.ts +2 -0
  17. package/dist-esm/samples-dev/availabilityGroupListenersGetSample.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/availabilityGroupListenersGetSample.js +40 -0
  19. package/dist-esm/samples-dev/availabilityGroupListenersGetSample.js.map +1 -0
  20. package/dist-esm/samples-dev/availabilityGroupListenersListByGroupSample.d.ts +2 -0
  21. package/dist-esm/samples-dev/availabilityGroupListenersListByGroupSample.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/availabilityGroupListenersListByGroupSample.js +60 -0
  23. package/dist-esm/samples-dev/availabilityGroupListenersListByGroupSample.js.map +1 -0
  24. package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
  25. package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
  26. package/dist-esm/samples-dev/operationsListSample.js +58 -0
  27. package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
  28. package/dist-esm/samples-dev/sqlVirtualMachineGroupsCreateOrUpdateSample.d.ts +2 -0
  29. package/dist-esm/samples-dev/sqlVirtualMachineGroupsCreateOrUpdateSample.d.ts.map +1 -0
  30. package/dist-esm/samples-dev/sqlVirtualMachineGroupsCreateOrUpdateSample.js +55 -0
  31. package/dist-esm/samples-dev/sqlVirtualMachineGroupsCreateOrUpdateSample.js.map +1 -0
  32. package/dist-esm/samples-dev/sqlVirtualMachineGroupsDeleteSample.d.ts +2 -0
  33. package/dist-esm/samples-dev/sqlVirtualMachineGroupsDeleteSample.d.ts.map +1 -0
  34. package/dist-esm/samples-dev/sqlVirtualMachineGroupsDeleteSample.js +39 -0
  35. package/dist-esm/samples-dev/sqlVirtualMachineGroupsDeleteSample.js.map +1 -0
  36. package/dist-esm/samples-dev/sqlVirtualMachineGroupsGetSample.d.ts +2 -0
  37. package/dist-esm/samples-dev/sqlVirtualMachineGroupsGetSample.d.ts.map +1 -0
  38. package/dist-esm/samples-dev/sqlVirtualMachineGroupsGetSample.js +39 -0
  39. package/dist-esm/samples-dev/sqlVirtualMachineGroupsGetSample.js.map +1 -0
  40. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListByResourceGroupSample.d.ts +2 -0
  41. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListByResourceGroupSample.d.ts.map +1 -0
  42. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListByResourceGroupSample.js +59 -0
  43. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListByResourceGroupSample.js.map +1 -0
  44. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListSample.d.ts +2 -0
  45. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListSample.d.ts.map +1 -0
  46. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListSample.js +58 -0
  47. package/dist-esm/samples-dev/sqlVirtualMachineGroupsListSample.js.map +1 -0
  48. package/dist-esm/samples-dev/sqlVirtualMachineGroupsUpdateSample.d.ts +2 -0
  49. package/dist-esm/samples-dev/sqlVirtualMachineGroupsUpdateSample.d.ts.map +1 -0
  50. package/dist-esm/samples-dev/sqlVirtualMachineGroupsUpdateSample.js +40 -0
  51. package/dist-esm/samples-dev/sqlVirtualMachineGroupsUpdateSample.js.map +1 -0
  52. package/dist-esm/samples-dev/sqlVirtualMachineTroubleshootSample.d.ts +2 -0
  53. package/dist-esm/samples-dev/sqlVirtualMachineTroubleshootSample.d.ts.map +1 -0
  54. package/dist-esm/samples-dev/sqlVirtualMachineTroubleshootSample.js +45 -0
  55. package/dist-esm/samples-dev/sqlVirtualMachineTroubleshootSample.js.map +1 -0
  56. package/dist-esm/samples-dev/sqlVirtualMachinesCreateOrUpdateSample.d.ts +2 -0
  57. package/dist-esm/samples-dev/sqlVirtualMachinesCreateOrUpdateSample.d.ts.map +1 -0
  58. package/dist-esm/samples-dev/sqlVirtualMachinesCreateOrUpdateSample.js +290 -0
  59. package/dist-esm/samples-dev/sqlVirtualMachinesCreateOrUpdateSample.js.map +1 -0
  60. package/dist-esm/samples-dev/sqlVirtualMachinesDeleteSample.d.ts +2 -0
  61. package/dist-esm/samples-dev/sqlVirtualMachinesDeleteSample.d.ts.map +1 -0
  62. package/dist-esm/samples-dev/sqlVirtualMachinesDeleteSample.js +39 -0
  63. package/dist-esm/samples-dev/sqlVirtualMachinesDeleteSample.js.map +1 -0
  64. package/dist-esm/samples-dev/sqlVirtualMachinesGetSample.d.ts +2 -0
  65. package/dist-esm/samples-dev/sqlVirtualMachinesGetSample.d.ts.map +1 -0
  66. package/dist-esm/samples-dev/sqlVirtualMachinesGetSample.js +39 -0
  67. package/dist-esm/samples-dev/sqlVirtualMachinesGetSample.js.map +1 -0
  68. package/dist-esm/samples-dev/sqlVirtualMachinesListByResourceGroupSample.d.ts +2 -0
  69. package/dist-esm/samples-dev/sqlVirtualMachinesListByResourceGroupSample.d.ts.map +1 -0
  70. package/dist-esm/samples-dev/sqlVirtualMachinesListByResourceGroupSample.js +59 -0
  71. package/dist-esm/samples-dev/sqlVirtualMachinesListByResourceGroupSample.js.map +1 -0
  72. package/dist-esm/samples-dev/sqlVirtualMachinesListBySqlVMGroupSample.d.ts +2 -0
  73. package/dist-esm/samples-dev/sqlVirtualMachinesListBySqlVMGroupSample.d.ts.map +1 -0
  74. package/dist-esm/samples-dev/sqlVirtualMachinesListBySqlVMGroupSample.js +60 -0
  75. package/dist-esm/samples-dev/sqlVirtualMachinesListBySqlVMGroupSample.js.map +1 -0
  76. package/dist-esm/samples-dev/sqlVirtualMachinesListSample.d.ts +2 -0
  77. package/dist-esm/samples-dev/sqlVirtualMachinesListSample.d.ts.map +1 -0
  78. package/dist-esm/samples-dev/sqlVirtualMachinesListSample.js +58 -0
  79. package/dist-esm/samples-dev/sqlVirtualMachinesListSample.js.map +1 -0
  80. package/dist-esm/samples-dev/sqlVirtualMachinesRedeploySample.d.ts +2 -0
  81. package/dist-esm/samples-dev/sqlVirtualMachinesRedeploySample.d.ts.map +1 -0
  82. package/dist-esm/samples-dev/sqlVirtualMachinesRedeploySample.js +39 -0
  83. package/dist-esm/samples-dev/sqlVirtualMachinesRedeploySample.js.map +1 -0
  84. package/dist-esm/samples-dev/sqlVirtualMachinesStartAssessmentSample.d.ts +2 -0
  85. package/dist-esm/samples-dev/sqlVirtualMachinesStartAssessmentSample.d.ts.map +1 -0
  86. package/dist-esm/samples-dev/sqlVirtualMachinesStartAssessmentSample.js +39 -0
  87. package/dist-esm/samples-dev/sqlVirtualMachinesStartAssessmentSample.js.map +1 -0
  88. package/dist-esm/samples-dev/sqlVirtualMachinesUpdateSample.d.ts +2 -0
  89. package/dist-esm/samples-dev/sqlVirtualMachinesUpdateSample.d.ts.map +1 -0
  90. package/dist-esm/samples-dev/sqlVirtualMachinesUpdateSample.js +40 -0
  91. package/dist-esm/samples-dev/sqlVirtualMachinesUpdateSample.js.map +1 -0
  92. package/dist-esm/src/index.d.ts +1 -0
  93. package/dist-esm/src/index.d.ts.map +1 -1
  94. package/dist-esm/src/index.js +1 -0
  95. package/dist-esm/src/index.js.map +1 -1
  96. package/dist-esm/src/lroImpl.d.ts +6 -11
  97. package/dist-esm/src/lroImpl.d.ts.map +1 -1
  98. package/dist-esm/src/lroImpl.js +12 -20
  99. package/dist-esm/src/lroImpl.js.map +1 -1
  100. package/dist-esm/src/models/index.d.ts +234 -68
  101. package/dist-esm/src/models/index.d.ts.map +1 -1
  102. package/dist-esm/src/models/index.js +8 -0
  103. package/dist-esm/src/models/index.js.map +1 -1
  104. package/dist-esm/src/models/mappers.d.ts +14 -0
  105. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  106. package/dist-esm/src/models/mappers.js +325 -0
  107. package/dist-esm/src/models/mappers.js.map +1 -1
  108. package/dist-esm/src/models/parameters.d.ts +1 -0
  109. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  110. package/dist-esm/src/models/parameters.js +11 -2
  111. package/dist-esm/src/models/parameters.js.map +1 -1
  112. package/dist-esm/src/operations/availabilityGroupListeners.d.ts +3 -3
  113. package/dist-esm/src/operations/availabilityGroupListeners.d.ts.map +1 -1
  114. package/dist-esm/src/operations/availabilityGroupListeners.js +86 -41
  115. package/dist-esm/src/operations/availabilityGroupListeners.js.map +1 -1
  116. package/dist-esm/src/operations/index.d.ts +1 -0
  117. package/dist-esm/src/operations/index.d.ts.map +1 -1
  118. package/dist-esm/src/operations/index.js +1 -0
  119. package/dist-esm/src/operations/index.js.map +1 -1
  120. package/dist-esm/src/operations/operations.d.ts.map +1 -1
  121. package/dist-esm/src/operations/operations.js +37 -15
  122. package/dist-esm/src/operations/operations.js.map +1 -1
  123. package/dist-esm/src/operations/sqlVirtualMachineGroups.d.ts +4 -4
  124. package/dist-esm/src/operations/sqlVirtualMachineGroups.d.ts.map +1 -1
  125. package/dist-esm/src/operations/sqlVirtualMachineGroups.js +134 -51
  126. package/dist-esm/src/operations/sqlVirtualMachineGroups.js.map +1 -1
  127. package/dist-esm/src/operations/sqlVirtualMachineTroubleshoot.d.ts +32 -0
  128. package/dist-esm/src/operations/sqlVirtualMachineTroubleshoot.d.ts.map +1 -0
  129. package/dist-esm/src/operations/sqlVirtualMachineTroubleshoot.js +118 -0
  130. package/dist-esm/src/operations/sqlVirtualMachineTroubleshoot.js.map +1 -0
  131. package/dist-esm/src/operations/sqlVirtualMachines.d.ts +29 -29
  132. package/dist-esm/src/operations/sqlVirtualMachines.d.ts.map +1 -1
  133. package/dist-esm/src/operations/sqlVirtualMachines.js +270 -148
  134. package/dist-esm/src/operations/sqlVirtualMachines.js.map +1 -1
  135. package/dist-esm/src/operationsInterfaces/availabilityGroupListeners.d.ts +3 -3
  136. package/dist-esm/src/operationsInterfaces/availabilityGroupListeners.d.ts.map +1 -1
  137. package/dist-esm/src/operationsInterfaces/index.d.ts +1 -0
  138. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
  139. package/dist-esm/src/operationsInterfaces/index.js +1 -0
  140. package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
  141. package/dist-esm/src/operationsInterfaces/sqlVirtualMachineGroups.d.ts +4 -4
  142. package/dist-esm/src/operationsInterfaces/sqlVirtualMachineGroups.d.ts.map +1 -1
  143. package/dist-esm/src/operationsInterfaces/sqlVirtualMachineTroubleshoot.d.ts +24 -0
  144. package/dist-esm/src/operationsInterfaces/sqlVirtualMachineTroubleshoot.d.ts.map +1 -0
  145. package/dist-esm/src/operationsInterfaces/sqlVirtualMachineTroubleshoot.js +9 -0
  146. package/dist-esm/src/operationsInterfaces/sqlVirtualMachineTroubleshoot.js.map +1 -0
  147. package/dist-esm/src/operationsInterfaces/sqlVirtualMachines.d.ts +26 -26
  148. package/dist-esm/src/operationsInterfaces/sqlVirtualMachines.d.ts.map +1 -1
  149. package/dist-esm/src/pagingHelper.d.ts +13 -0
  150. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  151. package/dist-esm/src/pagingHelper.js +32 -0
  152. package/dist-esm/src/pagingHelper.js.map +1 -0
  153. package/dist-esm/src/sqlVirtualMachineManagementClient.d.ts +2 -1
  154. package/dist-esm/src/sqlVirtualMachineManagementClient.d.ts.map +1 -1
  155. package/dist-esm/src/sqlVirtualMachineManagementClient.js +7 -9
  156. package/dist-esm/src/sqlVirtualMachineManagementClient.js.map +1 -1
  157. package/dist-esm/test/sqlvirtualmachine_operations_test.spec.d.ts +4 -0
  158. package/dist-esm/test/sqlvirtualmachine_operations_test.spec.d.ts.map +1 -0
  159. package/dist-esm/test/sqlvirtualmachine_operations_test.spec.js +78 -0
  160. package/dist-esm/test/sqlvirtualmachine_operations_test.spec.js.map +1 -0
  161. package/package.json +22 -12
  162. package/review/arm-sqlvirtualmachine.api.md +134 -13
  163. package/src/index.ts +1 -0
  164. package/src/lroImpl.ts +31 -23
  165. package/src/models/index.ts +210 -25
  166. package/src/models/mappers.ts +340 -0
  167. package/src/models/parameters.ts +15 -2
  168. package/src/operations/availabilityGroupListeners.ts +81 -42
  169. package/src/operations/index.ts +1 -0
  170. package/src/operations/operations.ts +27 -11
  171. package/src/operations/sqlVirtualMachineGroups.ts +134 -61
  172. package/src/operations/sqlVirtualMachineTroubleshoot.ts +172 -0
  173. package/src/operations/sqlVirtualMachines.ts +312 -213
  174. package/src/operationsInterfaces/availabilityGroupListeners.ts +4 -4
  175. package/src/operationsInterfaces/index.ts +1 -0
  176. package/src/operationsInterfaces/sqlVirtualMachineGroups.ts +6 -6
  177. package/src/operationsInterfaces/sqlVirtualMachineTroubleshoot.ts +51 -0
  178. package/src/operationsInterfaces/sqlVirtualMachines.ts +57 -57
  179. package/src/pagingHelper.ts +39 -0
  180. package/src/sqlVirtualMachineManagementClient.ts +14 -9
  181. package/tsconfig.json +8 -2
  182. package/types/arm-sqlvirtualmachine.d.ts +254 -38
  183. package/types/tsdoc-metadata.json +1 -1
  184. package/dist-esm/test/sampleTest.d.ts +0 -2
  185. package/dist-esm/test/sampleTest.d.ts.map +0 -1
  186. package/dist-esm/test/sampleTest.js +0 -38
  187. package/dist-esm/test/sampleTest.js.map +0 -1
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
- import { PollerLike, PollOperationState } from "@azure/core-lro";
10
+ import { SimplePollerLike, OperationState } from "@azure/core-lro";
11
11
  import {
12
12
  AvailabilityGroupListener,
13
13
  AvailabilityGroupListenersListByGroupOptionalParams,
@@ -63,8 +63,8 @@ export interface AvailabilityGroupListeners {
63
63
  parameters: AvailabilityGroupListener,
64
64
  options?: AvailabilityGroupListenersCreateOrUpdateOptionalParams
65
65
  ): Promise<
66
- PollerLike<
67
- PollOperationState<AvailabilityGroupListenersCreateOrUpdateResponse>,
66
+ SimplePollerLike<
67
+ OperationState<AvailabilityGroupListenersCreateOrUpdateResponse>,
68
68
  AvailabilityGroupListenersCreateOrUpdateResponse
69
69
  >
70
70
  >;
@@ -97,7 +97,7 @@ export interface AvailabilityGroupListeners {
97
97
  sqlVirtualMachineGroupName: string,
98
98
  availabilityGroupListenerName: string,
99
99
  options?: AvailabilityGroupListenersDeleteOptionalParams
100
- ): Promise<PollerLike<PollOperationState<void>, void>>;
100
+ ): Promise<SimplePollerLike<OperationState<void>, void>>;
101
101
  /**
102
102
  * Deletes an availability group listener.
103
103
  * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
@@ -10,3 +10,4 @@ export * from "./availabilityGroupListeners";
10
10
  export * from "./operations";
11
11
  export * from "./sqlVirtualMachineGroups";
12
12
  export * from "./sqlVirtualMachines";
13
+ export * from "./sqlVirtualMachineTroubleshoot";
@@ -7,7 +7,7 @@
7
7
  */
8
8
 
9
9
  import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
- import { PollerLike, PollOperationState } from "@azure/core-lro";
10
+ import { SimplePollerLike, OperationState } from "@azure/core-lro";
11
11
  import {
12
12
  SqlVirtualMachineGroup,
13
13
  SqlVirtualMachineGroupsListByResourceGroupOptionalParams,
@@ -68,8 +68,8 @@ export interface SqlVirtualMachineGroups {
68
68
  parameters: SqlVirtualMachineGroup,
69
69
  options?: SqlVirtualMachineGroupsCreateOrUpdateOptionalParams
70
70
  ): Promise<
71
- PollerLike<
72
- PollOperationState<SqlVirtualMachineGroupsCreateOrUpdateResponse>,
71
+ SimplePollerLike<
72
+ OperationState<SqlVirtualMachineGroupsCreateOrUpdateResponse>,
73
73
  SqlVirtualMachineGroupsCreateOrUpdateResponse
74
74
  >
75
75
  >;
@@ -98,7 +98,7 @@ export interface SqlVirtualMachineGroups {
98
98
  resourceGroupName: string,
99
99
  sqlVirtualMachineGroupName: string,
100
100
  options?: SqlVirtualMachineGroupsDeleteOptionalParams
101
- ): Promise<PollerLike<PollOperationState<void>, void>>;
101
+ ): Promise<SimplePollerLike<OperationState<void>, void>>;
102
102
  /**
103
103
  * Deletes a SQL virtual machine group.
104
104
  * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
@@ -125,8 +125,8 @@ export interface SqlVirtualMachineGroups {
125
125
  parameters: SqlVirtualMachineGroupUpdate,
126
126
  options?: SqlVirtualMachineGroupsUpdateOptionalParams
127
127
  ): Promise<
128
- PollerLike<
129
- PollOperationState<SqlVirtualMachineGroupsUpdateResponse>,
128
+ SimplePollerLike<
129
+ OperationState<SqlVirtualMachineGroupsUpdateResponse>,
130
130
  SqlVirtualMachineGroupsUpdateResponse
131
131
  >
132
132
  >;
@@ -0,0 +1,51 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { SimplePollerLike, OperationState } from "@azure/core-lro";
10
+ import {
11
+ SqlVmTroubleshooting,
12
+ SqlVirtualMachineTroubleshootTroubleshootOptionalParams,
13
+ SqlVirtualMachineTroubleshootTroubleshootResponse
14
+ } from "../models";
15
+
16
+ /** Interface representing a SqlVirtualMachineTroubleshoot. */
17
+ export interface SqlVirtualMachineTroubleshoot {
18
+ /**
19
+ * Starts SQL virtual machine troubleshooting.
20
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
21
+ * value from the Azure Resource Manager API or the portal.
22
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
23
+ * @param parameters The SQL virtual machine troubleshooting entity.
24
+ * @param options The options parameters.
25
+ */
26
+ beginTroubleshoot(
27
+ resourceGroupName: string,
28
+ sqlVirtualMachineName: string,
29
+ parameters: SqlVmTroubleshooting,
30
+ options?: SqlVirtualMachineTroubleshootTroubleshootOptionalParams
31
+ ): Promise<
32
+ SimplePollerLike<
33
+ OperationState<SqlVirtualMachineTroubleshootTroubleshootResponse>,
34
+ SqlVirtualMachineTroubleshootTroubleshootResponse
35
+ >
36
+ >;
37
+ /**
38
+ * Starts SQL virtual machine troubleshooting.
39
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
40
+ * value from the Azure Resource Manager API or the portal.
41
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
42
+ * @param parameters The SQL virtual machine troubleshooting entity.
43
+ * @param options The options parameters.
44
+ */
45
+ beginTroubleshootAndWait(
46
+ resourceGroupName: string,
47
+ sqlVirtualMachineName: string,
48
+ parameters: SqlVmTroubleshooting,
49
+ options?: SqlVirtualMachineTroubleshootTroubleshootOptionalParams
50
+ ): Promise<SqlVirtualMachineTroubleshootTroubleshootResponse>;
51
+ }
@@ -7,14 +7,12 @@
7
7
  */
8
8
 
9
9
  import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
- import { PollerLike, PollOperationState } from "@azure/core-lro";
10
+ import { SimplePollerLike, OperationState } from "@azure/core-lro";
11
11
  import {
12
12
  SqlVirtualMachine,
13
13
  SqlVirtualMachinesListBySqlVmGroupOptionalParams,
14
14
  SqlVirtualMachinesListOptionalParams,
15
15
  SqlVirtualMachinesListByResourceGroupOptionalParams,
16
- SqlVirtualMachinesStartAssessmentOptionalParams,
17
- SqlVirtualMachinesRedeployOptionalParams,
18
16
  SqlVirtualMachinesGetOptionalParams,
19
17
  SqlVirtualMachinesGetResponse,
20
18
  SqlVirtualMachinesCreateOrUpdateOptionalParams,
@@ -22,7 +20,9 @@ import {
22
20
  SqlVirtualMachinesDeleteOptionalParams,
23
21
  SqlVirtualMachineUpdate,
24
22
  SqlVirtualMachinesUpdateOptionalParams,
25
- SqlVirtualMachinesUpdateResponse
23
+ SqlVirtualMachinesUpdateResponse,
24
+ SqlVirtualMachinesStartAssessmentOptionalParams,
25
+ SqlVirtualMachinesRedeployOptionalParams
26
26
  } from "../models";
27
27
 
28
28
  /// <reference lib="esnext.asynciterable" />
@@ -57,54 +57,6 @@ 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>;
84
- /**
85
- * Uninstalls and reinstalls the SQL Iaas Extension.
86
- * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
87
- * value from the Azure Resource Manager API or the portal.
88
- * @param sqlVirtualMachineName Name of the SQL virtual machine.
89
- * @param options The options parameters.
90
- */
91
- beginRedeploy(
92
- resourceGroupName: string,
93
- sqlVirtualMachineName: string,
94
- options?: SqlVirtualMachinesRedeployOptionalParams
95
- ): Promise<PollerLike<PollOperationState<void>, void>>;
96
- /**
97
- * Uninstalls and reinstalls the SQL Iaas Extension.
98
- * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
99
- * value from the Azure Resource Manager API or the portal.
100
- * @param sqlVirtualMachineName Name of the SQL virtual machine.
101
- * @param options The options parameters.
102
- */
103
- beginRedeployAndWait(
104
- resourceGroupName: string,
105
- sqlVirtualMachineName: string,
106
- options?: SqlVirtualMachinesRedeployOptionalParams
107
- ): Promise<void>;
108
60
  /**
109
61
  * Gets a SQL virtual machine.
110
62
  * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
@@ -131,8 +83,8 @@ export interface SqlVirtualMachines {
131
83
  parameters: SqlVirtualMachine,
132
84
  options?: SqlVirtualMachinesCreateOrUpdateOptionalParams
133
85
  ): Promise<
134
- PollerLike<
135
- PollOperationState<SqlVirtualMachinesCreateOrUpdateResponse>,
86
+ SimplePollerLike<
87
+ OperationState<SqlVirtualMachinesCreateOrUpdateResponse>,
136
88
  SqlVirtualMachinesCreateOrUpdateResponse
137
89
  >
138
90
  >;
@@ -161,7 +113,7 @@ export interface SqlVirtualMachines {
161
113
  resourceGroupName: string,
162
114
  sqlVirtualMachineName: string,
163
115
  options?: SqlVirtualMachinesDeleteOptionalParams
164
- ): Promise<PollerLike<PollOperationState<void>, void>>;
116
+ ): Promise<SimplePollerLike<OperationState<void>, void>>;
165
117
  /**
166
118
  * Deletes a SQL virtual machine.
167
119
  * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
@@ -188,8 +140,8 @@ export interface SqlVirtualMachines {
188
140
  parameters: SqlVirtualMachineUpdate,
189
141
  options?: SqlVirtualMachinesUpdateOptionalParams
190
142
  ): Promise<
191
- PollerLike<
192
- PollOperationState<SqlVirtualMachinesUpdateResponse>,
143
+ SimplePollerLike<
144
+ OperationState<SqlVirtualMachinesUpdateResponse>,
193
145
  SqlVirtualMachinesUpdateResponse
194
146
  >
195
147
  >;
@@ -207,4 +159,52 @@ export interface SqlVirtualMachines {
207
159
  parameters: SqlVirtualMachineUpdate,
208
160
  options?: SqlVirtualMachinesUpdateOptionalParams
209
161
  ): Promise<SqlVirtualMachinesUpdateResponse>;
162
+ /**
163
+ * Starts SQL best practices Assessment on SQL virtual machine.
164
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
165
+ * value from the Azure Resource Manager API or the portal.
166
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
167
+ * @param options The options parameters.
168
+ */
169
+ beginStartAssessment(
170
+ resourceGroupName: string,
171
+ sqlVirtualMachineName: string,
172
+ options?: SqlVirtualMachinesStartAssessmentOptionalParams
173
+ ): Promise<SimplePollerLike<OperationState<void>, void>>;
174
+ /**
175
+ * Starts SQL best practices Assessment on SQL virtual machine.
176
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
177
+ * value from the Azure Resource Manager API or the portal.
178
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
179
+ * @param options The options parameters.
180
+ */
181
+ beginStartAssessmentAndWait(
182
+ resourceGroupName: string,
183
+ sqlVirtualMachineName: string,
184
+ options?: SqlVirtualMachinesStartAssessmentOptionalParams
185
+ ): Promise<void>;
186
+ /**
187
+ * Uninstalls and reinstalls the SQL IaaS Extension.
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
+ beginRedeploy(
194
+ resourceGroupName: string,
195
+ sqlVirtualMachineName: string,
196
+ options?: SqlVirtualMachinesRedeployOptionalParams
197
+ ): Promise<SimplePollerLike<OperationState<void>, void>>;
198
+ /**
199
+ * Uninstalls and reinstalls the SQL IaaS Extension.
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
+ beginRedeployAndWait(
206
+ resourceGroupName: string,
207
+ sqlVirtualMachineName: string,
208
+ options?: SqlVirtualMachinesRedeployOptionalParams
209
+ ): Promise<void>;
210
210
  }
@@ -0,0 +1,39 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ export interface PageInfo {
10
+ continuationToken?: string;
11
+ }
12
+
13
+ const pageMap = new WeakMap<object, PageInfo>();
14
+
15
+ /**
16
+ * Given the last `.value` produced by the `byPage` iterator,
17
+ * returns a continuation token that can be used to begin paging from
18
+ * that point later.
19
+ * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
20
+ * @returns The continuation token that can be passed into byPage() during future calls.
21
+ */
22
+ export function getContinuationToken(page: unknown): string | undefined {
23
+ if (typeof page !== "object" || page === null) {
24
+ return undefined;
25
+ }
26
+ return pageMap.get(page)?.continuationToken;
27
+ }
28
+
29
+ export function setContinuationToken(
30
+ page: unknown,
31
+ continuationToken: string | undefined
32
+ ): void {
33
+ if (typeof page !== "object" || page === null || !continuationToken) {
34
+ return;
35
+ }
36
+ const pageInfo = pageMap.get(page) ?? {};
37
+ pageInfo.continuationToken = continuationToken;
38
+ pageMap.set(page, pageInfo);
39
+ }
@@ -18,13 +18,15 @@ import {
18
18
  AvailabilityGroupListenersImpl,
19
19
  OperationsImpl,
20
20
  SqlVirtualMachineGroupsImpl,
21
- SqlVirtualMachinesImpl
21
+ SqlVirtualMachinesImpl,
22
+ SqlVirtualMachineTroubleshootImpl
22
23
  } from "./operations";
23
24
  import {
24
25
  AvailabilityGroupListeners,
25
26
  Operations,
26
27
  SqlVirtualMachineGroups,
27
- SqlVirtualMachines
28
+ SqlVirtualMachines,
29
+ SqlVirtualMachineTroubleshoot
28
30
  } from "./operationsInterfaces";
29
31
  import { SqlVirtualMachineManagementClientOptionalParams } from "./models";
30
32
 
@@ -60,22 +62,19 @@ export class SqlVirtualMachineManagementClient extends coreClient.ServiceClient
60
62
  credential: credentials
61
63
  };
62
64
 
63
- const packageDetails = `azsdk-js-arm-sqlvirtualmachine/5.0.0-beta.6`;
65
+ const packageDetails = `azsdk-js-arm-sqlvirtualmachine/5.0.0-beta.8`;
64
66
  const userAgentPrefix =
65
67
  options.userAgentOptions && options.userAgentOptions.userAgentPrefix
66
68
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
67
69
  : `${packageDetails}`;
68
70
 
69
- if (!options.credentialScopes) {
70
- options.credentialScopes = ["https://management.azure.com/.default"];
71
- }
72
71
  const optionsWithDefaults = {
73
72
  ...defaults,
74
73
  ...options,
75
74
  userAgentOptions: {
76
75
  userAgentPrefix
77
76
  },
78
- baseUri:
77
+ endpoint:
79
78
  options.endpoint ?? options.baseUri ?? "https://management.azure.com"
80
79
  };
81
80
  super(optionsWithDefaults);
@@ -101,7 +100,9 @@ export class SqlVirtualMachineManagementClient extends coreClient.ServiceClient
101
100
  this.pipeline.addPolicy(
102
101
  coreRestPipeline.bearerTokenAuthenticationPolicy({
103
102
  credential: credentials,
104
- scopes: `${optionsWithDefaults.credentialScopes}`,
103
+ scopes:
104
+ optionsWithDefaults.credentialScopes ??
105
+ `${optionsWithDefaults.endpoint}/.default`,
105
106
  challengeCallbacks: {
106
107
  authorizeRequestOnChallenge:
107
108
  coreClient.authorizeRequestOnClaimChallenge
@@ -114,11 +115,14 @@ export class SqlVirtualMachineManagementClient extends coreClient.ServiceClient
114
115
 
115
116
  // Assigning values to Constant parameters
116
117
  this.$host = options.$host || "https://management.azure.com";
117
- this.apiVersion = options.apiVersion || "2022-07-01-preview";
118
+ this.apiVersion = options.apiVersion || "2022-08-01-preview";
118
119
  this.availabilityGroupListeners = new AvailabilityGroupListenersImpl(this);
119
120
  this.operations = new OperationsImpl(this);
120
121
  this.sqlVirtualMachineGroups = new SqlVirtualMachineGroupsImpl(this);
121
122
  this.sqlVirtualMachines = new SqlVirtualMachinesImpl(this);
123
+ this.sqlVirtualMachineTroubleshoot = new SqlVirtualMachineTroubleshootImpl(
124
+ this
125
+ );
122
126
  this.addCustomApiVersionPolicy(options.apiVersion);
123
127
  }
124
128
 
@@ -154,4 +158,5 @@ export class SqlVirtualMachineManagementClient extends coreClient.ServiceClient
154
158
  operations: Operations;
155
159
  sqlVirtualMachineGroups: SqlVirtualMachineGroups;
156
160
  sqlVirtualMachines: SqlVirtualMachines;
161
+ sqlVirtualMachineTroubleshoot: SqlVirtualMachineTroubleshoot;
157
162
  }
package/tsconfig.json CHANGED
@@ -15,11 +15,17 @@
15
15
  ],
16
16
  "declaration": true,
17
17
  "outDir": "./dist-esm",
18
- "importHelpers": true
18
+ "importHelpers": true,
19
+ "paths": {
20
+ "@azure/arm-sqlvirtualmachine": [
21
+ "./src/index"
22
+ ]
23
+ }
19
24
  },
20
25
  "include": [
21
26
  "./src/**/*.ts",
22
- "./test/**/*.ts"
27
+ "./test/**/*.ts",
28
+ "samples-dev/**/*.ts"
23
29
  ],
24
30
  "exclude": [
25
31
  "node_modules"