@azure/arm-sqlvirtualmachine 5.0.0-alpha.20220208.1 → 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 (45) hide show
  1. package/CHANGELOG.md +3 -13
  2. package/LICENSE +1 -1
  3. package/README.md +11 -0
  4. package/dist/index.js +529 -19
  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 +14 -6
  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
package/dist/index.js CHANGED
@@ -33,6 +33,39 @@ var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
33
33
  * Code generated by Microsoft (R) AutoRest Code Generator.
34
34
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
35
35
  */
36
+ /** Known values of {@link Role} that the service accepts. */
37
+ exports.KnownRole = void 0;
38
+ (function (KnownRole) {
39
+ KnownRole["Primary"] = "PRIMARY";
40
+ KnownRole["Secondary"] = "SECONDARY";
41
+ })(exports.KnownRole || (exports.KnownRole = {}));
42
+ /** Known values of {@link Commit} that the service accepts. */
43
+ exports.KnownCommit = void 0;
44
+ (function (KnownCommit) {
45
+ KnownCommit["SynchronousCommit"] = "SYNCHRONOUS_COMMIT";
46
+ KnownCommit["AsynchronousCommit"] = "ASYNCHRONOUS_COMMIT";
47
+ })(exports.KnownCommit || (exports.KnownCommit = {}));
48
+ /** Known values of {@link Failover} that the service accepts. */
49
+ exports.KnownFailover = void 0;
50
+ (function (KnownFailover) {
51
+ KnownFailover["Automatic"] = "AUTOMATIC";
52
+ KnownFailover["Manual"] = "MANUAL";
53
+ })(exports.KnownFailover || (exports.KnownFailover = {}));
54
+ /** Known values of {@link ReadableSecondary} that the service accepts. */
55
+ exports.KnownReadableSecondary = void 0;
56
+ (function (KnownReadableSecondary) {
57
+ KnownReadableSecondary["NO"] = "NO";
58
+ KnownReadableSecondary["ALL"] = "ALL";
59
+ KnownReadableSecondary["ReadOnly"] = "READ_ONLY";
60
+ })(exports.KnownReadableSecondary || (exports.KnownReadableSecondary = {}));
61
+ /** Known values of {@link CreatedByType} that the service accepts. */
62
+ exports.KnownCreatedByType = void 0;
63
+ (function (KnownCreatedByType) {
64
+ KnownCreatedByType["User"] = "User";
65
+ KnownCreatedByType["Application"] = "Application";
66
+ KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
67
+ KnownCreatedByType["Key"] = "Key";
68
+ })(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
36
69
  /** Known values of {@link OperationOrigin} that the service accepts. */
37
70
  exports.KnownOperationOrigin = void 0;
38
71
  (function (KnownOperationOrigin) {
@@ -63,6 +96,7 @@ exports.KnownClusterConfiguration = void 0;
63
96
  /** Known values of {@link IdentityType} that the service accepts. */
64
97
  exports.KnownIdentityType = void 0;
65
98
  (function (KnownIdentityType) {
99
+ KnownIdentityType["None"] = "None";
66
100
  KnownIdentityType["SystemAssigned"] = "SystemAssigned";
67
101
  })(exports.KnownIdentityType || (exports.KnownIdentityType = {}));
68
102
  /** Known values of {@link SqlServerLicenseType} that the service accepts. */
@@ -100,6 +134,17 @@ exports.KnownFullBackupFrequencyType = void 0;
100
134
  KnownFullBackupFrequencyType["Daily"] = "Daily";
101
135
  KnownFullBackupFrequencyType["Weekly"] = "Weekly";
102
136
  })(exports.KnownFullBackupFrequencyType || (exports.KnownFullBackupFrequencyType = {}));
137
+ /** Known values of {@link DaysOfWeek} that the service accepts. */
138
+ exports.KnownDaysOfWeek = void 0;
139
+ (function (KnownDaysOfWeek) {
140
+ KnownDaysOfWeek["Monday"] = "Monday";
141
+ KnownDaysOfWeek["Tuesday"] = "Tuesday";
142
+ KnownDaysOfWeek["Wednesday"] = "Wednesday";
143
+ KnownDaysOfWeek["Thursday"] = "Thursday";
144
+ KnownDaysOfWeek["Friday"] = "Friday";
145
+ KnownDaysOfWeek["Saturday"] = "Saturday";
146
+ KnownDaysOfWeek["Sunday"] = "Sunday";
147
+ })(exports.KnownDaysOfWeek || (exports.KnownDaysOfWeek = {}));
103
148
  /** Known values of {@link ConnectivityType} that the service accepts. */
104
149
  exports.KnownConnectivityType = void 0;
105
150
  (function (KnownConnectivityType) {
@@ -200,6 +245,109 @@ const PrivateIPAddress = {
200
245
  }
201
246
  }
202
247
  };
248
+ const AgConfiguration = {
249
+ type: {
250
+ name: "Composite",
251
+ className: "AgConfiguration",
252
+ modelProperties: {
253
+ replicas: {
254
+ serializedName: "replicas",
255
+ readOnly: true,
256
+ type: {
257
+ name: "Sequence",
258
+ element: {
259
+ type: {
260
+ name: "Composite",
261
+ className: "AgReplica"
262
+ }
263
+ }
264
+ }
265
+ }
266
+ }
267
+ }
268
+ };
269
+ const AgReplica = {
270
+ type: {
271
+ name: "Composite",
272
+ className: "AgReplica",
273
+ modelProperties: {
274
+ sqlVirtualMachineInstanceId: {
275
+ serializedName: "sqlVirtualMachineInstanceId",
276
+ type: {
277
+ name: "String"
278
+ }
279
+ },
280
+ role: {
281
+ serializedName: "role",
282
+ type: {
283
+ name: "String"
284
+ }
285
+ },
286
+ commit: {
287
+ serializedName: "commit",
288
+ type: {
289
+ name: "String"
290
+ }
291
+ },
292
+ failover: {
293
+ serializedName: "failover",
294
+ type: {
295
+ name: "String"
296
+ }
297
+ },
298
+ readableSecondary: {
299
+ serializedName: "readableSecondary",
300
+ type: {
301
+ name: "String"
302
+ }
303
+ }
304
+ }
305
+ }
306
+ };
307
+ const SystemData = {
308
+ type: {
309
+ name: "Composite",
310
+ className: "SystemData",
311
+ modelProperties: {
312
+ createdBy: {
313
+ serializedName: "createdBy",
314
+ type: {
315
+ name: "String"
316
+ }
317
+ },
318
+ createdByType: {
319
+ serializedName: "createdByType",
320
+ type: {
321
+ name: "String"
322
+ }
323
+ },
324
+ createdAt: {
325
+ serializedName: "createdAt",
326
+ type: {
327
+ name: "DateTime"
328
+ }
329
+ },
330
+ lastModifiedBy: {
331
+ serializedName: "lastModifiedBy",
332
+ type: {
333
+ name: "String"
334
+ }
335
+ },
336
+ lastModifiedByType: {
337
+ serializedName: "lastModifiedByType",
338
+ type: {
339
+ name: "String"
340
+ }
341
+ },
342
+ lastModifiedAt: {
343
+ serializedName: "lastModifiedAt",
344
+ type: {
345
+ name: "DateTime"
346
+ }
347
+ }
348
+ }
349
+ }
350
+ };
203
351
  const Resource = {
204
352
  type: {
205
353
  name: "Composite",
@@ -611,6 +759,12 @@ const AutoBackupSettings = {
611
759
  name: "String"
612
760
  }
613
761
  },
762
+ storageContainerName: {
763
+ serializedName: "storageContainerName",
764
+ type: {
765
+ name: "String"
766
+ }
767
+ },
614
768
  storageAccessKey: {
615
769
  serializedName: "storageAccessKey",
616
770
  type: {
@@ -641,6 +795,17 @@ const AutoBackupSettings = {
641
795
  name: "String"
642
796
  }
643
797
  },
798
+ daysOfWeek: {
799
+ serializedName: "daysOfWeek",
800
+ type: {
801
+ name: "Sequence",
802
+ element: {
803
+ type: {
804
+ name: "String"
805
+ }
806
+ }
807
+ }
808
+ },
644
809
  fullBackupStartTime: {
645
810
  serializedName: "fullBackupStartTime",
646
811
  type: {
@@ -732,6 +897,13 @@ const ServerConfigurationsManagementSettings = {
732
897
  name: "Composite",
733
898
  className: "AdditionalFeaturesServerConfigurations"
734
899
  }
900
+ },
901
+ sqlInstanceSettings: {
902
+ serializedName: "sqlInstanceSettings",
903
+ type: {
904
+ name: "Composite",
905
+ className: "SQLInstanceSettings"
906
+ }
735
907
  }
736
908
  }
737
909
  }
@@ -822,6 +994,44 @@ const AdditionalFeaturesServerConfigurations = {
822
994
  }
823
995
  }
824
996
  };
997
+ const SQLInstanceSettings = {
998
+ type: {
999
+ name: "Composite",
1000
+ className: "SQLInstanceSettings",
1001
+ modelProperties: {
1002
+ collation: {
1003
+ serializedName: "collation",
1004
+ type: {
1005
+ name: "String"
1006
+ }
1007
+ },
1008
+ maxDop: {
1009
+ serializedName: "maxDop",
1010
+ type: {
1011
+ name: "Number"
1012
+ }
1013
+ },
1014
+ isOptimizeForAdHocWorkloadsEnabled: {
1015
+ serializedName: "isOptimizeForAdHocWorkloadsEnabled",
1016
+ type: {
1017
+ name: "Boolean"
1018
+ }
1019
+ },
1020
+ minServerMemoryMB: {
1021
+ serializedName: "minServerMemoryMB",
1022
+ type: {
1023
+ name: "Number"
1024
+ }
1025
+ },
1026
+ maxServerMemoryMB: {
1027
+ serializedName: "maxServerMemoryMB",
1028
+ type: {
1029
+ name: "Number"
1030
+ }
1031
+ }
1032
+ }
1033
+ }
1034
+ };
825
1035
  const StorageConfigurationSettings = {
826
1036
  type: {
827
1037
  name: "Composite",
@@ -845,7 +1055,13 @@ const StorageConfigurationSettings = {
845
1055
  serializedName: "sqlTempDbSettings",
846
1056
  type: {
847
1057
  name: "Composite",
848
- className: "SQLStorageSettings"
1058
+ className: "SQLTempDbSettings"
1059
+ }
1060
+ },
1061
+ sqlSystemDbOnDataDisk: {
1062
+ serializedName: "sqlSystemDbOnDataDisk",
1063
+ type: {
1064
+ name: "Boolean"
849
1065
  }
850
1066
  },
851
1067
  diskConfigurationType: {
@@ -888,6 +1104,135 @@ const SQLStorageSettings = {
888
1104
  }
889
1105
  }
890
1106
  };
1107
+ const SQLTempDbSettings = {
1108
+ type: {
1109
+ name: "Composite",
1110
+ className: "SQLTempDbSettings",
1111
+ modelProperties: {
1112
+ dataFileSize: {
1113
+ serializedName: "dataFileSize",
1114
+ type: {
1115
+ name: "Number"
1116
+ }
1117
+ },
1118
+ dataGrowth: {
1119
+ serializedName: "dataGrowth",
1120
+ type: {
1121
+ name: "Number"
1122
+ }
1123
+ },
1124
+ logFileSize: {
1125
+ serializedName: "logFileSize",
1126
+ type: {
1127
+ name: "Number"
1128
+ }
1129
+ },
1130
+ logGrowth: {
1131
+ serializedName: "logGrowth",
1132
+ type: {
1133
+ name: "Number"
1134
+ }
1135
+ },
1136
+ dataFileCount: {
1137
+ serializedName: "dataFileCount",
1138
+ type: {
1139
+ name: "Number"
1140
+ }
1141
+ },
1142
+ luns: {
1143
+ serializedName: "luns",
1144
+ type: {
1145
+ name: "Sequence",
1146
+ element: {
1147
+ type: {
1148
+ name: "Number"
1149
+ }
1150
+ }
1151
+ }
1152
+ },
1153
+ defaultFilePath: {
1154
+ serializedName: "defaultFilePath",
1155
+ type: {
1156
+ name: "String"
1157
+ }
1158
+ }
1159
+ }
1160
+ }
1161
+ };
1162
+ const AssessmentSettings = {
1163
+ type: {
1164
+ name: "Composite",
1165
+ className: "AssessmentSettings",
1166
+ modelProperties: {
1167
+ enable: {
1168
+ serializedName: "enable",
1169
+ type: {
1170
+ name: "Boolean"
1171
+ }
1172
+ },
1173
+ runImmediately: {
1174
+ serializedName: "runImmediately",
1175
+ type: {
1176
+ name: "Boolean"
1177
+ }
1178
+ },
1179
+ schedule: {
1180
+ serializedName: "schedule",
1181
+ type: {
1182
+ name: "Composite",
1183
+ className: "Schedule"
1184
+ }
1185
+ }
1186
+ }
1187
+ }
1188
+ };
1189
+ const Schedule = {
1190
+ type: {
1191
+ name: "Composite",
1192
+ className: "Schedule",
1193
+ modelProperties: {
1194
+ enable: {
1195
+ serializedName: "enable",
1196
+ type: {
1197
+ name: "Boolean"
1198
+ }
1199
+ },
1200
+ weeklyInterval: {
1201
+ serializedName: "weeklyInterval",
1202
+ type: {
1203
+ name: "Number"
1204
+ }
1205
+ },
1206
+ monthlyOccurrence: {
1207
+ serializedName: "monthlyOccurrence",
1208
+ type: {
1209
+ name: "Number"
1210
+ }
1211
+ },
1212
+ dayOfWeek: {
1213
+ serializedName: "dayOfWeek",
1214
+ type: {
1215
+ name: "Enum",
1216
+ allowedValues: [
1217
+ "Monday",
1218
+ "Tuesday",
1219
+ "Wednesday",
1220
+ "Thursday",
1221
+ "Friday",
1222
+ "Saturday",
1223
+ "Sunday"
1224
+ ]
1225
+ }
1226
+ },
1227
+ startTime: {
1228
+ serializedName: "startTime",
1229
+ type: {
1230
+ name: "String"
1231
+ }
1232
+ }
1233
+ }
1234
+ }
1235
+ };
891
1236
  const SqlVirtualMachineUpdate = {
892
1237
  type: {
893
1238
  name: "Composite",
@@ -933,7 +1278,13 @@ const AvailabilityGroupListener = {
933
1278
  type: {
934
1279
  name: "Composite",
935
1280
  className: "AvailabilityGroupListener",
936
- modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { provisioningState: {
1281
+ modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { systemData: {
1282
+ serializedName: "systemData",
1283
+ type: {
1284
+ name: "Composite",
1285
+ className: "SystemData"
1286
+ }
1287
+ }, provisioningState: {
937
1288
  serializedName: "properties.provisioningState",
938
1289
  readOnly: true,
939
1290
  type: {
@@ -965,6 +1316,12 @@ const AvailabilityGroupListener = {
965
1316
  type: {
966
1317
  name: "Number"
967
1318
  }
1319
+ }, availabilityGroupConfiguration: {
1320
+ serializedName: "properties.availabilityGroupConfiguration",
1321
+ type: {
1322
+ name: "Composite",
1323
+ className: "AgConfiguration"
1324
+ }
968
1325
  } })
969
1326
  }
970
1327
  };
@@ -972,7 +1329,13 @@ const SqlVirtualMachineGroup = {
972
1329
  type: {
973
1330
  name: "Composite",
974
1331
  className: "SqlVirtualMachineGroup",
975
- modelProperties: Object.assign(Object.assign({}, TrackedResource.type.modelProperties), { provisioningState: {
1332
+ modelProperties: Object.assign(Object.assign({}, TrackedResource.type.modelProperties), { systemData: {
1333
+ serializedName: "systemData",
1334
+ type: {
1335
+ name: "Composite",
1336
+ className: "SystemData"
1337
+ }
1338
+ }, provisioningState: {
976
1339
  serializedName: "properties.provisioningState",
977
1340
  readOnly: true,
978
1341
  type: {
@@ -1025,6 +1388,12 @@ const SqlVirtualMachine = {
1025
1388
  name: "Composite",
1026
1389
  className: "ResourceIdentity"
1027
1390
  }
1391
+ }, systemData: {
1392
+ serializedName: "systemData",
1393
+ type: {
1394
+ name: "Composite",
1395
+ className: "SystemData"
1396
+ }
1028
1397
  }, virtualMachineResourceId: {
1029
1398
  serializedName: "properties.virtualMachineResourceId",
1030
1399
  type: {
@@ -1097,6 +1466,12 @@ const SqlVirtualMachine = {
1097
1466
  name: "Composite",
1098
1467
  className: "StorageConfigurationSettings"
1099
1468
  }
1469
+ }, assessmentSettings: {
1470
+ serializedName: "properties.assessmentSettings",
1471
+ type: {
1472
+ name: "Composite",
1473
+ className: "AssessmentSettings"
1474
+ }
1100
1475
  } })
1101
1476
  }
1102
1477
  };
@@ -1105,6 +1480,9 @@ var Mappers = /*#__PURE__*/Object.freeze({
1105
1480
  __proto__: null,
1106
1481
  LoadBalancerConfiguration: LoadBalancerConfiguration,
1107
1482
  PrivateIPAddress: PrivateIPAddress,
1483
+ AgConfiguration: AgConfiguration,
1484
+ AgReplica: AgReplica,
1485
+ SystemData: SystemData,
1108
1486
  Resource: Resource,
1109
1487
  AvailabilityGroupListenerListResult: AvailabilityGroupListenerListResult,
1110
1488
  OperationListResult: OperationListResult,
@@ -1124,8 +1502,12 @@ var Mappers = /*#__PURE__*/Object.freeze({
1124
1502
  SqlWorkloadTypeUpdateSettings: SqlWorkloadTypeUpdateSettings,
1125
1503
  SqlStorageUpdateSettings: SqlStorageUpdateSettings,
1126
1504
  AdditionalFeaturesServerConfigurations: AdditionalFeaturesServerConfigurations,
1505
+ SQLInstanceSettings: SQLInstanceSettings,
1127
1506
  StorageConfigurationSettings: StorageConfigurationSettings,
1128
1507
  SQLStorageSettings: SQLStorageSettings,
1508
+ SQLTempDbSettings: SQLTempDbSettings,
1509
+ AssessmentSettings: AssessmentSettings,
1510
+ Schedule: Schedule,
1129
1511
  SqlVirtualMachineUpdate: SqlVirtualMachineUpdate,
1130
1512
  ProxyResource: ProxyResource,
1131
1513
  TrackedResource: TrackedResource,
@@ -1193,6 +1575,15 @@ const availabilityGroupListenerName = {
1193
1575
  }
1194
1576
  }
1195
1577
  };
1578
+ const expand = {
1579
+ parameterPath: ["options", "expand"],
1580
+ mapper: {
1581
+ serializedName: "$expand",
1582
+ type: {
1583
+ name: "String"
1584
+ }
1585
+ }
1586
+ };
1196
1587
  const subscriptionId = {
1197
1588
  parameterPath: "subscriptionId",
1198
1589
  mapper: {
@@ -1206,7 +1597,7 @@ const subscriptionId = {
1206
1597
  const apiVersion = {
1207
1598
  parameterPath: "apiVersion",
1208
1599
  mapper: {
1209
- defaultValue: "2017-03-01-preview",
1600
+ defaultValue: "2021-11-01-preview",
1210
1601
  isConstant: true,
1211
1602
  serializedName: "api-version",
1212
1603
  type: {
@@ -1258,15 +1649,6 @@ const sqlVirtualMachineName = {
1258
1649
  }
1259
1650
  }
1260
1651
  };
1261
- const expand = {
1262
- parameterPath: ["options", "expand"],
1263
- mapper: {
1264
- serializedName: "$expand",
1265
- type: {
1266
- name: "String"
1267
- }
1268
- }
1269
- };
1270
1652
  const parameters3 = {
1271
1653
  parameterPath: "parameters",
1272
1654
  mapper: SqlVirtualMachine
@@ -1540,7 +1922,7 @@ const getOperationSpec$2 = {
1540
1922
  },
1541
1923
  default: {}
1542
1924
  },
1543
- queryParameters: [apiVersion],
1925
+ queryParameters: [expand, apiVersion],
1544
1926
  urlParameters: [
1545
1927
  $host,
1546
1928
  resourceGroupName,
@@ -1654,7 +2036,7 @@ class OperationsImpl {
1654
2036
  this.client = client;
1655
2037
  }
1656
2038
  /**
1657
- * Lists all of the available SQL Rest API operations.
2039
+ * Lists all of the available SQL Virtual Machine Rest API operations.
1658
2040
  * @param options The options parameters.
1659
2041
  */
1660
2042
  list(options) {
@@ -1702,7 +2084,7 @@ class OperationsImpl {
1702
2084
  });
1703
2085
  }
1704
2086
  /**
1705
- * Lists all of the available SQL Rest API operations.
2087
+ * Lists all of the available SQL Virtual Machine Rest API operations.
1706
2088
  * @param options The options parameters.
1707
2089
  */
1708
2090
  _list(options) {
@@ -2412,6 +2794,57 @@ class SqlVirtualMachinesImpl {
2412
2794
  _list(options) {
2413
2795
  return this.client.sendOperationRequest({ options }, listOperationSpec);
2414
2796
  }
2797
+ /**
2798
+ * Uninstalls and reinstalls the SQL Iaas Extension.
2799
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
2800
+ * value from the Azure Resource Manager API or the portal.
2801
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
2802
+ * @param options The options parameters.
2803
+ */
2804
+ beginRedeploy(resourceGroupName, sqlVirtualMachineName, options) {
2805
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2806
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2807
+ return this.client.sendOperationRequest(args, spec);
2808
+ });
2809
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2810
+ var _a;
2811
+ let currentRawResponse = undefined;
2812
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2813
+ const callback = (rawResponse, flatResponse) => {
2814
+ currentRawResponse = rawResponse;
2815
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2816
+ };
2817
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2818
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2819
+ return {
2820
+ flatResponse,
2821
+ rawResponse: {
2822
+ statusCode: currentRawResponse.status,
2823
+ body: currentRawResponse.parsedBody,
2824
+ headers: currentRawResponse.headers.toJSON()
2825
+ }
2826
+ };
2827
+ });
2828
+ const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineName, options }, redeployOperationSpec);
2829
+ return new coreLro.LroEngine(lro, {
2830
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2831
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2832
+ });
2833
+ });
2834
+ }
2835
+ /**
2836
+ * Uninstalls and reinstalls the SQL Iaas Extension.
2837
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
2838
+ * value from the Azure Resource Manager API or the portal.
2839
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
2840
+ * @param options The options parameters.
2841
+ */
2842
+ beginRedeployAndWait(resourceGroupName, sqlVirtualMachineName, options) {
2843
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2844
+ const poller = yield this.beginRedeploy(resourceGroupName, sqlVirtualMachineName, options);
2845
+ return poller.pollUntilDone();
2846
+ });
2847
+ }
2415
2848
  /**
2416
2849
  * Gets a SQL virtual machine.
2417
2850
  * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
@@ -2588,6 +3021,57 @@ class SqlVirtualMachinesImpl {
2588
3021
  _listByResourceGroup(resourceGroupName, options) {
2589
3022
  return this.client.sendOperationRequest({ resourceGroupName, options }, listByResourceGroupOperationSpec);
2590
3023
  }
3024
+ /**
3025
+ * Starts Assessment on SQL virtual machine.
3026
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
3027
+ * value from the Azure Resource Manager API or the portal.
3028
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
3029
+ * @param options The options parameters.
3030
+ */
3031
+ beginStartAssessment(resourceGroupName, sqlVirtualMachineName, options) {
3032
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3033
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3034
+ return this.client.sendOperationRequest(args, spec);
3035
+ });
3036
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
3037
+ var _a;
3038
+ let currentRawResponse = undefined;
3039
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
3040
+ const callback = (rawResponse, flatResponse) => {
3041
+ currentRawResponse = rawResponse;
3042
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
3043
+ };
3044
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
3045
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
3046
+ return {
3047
+ flatResponse,
3048
+ rawResponse: {
3049
+ statusCode: currentRawResponse.status,
3050
+ body: currentRawResponse.parsedBody,
3051
+ headers: currentRawResponse.headers.toJSON()
3052
+ }
3053
+ };
3054
+ });
3055
+ const lro = new LroImpl(sendOperation, { resourceGroupName, sqlVirtualMachineName, options }, startAssessmentOperationSpec);
3056
+ return new coreLro.LroEngine(lro, {
3057
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
3058
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
3059
+ });
3060
+ });
3061
+ }
3062
+ /**
3063
+ * Starts Assessment on SQL virtual machine.
3064
+ * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
3065
+ * value from the Azure Resource Manager API or the portal.
3066
+ * @param sqlVirtualMachineName Name of the SQL virtual machine.
3067
+ * @param options The options parameters.
3068
+ */
3069
+ beginStartAssessmentAndWait(resourceGroupName, sqlVirtualMachineName, options) {
3070
+ return tslib.__awaiter(this, void 0, void 0, function* () {
3071
+ const poller = yield this.beginStartAssessment(resourceGroupName, sqlVirtualMachineName, options);
3072
+ return poller.pollUntilDone();
3073
+ });
3074
+ }
2591
3075
  /**
2592
3076
  * ListBySqlVmGroupNext
2593
3077
  * @param resourceGroupName Name of the resource group that contains the resource. You can obtain this
@@ -2653,6 +3137,19 @@ const listOperationSpec = {
2653
3137
  headerParameters: [accept],
2654
3138
  serializer
2655
3139
  };
3140
+ const redeployOperationSpec = {
3141
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/redeploy",
3142
+ httpMethod: "POST",
3143
+ responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },
3144
+ queryParameters: [apiVersion],
3145
+ urlParameters: [
3146
+ $host,
3147
+ resourceGroupName,
3148
+ subscriptionId,
3149
+ sqlVirtualMachineName
3150
+ ],
3151
+ serializer
3152
+ };
2656
3153
  const getOperationSpec = {
2657
3154
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}",
2658
3155
  httpMethod: "GET",
@@ -2662,7 +3159,7 @@ const getOperationSpec = {
2662
3159
  },
2663
3160
  default: {}
2664
3161
  },
2665
- queryParameters: [apiVersion, expand],
3162
+ queryParameters: [expand, apiVersion],
2666
3163
  urlParameters: [
2667
3164
  $host,
2668
3165
  resourceGroupName,
@@ -2763,6 +3260,19 @@ const listByResourceGroupOperationSpec = {
2763
3260
  headerParameters: [accept],
2764
3261
  serializer
2765
3262
  };
3263
+ const startAssessmentOperationSpec = {
3264
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/{sqlVirtualMachineName}/startAssessment",
3265
+ httpMethod: "POST",
3266
+ responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} },
3267
+ queryParameters: [apiVersion],
3268
+ urlParameters: [
3269
+ $host,
3270
+ resourceGroupName,
3271
+ subscriptionId,
3272
+ sqlVirtualMachineName
3273
+ ],
3274
+ serializer
3275
+ };
2766
3276
  const listBySqlVmGroupNextOperationSpec = {
2767
3277
  path: "{nextLink}",
2768
3278
  httpMethod: "GET",
@@ -2850,7 +3360,7 @@ class SqlVirtualMachineManagementClient extends coreClient__namespace.ServiceCli
2850
3360
  requestContentType: "application/json; charset=utf-8",
2851
3361
  credential: credentials
2852
3362
  };
2853
- const packageDetails = `azsdk-js-arm-sqlvirtualmachine/5.0.0-beta.2`;
3363
+ const packageDetails = `azsdk-js-arm-sqlvirtualmachine/5.0.0-beta.3`;
2854
3364
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
2855
3365
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
2856
3366
  : `${packageDetails}`;
@@ -2865,7 +3375,7 @@ class SqlVirtualMachineManagementClient extends coreClient__namespace.ServiceCli
2865
3375
  this.subscriptionId = subscriptionId;
2866
3376
  // Assigning values to Constant parameters
2867
3377
  this.$host = options.$host || "https://management.azure.com";
2868
- this.apiVersion = options.apiVersion || "2017-03-01-preview";
3378
+ this.apiVersion = options.apiVersion || "2021-11-01-preview";
2869
3379
  this.availabilityGroupListeners = new AvailabilityGroupListenersImpl(this);
2870
3380
  this.operations = new OperationsImpl(this);
2871
3381
  this.sqlVirtualMachineGroups = new SqlVirtualMachineGroupsImpl(this);