@azure/arm-sqlvirtualmachine 5.0.0-beta.2 → 5.0.0-beta.3

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 (46) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/LICENSE +1 -1
  3. package/README.md +11 -0
  4. package/dist/index.js +641 -81
  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/src/models/index.d.ts +233 -2
  9. package/dist-esm/src/models/index.d.ts.map +1 -1
  10. package/dist-esm/src/models/index.js +45 -0
  11. package/dist-esm/src/models/index.js.map +1 -1
  12. package/dist-esm/src/models/mappers.d.ts +7 -0
  13. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  14. package/dist-esm/src/models/mappers.js +333 -3
  15. package/dist-esm/src/models/mappers.js.map +1 -1
  16. package/dist-esm/src/models/parameters.d.ts +1 -1
  17. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  18. package/dist-esm/src/models/parameters.js +10 -10
  19. package/dist-esm/src/models/parameters.js.map +1 -1
  20. package/dist-esm/src/operations/availabilityGroupListeners.js +1 -1
  21. package/dist-esm/src/operations/availabilityGroupListeners.js.map +1 -1
  22. package/dist-esm/src/operations/operations.d.ts +2 -2
  23. package/dist-esm/src/operations/operations.js +2 -2
  24. package/dist-esm/src/operations/sqlVirtualMachines.d.ts +33 -1
  25. package/dist-esm/src/operations/sqlVirtualMachines.d.ts.map +1 -1
  26. package/dist-esm/src/operations/sqlVirtualMachines.js +129 -1
  27. package/dist-esm/src/operations/sqlVirtualMachines.js.map +1 -1
  28. package/dist-esm/src/operationsInterfaces/operations.d.ts +1 -1
  29. package/dist-esm/src/operationsInterfaces/sqlVirtualMachines.d.ts +33 -1
  30. package/dist-esm/src/operationsInterfaces/sqlVirtualMachines.d.ts.map +1 -1
  31. package/dist-esm/src/sqlVirtualMachineManagementClient.js +2 -2
  32. package/package.json +28 -10
  33. package/review/arm-sqlvirtualmachine.api.md +171 -1
  34. package/rollup.config.js +6 -72
  35. package/src/models/index.ts +258 -3
  36. package/src/models/mappers.ts +343 -1
  37. package/src/models/parameters.ts +11 -11
  38. package/src/operations/availabilityGroupListeners.ts +1 -1
  39. package/src/operations/operations.ts +2 -2
  40. package/src/operations/sqlVirtualMachines.ts +195 -1
  41. package/src/operationsInterfaces/operations.ts +1 -1
  42. package/src/operationsInterfaces/sqlVirtualMachines.ts +51 -1
  43. package/src/sqlVirtualMachineManagementClient.ts +2 -2
  44. package/tsconfig.json +12 -4
  45. package/types/arm-sqlvirtualmachine.d.ts +287 -3
  46. 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,88 @@ 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
+ return new LroEngine(lro, {
309
+ resumeFrom: options?.resumeFrom,
310
+ intervalInMs: options?.updateIntervalInMs
311
+ });
312
+ }
313
+
314
+ /**
315
+ * Uninstalls and reinstalls the SQL Iaas Extension.
316
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
317
+ * value from the Azure Resource Manager API or the portal.
318
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
319
+ * @param options The options parameters.
320
+ */
321
+ async beginRedeployAndWait(
322
+ resourceGroupName: string,
323
+ sqlVirtualMachineName: string,
324
+ options?: SqlVirtualMachinesRedeployOptionalParams
325
+ ): Promise<void> {
326
+ const poller = await this.beginRedeploy(
327
+ resourceGroupName,
328
+ sqlVirtualMachineName,
329
+ options
330
+ );
331
+ return poller.pollUntilDone();
332
+ }
333
+
250
334
  /**
251
335
  * Gets a SQL virtual machine.
252
336
  * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
@@ -547,6 +631,88 @@ export class SqlVirtualMachinesImpl implements SqlVirtualMachines {
547
631
  );
548
632
  }
549
633
 
634
+ /**
635
+ * Starts Assessment on SQL virtual machine.
636
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
637
+ * value from the Azure Resource Manager API or the portal.
638
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
639
+ * @param options The options parameters.
640
+ */
641
+ async beginStartAssessment(
642
+ resourceGroupName: string,
643
+ sqlVirtualMachineName: string,
644
+ options?: SqlVirtualMachinesStartAssessmentOptionalParams
645
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
646
+ const directSendOperation = async (
647
+ args: coreClient.OperationArguments,
648
+ spec: coreClient.OperationSpec
649
+ ): Promise<void> => {
650
+ return this.client.sendOperationRequest(args, spec);
651
+ };
652
+ const sendOperation = async (
653
+ args: coreClient.OperationArguments,
654
+ spec: coreClient.OperationSpec
655
+ ) => {
656
+ let currentRawResponse:
657
+ | coreClient.FullOperationResponse
658
+ | undefined = undefined;
659
+ const providedCallback = args.options?.onResponse;
660
+ const callback: coreClient.RawResponseCallback = (
661
+ rawResponse: coreClient.FullOperationResponse,
662
+ flatResponse: unknown
663
+ ) => {
664
+ currentRawResponse = rawResponse;
665
+ providedCallback?.(rawResponse, flatResponse);
666
+ };
667
+ const updatedArgs = {
668
+ ...args,
669
+ options: {
670
+ ...args.options,
671
+ onResponse: callback
672
+ }
673
+ };
674
+ const flatResponse = await directSendOperation(updatedArgs, spec);
675
+ return {
676
+ flatResponse,
677
+ rawResponse: {
678
+ statusCode: currentRawResponse!.status,
679
+ body: currentRawResponse!.parsedBody,
680
+ headers: currentRawResponse!.headers.toJSON()
681
+ }
682
+ };
683
+ };
684
+
685
+ const lro = new LroImpl(
686
+ sendOperation,
687
+ { resourceGroupName, sqlVirtualMachineName, options },
688
+ startAssessmentOperationSpec
689
+ );
690
+ return new LroEngine(lro, {
691
+ resumeFrom: options?.resumeFrom,
692
+ intervalInMs: options?.updateIntervalInMs
693
+ });
694
+ }
695
+
696
+ /**
697
+ * Starts Assessment on SQL virtual machine.
698
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
699
+ * value from the Azure Resource Manager API or the portal.
700
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
701
+ * @param options The options parameters.
702
+ */
703
+ async beginStartAssessmentAndWait(
704
+ resourceGroupName: string,
705
+ sqlVirtualMachineName: string,
706
+ options?: SqlVirtualMachinesStartAssessmentOptionalParams
707
+ ): Promise<void> {
708
+ const poller = await this.beginStartAssessment(
709
+ resourceGroupName,
710
+ sqlVirtualMachineName,
711
+ options
712
+ );
713
+ return poller.pollUntilDone();
714
+ }
715
+
550
716
  /**
551
717
  * ListBySqlVmGroupNext
552
718
  * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
@@ -638,6 +804,20 @@ const listOperationSpec: coreClient.OperationSpec = {
638
804
  headerParameters: [Parameters.accept],
639
805
  serializer
640
806
  };
807
+ const redeployOperationSpec: coreClient.OperationSpec = {
808
+ path:
809
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/redeploy",
810
+ httpMethod: "POST",
811
+ responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },
812
+ queryParameters: [Parameters.apiVersion],
813
+ urlParameters: [
814
+ Parameters.$host,
815
+ Parameters.resourceGroupName,
816
+ Parameters.subscriptionId,
817
+ Parameters.sqlVirtualMachineName
818
+ ],
819
+ serializer
820
+ };
641
821
  const getOperationSpec: coreClient.OperationSpec = {
642
822
  path:
643
823
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}",
@@ -648,7 +828,7 @@ const getOperationSpec: coreClient.OperationSpec = {
648
828
  },
649
829
  default: {}
650
830
  },
651
- queryParameters: [Parameters.apiVersion, Parameters.expand],
831
+ queryParameters: [Parameters.expand, Parameters.apiVersion],
652
832
  urlParameters: [
653
833
  Parameters.$host,
654
834
  Parameters.resourceGroupName,
@@ -753,6 +933,20 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
753
933
  headerParameters: [Parameters.accept],
754
934
  serializer
755
935
  };
936
+ const startAssessmentOperationSpec: coreClient.OperationSpec = {
937
+ path:
938
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/startAssessment",
939
+ httpMethod: "POST",
940
+ responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },
941
+ queryParameters: [Parameters.apiVersion],
942
+ urlParameters: [
943
+ Parameters.$host,
944
+ Parameters.resourceGroupName,
945
+ Parameters.subscriptionId,
946
+ Parameters.sqlVirtualMachineName
947
+ ],
948
+ serializer
949
+ };
756
950
  const listBySqlVmGroupNextOperationSpec: coreClient.OperationSpec = {
757
951
  path: "{nextLink}",
758
952
  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
  }
@@ -54,7 +54,7 @@ export class SqlVirtualMachineManagementClient extends coreClient.ServiceClient
54
54
  credential: credentials
55
55
  };
56
56
 
57
- const packageDetails = `azsdk-js-arm-sqlvirtualmachine/5.0.0-beta.2`;
57
+ const packageDetails = `azsdk-js-arm-sqlvirtualmachine/5.0.0-beta.3`;
58
58
  const userAgentPrefix =
59
59
  options.userAgentOptions && options.userAgentOptions.userAgentPrefix
60
60
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
@@ -77,7 +77,7 @@ export class SqlVirtualMachineManagementClient extends coreClient.ServiceClient
77
77
 
78
78
  // Assigning values to Constant parameters
79
79
  this.$host = options.$host || "https://management.azure.com";
80
- this.apiVersion = options.apiVersion || "2017-03-01-preview";
80
+ this.apiVersion = options.apiVersion || "2021-11-01-preview";
81
81
  this.availabilityGroupListeners = new AvailabilityGroupListenersImpl(this);
82
82
  this.operations = new OperationsImpl(this);
83
83
  this.sqlVirtualMachineGroups = new SqlVirtualMachineGroupsImpl(this);
package/tsconfig.json CHANGED
@@ -9,11 +9,19 @@
9
9
  "esModuleInterop": true,
10
10
  "allowSyntheticDefaultImports": true,
11
11
  "forceConsistentCasingInFileNames": true,
12
- "lib": ["es6", "dom"],
12
+ "lib": [
13
+ "es6",
14
+ "dom"
15
+ ],
13
16
  "declaration": true,
14
17
  "outDir": "./dist-esm",
15
18
  "importHelpers": true
16
19
  },
17
- "include": ["./src/**/*.ts", "./test/**/*.ts"],
18
- "exclude": ["node_modules"]
19
- }
20
+ "include": [
21
+ "./src/**/*.ts",
22
+ "./test/**/*.ts"
23
+ ],
24
+ "exclude": [
25
+ "node_modules"
26
+ ]
27
+ }