@azure/arm-hardwaresecuritymodules 2.0.0-alpha.20240110.1 → 2.0.0-beta.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 (175) hide show
  1. package/CHANGELOG.md +82 -1
  2. package/LICENSE +1 -1
  3. package/README.md +14 -14
  4. package/dist/index.js +2215 -425
  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/cloudHsmClusterPrivateEndpointConnectionsCreateSample.d.ts +2 -0
  9. package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsCreateSample.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsCreateSample.js +46 -0
  11. package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsCreateSample.js.map +1 -0
  12. package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsDeleteSample.d.ts +2 -0
  13. package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsDeleteSample.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsDeleteSample.js +40 -0
  15. package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsDeleteSample.js.map +1 -0
  16. package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsGetSample.d.ts +2 -0
  17. package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsGetSample.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsGetSample.js +40 -0
  19. package/dist-esm/samples-dev/cloudHsmClusterPrivateEndpointConnectionsGetSample.js.map +1 -0
  20. package/dist-esm/samples-dev/cloudHsmClusterPrivateLinkResourcesListByCloudHsmClusterSample.d.ts +2 -0
  21. package/dist-esm/samples-dev/cloudHsmClusterPrivateLinkResourcesListByCloudHsmClusterSample.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/cloudHsmClusterPrivateLinkResourcesListByCloudHsmClusterSample.js +39 -0
  23. package/dist-esm/samples-dev/cloudHsmClusterPrivateLinkResourcesListByCloudHsmClusterSample.js.map +1 -0
  24. package/dist-esm/samples-dev/cloudHsmClustersCreateOrUpdateSample.d.ts +2 -0
  25. package/dist-esm/samples-dev/cloudHsmClustersCreateOrUpdateSample.d.ts.map +1 -0
  26. package/dist-esm/samples-dev/cloudHsmClustersCreateOrUpdateSample.js +53 -0
  27. package/dist-esm/samples-dev/cloudHsmClustersCreateOrUpdateSample.js.map +1 -0
  28. package/dist-esm/samples-dev/cloudHsmClustersDeleteSample.d.ts +2 -0
  29. package/dist-esm/samples-dev/cloudHsmClustersDeleteSample.d.ts.map +1 -0
  30. package/dist-esm/samples-dev/cloudHsmClustersDeleteSample.js +39 -0
  31. package/dist-esm/samples-dev/cloudHsmClustersDeleteSample.js.map +1 -0
  32. package/dist-esm/samples-dev/cloudHsmClustersGetSample.d.ts +2 -0
  33. package/dist-esm/samples-dev/cloudHsmClustersGetSample.d.ts.map +1 -0
  34. package/dist-esm/samples-dev/cloudHsmClustersGetSample.js +39 -0
  35. package/dist-esm/samples-dev/cloudHsmClustersGetSample.js.map +1 -0
  36. package/dist-esm/samples-dev/cloudHsmClustersListByResourceGroupSample.d.ts +2 -0
  37. package/dist-esm/samples-dev/cloudHsmClustersListByResourceGroupSample.d.ts.map +1 -0
  38. package/dist-esm/samples-dev/cloudHsmClustersListByResourceGroupSample.js +54 -0
  39. package/dist-esm/samples-dev/cloudHsmClustersListByResourceGroupSample.js.map +1 -0
  40. package/dist-esm/samples-dev/cloudHsmClustersListBySubscriptionSample.d.ts +2 -0
  41. package/dist-esm/samples-dev/cloudHsmClustersListBySubscriptionSample.d.ts.map +1 -0
  42. package/dist-esm/samples-dev/cloudHsmClustersListBySubscriptionSample.js +53 -0
  43. package/dist-esm/samples-dev/cloudHsmClustersListBySubscriptionSample.js.map +1 -0
  44. package/dist-esm/samples-dev/cloudHsmClustersUpdateSample.d.ts +2 -0
  45. package/dist-esm/samples-dev/cloudHsmClustersUpdateSample.d.ts.map +1 -0
  46. package/dist-esm/samples-dev/cloudHsmClustersUpdateSample.js +47 -0
  47. package/dist-esm/samples-dev/cloudHsmClustersUpdateSample.js.map +1 -0
  48. package/dist-esm/samples-dev/dedicatedHsmCreateOrUpdateSample.js +23 -13
  49. package/dist-esm/samples-dev/dedicatedHsmCreateOrUpdateSample.js.map +1 -1
  50. package/dist-esm/samples-dev/dedicatedHsmDeleteSample.js +13 -5
  51. package/dist-esm/samples-dev/dedicatedHsmDeleteSample.js.map +1 -1
  52. package/dist-esm/samples-dev/dedicatedHsmGetSample.js +23 -13
  53. package/dist-esm/samples-dev/dedicatedHsmGetSample.js.map +1 -1
  54. package/dist-esm/samples-dev/dedicatedHsmListByResourceGroupSample.js +18 -9
  55. package/dist-esm/samples-dev/dedicatedHsmListByResourceGroupSample.js.map +1 -1
  56. package/dist-esm/samples-dev/dedicatedHsmListBySubscriptionSample.js +16 -7
  57. package/dist-esm/samples-dev/dedicatedHsmListBySubscriptionSample.js.map +1 -1
  58. package/dist-esm/samples-dev/dedicatedHsmListOutboundNetworkDependenciesEndpointsSample.js +13 -5
  59. package/dist-esm/samples-dev/dedicatedHsmListOutboundNetworkDependenciesEndpointsSample.js.map +1 -1
  60. package/dist-esm/samples-dev/dedicatedHsmUpdateSample.js +18 -9
  61. package/dist-esm/samples-dev/dedicatedHsmUpdateSample.js.map +1 -1
  62. package/dist-esm/samples-dev/operationsListSample.js +16 -7
  63. package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
  64. package/dist-esm/samples-dev/privateEndpointConnectionsListByCloudHsmClusterSample.d.ts +2 -0
  65. package/dist-esm/samples-dev/privateEndpointConnectionsListByCloudHsmClusterSample.d.ts.map +1 -0
  66. package/dist-esm/samples-dev/privateEndpointConnectionsListByCloudHsmClusterSample.js +55 -0
  67. package/dist-esm/samples-dev/privateEndpointConnectionsListByCloudHsmClusterSample.js.map +1 -0
  68. package/dist-esm/src/azureHSMResourceProvider.d.ts +22 -0
  69. package/dist-esm/src/azureHSMResourceProvider.d.ts.map +1 -0
  70. package/dist-esm/src/{azureDedicatedHSMResourceProvider.js → azureHSMResourceProvider.js} +10 -37
  71. package/dist-esm/src/azureHSMResourceProvider.js.map +1 -0
  72. package/dist-esm/src/index.d.ts +1 -1
  73. package/dist-esm/src/index.d.ts.map +1 -1
  74. package/dist-esm/src/index.js +1 -1
  75. package/dist-esm/src/index.js.map +1 -1
  76. package/dist-esm/src/lroImpl.d.ts +6 -11
  77. package/dist-esm/src/lroImpl.d.ts.map +1 -1
  78. package/dist-esm/src/lroImpl.js +12 -20
  79. package/dist-esm/src/lroImpl.js.map +1 -1
  80. package/dist-esm/src/models/index.d.ts +538 -8
  81. package/dist-esm/src/models/index.d.ts.map +1 -1
  82. package/dist-esm/src/models/index.js +72 -0
  83. package/dist-esm/src/models/index.js.map +1 -1
  84. package/dist-esm/src/models/mappers.d.ts +28 -2
  85. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  86. package/dist-esm/src/models/mappers.js +692 -7
  87. package/dist-esm/src/models/mappers.js.map +1 -1
  88. package/dist-esm/src/models/parameters.d.ts +27 -5
  89. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  90. package/dist-esm/src/models/parameters.js +161 -29
  91. package/dist-esm/src/models/parameters.js.map +1 -1
  92. package/dist-esm/src/operations/cloudHsmClusterPrivateEndpointConnections.d.ts +55 -0
  93. package/dist-esm/src/operations/cloudHsmClusterPrivateEndpointConnections.d.ts.map +1 -0
  94. package/dist-esm/src/operations/cloudHsmClusterPrivateEndpointConnections.js +193 -0
  95. package/dist-esm/src/operations/cloudHsmClusterPrivateEndpointConnections.js.map +1 -0
  96. package/dist-esm/src/operations/cloudHsmClusterPrivateLinkResources.d.ts +21 -0
  97. package/dist-esm/src/operations/cloudHsmClusterPrivateLinkResources.d.ts.map +1 -0
  98. package/dist-esm/src/operations/cloudHsmClusterPrivateLinkResources.js +54 -0
  99. package/dist-esm/src/operations/cloudHsmClusterPrivateLinkResources.js.map +1 -0
  100. package/dist-esm/src/operations/cloudHsmClusters.d.ts +114 -0
  101. package/dist-esm/src/operations/cloudHsmClusters.d.ts.map +1 -0
  102. package/dist-esm/src/operations/cloudHsmClusters.js +580 -0
  103. package/dist-esm/src/operations/cloudHsmClusters.js.map +1 -0
  104. package/dist-esm/src/operations/dedicatedHsmOperations.d.ts +6 -6
  105. package/dist-esm/src/operations/dedicatedHsmOperations.d.ts.map +1 -1
  106. package/dist-esm/src/operations/dedicatedHsmOperations.js +51 -39
  107. package/dist-esm/src/operations/dedicatedHsmOperations.js.map +1 -1
  108. package/dist-esm/src/operations/index.d.ts +4 -0
  109. package/dist-esm/src/operations/index.d.ts.map +1 -1
  110. package/dist-esm/src/operations/index.js +4 -0
  111. package/dist-esm/src/operations/index.js.map +1 -1
  112. package/dist-esm/src/operations/operations.d.ts +2 -2
  113. package/dist-esm/src/operations/operations.d.ts.map +1 -1
  114. package/dist-esm/src/operations/operations.js +1 -1
  115. package/dist-esm/src/operations/operations.js.map +1 -1
  116. package/dist-esm/src/operations/privateEndpointConnections.d.ts +43 -0
  117. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
  118. package/dist-esm/src/operations/privateEndpointConnections.js +155 -0
  119. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
  120. package/dist-esm/src/operationsInterfaces/cloudHsmClusterPrivateEndpointConnections.d.ts +47 -0
  121. package/dist-esm/src/operationsInterfaces/cloudHsmClusterPrivateEndpointConnections.d.ts.map +1 -0
  122. package/dist-esm/src/operationsInterfaces/cloudHsmClusterPrivateEndpointConnections.js +9 -0
  123. package/dist-esm/src/operationsInterfaces/cloudHsmClusterPrivateEndpointConnections.js.map +1 -0
  124. package/dist-esm/src/operationsInterfaces/cloudHsmClusterPrivateLinkResources.d.ts +13 -0
  125. package/dist-esm/src/operationsInterfaces/cloudHsmClusterPrivateLinkResources.d.ts.map +1 -0
  126. package/dist-esm/src/operationsInterfaces/cloudHsmClusterPrivateLinkResources.js +9 -0
  127. package/dist-esm/src/operationsInterfaces/cloudHsmClusterPrivateLinkResources.js.map +1 -0
  128. package/dist-esm/src/operationsInterfaces/cloudHsmClusters.d.ts +77 -0
  129. package/dist-esm/src/operationsInterfaces/cloudHsmClusters.d.ts.map +1 -0
  130. package/dist-esm/src/operationsInterfaces/cloudHsmClusters.js +9 -0
  131. package/dist-esm/src/operationsInterfaces/cloudHsmClusters.js.map +1 -0
  132. package/dist-esm/src/operationsInterfaces/dedicatedHsmOperations.d.ts +4 -4
  133. package/dist-esm/src/operationsInterfaces/dedicatedHsmOperations.d.ts.map +1 -1
  134. package/dist-esm/src/operationsInterfaces/index.d.ts +4 -0
  135. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
  136. package/dist-esm/src/operationsInterfaces/index.js +4 -0
  137. package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
  138. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +15 -0
  139. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
  140. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
  141. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
  142. package/dist-esm/test/hardwaresecuritymodules_operations_test.spec.d.ts +4 -0
  143. package/dist-esm/test/hardwaresecuritymodules_operations_test.spec.d.ts.map +1 -0
  144. package/dist-esm/test/hardwaresecuritymodules_operations_test.spec.js +73 -0
  145. package/dist-esm/test/hardwaresecuritymodules_operations_test.spec.js.map +1 -0
  146. package/package.json +15 -12
  147. package/review/arm-hardwaresecuritymodules.api.md +426 -19
  148. package/src/{azureDedicatedHSMResourceProvider.ts → azureHSMResourceProvider.ts} +35 -46
  149. package/src/index.ts +1 -1
  150. package/src/lroImpl.ts +31 -23
  151. package/src/models/index.ts +599 -8
  152. package/src/models/mappers.ts +751 -7
  153. package/src/models/parameters.ts +187 -30
  154. package/src/operations/cloudHsmClusterPrivateEndpointConnections.ts +263 -0
  155. package/src/operations/cloudHsmClusterPrivateLinkResources.ts +74 -0
  156. package/src/operations/cloudHsmClusters.ts +750 -0
  157. package/src/operations/dedicatedHsmOperations.ts +69 -59
  158. package/src/operations/index.ts +4 -0
  159. package/src/operations/operations.ts +4 -4
  160. package/src/operations/privateEndpointConnections.ts +208 -0
  161. package/src/operationsInterfaces/cloudHsmClusterPrivateEndpointConnections.ts +83 -0
  162. package/src/operationsInterfaces/cloudHsmClusterPrivateLinkResources.ts +28 -0
  163. package/src/operationsInterfaces/cloudHsmClusters.ts +142 -0
  164. package/src/operationsInterfaces/dedicatedHsmOperations.ts +6 -6
  165. package/src/operationsInterfaces/index.ts +4 -0
  166. package/src/operationsInterfaces/privateEndpointConnections.ts +31 -0
  167. package/types/arm-hardwaresecuritymodules.d.ts +773 -34
  168. package/types/tsdoc-metadata.json +1 -1
  169. package/dist-esm/src/azureDedicatedHSMResourceProvider.d.ts +0 -22
  170. package/dist-esm/src/azureDedicatedHSMResourceProvider.d.ts.map +0 -1
  171. package/dist-esm/src/azureDedicatedHSMResourceProvider.js.map +0 -1
  172. package/dist-esm/test/sampleTest.d.ts +0 -2
  173. package/dist-esm/test/sampleTest.d.ts.map +0 -1
  174. package/dist-esm/test/sampleTest.js +0 -38
  175. package/dist-esm/test/sampleTest.js.map +0 -1
@@ -12,9 +12,13 @@ import { DedicatedHsmOperations } from "../operationsInterfaces";
12
12
  import * as coreClient from "@azure/core-client";
13
13
  import * as Mappers from "../models/mappers";
14
14
  import * as Parameters from "../models/parameters";
15
- import { AzureDedicatedHSMResourceProvider } from "../azureDedicatedHSMResourceProvider";
16
- import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
17
- import { LroImpl } from "../lroImpl";
15
+ import { AzureHSMResourceProvider } from "../azureHSMResourceProvider";
16
+ import {
17
+ SimplePollerLike,
18
+ OperationState,
19
+ createHttpPoller
20
+ } from "@azure/core-lro";
21
+ import { createLroSpec } from "../lroImpl";
18
22
  import {
19
23
  DedicatedHsm,
20
24
  DedicatedHsmListByResourceGroupNextOptionalParams,
@@ -42,13 +46,13 @@ import {
42
46
  /// <reference lib="esnext.asynciterable" />
43
47
  /** Class containing DedicatedHsmOperations operations. */
44
48
  export class DedicatedHsmOperationsImpl implements DedicatedHsmOperations {
45
- private readonly client: AzureDedicatedHSMResourceProvider;
49
+ private readonly client: AzureHSMResourceProvider;
46
50
 
47
51
  /**
48
52
  * Initialize a new instance of the class DedicatedHsmOperations class.
49
53
  * @param client Reference to the service client
50
54
  */
51
- constructor(client: AzureDedicatedHSMResourceProvider) {
55
+ constructor(client: AzureHSMResourceProvider) {
52
56
  this.client = client;
53
57
  }
54
58
 
@@ -274,8 +278,8 @@ export class DedicatedHsmOperationsImpl implements DedicatedHsmOperations {
274
278
  parameters: DedicatedHsm,
275
279
  options?: DedicatedHsmCreateOrUpdateOptionalParams
276
280
  ): Promise<
277
- PollerLike<
278
- PollOperationState<DedicatedHsmCreateOrUpdateResponse>,
281
+ SimplePollerLike<
282
+ OperationState<DedicatedHsmCreateOrUpdateResponse>,
279
283
  DedicatedHsmCreateOrUpdateResponse
280
284
  >
281
285
  > {
@@ -285,7 +289,7 @@ export class DedicatedHsmOperationsImpl implements DedicatedHsmOperations {
285
289
  ): Promise<DedicatedHsmCreateOrUpdateResponse> => {
286
290
  return this.client.sendOperationRequest(args, spec);
287
291
  };
288
- const sendOperation = async (
292
+ const sendOperationFn = async (
289
293
  args: coreClient.OperationArguments,
290
294
  spec: coreClient.OperationSpec
291
295
  ) => {
@@ -318,13 +322,16 @@ export class DedicatedHsmOperationsImpl implements DedicatedHsmOperations {
318
322
  };
319
323
  };
320
324
 
321
- const lro = new LroImpl(
322
- sendOperation,
323
- { resourceGroupName, name, parameters, options },
324
- createOrUpdateOperationSpec
325
- );
326
- const poller = new LroEngine(lro, {
327
- resumeFrom: options?.resumeFrom,
325
+ const lro = createLroSpec({
326
+ sendOperationFn,
327
+ args: { resourceGroupName, name, parameters, options },
328
+ spec: createOrUpdateOperationSpec
329
+ });
330
+ const poller = await createHttpPoller<
331
+ DedicatedHsmCreateOrUpdateResponse,
332
+ OperationState<DedicatedHsmCreateOrUpdateResponse>
333
+ >(lro, {
334
+ restoreFrom: options?.resumeFrom,
328
335
  intervalInMs: options?.updateIntervalInMs
329
336
  });
330
337
  await poller.poll();
@@ -364,8 +371,8 @@ export class DedicatedHsmOperationsImpl implements DedicatedHsmOperations {
364
371
  name: string,
365
372
  options?: DedicatedHsmUpdateOptionalParams
366
373
  ): Promise<
367
- PollerLike<
368
- PollOperationState<DedicatedHsmUpdateResponse>,
374
+ SimplePollerLike<
375
+ OperationState<DedicatedHsmUpdateResponse>,
369
376
  DedicatedHsmUpdateResponse
370
377
  >
371
378
  > {
@@ -375,7 +382,7 @@ export class DedicatedHsmOperationsImpl implements DedicatedHsmOperations {
375
382
  ): Promise<DedicatedHsmUpdateResponse> => {
376
383
  return this.client.sendOperationRequest(args, spec);
377
384
  };
378
- const sendOperation = async (
385
+ const sendOperationFn = async (
379
386
  args: coreClient.OperationArguments,
380
387
  spec: coreClient.OperationSpec
381
388
  ) => {
@@ -408,13 +415,16 @@ export class DedicatedHsmOperationsImpl implements DedicatedHsmOperations {
408
415
  };
409
416
  };
410
417
 
411
- const lro = new LroImpl(
412
- sendOperation,
413
- { resourceGroupName, name, options },
414
- updateOperationSpec
415
- );
416
- const poller = new LroEngine(lro, {
417
- resumeFrom: options?.resumeFrom,
418
+ const lro = createLroSpec({
419
+ sendOperationFn,
420
+ args: { resourceGroupName, name, options },
421
+ spec: updateOperationSpec
422
+ });
423
+ const poller = await createHttpPoller<
424
+ DedicatedHsmUpdateResponse,
425
+ OperationState<DedicatedHsmUpdateResponse>
426
+ >(lro, {
427
+ restoreFrom: options?.resumeFrom,
418
428
  intervalInMs: options?.updateIntervalInMs
419
429
  });
420
430
  await poller.poll();
@@ -446,14 +456,14 @@ export class DedicatedHsmOperationsImpl implements DedicatedHsmOperations {
446
456
  resourceGroupName: string,
447
457
  name: string,
448
458
  options?: DedicatedHsmDeleteOptionalParams
449
- ): Promise<PollerLike<PollOperationState<void>, void>> {
459
+ ): Promise<SimplePollerLike<OperationState<void>, void>> {
450
460
  const directSendOperation = async (
451
461
  args: coreClient.OperationArguments,
452
462
  spec: coreClient.OperationSpec
453
463
  ): Promise<void> => {
454
464
  return this.client.sendOperationRequest(args, spec);
455
465
  };
456
- const sendOperation = async (
466
+ const sendOperationFn = async (
457
467
  args: coreClient.OperationArguments,
458
468
  spec: coreClient.OperationSpec
459
469
  ) => {
@@ -486,13 +496,13 @@ export class DedicatedHsmOperationsImpl implements DedicatedHsmOperations {
486
496
  };
487
497
  };
488
498
 
489
- const lro = new LroImpl(
490
- sendOperation,
491
- { resourceGroupName, name, options },
492
- deleteOperationSpec
493
- );
494
- const poller = new LroEngine(lro, {
495
- resumeFrom: options?.resumeFrom,
499
+ const lro = createLroSpec({
500
+ sendOperationFn,
501
+ args: { resourceGroupName, name, options },
502
+ spec: deleteOperationSpec
503
+ });
504
+ const poller = await createHttpPoller<void, OperationState<void>>(lro, {
505
+ restoreFrom: options?.resumeFrom,
496
506
  intervalInMs: options?.updateIntervalInMs
497
507
  });
498
508
  await poller.poll();
@@ -655,14 +665,14 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
655
665
  }
656
666
  },
657
667
  requestBody: Parameters.parameters,
658
- queryParameters: [Parameters.apiVersion],
668
+ queryParameters: [Parameters.apiVersion1],
659
669
  urlParameters: [
660
670
  Parameters.$host,
661
- Parameters.resourceGroupName,
662
- Parameters.name,
663
- Parameters.subscriptionId
671
+ Parameters.subscriptionId,
672
+ Parameters.resourceGroupName1,
673
+ Parameters.name
664
674
  ],
665
- headerParameters: [Parameters.accept, Parameters.contentType],
675
+ headerParameters: [Parameters.contentType, Parameters.accept],
666
676
  mediaType: "json",
667
677
  serializer
668
678
  };
@@ -691,14 +701,14 @@ const updateOperationSpec: coreClient.OperationSpec = {
691
701
  parameterPath: { tags: ["options", "tags"] },
692
702
  mapper: { ...Mappers.DedicatedHsmPatchParameters, required: true }
693
703
  },
694
- queryParameters: [Parameters.apiVersion],
704
+ queryParameters: [Parameters.apiVersion1],
695
705
  urlParameters: [
696
706
  Parameters.$host,
697
- Parameters.resourceGroupName,
698
- Parameters.name,
699
- Parameters.subscriptionId
707
+ Parameters.subscriptionId,
708
+ Parameters.resourceGroupName1,
709
+ Parameters.name
700
710
  ],
701
- headerParameters: [Parameters.accept, Parameters.contentType],
711
+ headerParameters: [Parameters.contentType, Parameters.accept],
702
712
  mediaType: "json",
703
713
  serializer
704
714
  };
@@ -715,11 +725,11 @@ const deleteOperationSpec: coreClient.OperationSpec = {
715
725
  bodyMapper: Mappers.DedicatedHsmError
716
726
  }
717
727
  },
718
- queryParameters: [Parameters.apiVersion],
728
+ queryParameters: [Parameters.apiVersion1],
719
729
  urlParameters: [
720
730
  Parameters.$host,
721
- Parameters.resourceGroupName,
722
731
  Parameters.subscriptionId,
732
+ Parameters.resourceGroupName1,
723
733
  Parameters.name1
724
734
  ],
725
735
  headerParameters: [Parameters.accept],
@@ -737,11 +747,11 @@ const getOperationSpec: coreClient.OperationSpec = {
737
747
  bodyMapper: Mappers.DedicatedHsmError
738
748
  }
739
749
  },
740
- queryParameters: [Parameters.apiVersion],
750
+ queryParameters: [Parameters.apiVersion1],
741
751
  urlParameters: [
742
752
  Parameters.$host,
743
- Parameters.resourceGroupName,
744
753
  Parameters.subscriptionId,
754
+ Parameters.resourceGroupName1,
745
755
  Parameters.name1
746
756
  ],
747
757
  headerParameters: [Parameters.accept],
@@ -759,11 +769,11 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
759
769
  bodyMapper: Mappers.DedicatedHsmError
760
770
  }
761
771
  },
762
- queryParameters: [Parameters.apiVersion, Parameters.top],
772
+ queryParameters: [Parameters.apiVersion1, Parameters.top],
763
773
  urlParameters: [
764
774
  Parameters.$host,
765
- Parameters.resourceGroupName,
766
- Parameters.subscriptionId
775
+ Parameters.subscriptionId,
776
+ Parameters.resourceGroupName1
767
777
  ],
768
778
  headerParameters: [Parameters.accept],
769
779
  serializer
@@ -780,7 +790,7 @@ const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
780
790
  bodyMapper: Mappers.DedicatedHsmError
781
791
  }
782
792
  },
783
- queryParameters: [Parameters.apiVersion, Parameters.top],
793
+ queryParameters: [Parameters.apiVersion1, Parameters.top],
784
794
  urlParameters: [Parameters.$host, Parameters.subscriptionId],
785
795
  headerParameters: [Parameters.accept],
786
796
  serializer
@@ -797,11 +807,11 @@ const listOutboundNetworkDependenciesEndpointsOperationSpec: coreClient.Operatio
797
807
  bodyMapper: Mappers.DedicatedHsmError
798
808
  }
799
809
  },
800
- queryParameters: [Parameters.apiVersion],
810
+ queryParameters: [Parameters.apiVersion1],
801
811
  urlParameters: [
802
812
  Parameters.$host,
803
- Parameters.resourceGroupName,
804
813
  Parameters.subscriptionId,
814
+ Parameters.resourceGroupName1,
805
815
  Parameters.name1
806
816
  ],
807
817
  headerParameters: [Parameters.accept],
@@ -820,9 +830,9 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
820
830
  },
821
831
  urlParameters: [
822
832
  Parameters.$host,
823
- Parameters.resourceGroupName,
824
833
  Parameters.subscriptionId,
825
- Parameters.nextLink
834
+ Parameters.nextLink,
835
+ Parameters.resourceGroupName1
826
836
  ],
827
837
  headerParameters: [Parameters.accept],
828
838
  serializer
@@ -859,10 +869,10 @@ const listOutboundNetworkDependenciesEndpointsNextOperationSpec: coreClient.Oper
859
869
  },
860
870
  urlParameters: [
861
871
  Parameters.$host,
862
- Parameters.resourceGroupName,
863
872
  Parameters.subscriptionId,
864
- Parameters.name1,
865
- Parameters.nextLink
873
+ Parameters.nextLink,
874
+ Parameters.resourceGroupName1,
875
+ Parameters.name1
866
876
  ],
867
877
  headerParameters: [Parameters.accept],
868
878
  serializer
@@ -6,5 +6,9 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
 
9
+ export * from "./cloudHsmClusters";
10
+ export * from "./cloudHsmClusterPrivateLinkResources";
11
+ export * from "./cloudHsmClusterPrivateEndpointConnections";
12
+ export * from "./privateEndpointConnections";
9
13
  export * from "./operations";
10
14
  export * from "./dedicatedHsmOperations";
@@ -11,7 +11,7 @@ import { Operations } from "../operationsInterfaces";
11
11
  import * as coreClient from "@azure/core-client";
12
12
  import * as Mappers from "../models/mappers";
13
13
  import * as Parameters from "../models/parameters";
14
- import { AzureDedicatedHSMResourceProvider } from "../azureDedicatedHSMResourceProvider";
14
+ import { AzureHSMResourceProvider } from "../azureHSMResourceProvider";
15
15
  import {
16
16
  DedicatedHsmOperation,
17
17
  OperationsListOptionalParams,
@@ -21,13 +21,13 @@ import {
21
21
  /// <reference lib="esnext.asynciterable" />
22
22
  /** Class containing Operations operations. */
23
23
  export class OperationsImpl implements Operations {
24
- private readonly client: AzureDedicatedHSMResourceProvider;
24
+ private readonly client: AzureHSMResourceProvider;
25
25
 
26
26
  /**
27
27
  * Initialize a new instance of the class Operations class.
28
28
  * @param client Reference to the service client
29
29
  */
30
- constructor(client: AzureDedicatedHSMResourceProvider) {
30
+ constructor(client: AzureHSMResourceProvider) {
31
31
  this.client = client;
32
32
  }
33
33
 
@@ -96,7 +96,7 @@ const listOperationSpec: coreClient.OperationSpec = {
96
96
  bodyMapper: Mappers.DedicatedHsmError
97
97
  }
98
98
  },
99
- queryParameters: [Parameters.apiVersion],
99
+ queryParameters: [Parameters.apiVersion1],
100
100
  urlParameters: [Parameters.$host],
101
101
  headerParameters: [Parameters.accept],
102
102
  serializer
@@ -0,0 +1,208 @@
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 { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
10
+ import { setContinuationToken } from "../pagingHelper";
11
+ import { PrivateEndpointConnections } from "../operationsInterfaces";
12
+ import * as coreClient from "@azure/core-client";
13
+ import * as Mappers from "../models/mappers";
14
+ import * as Parameters from "../models/parameters";
15
+ import { AzureHSMResourceProvider } from "../azureHSMResourceProvider";
16
+ import {
17
+ PrivateEndpointConnection,
18
+ PrivateEndpointConnectionsListByCloudHsmClusterNextOptionalParams,
19
+ PrivateEndpointConnectionsListByCloudHsmClusterOptionalParams,
20
+ PrivateEndpointConnectionsListByCloudHsmClusterResponse,
21
+ PrivateEndpointConnectionsListByCloudHsmClusterNextResponse
22
+ } from "../models";
23
+
24
+ /// <reference lib="esnext.asynciterable" />
25
+ /** Class containing PrivateEndpointConnections operations. */
26
+ export class PrivateEndpointConnectionsImpl
27
+ implements PrivateEndpointConnections {
28
+ private readonly client: AzureHSMResourceProvider;
29
+
30
+ /**
31
+ * Initialize a new instance of the class PrivateEndpointConnections class.
32
+ * @param client Reference to the service client
33
+ */
34
+ constructor(client: AzureHSMResourceProvider) {
35
+ this.client = client;
36
+ }
37
+
38
+ /**
39
+ * The List operation gets information about the private endpoint connections associated with the Cloud
40
+ * HSM Cluster
41
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
42
+ * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
43
+ * Cloud HSM Cluster names must be between 3 and 24 characters in length.
44
+ * @param options The options parameters.
45
+ */
46
+ public listByCloudHsmCluster(
47
+ resourceGroupName: string,
48
+ cloudHsmClusterName: string,
49
+ options?: PrivateEndpointConnectionsListByCloudHsmClusterOptionalParams
50
+ ): PagedAsyncIterableIterator<PrivateEndpointConnection> {
51
+ const iter = this.listByCloudHsmClusterPagingAll(
52
+ resourceGroupName,
53
+ cloudHsmClusterName,
54
+ options
55
+ );
56
+ return {
57
+ next() {
58
+ return iter.next();
59
+ },
60
+ [Symbol.asyncIterator]() {
61
+ return this;
62
+ },
63
+ byPage: (settings?: PageSettings) => {
64
+ if (settings?.maxPageSize) {
65
+ throw new Error("maxPageSize is not supported by this operation.");
66
+ }
67
+ return this.listByCloudHsmClusterPagingPage(
68
+ resourceGroupName,
69
+ cloudHsmClusterName,
70
+ options,
71
+ settings
72
+ );
73
+ }
74
+ };
75
+ }
76
+
77
+ private async *listByCloudHsmClusterPagingPage(
78
+ resourceGroupName: string,
79
+ cloudHsmClusterName: string,
80
+ options?: PrivateEndpointConnectionsListByCloudHsmClusterOptionalParams,
81
+ settings?: PageSettings
82
+ ): AsyncIterableIterator<PrivateEndpointConnection[]> {
83
+ let result: PrivateEndpointConnectionsListByCloudHsmClusterResponse;
84
+ let continuationToken = settings?.continuationToken;
85
+ if (!continuationToken) {
86
+ result = await this._listByCloudHsmCluster(
87
+ resourceGroupName,
88
+ cloudHsmClusterName,
89
+ options
90
+ );
91
+ let page = result.value || [];
92
+ continuationToken = result.nextLink;
93
+ setContinuationToken(page, continuationToken);
94
+ yield page;
95
+ }
96
+ while (continuationToken) {
97
+ result = await this._listByCloudHsmClusterNext(
98
+ resourceGroupName,
99
+ cloudHsmClusterName,
100
+ continuationToken,
101
+ options
102
+ );
103
+ continuationToken = result.nextLink;
104
+ let page = result.value || [];
105
+ setContinuationToken(page, continuationToken);
106
+ yield page;
107
+ }
108
+ }
109
+
110
+ private async *listByCloudHsmClusterPagingAll(
111
+ resourceGroupName: string,
112
+ cloudHsmClusterName: string,
113
+ options?: PrivateEndpointConnectionsListByCloudHsmClusterOptionalParams
114
+ ): AsyncIterableIterator<PrivateEndpointConnection> {
115
+ for await (const page of this.listByCloudHsmClusterPagingPage(
116
+ resourceGroupName,
117
+ cloudHsmClusterName,
118
+ options
119
+ )) {
120
+ yield* page;
121
+ }
122
+ }
123
+
124
+ /**
125
+ * The List operation gets information about the private endpoint connections associated with the Cloud
126
+ * HSM Cluster
127
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
128
+ * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
129
+ * Cloud HSM Cluster names must be between 3 and 24 characters in length.
130
+ * @param options The options parameters.
131
+ */
132
+ private _listByCloudHsmCluster(
133
+ resourceGroupName: string,
134
+ cloudHsmClusterName: string,
135
+ options?: PrivateEndpointConnectionsListByCloudHsmClusterOptionalParams
136
+ ): Promise<PrivateEndpointConnectionsListByCloudHsmClusterResponse> {
137
+ return this.client.sendOperationRequest(
138
+ { resourceGroupName, cloudHsmClusterName, options },
139
+ listByCloudHsmClusterOperationSpec
140
+ );
141
+ }
142
+
143
+ /**
144
+ * ListByCloudHsmClusterNext
145
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
146
+ * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
147
+ * Cloud HSM Cluster names must be between 3 and 24 characters in length.
148
+ * @param nextLink The nextLink from the previous successful call to the ListByCloudHsmCluster method.
149
+ * @param options The options parameters.
150
+ */
151
+ private _listByCloudHsmClusterNext(
152
+ resourceGroupName: string,
153
+ cloudHsmClusterName: string,
154
+ nextLink: string,
155
+ options?: PrivateEndpointConnectionsListByCloudHsmClusterNextOptionalParams
156
+ ): Promise<PrivateEndpointConnectionsListByCloudHsmClusterNextResponse> {
157
+ return this.client.sendOperationRequest(
158
+ { resourceGroupName, cloudHsmClusterName, nextLink, options },
159
+ listByCloudHsmClusterNextOperationSpec
160
+ );
161
+ }
162
+ }
163
+ // Operation Specifications
164
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
165
+
166
+ const listByCloudHsmClusterOperationSpec: coreClient.OperationSpec = {
167
+ path:
168
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HardwareSecurityModules/cloudHsmClusters/{cloudHsmClusterName}/privateEndpointConnections",
169
+ httpMethod: "GET",
170
+ responses: {
171
+ 200: {
172
+ bodyMapper: Mappers.PrivateEndpointConnectionListResult
173
+ },
174
+ default: {
175
+ bodyMapper: Mappers.CloudHsmClusterError
176
+ }
177
+ },
178
+ queryParameters: [Parameters.apiVersion],
179
+ urlParameters: [
180
+ Parameters.$host,
181
+ Parameters.subscriptionId,
182
+ Parameters.resourceGroupName,
183
+ Parameters.cloudHsmClusterName
184
+ ],
185
+ headerParameters: [Parameters.accept],
186
+ serializer
187
+ };
188
+ const listByCloudHsmClusterNextOperationSpec: coreClient.OperationSpec = {
189
+ path: "{nextLink}",
190
+ httpMethod: "GET",
191
+ responses: {
192
+ 200: {
193
+ bodyMapper: Mappers.PrivateEndpointConnectionListResult
194
+ },
195
+ default: {
196
+ bodyMapper: Mappers.CloudHsmClusterError
197
+ }
198
+ },
199
+ urlParameters: [
200
+ Parameters.$host,
201
+ Parameters.subscriptionId,
202
+ Parameters.resourceGroupName,
203
+ Parameters.cloudHsmClusterName,
204
+ Parameters.nextLink
205
+ ],
206
+ headerParameters: [Parameters.accept],
207
+ serializer
208
+ };
@@ -0,0 +1,83 @@
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
+ PrivateEndpointConnection,
12
+ CloudHsmClusterPrivateEndpointConnectionsCreateOptionalParams,
13
+ CloudHsmClusterPrivateEndpointConnectionsCreateResponse,
14
+ CloudHsmClusterPrivateEndpointConnectionsDeleteOptionalParams,
15
+ CloudHsmClusterPrivateEndpointConnectionsGetOptionalParams,
16
+ CloudHsmClusterPrivateEndpointConnectionsGetResponse
17
+ } from "../models";
18
+
19
+ /** Interface representing a CloudHsmClusterPrivateEndpointConnections. */
20
+ export interface CloudHsmClusterPrivateEndpointConnections {
21
+ /**
22
+ * Creates or updates the private endpoint connection for the Cloud Hsm Cluster.
23
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
24
+ * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
25
+ * Cloud HSM Cluster names must be between 3 and 24 characters in length.
26
+ * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM
27
+ * Cluster.
28
+ * @param properties Parameters of the PrivateEndpointConnection
29
+ * @param options The options parameters.
30
+ */
31
+ create(
32
+ resourceGroupName: string,
33
+ cloudHsmClusterName: string,
34
+ peConnectionName: string,
35
+ properties: PrivateEndpointConnection,
36
+ options?: CloudHsmClusterPrivateEndpointConnectionsCreateOptionalParams
37
+ ): Promise<CloudHsmClusterPrivateEndpointConnectionsCreateResponse>;
38
+ /**
39
+ * Deletes the private endpoint connection for the Cloud Hsm Cluster.
40
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
41
+ * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
42
+ * Cloud HSM Cluster names must be between 3 and 24 characters in length.
43
+ * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM
44
+ * Cluster.
45
+ * @param options The options parameters.
46
+ */
47
+ beginDelete(
48
+ resourceGroupName: string,
49
+ cloudHsmClusterName: string,
50
+ peConnectionName: string,
51
+ options?: CloudHsmClusterPrivateEndpointConnectionsDeleteOptionalParams
52
+ ): Promise<SimplePollerLike<OperationState<void>, void>>;
53
+ /**
54
+ * Deletes the private endpoint connection for the Cloud Hsm Cluster.
55
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
56
+ * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
57
+ * Cloud HSM Cluster names must be between 3 and 24 characters in length.
58
+ * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM
59
+ * Cluster.
60
+ * @param options The options parameters.
61
+ */
62
+ beginDeleteAndWait(
63
+ resourceGroupName: string,
64
+ cloudHsmClusterName: string,
65
+ peConnectionName: string,
66
+ options?: CloudHsmClusterPrivateEndpointConnectionsDeleteOptionalParams
67
+ ): Promise<void>;
68
+ /**
69
+ * Gets the private endpoint connection for the Cloud Hsm Cluster.
70
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
71
+ * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
72
+ * Cloud HSM Cluster names must be between 3 and 24 characters in length.
73
+ * @param peConnectionName Name of the private endpoint connection associated with the Cloud HSM
74
+ * Cluster.
75
+ * @param options The options parameters.
76
+ */
77
+ get(
78
+ resourceGroupName: string,
79
+ cloudHsmClusterName: string,
80
+ peConnectionName: string,
81
+ options?: CloudHsmClusterPrivateEndpointConnectionsGetOptionalParams
82
+ ): Promise<CloudHsmClusterPrivateEndpointConnectionsGetResponse>;
83
+ }
@@ -0,0 +1,28 @@
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 {
10
+ CloudHsmClusterPrivateLinkResourcesListByCloudHsmClusterOptionalParams,
11
+ CloudHsmClusterPrivateLinkResourcesListByCloudHsmClusterResponse
12
+ } from "../models";
13
+
14
+ /** Interface representing a CloudHsmClusterPrivateLinkResources. */
15
+ export interface CloudHsmClusterPrivateLinkResources {
16
+ /**
17
+ * Gets the private link resources supported for the Cloud Hsm Cluster.
18
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
19
+ * @param cloudHsmClusterName The name of the Cloud HSM Cluster within the specified resource group.
20
+ * Cloud HSM Cluster names must be between 3 and 24 characters in length.
21
+ * @param options The options parameters.
22
+ */
23
+ listByCloudHsmCluster(
24
+ resourceGroupName: string,
25
+ cloudHsmClusterName: string,
26
+ options?: CloudHsmClusterPrivateLinkResourcesListByCloudHsmClusterOptionalParams
27
+ ): Promise<CloudHsmClusterPrivateLinkResourcesListByCloudHsmClusterResponse>;
28
+ }