@azure/arm-recoveryservicesbackup 10.0.1-alpha.20230320.1 → 10.1.0

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 (147) hide show
  1. package/CHANGELOG.md +17 -10
  2. package/dist/index.js +209 -78
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/dist-esm/samples-dev/backupEnginesGetSample.js +1 -1
  7. package/dist-esm/samples-dev/backupEnginesListSample.js +1 -1
  8. package/dist-esm/samples-dev/backupJobsListSample.js +3 -3
  9. package/dist-esm/samples-dev/backupOperationResultsGetSample.js +1 -1
  10. package/dist-esm/samples-dev/backupOperationStatusesGetSample.js +1 -1
  11. package/dist-esm/samples-dev/backupPoliciesListSample.js +3 -3
  12. package/dist-esm/samples-dev/backupProtectableItemsListSample.js +1 -1
  13. package/dist-esm/samples-dev/backupProtectedItemsListSample.js +1 -1
  14. package/dist-esm/samples-dev/backupProtectionContainersListSample.js +1 -1
  15. package/dist-esm/samples-dev/backupProtectionIntentListSample.js +1 -1
  16. package/dist-esm/samples-dev/backupResourceEncryptionConfigsGetSample.js +1 -1
  17. package/dist-esm/samples-dev/backupResourceEncryptionConfigsUpdateSample.js +1 -1
  18. package/dist-esm/samples-dev/backupResourceStorageConfigsNonCrrGetSample.js +1 -1
  19. package/dist-esm/samples-dev/backupResourceStorageConfigsNonCrrPatchSample.js +1 -1
  20. package/dist-esm/samples-dev/backupResourceStorageConfigsNonCrrUpdateSample.js +1 -1
  21. package/dist-esm/samples-dev/backupResourceVaultConfigsGetSample.js +1 -1
  22. package/dist-esm/samples-dev/backupResourceVaultConfigsPutSample.js +1 -1
  23. package/dist-esm/samples-dev/backupResourceVaultConfigsUpdateSample.js +1 -1
  24. package/dist-esm/samples-dev/backupStatusGetSample.js +1 -1
  25. package/dist-esm/samples-dev/backupUsageSummariesListSample.js +2 -2
  26. package/dist-esm/samples-dev/backupWorkloadItemsListSample.js +1 -1
  27. package/dist-esm/samples-dev/backupsTriggerSample.js +1 -1
  28. package/dist-esm/samples-dev/bmsPrepareDataMoveOperationResultGetSample.js +1 -1
  29. package/dist-esm/samples-dev/bmsPrepareDataMoveSample.js +1 -1
  30. package/dist-esm/samples-dev/bmsTriggerDataMoveSample.js +1 -1
  31. package/dist-esm/samples-dev/deletedProtectionContainersListSample.js +1 -1
  32. package/dist-esm/samples-dev/exportJobsOperationResultsGetSample.js +1 -1
  33. package/dist-esm/samples-dev/featureSupportValidateSample.js +1 -1
  34. package/dist-esm/samples-dev/getOperationStatusSample.js +1 -1
  35. package/dist-esm/samples-dev/itemLevelRecoveryConnectionsProvisionSample.js +1 -1
  36. package/dist-esm/samples-dev/itemLevelRecoveryConnectionsRevokeSample.js +1 -1
  37. package/dist-esm/samples-dev/jobCancellationsTriggerSample.js +1 -1
  38. package/dist-esm/samples-dev/jobDetailsGetSample.js +1 -1
  39. package/dist-esm/samples-dev/jobOperationResultsGetSample.js +1 -1
  40. package/dist-esm/samples-dev/jobsExportSample.js +1 -1
  41. package/dist-esm/samples-dev/moveRecoveryPointSample.js +1 -1
  42. package/dist-esm/samples-dev/operationValidateSample.js +2 -2
  43. package/dist-esm/samples-dev/operationsListSample.js +1 -1
  44. package/dist-esm/samples-dev/privateEndpointConnectionDeleteSample.js +1 -1
  45. package/dist-esm/samples-dev/privateEndpointConnectionGetSample.js +1 -1
  46. package/dist-esm/samples-dev/privateEndpointConnectionPutSample.js +1 -1
  47. package/dist-esm/samples-dev/privateEndpointGetOperationStatusSample.js +1 -1
  48. package/dist-esm/samples-dev/protectableContainersListSample.js +1 -1
  49. package/dist-esm/samples-dev/protectedItemOperationResultsGetSample.js +1 -1
  50. package/dist-esm/samples-dev/protectedItemOperationStatusesGetSample.js +1 -1
  51. package/dist-esm/samples-dev/protectedItemsCreateOrUpdateSample.js +2 -2
  52. package/dist-esm/samples-dev/protectedItemsDeleteSample.js +1 -1
  53. package/dist-esm/samples-dev/protectedItemsGetSample.js +2 -2
  54. package/dist-esm/samples-dev/protectionContainerOperationResultsGetSample.js +1 -1
  55. package/dist-esm/samples-dev/protectionContainerRefreshOperationResultsGetSample.js +1 -1
  56. package/dist-esm/samples-dev/protectionContainersGetSample.js +1 -1
  57. package/dist-esm/samples-dev/protectionContainersInquireSample.js +1 -1
  58. package/dist-esm/samples-dev/protectionContainersRefreshSample.js +1 -1
  59. package/dist-esm/samples-dev/protectionContainersRegisterSample.js +1 -1
  60. package/dist-esm/samples-dev/protectionContainersUnregisterSample.js +1 -1
  61. package/dist-esm/samples-dev/protectionIntentCreateOrUpdateSample.js +1 -1
  62. package/dist-esm/samples-dev/protectionIntentDeleteSample.js +1 -1
  63. package/dist-esm/samples-dev/protectionIntentGetSample.js +1 -1
  64. package/dist-esm/samples-dev/protectionIntentValidateSample.js +1 -1
  65. package/dist-esm/samples-dev/protectionPoliciesCreateOrUpdateSample.js +7 -7
  66. package/dist-esm/samples-dev/protectionPoliciesDeleteSample.js +1 -1
  67. package/dist-esm/samples-dev/protectionPoliciesGetSample.js +2 -2
  68. package/dist-esm/samples-dev/protectionPolicyOperationResultsGetSample.js +1 -1
  69. package/dist-esm/samples-dev/protectionPolicyOperationStatusesGetSample.js +1 -1
  70. package/dist-esm/samples-dev/recoveryPointsGetSample.js +1 -1
  71. package/dist-esm/samples-dev/recoveryPointsListSample.js +1 -1
  72. package/dist-esm/samples-dev/recoveryPointsRecommendedForMoveListSample.js +1 -1
  73. package/dist-esm/samples-dev/resourceGuardProxiesGetSample.js +1 -1
  74. package/dist-esm/samples-dev/resourceGuardProxyDeleteSample.js +1 -1
  75. package/dist-esm/samples-dev/resourceGuardProxyGetSample.js +1 -1
  76. package/dist-esm/samples-dev/resourceGuardProxyPutSample.js +1 -1
  77. package/dist-esm/samples-dev/resourceGuardProxyUnlockDeleteSample.js +1 -1
  78. package/dist-esm/samples-dev/restoresTriggerSample.js +11 -7
  79. package/dist-esm/samples-dev/restoresTriggerSample.js.map +1 -1
  80. package/dist-esm/samples-dev/securityPiNsGetSample.js +1 -1
  81. package/dist-esm/samples-dev/validateOperationResultsGetSample.js +1 -1
  82. package/dist-esm/samples-dev/validateOperationStatusesGetSample.js +1 -1
  83. package/dist-esm/samples-dev/validateOperationTriggerSample.js +1 -1
  84. package/dist-esm/src/lroImpl.d.ts +6 -11
  85. package/dist-esm/src/lroImpl.d.ts.map +1 -1
  86. package/dist-esm/src/lroImpl.js +12 -20
  87. package/dist-esm/src/lroImpl.js.map +1 -1
  88. package/dist-esm/src/models/index.d.ts +38 -0
  89. package/dist-esm/src/models/index.d.ts.map +1 -1
  90. package/dist-esm/src/models/index.js.map +1 -1
  91. package/dist-esm/src/models/mappers.d.ts +3 -0
  92. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  93. package/dist-esm/src/models/mappers.js +99 -0
  94. package/dist-esm/src/models/mappers.js.map +1 -1
  95. package/dist-esm/src/models/parameters.js +1 -1
  96. package/dist-esm/src/operations/privateEndpointConnectionOperations.d.ts +3 -3
  97. package/dist-esm/src/operations/privateEndpointConnectionOperations.d.ts.map +1 -1
  98. package/dist-esm/src/operations/privateEndpointConnectionOperations.js +29 -16
  99. package/dist-esm/src/operations/privateEndpointConnectionOperations.js.map +1 -1
  100. package/dist-esm/src/operations/protectionPolicies.d.ts +2 -2
  101. package/dist-esm/src/operations/protectionPolicies.d.ts.map +1 -1
  102. package/dist-esm/src/operations/protectionPolicies.js +10 -6
  103. package/dist-esm/src/operations/protectionPolicies.js.map +1 -1
  104. package/dist-esm/src/operations/restores.d.ts +2 -2
  105. package/dist-esm/src/operations/restores.d.ts.map +1 -1
  106. package/dist-esm/src/operations/restores.js +19 -15
  107. package/dist-esm/src/operations/restores.js.map +1 -1
  108. package/dist-esm/src/operations/validateOperation.d.ts +2 -2
  109. package/dist-esm/src/operations/validateOperation.d.ts.map +1 -1
  110. package/dist-esm/src/operations/validateOperation.js +10 -6
  111. package/dist-esm/src/operations/validateOperation.js.map +1 -1
  112. package/dist-esm/src/operationsInterfaces/privateEndpointConnectionOperations.d.ts +3 -3
  113. package/dist-esm/src/operationsInterfaces/privateEndpointConnectionOperations.d.ts.map +1 -1
  114. package/dist-esm/src/operationsInterfaces/protectionPolicies.d.ts +2 -2
  115. package/dist-esm/src/operationsInterfaces/protectionPolicies.d.ts.map +1 -1
  116. package/dist-esm/src/operationsInterfaces/restores.d.ts +2 -2
  117. package/dist-esm/src/operationsInterfaces/restores.d.ts.map +1 -1
  118. package/dist-esm/src/operationsInterfaces/validateOperation.d.ts +2 -2
  119. package/dist-esm/src/operationsInterfaces/validateOperation.d.ts.map +1 -1
  120. package/dist-esm/src/recoveryServicesBackupClient.d.ts +4 -4
  121. package/dist-esm/src/recoveryServicesBackupClient.d.ts.map +1 -1
  122. package/dist-esm/src/recoveryServicesBackupClient.js +37 -25
  123. package/dist-esm/src/recoveryServicesBackupClient.js.map +1 -1
  124. package/dist-esm/test/recoveryservicesbackup_operations_test.spec.d.ts +4 -0
  125. package/dist-esm/test/recoveryservicesbackup_operations_test.spec.d.ts.map +1 -0
  126. package/dist-esm/test/recoveryservicesbackup_operations_test.spec.js +142 -0
  127. package/dist-esm/test/recoveryservicesbackup_operations_test.spec.js.map +1 -0
  128. package/package.json +6 -5
  129. package/review/arm-recoveryservicesbackup.api.md +37 -10
  130. package/src/lroImpl.ts +31 -23
  131. package/src/models/index.ts +44 -0
  132. package/src/models/mappers.ts +107 -0
  133. package/src/models/parameters.ts +1 -1
  134. package/src/operations/privateEndpointConnectionOperations.ts +33 -21
  135. package/src/operations/protectionPolicies.ts +15 -11
  136. package/src/operations/restores.ts +15 -11
  137. package/src/operations/validateOperation.ts +15 -11
  138. package/src/operationsInterfaces/privateEndpointConnectionOperations.ts +4 -4
  139. package/src/operationsInterfaces/protectionPolicies.ts +2 -2
  140. package/src/operationsInterfaces/restores.ts +2 -2
  141. package/src/operationsInterfaces/validateOperation.ts +2 -2
  142. package/src/recoveryServicesBackupClient.ts +35 -31
  143. package/types/arm-recoveryservicesbackup.d.ts +52 -10
  144. package/dist-esm/test/sampleTest.d.ts +0 -2
  145. package/dist-esm/test/sampleTest.d.ts.map +0 -1
  146. package/dist-esm/test/sampleTest.js +0 -38
  147. package/dist-esm/test/sampleTest.js.map +0 -1
@@ -1103,6 +1103,8 @@ export interface RecoveryPointProperties {
1103
1103
  expiryTime?: string;
1104
1104
  /** Rule name tagged on Recovery Point that governs life cycle */
1105
1105
  ruleName?: string;
1106
+ /** Bool to indicate whether RP is in soft delete state or not */
1107
+ isSoftDeleted?: boolean;
1106
1108
  }
1107
1109
 
1108
1110
  /** Restore file specs like file path, type and target folder path info. */
@@ -1466,6 +1468,8 @@ export interface BmsrpQueryObject {
1466
1468
  extendedInfo?: boolean;
1467
1469
  /** Whether the RP can be moved to another tier */
1468
1470
  moveReadyRPOnly?: boolean;
1471
+ /** Flag to indicate whether Soft Deleted RPs should be included/excluded from result. */
1472
+ includeSoftDeletedRP?: boolean;
1469
1473
  }
1470
1474
 
1471
1475
  /** Disk information */
@@ -1673,6 +1677,28 @@ export interface RecoveryPointDiskConfiguration {
1673
1677
  excludedDiskList?: DiskInformation[];
1674
1678
  }
1675
1679
 
1680
+ /** The extended location of Recovery point where VM was present. */
1681
+ export interface ExtendedLocation {
1682
+ /** Name of the extended location. */
1683
+ name?: string;
1684
+ /** Type of the extended location. Possible values include: 'EdgeZone' */
1685
+ type?: string;
1686
+ }
1687
+
1688
+ /** Restore request parameters for Secured VMs */
1689
+ export interface SecuredVMDetails {
1690
+ /** Gets or Sets Disk Encryption Set Id for Secured VM OS Disk */
1691
+ securedVMOsDiskEncryptionSetId?: string;
1692
+ }
1693
+
1694
+ /** Specifies target network access settings for disks of VM to be restored. */
1695
+ export interface TargetDiskNetworkAccessSettings {
1696
+ /** Network access settings to be used for restored disks */
1697
+ targetDiskNetworkAccessOption?: TargetDiskNetworkAccessOption;
1698
+ /** Gets or sets the ARM resource ID of the target disk access to be used when TargetDiskNetworkAccessOption is set to TargetDiskNetworkAccessOption.UseNew */
1699
+ targetDiskAccessId?: string;
1700
+ }
1701
+
1676
1702
  /** Filters to list the jobs. */
1677
1703
  export interface JobQueryObject {
1678
1704
  /** Status of the job. */
@@ -2628,8 +2654,12 @@ export interface IaasVMRecoveryPoint extends RecoveryPoint {
2628
2654
  recoveryPointMoveReadinessInfo?: {
2629
2655
  [propertyName: string]: RecoveryPointMoveReadinessInfo;
2630
2656
  };
2657
+ /** Security Type of the Disk */
2658
+ securityType?: string;
2631
2659
  /** Properties of Recovery Point */
2632
2660
  recoveryPointProperties?: RecoveryPointProperties;
2661
+ /** This flag denotes if any of the disks in the VM are using Private access network setting */
2662
+ isPrivateAccessEnabledOnAnyDisk?: boolean;
2633
2663
  }
2634
2664
 
2635
2665
  /** AzureFileShare Restore Request */
@@ -2744,6 +2774,15 @@ export interface IaasVMRestoreRequest extends RestoreRequest {
2744
2774
  identityInfo?: IdentityInfo;
2745
2775
  /** IaaS VM workload specific restore details for restores using managed identity. */
2746
2776
  identityBasedRestoreDetails?: IdentityBasedRestoreDetails;
2777
+ /**
2778
+ * Target extended location where the VM should be restored,
2779
+ * should be null if restore is to be done in public cloud
2780
+ */
2781
+ extendedLocation?: ExtendedLocation;
2782
+ /** Stores Secured VM Details */
2783
+ securedVMDetails?: SecuredVMDetails;
2784
+ /** Specifies target network access settings for disks of VM to be restored, */
2785
+ targetDiskNetworkAccessSettings?: TargetDiskNetworkAccessSettings;
2747
2786
  }
2748
2787
 
2749
2788
  /** Azure VM (Mercury) workload-specific backup policy. */
@@ -5483,6 +5522,11 @@ export type DayOfWeek =
5483
5522
  | "Thursday"
5484
5523
  | "Friday"
5485
5524
  | "Saturday";
5525
+ /** Defines values for TargetDiskNetworkAccessOption. */
5526
+ export type TargetDiskNetworkAccessOption =
5527
+ | "SameAsOnSourceDisks"
5528
+ | "EnablePrivateAccessForAllDisks"
5529
+ | "EnablePublicAccessForAllDisks";
5486
5530
  /** Defines values for WeekOfMonth. */
5487
5531
  export type WeekOfMonth =
5488
5532
  | "First"
@@ -2378,6 +2378,12 @@ export const RecoveryPointProperties: coreClient.CompositeMapper = {
2378
2378
  type: {
2379
2379
  name: "String"
2380
2380
  }
2381
+ },
2382
+ isSoftDeleted: {
2383
+ serializedName: "isSoftDeleted",
2384
+ type: {
2385
+ name: "Boolean"
2386
+ }
2381
2387
  }
2382
2388
  }
2383
2389
  }
@@ -3352,6 +3358,12 @@ export const BmsrpQueryObject: coreClient.CompositeMapper = {
3352
3358
  type: {
3353
3359
  name: "Boolean"
3354
3360
  }
3361
+ },
3362
+ includeSoftDeletedRP: {
3363
+ serializedName: "includeSoftDeletedRP",
3364
+ type: {
3365
+ name: "Boolean"
3366
+ }
3355
3367
  }
3356
3368
  }
3357
3369
  }
@@ -3945,6 +3957,68 @@ export const RecoveryPointDiskConfiguration: coreClient.CompositeMapper = {
3945
3957
  }
3946
3958
  };
3947
3959
 
3960
+ export const ExtendedLocation: coreClient.CompositeMapper = {
3961
+ type: {
3962
+ name: "Composite",
3963
+ className: "ExtendedLocation",
3964
+ modelProperties: {
3965
+ name: {
3966
+ serializedName: "name",
3967
+ type: {
3968
+ name: "String"
3969
+ }
3970
+ },
3971
+ type: {
3972
+ serializedName: "type",
3973
+ type: {
3974
+ name: "String"
3975
+ }
3976
+ }
3977
+ }
3978
+ }
3979
+ };
3980
+
3981
+ export const SecuredVMDetails: coreClient.CompositeMapper = {
3982
+ type: {
3983
+ name: "Composite",
3984
+ className: "SecuredVMDetails",
3985
+ modelProperties: {
3986
+ securedVMOsDiskEncryptionSetId: {
3987
+ serializedName: "securedVMOsDiskEncryptionSetId",
3988
+ type: {
3989
+ name: "String"
3990
+ }
3991
+ }
3992
+ }
3993
+ }
3994
+ };
3995
+
3996
+ export const TargetDiskNetworkAccessSettings: coreClient.CompositeMapper = {
3997
+ type: {
3998
+ name: "Composite",
3999
+ className: "TargetDiskNetworkAccessSettings",
4000
+ modelProperties: {
4001
+ targetDiskNetworkAccessOption: {
4002
+ serializedName: "targetDiskNetworkAccessOption",
4003
+ type: {
4004
+ name: "Enum",
4005
+ allowedValues: [
4006
+ "SameAsOnSourceDisks",
4007
+ "EnablePrivateAccessForAllDisks",
4008
+ "EnablePublicAccessForAllDisks"
4009
+ ]
4010
+ }
4011
+ },
4012
+ targetDiskAccessId: {
4013
+ serializedName: "targetDiskAccessId",
4014
+ type: {
4015
+ name: "String"
4016
+ }
4017
+ }
4018
+ }
4019
+ }
4020
+ };
4021
+
3948
4022
  export const JobQueryObject: coreClient.CompositeMapper = {
3949
4023
  type: {
3950
4024
  name: "Composite",
@@ -6636,12 +6710,24 @@ export const IaasVMRecoveryPoint: coreClient.CompositeMapper = {
6636
6710
  }
6637
6711
  }
6638
6712
  },
6713
+ securityType: {
6714
+ serializedName: "securityType",
6715
+ type: {
6716
+ name: "String"
6717
+ }
6718
+ },
6639
6719
  recoveryPointProperties: {
6640
6720
  serializedName: "recoveryPointProperties",
6641
6721
  type: {
6642
6722
  name: "Composite",
6643
6723
  className: "RecoveryPointProperties"
6644
6724
  }
6725
+ },
6726
+ isPrivateAccessEnabledOnAnyDisk: {
6727
+ serializedName: "isPrivateAccessEnabledOnAnyDisk",
6728
+ type: {
6729
+ name: "Boolean"
6730
+ }
6645
6731
  }
6646
6732
  }
6647
6733
  }
@@ -6901,6 +6987,27 @@ export const IaasVMRestoreRequest: coreClient.CompositeMapper = {
6901
6987
  name: "Composite",
6902
6988
  className: "IdentityBasedRestoreDetails"
6903
6989
  }
6990
+ },
6991
+ extendedLocation: {
6992
+ serializedName: "extendedLocation",
6993
+ type: {
6994
+ name: "Composite",
6995
+ className: "ExtendedLocation"
6996
+ }
6997
+ },
6998
+ securedVMDetails: {
6999
+ serializedName: "securedVMDetails",
7000
+ type: {
7001
+ name: "Composite",
7002
+ className: "SecuredVMDetails"
7003
+ }
7004
+ },
7005
+ targetDiskNetworkAccessSettings: {
7006
+ serializedName: "targetDiskNetworkAccessSettings",
7007
+ type: {
7008
+ name: "Composite",
7009
+ className: "TargetDiskNetworkAccessSettings"
7010
+ }
6904
7011
  }
6905
7012
  }
6906
7013
  }
@@ -63,7 +63,7 @@ export const $host: OperationURLParameter = {
63
63
  export const apiVersion: OperationQueryParameter = {
64
64
  parameterPath: "apiVersion",
65
65
  mapper: {
66
- defaultValue: "2023-01-01",
66
+ defaultValue: "2023-02-01",
67
67
  isConstant: true,
68
68
  serializedName: "api-version",
69
69
  type: {
@@ -11,8 +11,12 @@ import * as coreClient from "@azure/core-client";
11
11
  import * as Mappers from "../models/mappers";
12
12
  import * as Parameters from "../models/parameters";
13
13
  import { RecoveryServicesBackupClient } from "../recoveryServicesBackupClient";
14
- import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
15
- import { LroImpl } from "../lroImpl";
14
+ import {
15
+ SimplePollerLike,
16
+ OperationState,
17
+ createHttpPoller
18
+ } from "@azure/core-lro";
19
+ import { createLroSpec } from "../lroImpl";
16
20
  import {
17
21
  PrivateEndpointConnectionGetOptionalParams,
18
22
  PrivateEndpointConnectionGetResponse,
@@ -71,8 +75,8 @@ export class PrivateEndpointConnectionOperationsImpl
71
75
  parameters: PrivateEndpointConnectionResource,
72
76
  options?: PrivateEndpointConnectionPutOptionalParams
73
77
  ): Promise<
74
- PollerLike<
75
- PollOperationState<PrivateEndpointConnectionPutResponse>,
78
+ SimplePollerLike<
79
+ OperationState<PrivateEndpointConnectionPutResponse>,
76
80
  PrivateEndpointConnectionPutResponse
77
81
  >
78
82
  > {
@@ -82,7 +86,7 @@ export class PrivateEndpointConnectionOperationsImpl
82
86
  ): Promise<PrivateEndpointConnectionPutResponse> => {
83
87
  return this.client.sendOperationRequest(args, spec);
84
88
  };
85
- const sendOperation = async (
89
+ const sendOperationFn = async (
86
90
  args: coreClient.OperationArguments,
87
91
  spec: coreClient.OperationSpec
88
92
  ) => {
@@ -115,19 +119,22 @@ export class PrivateEndpointConnectionOperationsImpl
115
119
  };
116
120
  };
117
121
 
118
- const lro = new LroImpl(
119
- sendOperation,
120
- {
122
+ const lro = createLroSpec({
123
+ sendOperationFn,
124
+ args: {
121
125
  vaultName,
122
126
  resourceGroupName,
123
127
  privateEndpointConnectionName,
124
128
  parameters,
125
129
  options
126
130
  },
127
- putOperationSpec
128
- );
129
- const poller = new LroEngine(lro, {
130
- resumeFrom: options?.resumeFrom,
131
+ spec: putOperationSpec
132
+ });
133
+ const poller = await createHttpPoller<
134
+ PrivateEndpointConnectionPutResponse,
135
+ OperationState<PrivateEndpointConnectionPutResponse>
136
+ >(lro, {
137
+ restoreFrom: options?.resumeFrom,
131
138
  intervalInMs: options?.updateIntervalInMs
132
139
  });
133
140
  await poller.poll();
@@ -173,14 +180,14 @@ export class PrivateEndpointConnectionOperationsImpl
173
180
  resourceGroupName: string,
174
181
  privateEndpointConnectionName: string,
175
182
  options?: PrivateEndpointConnectionDeleteOptionalParams
176
- ): Promise<PollerLike<PollOperationState<void>, void>> {
183
+ ): Promise<SimplePollerLike<OperationState<void>, void>> {
177
184
  const directSendOperation = async (
178
185
  args: coreClient.OperationArguments,
179
186
  spec: coreClient.OperationSpec
180
187
  ): Promise<void> => {
181
188
  return this.client.sendOperationRequest(args, spec);
182
189
  };
183
- const sendOperation = async (
190
+ const sendOperationFn = async (
184
191
  args: coreClient.OperationArguments,
185
192
  spec: coreClient.OperationSpec
186
193
  ) => {
@@ -213,13 +220,18 @@ export class PrivateEndpointConnectionOperationsImpl
213
220
  };
214
221
  };
215
222
 
216
- const lro = new LroImpl(
217
- sendOperation,
218
- { vaultName, resourceGroupName, privateEndpointConnectionName, options },
219
- deleteOperationSpec
220
- );
221
- const poller = new LroEngine(lro, {
222
- resumeFrom: options?.resumeFrom,
223
+ const lro = createLroSpec({
224
+ sendOperationFn,
225
+ args: {
226
+ vaultName,
227
+ resourceGroupName,
228
+ privateEndpointConnectionName,
229
+ options
230
+ },
231
+ spec: deleteOperationSpec
232
+ });
233
+ const poller = await createHttpPoller<void, OperationState<void>>(lro, {
234
+ restoreFrom: options?.resumeFrom,
223
235
  intervalInMs: options?.updateIntervalInMs
224
236
  });
225
237
  await poller.poll();
@@ -11,8 +11,12 @@ import * as coreClient from "@azure/core-client";
11
11
  import * as Mappers from "../models/mappers";
12
12
  import * as Parameters from "../models/parameters";
13
13
  import { RecoveryServicesBackupClient } from "../recoveryServicesBackupClient";
14
- import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
15
- import { LroImpl } from "../lroImpl";
14
+ import {
15
+ SimplePollerLike,
16
+ OperationState,
17
+ createHttpPoller
18
+ } from "@azure/core-lro";
19
+ import { createLroSpec } from "../lroImpl";
16
20
  import {
17
21
  ProtectionPoliciesGetOptionalParams,
18
22
  ProtectionPoliciesGetResponse,
@@ -95,14 +99,14 @@ export class ProtectionPoliciesImpl implements ProtectionPolicies {
95
99
  resourceGroupName: string,
96
100
  policyName: string,
97
101
  options?: ProtectionPoliciesDeleteOptionalParams
98
- ): Promise<PollerLike<PollOperationState<void>, void>> {
102
+ ): Promise<SimplePollerLike<OperationState<void>, void>> {
99
103
  const directSendOperation = async (
100
104
  args: coreClient.OperationArguments,
101
105
  spec: coreClient.OperationSpec
102
106
  ): Promise<void> => {
103
107
  return this.client.sendOperationRequest(args, spec);
104
108
  };
105
- const sendOperation = async (
109
+ const sendOperationFn = async (
106
110
  args: coreClient.OperationArguments,
107
111
  spec: coreClient.OperationSpec
108
112
  ) => {
@@ -135,13 +139,13 @@ export class ProtectionPoliciesImpl implements ProtectionPolicies {
135
139
  };
136
140
  };
137
141
 
138
- const lro = new LroImpl(
139
- sendOperation,
140
- { vaultName, resourceGroupName, policyName, options },
141
- deleteOperationSpec
142
- );
143
- const poller = new LroEngine(lro, {
144
- resumeFrom: options?.resumeFrom,
142
+ const lro = createLroSpec({
143
+ sendOperationFn,
144
+ args: { vaultName, resourceGroupName, policyName, options },
145
+ spec: deleteOperationSpec
146
+ });
147
+ const poller = await createHttpPoller<void, OperationState<void>>(lro, {
148
+ restoreFrom: options?.resumeFrom,
145
149
  intervalInMs: options?.updateIntervalInMs
146
150
  });
147
151
  await poller.poll();
@@ -11,8 +11,12 @@ import * as coreClient from "@azure/core-client";
11
11
  import * as Mappers from "../models/mappers";
12
12
  import * as Parameters from "../models/parameters";
13
13
  import { RecoveryServicesBackupClient } from "../recoveryServicesBackupClient";
14
- import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
15
- import { LroImpl } from "../lroImpl";
14
+ import {
15
+ SimplePollerLike,
16
+ OperationState,
17
+ createHttpPoller
18
+ } from "@azure/core-lro";
19
+ import { createLroSpec } from "../lroImpl";
16
20
  import {
17
21
  RestoreRequestResource,
18
22
  RestoresTriggerOptionalParams
@@ -53,14 +57,14 @@ export class RestoresImpl implements Restores {
53
57
  recoveryPointId: string,
54
58
  parameters: RestoreRequestResource,
55
59
  options?: RestoresTriggerOptionalParams
56
- ): Promise<PollerLike<PollOperationState<void>, void>> {
60
+ ): Promise<SimplePollerLike<OperationState<void>, void>> {
57
61
  const directSendOperation = async (
58
62
  args: coreClient.OperationArguments,
59
63
  spec: coreClient.OperationSpec
60
64
  ): Promise<void> => {
61
65
  return this.client.sendOperationRequest(args, spec);
62
66
  };
63
- const sendOperation = async (
67
+ const sendOperationFn = async (
64
68
  args: coreClient.OperationArguments,
65
69
  spec: coreClient.OperationSpec
66
70
  ) => {
@@ -93,9 +97,9 @@ export class RestoresImpl implements Restores {
93
97
  };
94
98
  };
95
99
 
96
- const lro = new LroImpl(
97
- sendOperation,
98
- {
100
+ const lro = createLroSpec({
101
+ sendOperationFn,
102
+ args: {
99
103
  vaultName,
100
104
  resourceGroupName,
101
105
  fabricName,
@@ -105,10 +109,10 @@ export class RestoresImpl implements Restores {
105
109
  parameters,
106
110
  options
107
111
  },
108
- triggerOperationSpec
109
- );
110
- const poller = new LroEngine(lro, {
111
- resumeFrom: options?.resumeFrom,
112
+ spec: triggerOperationSpec
113
+ });
114
+ const poller = await createHttpPoller<void, OperationState<void>>(lro, {
115
+ restoreFrom: options?.resumeFrom,
112
116
  intervalInMs: options?.updateIntervalInMs
113
117
  });
114
118
  await poller.poll();
@@ -11,8 +11,12 @@ import * as coreClient from "@azure/core-client";
11
11
  import * as Mappers from "../models/mappers";
12
12
  import * as Parameters from "../models/parameters";
13
13
  import { RecoveryServicesBackupClient } from "../recoveryServicesBackupClient";
14
- import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
15
- import { LroImpl } from "../lroImpl";
14
+ import {
15
+ SimplePollerLike,
16
+ OperationState,
17
+ createHttpPoller
18
+ } from "@azure/core-lro";
19
+ import { createLroSpec } from "../lroImpl";
16
20
  import {
17
21
  ValidateOperationRequestUnion,
18
22
  ValidateOperationTriggerOptionalParams
@@ -44,14 +48,14 @@ export class ValidateOperationImpl implements ValidateOperation {
44
48
  resourceGroupName: string,
45
49
  parameters: ValidateOperationRequestUnion,
46
50
  options?: ValidateOperationTriggerOptionalParams
47
- ): Promise<PollerLike<PollOperationState<void>, void>> {
51
+ ): Promise<SimplePollerLike<OperationState<void>, void>> {
48
52
  const directSendOperation = async (
49
53
  args: coreClient.OperationArguments,
50
54
  spec: coreClient.OperationSpec
51
55
  ): Promise<void> => {
52
56
  return this.client.sendOperationRequest(args, spec);
53
57
  };
54
- const sendOperation = async (
58
+ const sendOperationFn = async (
55
59
  args: coreClient.OperationArguments,
56
60
  spec: coreClient.OperationSpec
57
61
  ) => {
@@ -84,13 +88,13 @@ export class ValidateOperationImpl implements ValidateOperation {
84
88
  };
85
89
  };
86
90
 
87
- const lro = new LroImpl(
88
- sendOperation,
89
- { vaultName, resourceGroupName, parameters, options },
90
- triggerOperationSpec
91
- );
92
- const poller = new LroEngine(lro, {
93
- resumeFrom: options?.resumeFrom,
91
+ const lro = createLroSpec({
92
+ sendOperationFn,
93
+ args: { vaultName, resourceGroupName, parameters, options },
94
+ spec: triggerOperationSpec
95
+ });
96
+ const poller = await createHttpPoller<void, OperationState<void>>(lro, {
97
+ restoreFrom: options?.resumeFrom,
94
98
  intervalInMs: options?.updateIntervalInMs
95
99
  });
96
100
  await poller.poll();
@@ -6,7 +6,7 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
 
9
- import { PollerLike, PollOperationState } from "@azure/core-lro";
9
+ import { SimplePollerLike, OperationState } from "@azure/core-lro";
10
10
  import {
11
11
  PrivateEndpointConnectionGetOptionalParams,
12
12
  PrivateEndpointConnectionGetResponse,
@@ -48,8 +48,8 @@ export interface PrivateEndpointConnectionOperations {
48
48
  parameters: PrivateEndpointConnectionResource,
49
49
  options?: PrivateEndpointConnectionPutOptionalParams
50
50
  ): Promise<
51
- PollerLike<
52
- PollOperationState<PrivateEndpointConnectionPutResponse>,
51
+ SimplePollerLike<
52
+ OperationState<PrivateEndpointConnectionPutResponse>,
53
53
  PrivateEndpointConnectionPutResponse
54
54
  >
55
55
  >;
@@ -82,7 +82,7 @@ export interface PrivateEndpointConnectionOperations {
82
82
  resourceGroupName: string,
83
83
  privateEndpointConnectionName: string,
84
84
  options?: PrivateEndpointConnectionDeleteOptionalParams
85
- ): Promise<PollerLike<PollOperationState<void>, void>>;
85
+ ): Promise<SimplePollerLike<OperationState<void>, void>>;
86
86
  /**
87
87
  * Delete Private Endpoint requests. This call is made by Backup Admin.
88
88
  * @param vaultName The name of the recovery services vault.
@@ -6,7 +6,7 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
 
9
- import { PollerLike, PollOperationState } from "@azure/core-lro";
9
+ import { SimplePollerLike, OperationState } from "@azure/core-lro";
10
10
  import {
11
11
  ProtectionPoliciesGetOptionalParams,
12
12
  ProtectionPoliciesGetResponse,
@@ -67,7 +67,7 @@ export interface ProtectionPolicies {
67
67
  resourceGroupName: string,
68
68
  policyName: string,
69
69
  options?: ProtectionPoliciesDeleteOptionalParams
70
- ): Promise<PollerLike<PollOperationState<void>, void>>;
70
+ ): Promise<SimplePollerLike<OperationState<void>, void>>;
71
71
  /**
72
72
  * Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous
73
73
  * operation. Status of the
@@ -6,7 +6,7 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
 
9
- import { PollerLike, PollOperationState } from "@azure/core-lro";
9
+ import { SimplePollerLike, OperationState } from "@azure/core-lro";
10
10
  import {
11
11
  RestoreRequestResource,
12
12
  RestoresTriggerOptionalParams
@@ -37,7 +37,7 @@ export interface Restores {
37
37
  recoveryPointId: string,
38
38
  parameters: RestoreRequestResource,
39
39
  options?: RestoresTriggerOptionalParams
40
- ): Promise<PollerLike<PollOperationState<void>, void>>;
40
+ ): Promise<SimplePollerLike<OperationState<void>, void>>;
41
41
  /**
42
42
  * Restores the specified backed up data. This is an asynchronous operation. To know the status of this
43
43
  * API call, use
@@ -6,7 +6,7 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
 
9
- import { PollerLike, PollOperationState } from "@azure/core-lro";
9
+ import { SimplePollerLike, OperationState } from "@azure/core-lro";
10
10
  import {
11
11
  ValidateOperationRequestUnion,
12
12
  ValidateOperationTriggerOptionalParams
@@ -28,7 +28,7 @@ export interface ValidateOperation {
28
28
  resourceGroupName: string,
29
29
  parameters: ValidateOperationRequestUnion,
30
30
  options?: ValidateOperationTriggerOptionalParams
31
- ): Promise<PollerLike<PollOperationState<void>, void>>;
31
+ ): Promise<SimplePollerLike<OperationState<void>, void>>;
32
32
  /**
33
33
  * Validate operation for specified backed up item in the form of an asynchronous operation. Returns
34
34
  * tracking headers which can be tracked using GetValidateOperationResult API.