@azure/arm-azurestackhci 2.1.1-alpha.20220422.1 → 3.0.1-alpha.20220527.1

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 (88) hide show
  1. package/CHANGELOG.md +46 -1
  2. package/README.md +1 -1
  3. package/dist/index.js +616 -10
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/dist-esm/samples-dev/arcSettingsCreateIdentitySample.d.ts +2 -0
  8. package/dist-esm/samples-dev/arcSettingsCreateIdentitySample.d.ts.map +1 -0
  9. package/dist-esm/samples-dev/arcSettingsCreateIdentitySample.js +32 -0
  10. package/dist-esm/samples-dev/arcSettingsCreateIdentitySample.js.map +1 -0
  11. package/dist-esm/samples-dev/arcSettingsCreateSample.js +1 -1
  12. package/dist-esm/samples-dev/arcSettingsDeleteSample.js +1 -1
  13. package/dist-esm/samples-dev/arcSettingsGeneratePasswordSample.d.ts +2 -0
  14. package/dist-esm/samples-dev/arcSettingsGeneratePasswordSample.d.ts.map +1 -0
  15. package/dist-esm/samples-dev/arcSettingsGeneratePasswordSample.js +32 -0
  16. package/dist-esm/samples-dev/arcSettingsGeneratePasswordSample.js.map +1 -0
  17. package/dist-esm/samples-dev/arcSettingsGetSample.js +1 -1
  18. package/dist-esm/samples-dev/arcSettingsListByClusterSample.js +1 -1
  19. package/dist-esm/samples-dev/arcSettingsUpdateSample.d.ts +2 -0
  20. package/dist-esm/samples-dev/arcSettingsUpdateSample.d.ts.map +1 -0
  21. package/dist-esm/samples-dev/arcSettingsUpdateSample.js +35 -0
  22. package/dist-esm/samples-dev/arcSettingsUpdateSample.js.map +1 -0
  23. package/dist-esm/samples-dev/clustersCreateIdentitySample.d.ts +2 -0
  24. package/dist-esm/samples-dev/clustersCreateIdentitySample.d.ts.map +1 -0
  25. package/dist-esm/samples-dev/clustersCreateIdentitySample.js +31 -0
  26. package/dist-esm/samples-dev/clustersCreateIdentitySample.js.map +1 -0
  27. package/dist-esm/samples-dev/clustersCreateSample.js +1 -1
  28. package/dist-esm/samples-dev/clustersDeleteSample.js +2 -2
  29. package/dist-esm/samples-dev/clustersDeleteSample.js.map +1 -1
  30. package/dist-esm/samples-dev/clustersGetSample.js +1 -1
  31. package/dist-esm/samples-dev/clustersListByResourceGroupSample.js +1 -1
  32. package/dist-esm/samples-dev/clustersListBySubscriptionSample.js +1 -1
  33. package/dist-esm/samples-dev/clustersUpdateSample.js +1 -1
  34. package/dist-esm/samples-dev/clustersUploadCertificateSample.d.ts +2 -0
  35. package/dist-esm/samples-dev/clustersUploadCertificateSample.d.ts.map +1 -0
  36. package/dist-esm/samples-dev/clustersUploadCertificateSample.js +34 -0
  37. package/dist-esm/samples-dev/clustersUploadCertificateSample.js.map +1 -0
  38. package/dist-esm/samples-dev/deleteCluster.js +1 -1
  39. package/dist-esm/samples-dev/deleteCluster.js.map +1 -1
  40. package/dist-esm/samples-dev/extensionsCreateSample.js +1 -1
  41. package/dist-esm/samples-dev/extensionsDeleteSample.js +1 -1
  42. package/dist-esm/samples-dev/extensionsGetSample.js +1 -1
  43. package/dist-esm/samples-dev/extensionsListByArcSettingSample.js +1 -1
  44. package/dist-esm/samples-dev/extensionsUpdateSample.js +1 -1
  45. package/dist-esm/samples-dev/operationsListSample.js +3 -3
  46. package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
  47. package/dist-esm/src/azureStackHCIClient.d.ts.map +1 -1
  48. package/dist-esm/src/azureStackHCIClient.js +21 -3
  49. package/dist-esm/src/azureStackHCIClient.js.map +1 -1
  50. package/dist-esm/src/models/index.d.ts +98 -0
  51. package/dist-esm/src/models/index.d.ts.map +1 -1
  52. package/dist-esm/src/models/index.js.map +1 -1
  53. package/dist-esm/src/models/mappers.d.ts +7 -0
  54. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  55. package/dist-esm/src/models/mappers.js +208 -0
  56. package/dist-esm/src/models/mappers.js.map +1 -1
  57. package/dist-esm/src/models/parameters.d.ts +2 -0
  58. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  59. package/dist-esm/src/models/parameters.js +10 -2
  60. package/dist-esm/src/models/parameters.js.map +1 -1
  61. package/dist-esm/src/operations/arcSettings.d.ts +34 -1
  62. package/dist-esm/src/operations/arcSettings.d.ts.map +1 -1
  63. package/dist-esm/src/operations/arcSettings.js +155 -1
  64. package/dist-esm/src/operations/arcSettings.js.map +1 -1
  65. package/dist-esm/src/operations/clusters.d.ts +40 -2
  66. package/dist-esm/src/operations/clusters.d.ts.map +1 -1
  67. package/dist-esm/src/operations/clusters.js +209 -3
  68. package/dist-esm/src/operations/clusters.js.map +1 -1
  69. package/dist-esm/src/operations/extensions.d.ts.map +1 -1
  70. package/dist-esm/src/operations/extensions.js +9 -3
  71. package/dist-esm/src/operations/extensions.js.map +1 -1
  72. package/dist-esm/src/operationsInterfaces/arcSettings.d.ts +34 -1
  73. package/dist-esm/src/operationsInterfaces/arcSettings.d.ts.map +1 -1
  74. package/dist-esm/src/operationsInterfaces/clusters.d.ts +40 -2
  75. package/dist-esm/src/operationsInterfaces/clusters.d.ts.map +1 -1
  76. package/package.json +3 -3
  77. package/review/arm-azurestackhci.api.md +119 -1
  78. package/src/azureStackHCIClient.ts +28 -3
  79. package/src/models/index.ts +117 -1
  80. package/src/models/mappers.ts +223 -0
  81. package/src/models/parameters.ts +13 -1
  82. package/src/operations/arcSettings.ts +223 -1
  83. package/src/operations/clusters.ts +308 -3
  84. package/src/operations/extensions.ts +9 -3
  85. package/src/operationsInterfaces/arcSettings.ts +67 -1
  86. package/src/operationsInterfaces/clusters.ts +71 -2
  87. package/types/arm-azurestackhci.d.ts +185 -1
  88. package/LICENSE.txt +0 -21
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var coreClient = require('@azure/core-client');
6
+ var coreRestPipeline = require('@azure/core-rest-pipeline');
6
7
  var tslib = require('tslib');
7
8
  var coreLro = require('@azure/core-lro');
8
9
 
@@ -25,6 +26,7 @@ function _interopNamespace(e) {
25
26
  }
26
27
 
27
28
  var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
29
+ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
28
30
 
29
31
  /*
30
32
  * Copyright (c) Microsoft Corporation.
@@ -347,6 +349,92 @@ const ErrorAdditionalInfo = {
347
349
  }
348
350
  }
349
351
  };
352
+ const ArcSettingsPatch = {
353
+ type: {
354
+ name: "Composite",
355
+ className: "ArcSettingsPatch",
356
+ modelProperties: {
357
+ tags: {
358
+ serializedName: "tags",
359
+ type: {
360
+ name: "Dictionary",
361
+ value: { type: { name: "String" } }
362
+ }
363
+ },
364
+ connectivityProperties: {
365
+ serializedName: "properties.connectivityProperties",
366
+ type: {
367
+ name: "Dictionary",
368
+ value: { type: { name: "any" } }
369
+ }
370
+ }
371
+ }
372
+ }
373
+ };
374
+ const PasswordCredential = {
375
+ type: {
376
+ name: "Composite",
377
+ className: "PasswordCredential",
378
+ modelProperties: {
379
+ secretText: {
380
+ serializedName: "secretText",
381
+ type: {
382
+ name: "String"
383
+ }
384
+ },
385
+ keyId: {
386
+ serializedName: "keyId",
387
+ type: {
388
+ name: "String"
389
+ }
390
+ },
391
+ startDateTime: {
392
+ serializedName: "startDateTime",
393
+ type: {
394
+ name: "DateTime"
395
+ }
396
+ },
397
+ endDateTime: {
398
+ serializedName: "endDateTime",
399
+ type: {
400
+ name: "DateTime"
401
+ }
402
+ }
403
+ }
404
+ }
405
+ };
406
+ const ArcIdentityResponse = {
407
+ type: {
408
+ name: "Composite",
409
+ className: "ArcIdentityResponse",
410
+ modelProperties: {
411
+ arcApplicationClientId: {
412
+ serializedName: "properties.arcApplicationClientId",
413
+ type: {
414
+ name: "String"
415
+ }
416
+ },
417
+ arcApplicationTenantId: {
418
+ serializedName: "properties.arcApplicationTenantId",
419
+ type: {
420
+ name: "String"
421
+ }
422
+ },
423
+ arcServicePrincipalObjectId: {
424
+ serializedName: "properties.arcServicePrincipalObjectId",
425
+ type: {
426
+ name: "String"
427
+ }
428
+ },
429
+ arcApplicationObjectId: {
430
+ serializedName: "properties.arcApplicationObjectId",
431
+ type: {
432
+ name: "String"
433
+ }
434
+ }
435
+ }
436
+ }
437
+ };
350
438
  const ClusterList = {
351
439
  type: {
352
440
  name: "Composite",
@@ -574,6 +662,72 @@ const ClusterPatch = {
574
662
  }
575
663
  }
576
664
  };
665
+ const UploadCertificateRequest = {
666
+ type: {
667
+ name: "Composite",
668
+ className: "UploadCertificateRequest",
669
+ modelProperties: {
670
+ properties: {
671
+ serializedName: "properties",
672
+ type: {
673
+ name: "Composite",
674
+ className: "RawCertificateData"
675
+ }
676
+ }
677
+ }
678
+ }
679
+ };
680
+ const RawCertificateData = {
681
+ type: {
682
+ name: "Composite",
683
+ className: "RawCertificateData",
684
+ modelProperties: {
685
+ certificates: {
686
+ serializedName: "certificates",
687
+ type: {
688
+ name: "Sequence",
689
+ element: {
690
+ type: {
691
+ name: "String"
692
+ }
693
+ }
694
+ }
695
+ }
696
+ }
697
+ }
698
+ };
699
+ const ClusterIdentityResponse = {
700
+ type: {
701
+ name: "Composite",
702
+ className: "ClusterIdentityResponse",
703
+ modelProperties: {
704
+ aadClientId: {
705
+ serializedName: "properties.aadClientId",
706
+ type: {
707
+ name: "String"
708
+ }
709
+ },
710
+ aadTenantId: {
711
+ serializedName: "properties.aadTenantId",
712
+ type: {
713
+ name: "String"
714
+ }
715
+ },
716
+ aadServicePrincipalObjectId: {
717
+ serializedName: "properties.aadServicePrincipalObjectId",
718
+ type: {
719
+ name: "String"
720
+ }
721
+ },
722
+ aadApplicationObjectId: {
723
+ serializedName: "properties.aadApplicationObjectId",
724
+ type: {
725
+ name: "String"
726
+ }
727
+ }
728
+ }
729
+ }
730
+ };
577
731
  const ExtensionList = {
578
732
  type: {
579
733
  name: "Composite",
@@ -738,6 +892,20 @@ const OperationDisplay = {
738
892
  }
739
893
  }
740
894
  };
895
+ const ArcConnectivityProperties = {
896
+ type: {
897
+ name: "Composite",
898
+ className: "ArcConnectivityProperties",
899
+ modelProperties: {
900
+ enabled: {
901
+ serializedName: "enabled",
902
+ type: {
903
+ name: "Boolean"
904
+ }
905
+ }
906
+ }
907
+ }
908
+ };
741
909
  const ProxyResource = {
742
910
  type: {
743
911
  name: "Composite",
@@ -779,6 +947,26 @@ const ArcSetting = {
779
947
  type: {
780
948
  name: "String"
781
949
  }
950
+ }, arcApplicationClientId: {
951
+ serializedName: "properties.arcApplicationClientId",
952
+ type: {
953
+ name: "String"
954
+ }
955
+ }, arcApplicationTenantId: {
956
+ serializedName: "properties.arcApplicationTenantId",
957
+ type: {
958
+ name: "String"
959
+ }
960
+ }, arcServicePrincipalObjectId: {
961
+ serializedName: "properties.arcServicePrincipalObjectId",
962
+ type: {
963
+ name: "String"
964
+ }
965
+ }, arcApplicationObjectId: {
966
+ serializedName: "properties.arcApplicationObjectId",
967
+ type: {
968
+ name: "String"
969
+ }
782
970
  }, aggregateState: {
783
971
  serializedName: "properties.aggregateState",
784
972
  readOnly: true,
@@ -797,6 +985,12 @@ const ArcSetting = {
797
985
  }
798
986
  }
799
987
  }
988
+ }, connectivityProperties: {
989
+ serializedName: "properties.connectivityProperties",
990
+ type: {
991
+ name: "Dictionary",
992
+ value: { type: { name: "any" } }
993
+ }
800
994
  }, createdBy: {
801
995
  serializedName: "systemData.createdBy",
802
996
  type: {
@@ -965,6 +1159,16 @@ const Cluster = {
965
1159
  type: {
966
1160
  name: "String"
967
1161
  }
1162
+ }, aadApplicationObjectId: {
1163
+ serializedName: "properties.aadApplicationObjectId",
1164
+ type: {
1165
+ name: "String"
1166
+ }
1167
+ }, aadServicePrincipalObjectId: {
1168
+ serializedName: "properties.aadServicePrincipalObjectId",
1169
+ type: {
1170
+ name: "String"
1171
+ }
968
1172
  }, desiredProperties: {
969
1173
  serializedName: "properties.desiredProperties",
970
1174
  type: {
@@ -1007,6 +1211,12 @@ const Cluster = {
1007
1211
  type: {
1008
1212
  name: "DateTime"
1009
1213
  }
1214
+ }, serviceEndpoint: {
1215
+ serializedName: "properties.serviceEndpoint",
1216
+ readOnly: true,
1217
+ type: {
1218
+ name: "String"
1219
+ }
1010
1220
  }, createdBy: {
1011
1221
  serializedName: "systemData.createdBy",
1012
1222
  type: {
@@ -1049,16 +1259,23 @@ var Mappers = /*#__PURE__*/Object.freeze({
1049
1259
  ErrorResponse: ErrorResponse,
1050
1260
  ErrorDetail: ErrorDetail,
1051
1261
  ErrorAdditionalInfo: ErrorAdditionalInfo,
1262
+ ArcSettingsPatch: ArcSettingsPatch,
1263
+ PasswordCredential: PasswordCredential,
1264
+ ArcIdentityResponse: ArcIdentityResponse,
1052
1265
  ClusterList: ClusterList,
1053
1266
  ClusterDesiredProperties: ClusterDesiredProperties,
1054
1267
  ClusterReportedProperties: ClusterReportedProperties,
1055
1268
  ClusterNode: ClusterNode,
1056
1269
  ClusterPatch: ClusterPatch,
1270
+ UploadCertificateRequest: UploadCertificateRequest,
1271
+ RawCertificateData: RawCertificateData,
1272
+ ClusterIdentityResponse: ClusterIdentityResponse,
1057
1273
  ExtensionList: ExtensionList,
1058
1274
  PerNodeExtensionState: PerNodeExtensionState,
1059
1275
  OperationListResult: OperationListResult,
1060
1276
  Operation: Operation,
1061
1277
  OperationDisplay: OperationDisplay,
1278
+ ArcConnectivityProperties: ArcConnectivityProperties,
1062
1279
  ProxyResource: ProxyResource,
1063
1280
  TrackedResource: TrackedResource,
1064
1281
  ArcSetting: ArcSetting,
@@ -1135,7 +1352,7 @@ const clusterName = {
1135
1352
  const apiVersion = {
1136
1353
  parameterPath: "apiVersion",
1137
1354
  mapper: {
1138
- defaultValue: "2022-01-01",
1355
+ defaultValue: "2022-05-01",
1139
1356
  isConstant: true,
1140
1357
  serializedName: "api-version",
1141
1358
  type: {
@@ -1168,6 +1385,10 @@ const arcSetting = {
1168
1385
  parameterPath: "arcSetting",
1169
1386
  mapper: ArcSetting
1170
1387
  };
1388
+ const arcSetting1 = {
1389
+ parameterPath: "arcSetting",
1390
+ mapper: ArcSettingsPatch
1391
+ };
1171
1392
  const nextLink = {
1172
1393
  parameterPath: "nextLink",
1173
1394
  mapper: {
@@ -1187,6 +1408,10 @@ const cluster1 = {
1187
1408
  parameterPath: "cluster",
1188
1409
  mapper: ClusterPatch
1189
1410
  };
1411
+ const uploadCertificateRequest = {
1412
+ parameterPath: "uploadCertificateRequest",
1413
+ mapper: UploadCertificateRequest
1414
+ };
1190
1415
  const extensionName = {
1191
1416
  parameterPath: "extensionName",
1192
1417
  mapper: {
@@ -1327,6 +1552,17 @@ class ArcSettingsImpl {
1327
1552
  create(resourceGroupName, clusterName, arcSettingName, arcSetting, options) {
1328
1553
  return this.client.sendOperationRequest({ resourceGroupName, clusterName, arcSettingName, arcSetting, options }, createOperationSpec$2);
1329
1554
  }
1555
+ /**
1556
+ * Update ArcSettings for HCI cluster.
1557
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1558
+ * @param clusterName The name of the cluster.
1559
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
1560
+ * @param arcSetting ArcSettings parameters that needs to be updated
1561
+ * @param options The options parameters.
1562
+ */
1563
+ update(resourceGroupName, clusterName, arcSettingName, arcSetting, options) {
1564
+ return this.client.sendOperationRequest({ resourceGroupName, clusterName, arcSettingName, arcSetting, options }, updateOperationSpec$2);
1565
+ }
1330
1566
  /**
1331
1567
  * Delete ArcSetting resource details of HCI Cluster.
1332
1568
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
@@ -1359,11 +1595,13 @@ class ArcSettingsImpl {
1359
1595
  };
1360
1596
  });
1361
1597
  const lro = new LroImpl(sendOperation, { resourceGroupName, clusterName, arcSettingName, options }, deleteOperationSpec$2);
1362
- return new coreLro.LroEngine(lro, {
1598
+ const poller = new coreLro.LroEngine(lro, {
1363
1599
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1364
1600
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1365
1601
  lroResourceLocationConfig: "azure-async-operation"
1366
1602
  });
1603
+ yield poller.poll();
1604
+ return poller;
1367
1605
  });
1368
1606
  }
1369
1607
  /**
@@ -1379,6 +1617,70 @@ class ArcSettingsImpl {
1379
1617
  return poller.pollUntilDone();
1380
1618
  });
1381
1619
  }
1620
+ /**
1621
+ * Generate password for arc settings.
1622
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1623
+ * @param clusterName The name of the cluster.
1624
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
1625
+ * @param options The options parameters.
1626
+ */
1627
+ generatePassword(resourceGroupName, clusterName, arcSettingName, options) {
1628
+ return this.client.sendOperationRequest({ resourceGroupName, clusterName, arcSettingName, options }, generatePasswordOperationSpec);
1629
+ }
1630
+ /**
1631
+ * Create Aad identity for arc settings.
1632
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1633
+ * @param clusterName The name of the cluster.
1634
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
1635
+ * @param options The options parameters.
1636
+ */
1637
+ beginCreateIdentity(resourceGroupName, clusterName, arcSettingName, options) {
1638
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1639
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1640
+ return this.client.sendOperationRequest(args, spec);
1641
+ });
1642
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
1643
+ var _a;
1644
+ let currentRawResponse = undefined;
1645
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
1646
+ const callback = (rawResponse, flatResponse) => {
1647
+ currentRawResponse = rawResponse;
1648
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
1649
+ };
1650
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
1651
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
1652
+ return {
1653
+ flatResponse,
1654
+ rawResponse: {
1655
+ statusCode: currentRawResponse.status,
1656
+ body: currentRawResponse.parsedBody,
1657
+ headers: currentRawResponse.headers.toJSON()
1658
+ }
1659
+ };
1660
+ });
1661
+ const lro = new LroImpl(sendOperation, { resourceGroupName, clusterName, arcSettingName, options }, createIdentityOperationSpec$1);
1662
+ const poller = new coreLro.LroEngine(lro, {
1663
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1664
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1665
+ lroResourceLocationConfig: "azure-async-operation"
1666
+ });
1667
+ yield poller.poll();
1668
+ return poller;
1669
+ });
1670
+ }
1671
+ /**
1672
+ * Create Aad identity for arc settings.
1673
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
1674
+ * @param clusterName The name of the cluster.
1675
+ * @param arcSettingName The name of the proxy resource holding details of HCI ArcSetting information.
1676
+ * @param options The options parameters.
1677
+ */
1678
+ beginCreateIdentityAndWait(resourceGroupName, clusterName, arcSettingName, options) {
1679
+ return tslib.__awaiter(this, void 0, void 0, function* () {
1680
+ const poller = yield this.beginCreateIdentity(resourceGroupName, clusterName, arcSettingName, options);
1681
+ return poller.pollUntilDone();
1682
+ });
1683
+ }
1382
1684
  /**
1383
1685
  * ListByClusterNext
1384
1686
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
@@ -1459,6 +1761,30 @@ const createOperationSpec$2 = {
1459
1761
  mediaType: "json",
1460
1762
  serializer: serializer$3
1461
1763
  };
1764
+ const updateOperationSpec$2 = {
1765
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}",
1766
+ httpMethod: "PATCH",
1767
+ responses: {
1768
+ 200: {
1769
+ bodyMapper: ArcSetting
1770
+ },
1771
+ default: {
1772
+ bodyMapper: ErrorResponse
1773
+ }
1774
+ },
1775
+ requestBody: arcSetting1,
1776
+ queryParameters: [apiVersion],
1777
+ urlParameters: [
1778
+ $host,
1779
+ subscriptionId,
1780
+ resourceGroupName,
1781
+ clusterName,
1782
+ arcSettingName
1783
+ ],
1784
+ headerParameters: [accept, contentType],
1785
+ mediaType: "json",
1786
+ serializer: serializer$3
1787
+ };
1462
1788
  const deleteOperationSpec$2 = {
1463
1789
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}",
1464
1790
  httpMethod: "DELETE",
@@ -1482,6 +1808,59 @@ const deleteOperationSpec$2 = {
1482
1808
  headerParameters: [accept],
1483
1809
  serializer: serializer$3
1484
1810
  };
1811
+ const generatePasswordOperationSpec = {
1812
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/generatePassword",
1813
+ httpMethod: "POST",
1814
+ responses: {
1815
+ 200: {
1816
+ bodyMapper: PasswordCredential
1817
+ },
1818
+ default: {
1819
+ bodyMapper: ErrorResponse
1820
+ }
1821
+ },
1822
+ queryParameters: [apiVersion],
1823
+ urlParameters: [
1824
+ $host,
1825
+ subscriptionId,
1826
+ resourceGroupName,
1827
+ clusterName,
1828
+ arcSettingName
1829
+ ],
1830
+ headerParameters: [accept],
1831
+ serializer: serializer$3
1832
+ };
1833
+ const createIdentityOperationSpec$1 = {
1834
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/arcSettings/{arcSettingName}/createArcIdentity",
1835
+ httpMethod: "POST",
1836
+ responses: {
1837
+ 200: {
1838
+ bodyMapper: ArcIdentityResponse
1839
+ },
1840
+ 201: {
1841
+ bodyMapper: ArcIdentityResponse
1842
+ },
1843
+ 202: {
1844
+ bodyMapper: ArcIdentityResponse
1845
+ },
1846
+ 204: {
1847
+ bodyMapper: ArcIdentityResponse
1848
+ },
1849
+ default: {
1850
+ bodyMapper: ErrorResponse
1851
+ }
1852
+ },
1853
+ queryParameters: [apiVersion],
1854
+ urlParameters: [
1855
+ $host,
1856
+ subscriptionId,
1857
+ resourceGroupName,
1858
+ clusterName,
1859
+ arcSettingName
1860
+ ],
1861
+ headerParameters: [accept],
1862
+ serializer: serializer$3
1863
+ };
1485
1864
  const listByClusterNextOperationSpec = {
1486
1865
  path: "{nextLink}",
1487
1866
  httpMethod: "GET",
@@ -1669,8 +2048,156 @@ class ClustersImpl {
1669
2048
  * @param clusterName The name of the cluster.
1670
2049
  * @param options The options parameters.
1671
2050
  */
1672
- delete(resourceGroupName, clusterName, options) {
1673
- return this.client.sendOperationRequest({ resourceGroupName, clusterName, options }, deleteOperationSpec$1);
2051
+ beginDelete(resourceGroupName, clusterName, options) {
2052
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2053
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2054
+ return this.client.sendOperationRequest(args, spec);
2055
+ });
2056
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2057
+ var _a;
2058
+ let currentRawResponse = undefined;
2059
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2060
+ const callback = (rawResponse, flatResponse) => {
2061
+ currentRawResponse = rawResponse;
2062
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2063
+ };
2064
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2065
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2066
+ return {
2067
+ flatResponse,
2068
+ rawResponse: {
2069
+ statusCode: currentRawResponse.status,
2070
+ body: currentRawResponse.parsedBody,
2071
+ headers: currentRawResponse.headers.toJSON()
2072
+ }
2073
+ };
2074
+ });
2075
+ const lro = new LroImpl(sendOperation, { resourceGroupName, clusterName, options }, deleteOperationSpec$1);
2076
+ const poller = new coreLro.LroEngine(lro, {
2077
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2078
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
2079
+ });
2080
+ yield poller.poll();
2081
+ return poller;
2082
+ });
2083
+ }
2084
+ /**
2085
+ * Delete an HCI cluster.
2086
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2087
+ * @param clusterName The name of the cluster.
2088
+ * @param options The options parameters.
2089
+ */
2090
+ beginDeleteAndWait(resourceGroupName, clusterName, options) {
2091
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2092
+ const poller = yield this.beginDelete(resourceGroupName, clusterName, options);
2093
+ return poller.pollUntilDone();
2094
+ });
2095
+ }
2096
+ /**
2097
+ * Upload certificate.
2098
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2099
+ * @param clusterName The name of the cluster.
2100
+ * @param uploadCertificateRequest Upload certificate request.
2101
+ * @param options The options parameters.
2102
+ */
2103
+ beginUploadCertificate(resourceGroupName, clusterName, uploadCertificateRequest, options) {
2104
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2105
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2106
+ return this.client.sendOperationRequest(args, spec);
2107
+ });
2108
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2109
+ var _a;
2110
+ let currentRawResponse = undefined;
2111
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2112
+ const callback = (rawResponse, flatResponse) => {
2113
+ currentRawResponse = rawResponse;
2114
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2115
+ };
2116
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2117
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2118
+ return {
2119
+ flatResponse,
2120
+ rawResponse: {
2121
+ statusCode: currentRawResponse.status,
2122
+ body: currentRawResponse.parsedBody,
2123
+ headers: currentRawResponse.headers.toJSON()
2124
+ }
2125
+ };
2126
+ });
2127
+ const lro = new LroImpl(sendOperation, { resourceGroupName, clusterName, uploadCertificateRequest, options }, uploadCertificateOperationSpec);
2128
+ const poller = new coreLro.LroEngine(lro, {
2129
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2130
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2131
+ lroResourceLocationConfig: "azure-async-operation"
2132
+ });
2133
+ yield poller.poll();
2134
+ return poller;
2135
+ });
2136
+ }
2137
+ /**
2138
+ * Upload certificate.
2139
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2140
+ * @param clusterName The name of the cluster.
2141
+ * @param uploadCertificateRequest Upload certificate request.
2142
+ * @param options The options parameters.
2143
+ */
2144
+ beginUploadCertificateAndWait(resourceGroupName, clusterName, uploadCertificateRequest, options) {
2145
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2146
+ const poller = yield this.beginUploadCertificate(resourceGroupName, clusterName, uploadCertificateRequest, options);
2147
+ return poller.pollUntilDone();
2148
+ });
2149
+ }
2150
+ /**
2151
+ * Create cluster identity.
2152
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2153
+ * @param clusterName The name of the cluster.
2154
+ * @param options The options parameters.
2155
+ */
2156
+ beginCreateIdentity(resourceGroupName, clusterName, options) {
2157
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2158
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2159
+ return this.client.sendOperationRequest(args, spec);
2160
+ });
2161
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
2162
+ var _a;
2163
+ let currentRawResponse = undefined;
2164
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
2165
+ const callback = (rawResponse, flatResponse) => {
2166
+ currentRawResponse = rawResponse;
2167
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
2168
+ };
2169
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
2170
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
2171
+ return {
2172
+ flatResponse,
2173
+ rawResponse: {
2174
+ statusCode: currentRawResponse.status,
2175
+ body: currentRawResponse.parsedBody,
2176
+ headers: currentRawResponse.headers.toJSON()
2177
+ }
2178
+ };
2179
+ });
2180
+ const lro = new LroImpl(sendOperation, { resourceGroupName, clusterName, options }, createIdentityOperationSpec);
2181
+ const poller = new coreLro.LroEngine(lro, {
2182
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2183
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2184
+ lroResourceLocationConfig: "azure-async-operation"
2185
+ });
2186
+ yield poller.poll();
2187
+ return poller;
2188
+ });
2189
+ }
2190
+ /**
2191
+ * Create cluster identity.
2192
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
2193
+ * @param clusterName The name of the cluster.
2194
+ * @param options The options parameters.
2195
+ */
2196
+ beginCreateIdentityAndWait(resourceGroupName, clusterName, options) {
2197
+ return tslib.__awaiter(this, void 0, void 0, function* () {
2198
+ const poller = yield this.beginCreateIdentity(resourceGroupName, clusterName, options);
2199
+ return poller.pollUntilDone();
2200
+ });
1674
2201
  }
1675
2202
  /**
1676
2203
  * ListBySubscriptionNext
@@ -1800,6 +2327,8 @@ const deleteOperationSpec$1 = {
1800
2327
  httpMethod: "DELETE",
1801
2328
  responses: {
1802
2329
  200: {},
2330
+ 201: {},
2331
+ 202: {},
1803
2332
  204: {},
1804
2333
  default: {
1805
2334
  bodyMapper: ErrorResponse
@@ -1815,6 +2344,60 @@ const deleteOperationSpec$1 = {
1815
2344
  headerParameters: [accept],
1816
2345
  serializer: serializer$2
1817
2346
  };
2347
+ const uploadCertificateOperationSpec = {
2348
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/uploadCertificate",
2349
+ httpMethod: "POST",
2350
+ responses: {
2351
+ 200: {},
2352
+ 201: {},
2353
+ 202: {},
2354
+ 204: {},
2355
+ default: {
2356
+ bodyMapper: ErrorResponse
2357
+ }
2358
+ },
2359
+ requestBody: uploadCertificateRequest,
2360
+ queryParameters: [apiVersion],
2361
+ urlParameters: [
2362
+ $host,
2363
+ subscriptionId,
2364
+ resourceGroupName,
2365
+ clusterName
2366
+ ],
2367
+ headerParameters: [accept, contentType],
2368
+ mediaType: "json",
2369
+ serializer: serializer$2
2370
+ };
2371
+ const createIdentityOperationSpec = {
2372
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/createClusterIdentity",
2373
+ httpMethod: "POST",
2374
+ responses: {
2375
+ 200: {
2376
+ bodyMapper: ClusterIdentityResponse
2377
+ },
2378
+ 201: {
2379
+ bodyMapper: ClusterIdentityResponse
2380
+ },
2381
+ 202: {
2382
+ bodyMapper: ClusterIdentityResponse
2383
+ },
2384
+ 204: {
2385
+ bodyMapper: ClusterIdentityResponse
2386
+ },
2387
+ default: {
2388
+ bodyMapper: ErrorResponse
2389
+ }
2390
+ },
2391
+ queryParameters: [apiVersion],
2392
+ urlParameters: [
2393
+ $host,
2394
+ subscriptionId,
2395
+ resourceGroupName,
2396
+ clusterName
2397
+ ],
2398
+ headerParameters: [accept],
2399
+ serializer: serializer$2
2400
+ };
1818
2401
  const listBySubscriptionNextOperationSpec = {
1819
2402
  path: "{nextLink}",
1820
2403
  httpMethod: "GET",
@@ -1993,11 +2576,13 @@ class ExtensionsImpl {
1993
2576
  extension,
1994
2577
  options
1995
2578
  }, createOperationSpec);
1996
- return new coreLro.LroEngine(lro, {
2579
+ const poller = new coreLro.LroEngine(lro, {
1997
2580
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
1998
2581
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
1999
2582
  lroResourceLocationConfig: "azure-async-operation"
2000
2583
  });
2584
+ yield poller.poll();
2585
+ return poller;
2001
2586
  });
2002
2587
  }
2003
2588
  /**
@@ -2056,11 +2641,13 @@ class ExtensionsImpl {
2056
2641
  extension,
2057
2642
  options
2058
2643
  }, updateOperationSpec);
2059
- return new coreLro.LroEngine(lro, {
2644
+ const poller = new coreLro.LroEngine(lro, {
2060
2645
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2061
2646
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2062
2647
  lroResourceLocationConfig: "original-uri"
2063
2648
  });
2649
+ yield poller.poll();
2650
+ return poller;
2064
2651
  });
2065
2652
  }
2066
2653
  /**
@@ -2117,11 +2704,13 @@ class ExtensionsImpl {
2117
2704
  extensionName,
2118
2705
  options
2119
2706
  }, deleteOperationSpec);
2120
- return new coreLro.LroEngine(lro, {
2707
+ const poller = new coreLro.LroEngine(lro, {
2121
2708
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
2122
2709
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
2123
2710
  lroResourceLocationConfig: "azure-async-operation"
2124
2711
  });
2712
+ yield poller.poll();
2713
+ return poller;
2125
2714
  });
2126
2715
  }
2127
2716
  /**
@@ -2371,6 +2960,7 @@ class AzureStackHCIClient extends coreClient__namespace.ServiceClient {
2371
2960
  * @param options The parameter options
2372
2961
  */
2373
2962
  constructor(credentials, subscriptionId, options) {
2963
+ var _a, _b;
2374
2964
  if (credentials === undefined) {
2375
2965
  throw new Error("'credentials' cannot be null");
2376
2966
  }
@@ -2385,7 +2975,7 @@ class AzureStackHCIClient extends coreClient__namespace.ServiceClient {
2385
2975
  requestContentType: "application/json; charset=utf-8",
2386
2976
  credential: credentials
2387
2977
  };
2388
- const packageDetails = `azsdk-js-arm-azurestackhci/2.1.1`;
2978
+ const packageDetails = `azsdk-js-arm-azurestackhci/3.0.1`;
2389
2979
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
2390
2980
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
2391
2981
  : `${packageDetails}`;
@@ -2394,13 +2984,29 @@ class AzureStackHCIClient extends coreClient__namespace.ServiceClient {
2394
2984
  }
2395
2985
  const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
2396
2986
  userAgentPrefix
2397
- }, baseUri: options.endpoint || "https://management.azure.com" });
2987
+ }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
2398
2988
  super(optionsWithDefaults);
2989
+ if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
2990
+ const pipelinePolicies = options.pipeline.getOrderedPolicies();
2991
+ const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
2992
+ coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
2993
+ if (!bearerTokenAuthenticationPolicyFound) {
2994
+ this.pipeline.removePolicy({
2995
+ name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
2996
+ });
2997
+ this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
2998
+ scopes: `${optionsWithDefaults.baseUri}/.default`,
2999
+ challengeCallbacks: {
3000
+ authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
3001
+ }
3002
+ }));
3003
+ }
3004
+ }
2399
3005
  // Parameter assignments
2400
3006
  this.subscriptionId = subscriptionId;
2401
3007
  // Assigning values to Constant parameters
2402
3008
  this.$host = options.$host || "https://management.azure.com";
2403
- this.apiVersion = options.apiVersion || "2022-01-01";
3009
+ this.apiVersion = options.apiVersion || "2022-05-01";
2404
3010
  this.arcSettings = new ArcSettingsImpl(this);
2405
3011
  this.clusters = new ClustersImpl(this);
2406
3012
  this.extensions = new ExtensionsImpl(this);