From 34458b5884647c5b1d5e72c1a5160f5a852efc35 Mon Sep 17 00:00:00 2001 From: SDKAuto <sdkautomation@microsoft.com> Date: Mon, 7 Aug 2023 13:34:25 +0000 Subject: [PATCH] CodeGen from PR 23991 in Azure/azure-rest-api-specs Merge 7b9468a8c8a01b37a5da1804483293e8358b791a into a3089b2764df11b10a8a43e2a5a33dbe4d3653ca --- common/config/rush/pnpm-lock.yaml | 15 +- .../CHANGELOG.md | 54 +- .../arm-recoveryservices-siterecovery/LICENSE | 2 +- .../_meta.json | 8 +- .../package.json | 21 +- .../arm-recoveryservices-siterecovery.api.md | 267 ++++++--- .../src/lroImpl.ts | 54 +- .../src/models/index.ts | 302 ++++++++++ .../src/models/mappers.ts | 559 ++++++++++++++++++ .../src/models/parameters.ts | 2 +- .../src/operations/replicationFabrics.ts | 154 ++--- .../src/operations/replicationJobs.ts | 106 ++-- .../operations/replicationMigrationItems.ts | 210 ++++--- .../operations/replicationNetworkMappings.ts | 72 ++- .../src/operations/replicationPolicies.ts | 72 ++- .../operations/replicationProtectedItems.ts | 441 ++++++++------ .../replicationProtectionContainerMappings.ts | 90 +-- .../replicationProtectionContainers.ts | 99 ++-- .../operations/replicationRecoveryPlans.ts | 269 +++++---- .../replicationRecoveryServicesProviders.ts | 110 ++-- ...eplicationStorageClassificationMappings.ts | 51 +- .../src/operations/replicationVaultHealth.ts | 31 +- .../src/operations/replicationVaultSetting.ts | 37 +- .../src/operations/replicationvCenters.ts | 78 ++- .../replicationFabrics.ts | 24 +- .../operationsInterfaces/replicationJobs.ts | 18 +- .../replicationMigrationItems.ts | 36 +- .../replicationNetworkMappings.ts | 12 +- .../replicationPolicies.ts | 12 +- .../replicationProtectedItems.ts | 76 ++- .../replicationProtectionContainerMappings.ts | 14 +- .../replicationProtectionContainers.ts | 18 +- .../replicationRecoveryPlans.ts | 40 +- .../replicationRecoveryServicesProviders.ts | 14 +- ...eplicationStorageClassificationMappings.ts | 10 +- .../replicationVaultHealth.ts | 6 +- .../replicationVaultSetting.ts | 6 +- .../replicationvCenters.ts | 12 +- .../src/siteRecoveryManagementClient.ts | 4 +- .../test/sampleTest.ts | 43 ++ .../tsconfig.json | 10 +- 41 files changed, 2401 insertions(+), 1058 deletions(-) create mode 100644 sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/test/sampleTest.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index ff5cbc35691d..ebb5804870af 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -4818,7 +4818,7 @@ packages: dependencies: semver: 7.5.4 shelljs: 0.8.5 - typescript: 5.2.0-dev.20230804 + typescript: 5.2.0-dev.20230807 dev: false /duplexer3/0.1.5: @@ -10326,8 +10326,8 @@ packages: hasBin: true dev: false - /typescript/5.2.0-dev.20230804: - resolution: {integrity: sha512-4g7zcF85Th+zpaMgR7CHzM1MqjJ0Fv3+2PUxzCUMW8tc7aRYGPtQBfnAyN0+yXChZaV6lVejmrh7hle1DMAEcw==} + /typescript/5.2.0-dev.20230807: + resolution: {integrity: sha512-sF8sZl3r/mpAdKAxASaWaoU+mNPF3g8OrZ601HraU2l4WEwAf6nO7sq0Bzl+Y3FV7sWjy+gb6kdM1CtLjVne/g==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -15967,7 +15967,7 @@ packages: dev: false file:projects/arm-recoveryservices-siterecovery.tgz: - resolution: {integrity: sha512-CburLVfm8RTB0DPRJAnrvOo7Pixk8dmFxw2lMp75az3K3YwhXJIDVSYmnqkLj8BMfzepQSxXXFQnR676O8Acig==, tarball: file:projects/arm-recoveryservices-siterecovery.tgz} + resolution: {integrity: sha512-UcKGH5ppAwI5//BZfCcETWM1+1goiVUw2eaoQBcRPVnICtLbKTZ+QEKY5ctaCCS/XtzIDWioeoqkuo2bp+IK5Q==, tarball: file:projects/arm-recoveryservices-siterecovery.tgz} name: '@rush-temp/arm-recoveryservices-siterecovery' version: 0.0.0 dependencies: @@ -15981,7 +15981,8 @@ packages: '@types/node': 14.18.54 chai: 4.3.7 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.3.1 + mkdirp: 2.1.6 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 @@ -19300,7 +19301,7 @@ packages: dev: false file:projects/identity-cache-persistence.tgz: - resolution: {integrity: sha512-suRodhlNh4+HKHblrqtOmgcd0v93ubPFRNq17B5XYbNYKyI2Od9n8dyx888Ncq111F0AkZ18ZuHtfOlGGj2kMA==, tarball: file:projects/identity-cache-persistence.tgz} + resolution: {integrity: sha512-m0hoOpafOAY1QGvzbcWmZ09OVvF0vr9h1IJXZPPBm7k9Z6PY7YnbcVSmGhNDTM7uYh+dviEKRh4+iw1ZDeZkDw==, tarball: file:projects/identity-cache-persistence.tgz} name: '@rush-temp/identity-cache-persistence' version: 0.0.0 dependencies: @@ -20254,7 +20255,7 @@ packages: dev: false file:projects/notification-hubs.tgz: - resolution: {integrity: sha512-9MFu1tfnxzzD0yi+/vt2r/ZCUZ79/cMut8DlmlKrYaA4vJo/CicjvfUAWMHz6lkhbJLpYuHy73X0IPIbve11fg==, tarball: file:projects/notification-hubs.tgz} + resolution: {integrity: sha512-DGgM6ZJxfKnVK8axRpJQXEKY+mhOliJQc1QU5q/cyzia188SP9xzz4UX73KmCYNchJuY8AhUoRMShUy+p4ztlg==, tarball: file:projects/notification-hubs.tgz} name: '@rush-temp/notification-hubs' version: 0.0.0 dependencies: diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/CHANGELOG.md b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/CHANGELOG.md index 369c2941b7d7..2d55e417d61a 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/CHANGELOG.md +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/CHANGELOG.md @@ -1,15 +1,49 @@ # Release History + +## 5.1.0 (2023-08-07) + +**Features** -## 5.0.2 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added Interface A2AFabricSpecificLocationDetails + - Added Interface ApplianceMonitoringDetails + - Added Interface ApplianceResourceDetails + - Added Interface DataStoreUtilizationDetails + - Added Interface GatewayOperationDetails + - Added Interface OSUpgradeSupportedVersions + - Added Interface VMwareCbtSecurityProfileProperties + - Added Type Alias ChurnOptionSelected + - Added Type Alias SecurityType + - Interface A2AReplicationDetails has a new optional parameter churnOptionSelected + - Interface AzureFabricSpecificDetails has a new optional parameter locationDetails + - Interface FabricQueryParameter has a new optional parameter extendedLocationMappings + - Interface FabricQueryParameter has a new optional parameter locationDetails + - Interface HyperVReplicaAzurePlannedFailoverProviderInput has a new optional parameter osUpgradeVersion + - Interface HyperVReplicaAzureReplicationDetails has a new optional parameter allAvailableOSUpgradeConfigurations + - Interface HyperVReplicaAzureTestFailoverInput has a new optional parameter osUpgradeVersion + - Interface InMageAzureV2ReplicationDetails has a new optional parameter allAvailableOSUpgradeConfigurations + - Interface InMageAzureV2ReplicationDetails has a new optional parameter osName + - Interface InMageAzureV2ReplicationDetails has a new optional parameter supportedOSVersions + - Interface InMageAzureV2TestFailoverInput has a new optional parameter osUpgradeVersion + - Interface InMageAzureV2UnplannedFailoverInput has a new optional parameter osUpgradeVersion + - Interface VMwareCbtEnableMigrationInput has a new optional parameter confidentialVmKeyVaultId + - Interface VMwareCbtEnableMigrationInput has a new optional parameter targetVmSecurityProfile + - Interface VMwareCbtMigrateInput has a new optional parameter osUpgradeVersion + - Interface VMwareCbtMigrationDetails has a new optional parameter applianceMonitoringDetails + - Interface VMwareCbtMigrationDetails has a new optional parameter confidentialVmKeyVaultId + - Interface VMwareCbtMigrationDetails has a new optional parameter deltaSyncProgressPercentage + - Interface VMwareCbtMigrationDetails has a new optional parameter deltaSyncRetryCount + - Interface VMwareCbtMigrationDetails has a new optional parameter gatewayOperationDetails + - Interface VMwareCbtMigrationDetails has a new optional parameter isCheckSumResyncCycle + - Interface VMwareCbtMigrationDetails has a new optional parameter operationName + - Interface VMwareCbtMigrationDetails has a new optional parameter osName + - Interface VMwareCbtMigrationDetails has a new optional parameter supportedOSVersions + - Interface VMwareCbtMigrationDetails has a new optional parameter targetVmSecurityProfile + - Interface VMwareCbtProtectedDiskDetails has a new optional parameter gatewayOperationDetails + - Interface VMwareCbtProtectionContainerMappingDetails has a new optional parameter excludedSkus + - Interface VMwareCbtTestMigrateInput has a new optional parameter osUpgradeVersion + - Added Enum KnownChurnOptionSelected + - Added Enum KnownSecurityType + ## 5.0.1 (2023-01-05) **Migration Guide** diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/LICENSE b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/LICENSE +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2023 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/_meta.json b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/_meta.json index 904e9a13e3ad..d88ea7ae4d5e 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/_meta.json +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/_meta.json @@ -1,8 +1,8 @@ { - "commit": "1be09531e4c6edeafde41d6562371566d39669e8", + "commit": "7b7ed9693e3198596736a7bda8c4f07452d1d465", "readme": "specification/recoveryservicessiterecovery/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\recoveryservicessiterecovery\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.4 --generate-sample=true", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/recoveryservicessiterecovery/resource-manager/readme.md --use=@autorest/typescript@^6.0.4", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.5.2", - "use": "@autorest/typescript@6.0.0-rc.4" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.1", + "use": "@autorest/typescript@^6.0.4" } \ No newline at end of file diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/package.json b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/package.json index 78e6209554cf..c4eb72df6ea6 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/package.json +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/package.json @@ -3,15 +3,15 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for SiteRecoveryManagementClient.", - "version": "5.0.2", + "version": "5.1.0", "engines": { "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.4", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.6.1", + "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", "@azure/core-rest-pipeline": "^1.8.0", "tslib": "^2.2.0" @@ -33,12 +33,13 @@ "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-multi-entry": "^6.0.0", "@rollup/plugin-node-resolve": "^13.1.3", - "mkdirp": "^1.0.4", + "mkdirp": "^2.1.2", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", "typescript": "~5.0.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", + "dotenv": "^16.0.0", "@azure/identity": "^2.0.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", @@ -49,7 +50,6 @@ "@types/node": "^14.0.0", "@azure/dev-tool": "^1.0.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" @@ -111,12 +111,5 @@ ] }, "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-recoveryservices-siterecovery?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery" +} \ No newline at end of file diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/review/arm-recoveryservices-siterecovery.api.md b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/review/arm-recoveryservices-siterecovery.api.md index 119a0fa21a78..54bf698e2dda 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/review/arm-recoveryservices-siterecovery.api.md +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/review/arm-recoveryservices-siterecovery.api.md @@ -6,9 +6,9 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { PollerLike } from '@azure/core-lro'; -import { PollOperationState } from '@azure/core-lro'; +import { SimplePollerLike } from '@azure/core-lro'; // @public export interface A2AAddDisksInput extends AddDisksProviderSpecificInput { @@ -135,6 +135,22 @@ export interface A2AExtendedLocationDetails { recoveryExtendedLocation?: ExtendedLocation; } +// @public +export interface A2AFabricSpecificLocationDetails { + initialPrimaryExtendedLocation?: ExtendedLocation; + initialPrimaryFabricLocation?: string; + initialPrimaryZone?: string; + initialRecoveryExtendedLocation?: ExtendedLocation; + initialRecoveryFabricLocation?: string; + initialRecoveryZone?: string; + primaryExtendedLocation?: ExtendedLocation; + primaryFabricLocation?: string; + primaryZone?: string; + recoveryExtendedLocation?: ExtendedLocation; + recoveryFabricLocation?: string; + recoveryZone?: string; +} + // @public export interface A2APolicyCreationInput extends PolicyProviderSpecificInput { appConsistentFrequencyInMinutes?: number; @@ -264,6 +280,7 @@ export interface A2AReplicationDetails extends ReplicationProviderSpecificSettin agentExpiryDate?: Date; agentVersion?: string; autoProtectionOfDataDisk?: AutoProtectionOfDataDisk; + readonly churnOptionSelected?: ChurnOptionSelected; fabricObjectId?: string; initialPrimaryExtendedLocation?: ExtendedLocation; readonly initialPrimaryFabricLocation?: string; @@ -552,11 +569,29 @@ export interface ApplianceCollection { value?: ReplicationAppliance[]; } +// @public +export interface ApplianceMonitoringDetails { + readonly cpuDetails?: ApplianceResourceDetails; + readonly datastoreSnapshot?: DataStoreUtilizationDetails[]; + readonly disksReplicationDetails?: ApplianceResourceDetails; + readonly esxiNfcBuffer?: ApplianceResourceDetails; + readonly networkBandwidth?: ApplianceResourceDetails; + readonly ramDetails?: ApplianceResourceDetails; +} + // @public export interface ApplianceQueryParameter { providerType?: string; } +// @public +export interface ApplianceResourceDetails { + readonly capacity?: number; + readonly processUtilization?: number; + readonly status?: string; + readonly totalUtilization?: number; +} + // @public export interface ApplianceSpecificDetails { instanceType: "InMageRcm"; @@ -637,6 +672,7 @@ export interface AzureFabricSpecificDetails extends FabricSpecificDetails { extendedLocations?: A2AExtendedLocationDetails[]; instanceType: "Azure"; location?: string; + locationDetails?: A2AFabricSpecificLocationDetails[]; zones?: A2AZoneDetails[]; } @@ -681,6 +717,9 @@ export interface AzureVmDiskDetails { vhdType?: string; } +// @public +export type ChurnOptionSelected = string; + // @public export interface ComputeSizeErrorDetails { message?: string; @@ -820,6 +859,13 @@ export interface DataStore { uuid?: string; } +// @public +export interface DataStoreUtilizationDetails { + readonly dataStoreName?: string; + readonly totalSnapshotsCreated?: number; + readonly totalSnapshotsSupported?: number; +} + // @public export type DataSyncStatus = string; @@ -1107,8 +1153,10 @@ export interface FabricProperties { export interface FabricQueryParameter { biosId?: string; discoveryType?: string; + extendedLocationMappings?: string; fetchAgentDetails?: string; fqdn?: string; + locationDetails?: string; osType?: string; zoneToZoneMappings?: string; } @@ -1188,6 +1236,18 @@ export interface FailoverReplicationProtectedItemDetails { testVmName?: string; } +// @public +export interface GatewayOperationDetails { + readonly dataStores?: string[]; + readonly hostName?: string; + readonly progressPercentage?: number; + readonly state?: string; + readonly timeElapsed?: number; + readonly timeRemaining?: number; + readonly uploadSpeed?: number; + readonly vmwareReadThroughput?: number; +} + // @public export function getContinuationToken(page: unknown): string | undefined; @@ -1344,6 +1404,7 @@ export interface HyperVReplicaAzureManagedDiskDetails { // @public export interface HyperVReplicaAzurePlannedFailoverProviderInput extends PlannedFailoverProviderSpecificFailoverInput { instanceType: "HyperVReplicaAzure"; + osUpgradeVersion?: string; primaryKekCertificatePfx?: string; recoveryPointId?: string; secondaryKekCertificatePfx?: string; @@ -1372,6 +1433,7 @@ export interface HyperVReplicaAzurePolicyInput extends PolicyProviderSpecificInp // @public export interface HyperVReplicaAzureReplicationDetails extends ReplicationProviderSpecificSettings { + allAvailableOSUpgradeConfigurations?: OSUpgradeSupportedVersions[]; azureVmDiskDetails?: AzureVmDiskDetails[]; enableRdpOnTargetOption?: string; encryption?: string; @@ -1433,6 +1495,7 @@ export type HyperVReplicaAzureRpRecoveryPointType = string; // @public export interface HyperVReplicaAzureTestFailoverInput extends TestFailoverProviderSpecificInput { instanceType: "HyperVReplicaAzure"; + osUpgradeVersion?: string; primaryKekCertificatePfx?: string; recoveryPointId?: string; secondaryKekCertificatePfx?: string; @@ -1783,6 +1846,7 @@ export interface InMageAzureV2RecoveryPointDetails extends ProviderSpecificRecov export interface InMageAzureV2ReplicationDetails extends ReplicationProviderSpecificSettings { agentExpiryDate?: Date; agentVersion?: string; + allAvailableOSUpgradeConfigurations?: OSUpgradeSupportedVersions[]; azureVMDiskDetails?: AzureVmDiskDetails[]; azureVmGeneration?: string; compressedDataRateInMB?: number; @@ -1807,6 +1871,7 @@ export interface InMageAzureV2ReplicationDetails extends ReplicationProviderSpec multiVmGroupName?: string; multiVmSyncStatus?: string; osDiskId?: string; + readonly osName?: string; osType?: string; osVersion?: string; processServerId?: string; @@ -1832,6 +1897,7 @@ export interface InMageAzureV2ReplicationDetails extends ReplicationProviderSpec sourceVmCpuCount?: number; sourceVmRamSizeInMB?: number; sqlServerLicenseType?: string; + supportedOSVersions?: string[]; switchProviderBlockingErrorDetails?: InMageAzureV2SwitchProviderBlockingErrorDetails[]; switchProviderDetails?: InMageAzureV2SwitchProviderDetails; targetAvailabilityZone?: string; @@ -1904,12 +1970,14 @@ export interface InMageAzureV2SwitchProviderInput extends SwitchProviderSpecific // @public export interface InMageAzureV2TestFailoverInput extends TestFailoverProviderSpecificInput { instanceType: "InMageAzureV2"; + osUpgradeVersion?: string; recoveryPointId?: string; } // @public export interface InMageAzureV2UnplannedFailoverInput extends UnplannedFailoverProviderSpecificInput { instanceType: "InMageAzureV2"; + osUpgradeVersion?: string; recoveryPointId?: string; } @@ -2892,6 +2960,12 @@ export enum KnownAutoProtectionOfDataDisk { Enabled = "Enabled" } +// @public +export enum KnownChurnOptionSelected { + High = "High", + Normal = "Normal" +} + // @public export enum KnownDataSyncStatus { ForDownTime = "ForDownTime", @@ -3156,6 +3230,13 @@ export enum KnownRpInMageRecoveryPointType { LatestTime = "LatestTime" } +// @public +export enum KnownSecurityType { + ConfidentialVM = "ConfidentialVM", + None = "None", + TrustedLaunch = "TrustedLaunch" +} + // @public export enum KnownSetMultiVmSyncStatus { Disable = "Disable", @@ -3530,6 +3611,12 @@ export interface OSDiskDetails { vhdName?: string; } +// @public +export interface OSUpgradeSupportedVersions { + readonly supportedSourceOsVersion?: string; + readonly supportedTargetOsVersions?: string[]; +} + // @public export interface OSVersionWrapper { servicePack?: string; @@ -4396,19 +4483,19 @@ export type ReplicationEventsListResponse = EventCollection; // @public export interface ReplicationFabrics { - beginCheckConsistency(resourceName: string, resourceGroupName: string, fabricName: string, options?: ReplicationFabricsCheckConsistencyOptionalParams): Promise<PollerLike<PollOperationState<ReplicationFabricsCheckConsistencyResponse>, ReplicationFabricsCheckConsistencyResponse>>; + beginCheckConsistency(resourceName: string, resourceGroupName: string, fabricName: string, options?: ReplicationFabricsCheckConsistencyOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationFabricsCheckConsistencyResponse>, ReplicationFabricsCheckConsistencyResponse>>; beginCheckConsistencyAndWait(resourceName: string, resourceGroupName: string, fabricName: string, options?: ReplicationFabricsCheckConsistencyOptionalParams): Promise<ReplicationFabricsCheckConsistencyResponse>; - beginCreate(resourceName: string, resourceGroupName: string, fabricName: string, input: FabricCreationInput, options?: ReplicationFabricsCreateOptionalParams): Promise<PollerLike<PollOperationState<ReplicationFabricsCreateResponse>, ReplicationFabricsCreateResponse>>; + beginCreate(resourceName: string, resourceGroupName: string, fabricName: string, input: FabricCreationInput, options?: ReplicationFabricsCreateOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationFabricsCreateResponse>, ReplicationFabricsCreateResponse>>; beginCreateAndWait(resourceName: string, resourceGroupName: string, fabricName: string, input: FabricCreationInput, options?: ReplicationFabricsCreateOptionalParams): Promise<ReplicationFabricsCreateResponse>; - beginDelete(resourceName: string, resourceGroupName: string, fabricName: string, options?: ReplicationFabricsDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>; + beginDelete(resourceName: string, resourceGroupName: string, fabricName: string, options?: ReplicationFabricsDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>; beginDeleteAndWait(resourceName: string, resourceGroupName: string, fabricName: string, options?: ReplicationFabricsDeleteOptionalParams): Promise<void>; - beginMigrateToAad(resourceName: string, resourceGroupName: string, fabricName: string, options?: ReplicationFabricsMigrateToAadOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>; + beginMigrateToAad(resourceName: string, resourceGroupName: string, fabricName: string, options?: ReplicationFabricsMigrateToAadOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>; beginMigrateToAadAndWait(resourceName: string, resourceGroupName: string, fabricName: string, options?: ReplicationFabricsMigrateToAadOptionalParams): Promise<void>; - beginPurge(resourceName: string, resourceGroupName: string, fabricName: string, options?: ReplicationFabricsPurgeOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>; + beginPurge(resourceName: string, resourceGroupName: string, fabricName: string, options?: ReplicationFabricsPurgeOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>; beginPurgeAndWait(resourceName: string, resourceGroupName: string, fabricName: string, options?: ReplicationFabricsPurgeOptionalParams): Promise<void>; - beginReassociateGateway(resourceName: string, resourceGroupName: string, fabricName: string, failoverProcessServerRequest: FailoverProcessServerRequest, options?: ReplicationFabricsReassociateGatewayOptionalParams): Promise<PollerLike<PollOperationState<ReplicationFabricsReassociateGatewayResponse>, ReplicationFabricsReassociateGatewayResponse>>; + beginReassociateGateway(resourceName: string, resourceGroupName: string, fabricName: string, failoverProcessServerRequest: FailoverProcessServerRequest, options?: ReplicationFabricsReassociateGatewayOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationFabricsReassociateGatewayResponse>, ReplicationFabricsReassociateGatewayResponse>>; beginReassociateGatewayAndWait(resourceName: string, resourceGroupName: string, fabricName: string, failoverProcessServerRequest: FailoverProcessServerRequest, options?: ReplicationFabricsReassociateGatewayOptionalParams): Promise<ReplicationFabricsReassociateGatewayResponse>; - beginRenewCertificate(resourceName: string, resourceGroupName: string, fabricName: string, renewCertificate: RenewCertificateInput, options?: ReplicationFabricsRenewCertificateOptionalParams): Promise<PollerLike<PollOperationState<ReplicationFabricsRenewCertificateResponse>, ReplicationFabricsRenewCertificateResponse>>; + beginRenewCertificate(resourceName: string, resourceGroupName: string, fabricName: string, renewCertificate: RenewCertificateInput, options?: ReplicationFabricsRenewCertificateOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationFabricsRenewCertificateResponse>, ReplicationFabricsRenewCertificateResponse>>; beginRenewCertificateAndWait(resourceName: string, resourceGroupName: string, fabricName: string, renewCertificate: RenewCertificateInput, options?: ReplicationFabricsRenewCertificateOptionalParams): Promise<ReplicationFabricsRenewCertificateResponse>; get(resourceName: string, resourceGroupName: string, fabricName: string, options?: ReplicationFabricsGetOptionalParams): Promise<ReplicationFabricsGetResponse>; list(resourceName: string, resourceGroupName: string, options?: ReplicationFabricsListOptionalParams): PagedAsyncIterableIterator<Fabric>; @@ -4497,13 +4584,13 @@ export interface ReplicationGroupDetails extends ConfigurationSettings { // @public export interface ReplicationJobs { - beginCancel(resourceName: string, resourceGroupName: string, jobName: string, options?: ReplicationJobsCancelOptionalParams): Promise<PollerLike<PollOperationState<ReplicationJobsCancelResponse>, ReplicationJobsCancelResponse>>; + beginCancel(resourceName: string, resourceGroupName: string, jobName: string, options?: ReplicationJobsCancelOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationJobsCancelResponse>, ReplicationJobsCancelResponse>>; beginCancelAndWait(resourceName: string, resourceGroupName: string, jobName: string, options?: ReplicationJobsCancelOptionalParams): Promise<ReplicationJobsCancelResponse>; - beginExport(resourceName: string, resourceGroupName: string, jobQueryParameter: JobQueryParameter, options?: ReplicationJobsExportOptionalParams): Promise<PollerLike<PollOperationState<ReplicationJobsExportResponse>, ReplicationJobsExportResponse>>; + beginExport(resourceName: string, resourceGroupName: string, jobQueryParameter: JobQueryParameter, options?: ReplicationJobsExportOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationJobsExportResponse>, ReplicationJobsExportResponse>>; beginExportAndWait(resourceName: string, resourceGroupName: string, jobQueryParameter: JobQueryParameter, options?: ReplicationJobsExportOptionalParams): Promise<ReplicationJobsExportResponse>; - beginRestart(resourceName: string, resourceGroupName: string, jobName: string, options?: ReplicationJobsRestartOptionalParams): Promise<PollerLike<PollOperationState<ReplicationJobsRestartResponse>, ReplicationJobsRestartResponse>>; + beginRestart(resourceName: string, resourceGroupName: string, jobName: string, options?: ReplicationJobsRestartOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationJobsRestartResponse>, ReplicationJobsRestartResponse>>; beginRestartAndWait(resourceName: string, resourceGroupName: string, jobName: string, options?: ReplicationJobsRestartOptionalParams): Promise<ReplicationJobsRestartResponse>; - beginResume(resourceName: string, resourceGroupName: string, jobName: string, resumeJobParams: ResumeJobParams, options?: ReplicationJobsResumeOptionalParams): Promise<PollerLike<PollOperationState<ReplicationJobsResumeResponse>, ReplicationJobsResumeResponse>>; + beginResume(resourceName: string, resourceGroupName: string, jobName: string, resumeJobParams: ResumeJobParams, options?: ReplicationJobsResumeOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationJobsResumeResponse>, ReplicationJobsResumeResponse>>; beginResumeAndWait(resourceName: string, resourceGroupName: string, jobName: string, resumeJobParams: ResumeJobParams, options?: ReplicationJobsResumeOptionalParams): Promise<ReplicationJobsResumeResponse>; get(resourceName: string, resourceGroupName: string, jobName: string, options?: ReplicationJobsGetOptionalParams): Promise<ReplicationJobsGetResponse>; list(resourceName: string, resourceGroupName: string, options?: ReplicationJobsListOptionalParams): PagedAsyncIterableIterator<Job>; @@ -4596,23 +4683,23 @@ export type ReplicationLogicalNetworksListByReplicationFabricsResponse = Logical // @public export interface ReplicationMigrationItems { - beginCreate(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, migrationItemName: string, input: EnableMigrationInput, options?: ReplicationMigrationItemsCreateOptionalParams): Promise<PollerLike<PollOperationState<ReplicationMigrationItemsCreateResponse>, ReplicationMigrationItemsCreateResponse>>; + beginCreate(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, migrationItemName: string, input: EnableMigrationInput, options?: ReplicationMigrationItemsCreateOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationMigrationItemsCreateResponse>, ReplicationMigrationItemsCreateResponse>>; beginCreateAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, migrationItemName: string, input: EnableMigrationInput, options?: ReplicationMigrationItemsCreateOptionalParams): Promise<ReplicationMigrationItemsCreateResponse>; - beginDelete(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, migrationItemName: string, options?: ReplicationMigrationItemsDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>; + beginDelete(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, migrationItemName: string, options?: ReplicationMigrationItemsDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>; beginDeleteAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, migrationItemName: string, options?: ReplicationMigrationItemsDeleteOptionalParams): Promise<void>; - beginMigrate(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, migrationItemName: string, migrateInput: MigrateInput, options?: ReplicationMigrationItemsMigrateOptionalParams): Promise<PollerLike<PollOperationState<ReplicationMigrationItemsMigrateResponse>, ReplicationMigrationItemsMigrateResponse>>; + beginMigrate(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, migrationItemName: string, migrateInput: MigrateInput, options?: ReplicationMigrationItemsMigrateOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationMigrationItemsMigrateResponse>, ReplicationMigrationItemsMigrateResponse>>; beginMigrateAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, migrationItemName: string, migrateInput: MigrateInput, options?: ReplicationMigrationItemsMigrateOptionalParams): Promise<ReplicationMigrationItemsMigrateResponse>; - beginPauseReplication(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, migrationItemName: string, pauseReplicationInput: PauseReplicationInput, options?: ReplicationMigrationItemsPauseReplicationOptionalParams): Promise<PollerLike<PollOperationState<ReplicationMigrationItemsPauseReplicationResponse>, ReplicationMigrationItemsPauseReplicationResponse>>; + beginPauseReplication(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, migrationItemName: string, pauseReplicationInput: PauseReplicationInput, options?: ReplicationMigrationItemsPauseReplicationOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationMigrationItemsPauseReplicationResponse>, ReplicationMigrationItemsPauseReplicationResponse>>; beginPauseReplicationAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, migrationItemName: string, pauseReplicationInput: PauseReplicationInput, options?: ReplicationMigrationItemsPauseReplicationOptionalParams): Promise<ReplicationMigrationItemsPauseReplicationResponse>; - beginResumeReplication(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, migrationItemName: string, resumeReplicationInput: ResumeReplicationInput, options?: ReplicationMigrationItemsResumeReplicationOptionalParams): Promise<PollerLike<PollOperationState<ReplicationMigrationItemsResumeReplicationResponse>, ReplicationMigrationItemsResumeReplicationResponse>>; + beginResumeReplication(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, migrationItemName: string, resumeReplicationInput: ResumeReplicationInput, options?: ReplicationMigrationItemsResumeReplicationOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationMigrationItemsResumeReplicationResponse>, ReplicationMigrationItemsResumeReplicationResponse>>; beginResumeReplicationAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, migrationItemName: string, resumeReplicationInput: ResumeReplicationInput, options?: ReplicationMigrationItemsResumeReplicationOptionalParams): Promise<ReplicationMigrationItemsResumeReplicationResponse>; - beginResync(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, migrationItemName: string, input: ResyncInput, options?: ReplicationMigrationItemsResyncOptionalParams): Promise<PollerLike<PollOperationState<ReplicationMigrationItemsResyncResponse>, ReplicationMigrationItemsResyncResponse>>; + beginResync(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, migrationItemName: string, input: ResyncInput, options?: ReplicationMigrationItemsResyncOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationMigrationItemsResyncResponse>, ReplicationMigrationItemsResyncResponse>>; beginResyncAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, migrationItemName: string, input: ResyncInput, options?: ReplicationMigrationItemsResyncOptionalParams): Promise<ReplicationMigrationItemsResyncResponse>; - beginTestMigrate(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, migrationItemName: string, testMigrateInput: TestMigrateInput, options?: ReplicationMigrationItemsTestMigrateOptionalParams): Promise<PollerLike<PollOperationState<ReplicationMigrationItemsTestMigrateResponse>, ReplicationMigrationItemsTestMigrateResponse>>; + beginTestMigrate(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, migrationItemName: string, testMigrateInput: TestMigrateInput, options?: ReplicationMigrationItemsTestMigrateOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationMigrationItemsTestMigrateResponse>, ReplicationMigrationItemsTestMigrateResponse>>; beginTestMigrateAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, migrationItemName: string, testMigrateInput: TestMigrateInput, options?: ReplicationMigrationItemsTestMigrateOptionalParams): Promise<ReplicationMigrationItemsTestMigrateResponse>; - beginTestMigrateCleanup(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, migrationItemName: string, testMigrateCleanupInput: TestMigrateCleanupInput, options?: ReplicationMigrationItemsTestMigrateCleanupOptionalParams): Promise<PollerLike<PollOperationState<ReplicationMigrationItemsTestMigrateCleanupResponse>, ReplicationMigrationItemsTestMigrateCleanupResponse>>; + beginTestMigrateCleanup(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, migrationItemName: string, testMigrateCleanupInput: TestMigrateCleanupInput, options?: ReplicationMigrationItemsTestMigrateCleanupOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationMigrationItemsTestMigrateCleanupResponse>, ReplicationMigrationItemsTestMigrateCleanupResponse>>; beginTestMigrateCleanupAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, migrationItemName: string, testMigrateCleanupInput: TestMigrateCleanupInput, options?: ReplicationMigrationItemsTestMigrateCleanupOptionalParams): Promise<ReplicationMigrationItemsTestMigrateCleanupResponse>; - beginUpdate(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, migrationItemName: string, input: UpdateMigrationItemInput, options?: ReplicationMigrationItemsUpdateOptionalParams): Promise<PollerLike<PollOperationState<ReplicationMigrationItemsUpdateResponse>, ReplicationMigrationItemsUpdateResponse>>; + beginUpdate(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, migrationItemName: string, input: UpdateMigrationItemInput, options?: ReplicationMigrationItemsUpdateOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationMigrationItemsUpdateResponse>, ReplicationMigrationItemsUpdateResponse>>; beginUpdateAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, migrationItemName: string, input: UpdateMigrationItemInput, options?: ReplicationMigrationItemsUpdateOptionalParams): Promise<ReplicationMigrationItemsUpdateResponse>; get(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, migrationItemName: string, options?: ReplicationMigrationItemsGetOptionalParams): Promise<ReplicationMigrationItemsGetResponse>; list(resourceName: string, resourceGroupName: string, options?: ReplicationMigrationItemsListOptionalParams): PagedAsyncIterableIterator<MigrationItem>; @@ -4741,11 +4828,11 @@ export type ReplicationMigrationItemsUpdateResponse = MigrationItem; // @public export interface ReplicationNetworkMappings { - beginCreate(resourceName: string, resourceGroupName: string, fabricName: string, networkName: string, networkMappingName: string, input: CreateNetworkMappingInput, options?: ReplicationNetworkMappingsCreateOptionalParams): Promise<PollerLike<PollOperationState<ReplicationNetworkMappingsCreateResponse>, ReplicationNetworkMappingsCreateResponse>>; + beginCreate(resourceName: string, resourceGroupName: string, fabricName: string, networkName: string, networkMappingName: string, input: CreateNetworkMappingInput, options?: ReplicationNetworkMappingsCreateOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationNetworkMappingsCreateResponse>, ReplicationNetworkMappingsCreateResponse>>; beginCreateAndWait(resourceName: string, resourceGroupName: string, fabricName: string, networkName: string, networkMappingName: string, input: CreateNetworkMappingInput, options?: ReplicationNetworkMappingsCreateOptionalParams): Promise<ReplicationNetworkMappingsCreateResponse>; - beginDelete(resourceName: string, resourceGroupName: string, fabricName: string, networkName: string, networkMappingName: string, options?: ReplicationNetworkMappingsDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>; + beginDelete(resourceName: string, resourceGroupName: string, fabricName: string, networkName: string, networkMappingName: string, options?: ReplicationNetworkMappingsDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>; beginDeleteAndWait(resourceName: string, resourceGroupName: string, fabricName: string, networkName: string, networkMappingName: string, options?: ReplicationNetworkMappingsDeleteOptionalParams): Promise<void>; - beginUpdate(resourceName: string, resourceGroupName: string, fabricName: string, networkName: string, networkMappingName: string, input: UpdateNetworkMappingInput, options?: ReplicationNetworkMappingsUpdateOptionalParams): Promise<PollerLike<PollOperationState<ReplicationNetworkMappingsUpdateResponse>, ReplicationNetworkMappingsUpdateResponse>>; + beginUpdate(resourceName: string, resourceGroupName: string, fabricName: string, networkName: string, networkMappingName: string, input: UpdateNetworkMappingInput, options?: ReplicationNetworkMappingsUpdateOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationNetworkMappingsUpdateResponse>, ReplicationNetworkMappingsUpdateResponse>>; beginUpdateAndWait(resourceName: string, resourceGroupName: string, fabricName: string, networkName: string, networkMappingName: string, input: UpdateNetworkMappingInput, options?: ReplicationNetworkMappingsUpdateOptionalParams): Promise<ReplicationNetworkMappingsUpdateResponse>; get(resourceName: string, resourceGroupName: string, fabricName: string, networkName: string, networkMappingName: string, options?: ReplicationNetworkMappingsGetOptionalParams): Promise<ReplicationNetworkMappingsGetResponse>; list(resourceName: string, resourceGroupName: string, options?: ReplicationNetworkMappingsListOptionalParams): PagedAsyncIterableIterator<NetworkMapping>; @@ -4855,11 +4942,11 @@ export type ReplicationNetworksListResponse = NetworkCollection; // @public export interface ReplicationPolicies { - beginCreate(resourceName: string, resourceGroupName: string, policyName: string, input: CreatePolicyInput, options?: ReplicationPoliciesCreateOptionalParams): Promise<PollerLike<PollOperationState<ReplicationPoliciesCreateResponse>, ReplicationPoliciesCreateResponse>>; + beginCreate(resourceName: string, resourceGroupName: string, policyName: string, input: CreatePolicyInput, options?: ReplicationPoliciesCreateOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationPoliciesCreateResponse>, ReplicationPoliciesCreateResponse>>; beginCreateAndWait(resourceName: string, resourceGroupName: string, policyName: string, input: CreatePolicyInput, options?: ReplicationPoliciesCreateOptionalParams): Promise<ReplicationPoliciesCreateResponse>; - beginDelete(resourceName: string, resourceGroupName: string, policyName: string, options?: ReplicationPoliciesDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>; + beginDelete(resourceName: string, resourceGroupName: string, policyName: string, options?: ReplicationPoliciesDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>; beginDeleteAndWait(resourceName: string, resourceGroupName: string, policyName: string, options?: ReplicationPoliciesDeleteOptionalParams): Promise<void>; - beginUpdate(resourceName: string, resourceGroupName: string, policyName: string, input: UpdatePolicyInput, options?: ReplicationPoliciesUpdateOptionalParams): Promise<PollerLike<PollOperationState<ReplicationPoliciesUpdateResponse>, ReplicationPoliciesUpdateResponse>>; + beginUpdate(resourceName: string, resourceGroupName: string, policyName: string, input: UpdatePolicyInput, options?: ReplicationPoliciesUpdateOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationPoliciesUpdateResponse>, ReplicationPoliciesUpdateResponse>>; beginUpdateAndWait(resourceName: string, resourceGroupName: string, policyName: string, input: UpdatePolicyInput, options?: ReplicationPoliciesUpdateOptionalParams): Promise<ReplicationPoliciesUpdateResponse>; get(resourceName: string, resourceGroupName: string, policyName: string, options?: ReplicationPoliciesGetOptionalParams): Promise<ReplicationPoliciesGetResponse>; list(resourceName: string, resourceGroupName: string, options?: ReplicationPoliciesListOptionalParams): PagedAsyncIterableIterator<Policy>; @@ -4990,43 +5077,43 @@ export interface ReplicationProtectedItemProperties { // @public export interface ReplicationProtectedItems { - beginAddDisks(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, addDisksInput: AddDisksInput, options?: ReplicationProtectedItemsAddDisksOptionalParams): Promise<PollerLike<PollOperationState<ReplicationProtectedItemsAddDisksResponse>, ReplicationProtectedItemsAddDisksResponse>>; + beginAddDisks(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, addDisksInput: AddDisksInput, options?: ReplicationProtectedItemsAddDisksOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationProtectedItemsAddDisksResponse>, ReplicationProtectedItemsAddDisksResponse>>; beginAddDisksAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, addDisksInput: AddDisksInput, options?: ReplicationProtectedItemsAddDisksOptionalParams): Promise<ReplicationProtectedItemsAddDisksResponse>; - beginApplyRecoveryPoint(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, applyRecoveryPointInput: ApplyRecoveryPointInput, options?: ReplicationProtectedItemsApplyRecoveryPointOptionalParams): Promise<PollerLike<PollOperationState<ReplicationProtectedItemsApplyRecoveryPointResponse>, ReplicationProtectedItemsApplyRecoveryPointResponse>>; + beginApplyRecoveryPoint(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, applyRecoveryPointInput: ApplyRecoveryPointInput, options?: ReplicationProtectedItemsApplyRecoveryPointOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationProtectedItemsApplyRecoveryPointResponse>, ReplicationProtectedItemsApplyRecoveryPointResponse>>; beginApplyRecoveryPointAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, applyRecoveryPointInput: ApplyRecoveryPointInput, options?: ReplicationProtectedItemsApplyRecoveryPointOptionalParams): Promise<ReplicationProtectedItemsApplyRecoveryPointResponse>; - beginCreate(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, input: EnableProtectionInput, options?: ReplicationProtectedItemsCreateOptionalParams): Promise<PollerLike<PollOperationState<ReplicationProtectedItemsCreateResponse>, ReplicationProtectedItemsCreateResponse>>; + beginCreate(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, input: EnableProtectionInput, options?: ReplicationProtectedItemsCreateOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationProtectedItemsCreateResponse>, ReplicationProtectedItemsCreateResponse>>; beginCreateAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, input: EnableProtectionInput, options?: ReplicationProtectedItemsCreateOptionalParams): Promise<ReplicationProtectedItemsCreateResponse>; - beginDelete(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, disableProtectionInput: DisableProtectionInput, options?: ReplicationProtectedItemsDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>; + beginDelete(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, disableProtectionInput: DisableProtectionInput, options?: ReplicationProtectedItemsDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>; beginDeleteAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, disableProtectionInput: DisableProtectionInput, options?: ReplicationProtectedItemsDeleteOptionalParams): Promise<void>; - beginFailoverCancel(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, options?: ReplicationProtectedItemsFailoverCancelOptionalParams): Promise<PollerLike<PollOperationState<ReplicationProtectedItemsFailoverCancelResponse>, ReplicationProtectedItemsFailoverCancelResponse>>; + beginFailoverCancel(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, options?: ReplicationProtectedItemsFailoverCancelOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationProtectedItemsFailoverCancelResponse>, ReplicationProtectedItemsFailoverCancelResponse>>; beginFailoverCancelAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, options?: ReplicationProtectedItemsFailoverCancelOptionalParams): Promise<ReplicationProtectedItemsFailoverCancelResponse>; - beginFailoverCommit(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, options?: ReplicationProtectedItemsFailoverCommitOptionalParams): Promise<PollerLike<PollOperationState<ReplicationProtectedItemsFailoverCommitResponse>, ReplicationProtectedItemsFailoverCommitResponse>>; + beginFailoverCommit(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, options?: ReplicationProtectedItemsFailoverCommitOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationProtectedItemsFailoverCommitResponse>, ReplicationProtectedItemsFailoverCommitResponse>>; beginFailoverCommitAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, options?: ReplicationProtectedItemsFailoverCommitOptionalParams): Promise<ReplicationProtectedItemsFailoverCommitResponse>; - beginPlannedFailover(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, failoverInput: PlannedFailoverInput, options?: ReplicationProtectedItemsPlannedFailoverOptionalParams): Promise<PollerLike<PollOperationState<ReplicationProtectedItemsPlannedFailoverResponse>, ReplicationProtectedItemsPlannedFailoverResponse>>; + beginPlannedFailover(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, failoverInput: PlannedFailoverInput, options?: ReplicationProtectedItemsPlannedFailoverOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationProtectedItemsPlannedFailoverResponse>, ReplicationProtectedItemsPlannedFailoverResponse>>; beginPlannedFailoverAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, failoverInput: PlannedFailoverInput, options?: ReplicationProtectedItemsPlannedFailoverOptionalParams): Promise<ReplicationProtectedItemsPlannedFailoverResponse>; - beginPurge(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, options?: ReplicationProtectedItemsPurgeOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>; + beginPurge(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, options?: ReplicationProtectedItemsPurgeOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>; beginPurgeAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, options?: ReplicationProtectedItemsPurgeOptionalParams): Promise<void>; - beginRemoveDisks(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, removeDisksInput: RemoveDisksInput, options?: ReplicationProtectedItemsRemoveDisksOptionalParams): Promise<PollerLike<PollOperationState<ReplicationProtectedItemsRemoveDisksResponse>, ReplicationProtectedItemsRemoveDisksResponse>>; + beginRemoveDisks(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, removeDisksInput: RemoveDisksInput, options?: ReplicationProtectedItemsRemoveDisksOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationProtectedItemsRemoveDisksResponse>, ReplicationProtectedItemsRemoveDisksResponse>>; beginRemoveDisksAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, removeDisksInput: RemoveDisksInput, options?: ReplicationProtectedItemsRemoveDisksOptionalParams): Promise<ReplicationProtectedItemsRemoveDisksResponse>; - beginRepairReplication(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, options?: ReplicationProtectedItemsRepairReplicationOptionalParams): Promise<PollerLike<PollOperationState<ReplicationProtectedItemsRepairReplicationResponse>, ReplicationProtectedItemsRepairReplicationResponse>>; + beginRepairReplication(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, options?: ReplicationProtectedItemsRepairReplicationOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationProtectedItemsRepairReplicationResponse>, ReplicationProtectedItemsRepairReplicationResponse>>; beginRepairReplicationAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, options?: ReplicationProtectedItemsRepairReplicationOptionalParams): Promise<ReplicationProtectedItemsRepairReplicationResponse>; - beginReprotect(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, reprotectInput: ReverseReplicationInput, options?: ReplicationProtectedItemsReprotectOptionalParams): Promise<PollerLike<PollOperationState<ReplicationProtectedItemsReprotectResponse>, ReplicationProtectedItemsReprotectResponse>>; + beginReprotect(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, reprotectInput: ReverseReplicationInput, options?: ReplicationProtectedItemsReprotectOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationProtectedItemsReprotectResponse>, ReplicationProtectedItemsReprotectResponse>>; beginReprotectAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, reprotectInput: ReverseReplicationInput, options?: ReplicationProtectedItemsReprotectOptionalParams): Promise<ReplicationProtectedItemsReprotectResponse>; - beginResolveHealthErrors(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, resolveHealthInput: ResolveHealthInput, options?: ReplicationProtectedItemsResolveHealthErrorsOptionalParams): Promise<PollerLike<PollOperationState<ReplicationProtectedItemsResolveHealthErrorsResponse>, ReplicationProtectedItemsResolveHealthErrorsResponse>>; + beginResolveHealthErrors(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, resolveHealthInput: ResolveHealthInput, options?: ReplicationProtectedItemsResolveHealthErrorsOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationProtectedItemsResolveHealthErrorsResponse>, ReplicationProtectedItemsResolveHealthErrorsResponse>>; beginResolveHealthErrorsAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, resolveHealthInput: ResolveHealthInput, options?: ReplicationProtectedItemsResolveHealthErrorsOptionalParams): Promise<ReplicationProtectedItemsResolveHealthErrorsResponse>; - beginSwitchProvider(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, switchProviderInput: SwitchProviderInput, options?: ReplicationProtectedItemsSwitchProviderOptionalParams): Promise<PollerLike<PollOperationState<ReplicationProtectedItemsSwitchProviderResponse>, ReplicationProtectedItemsSwitchProviderResponse>>; + beginSwitchProvider(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, switchProviderInput: SwitchProviderInput, options?: ReplicationProtectedItemsSwitchProviderOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationProtectedItemsSwitchProviderResponse>, ReplicationProtectedItemsSwitchProviderResponse>>; beginSwitchProviderAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, switchProviderInput: SwitchProviderInput, options?: ReplicationProtectedItemsSwitchProviderOptionalParams): Promise<ReplicationProtectedItemsSwitchProviderResponse>; - beginTestFailover(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, testfailoverInput: TestFailoverInput, options?: ReplicationProtectedItemsTestFailoverOptionalParams): Promise<PollerLike<PollOperationState<ReplicationProtectedItemsTestFailoverResponse>, ReplicationProtectedItemsTestFailoverResponse>>; + beginTestFailover(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, testfailoverInput: TestFailoverInput, options?: ReplicationProtectedItemsTestFailoverOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationProtectedItemsTestFailoverResponse>, ReplicationProtectedItemsTestFailoverResponse>>; beginTestFailoverAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, testfailoverInput: TestFailoverInput, options?: ReplicationProtectedItemsTestFailoverOptionalParams): Promise<ReplicationProtectedItemsTestFailoverResponse>; - beginTestFailoverCleanup(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, cleanupInput: TestFailoverCleanupInput, options?: ReplicationProtectedItemsTestFailoverCleanupOptionalParams): Promise<PollerLike<PollOperationState<ReplicationProtectedItemsTestFailoverCleanupResponse>, ReplicationProtectedItemsTestFailoverCleanupResponse>>; + beginTestFailoverCleanup(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, cleanupInput: TestFailoverCleanupInput, options?: ReplicationProtectedItemsTestFailoverCleanupOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationProtectedItemsTestFailoverCleanupResponse>, ReplicationProtectedItemsTestFailoverCleanupResponse>>; beginTestFailoverCleanupAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, cleanupInput: TestFailoverCleanupInput, options?: ReplicationProtectedItemsTestFailoverCleanupOptionalParams): Promise<ReplicationProtectedItemsTestFailoverCleanupResponse>; - beginUnplannedFailover(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, failoverInput: UnplannedFailoverInput, options?: ReplicationProtectedItemsUnplannedFailoverOptionalParams): Promise<PollerLike<PollOperationState<ReplicationProtectedItemsUnplannedFailoverResponse>, ReplicationProtectedItemsUnplannedFailoverResponse>>; + beginUnplannedFailover(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, failoverInput: UnplannedFailoverInput, options?: ReplicationProtectedItemsUnplannedFailoverOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationProtectedItemsUnplannedFailoverResponse>, ReplicationProtectedItemsUnplannedFailoverResponse>>; beginUnplannedFailoverAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, failoverInput: UnplannedFailoverInput, options?: ReplicationProtectedItemsUnplannedFailoverOptionalParams): Promise<ReplicationProtectedItemsUnplannedFailoverResponse>; - beginUpdate(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, updateProtectionInput: UpdateReplicationProtectedItemInput, options?: ReplicationProtectedItemsUpdateOptionalParams): Promise<PollerLike<PollOperationState<ReplicationProtectedItemsUpdateResponse>, ReplicationProtectedItemsUpdateResponse>>; + beginUpdate(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, updateProtectionInput: UpdateReplicationProtectedItemInput, options?: ReplicationProtectedItemsUpdateOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationProtectedItemsUpdateResponse>, ReplicationProtectedItemsUpdateResponse>>; beginUpdateAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, updateProtectionInput: UpdateReplicationProtectedItemInput, options?: ReplicationProtectedItemsUpdateOptionalParams): Promise<ReplicationProtectedItemsUpdateResponse>; - beginUpdateAppliance(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, applianceUpdateInput: UpdateApplianceForReplicationProtectedItemInput, options?: ReplicationProtectedItemsUpdateApplianceOptionalParams): Promise<PollerLike<PollOperationState<ReplicationProtectedItemsUpdateApplianceResponse>, ReplicationProtectedItemsUpdateApplianceResponse>>; + beginUpdateAppliance(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, applianceUpdateInput: UpdateApplianceForReplicationProtectedItemInput, options?: ReplicationProtectedItemsUpdateApplianceOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationProtectedItemsUpdateApplianceResponse>, ReplicationProtectedItemsUpdateApplianceResponse>>; beginUpdateApplianceAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, applianceUpdateInput: UpdateApplianceForReplicationProtectedItemInput, options?: ReplicationProtectedItemsUpdateApplianceOptionalParams): Promise<ReplicationProtectedItemsUpdateApplianceResponse>; - beginUpdateMobilityService(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, updateMobilityServiceRequest: UpdateMobilityServiceRequest, options?: ReplicationProtectedItemsUpdateMobilityServiceOptionalParams): Promise<PollerLike<PollOperationState<ReplicationProtectedItemsUpdateMobilityServiceResponse>, ReplicationProtectedItemsUpdateMobilityServiceResponse>>; + beginUpdateMobilityService(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, updateMobilityServiceRequest: UpdateMobilityServiceRequest, options?: ReplicationProtectedItemsUpdateMobilityServiceOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationProtectedItemsUpdateMobilityServiceResponse>, ReplicationProtectedItemsUpdateMobilityServiceResponse>>; beginUpdateMobilityServiceAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, updateMobilityServiceRequest: UpdateMobilityServiceRequest, options?: ReplicationProtectedItemsUpdateMobilityServiceOptionalParams): Promise<ReplicationProtectedItemsUpdateMobilityServiceResponse>; get(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, replicatedProtectedItemName: string, options?: ReplicationProtectedItemsGetOptionalParams): Promise<ReplicationProtectedItemsGetResponse>; list(resourceName: string, resourceGroupName: string, options?: ReplicationProtectedItemsListOptionalParams): PagedAsyncIterableIterator<ReplicationProtectedItem>; @@ -5243,13 +5330,13 @@ export type ReplicationProtectedItemsUpdateResponse = ReplicationProtectedItem; // @public export interface ReplicationProtectionContainerMappings { - beginCreate(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, mappingName: string, creationInput: CreateProtectionContainerMappingInput, options?: ReplicationProtectionContainerMappingsCreateOptionalParams): Promise<PollerLike<PollOperationState<ReplicationProtectionContainerMappingsCreateResponse>, ReplicationProtectionContainerMappingsCreateResponse>>; + beginCreate(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, mappingName: string, creationInput: CreateProtectionContainerMappingInput, options?: ReplicationProtectionContainerMappingsCreateOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationProtectionContainerMappingsCreateResponse>, ReplicationProtectionContainerMappingsCreateResponse>>; beginCreateAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, mappingName: string, creationInput: CreateProtectionContainerMappingInput, options?: ReplicationProtectionContainerMappingsCreateOptionalParams): Promise<ReplicationProtectionContainerMappingsCreateResponse>; - beginDelete(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, mappingName: string, removalInput: RemoveProtectionContainerMappingInput, options?: ReplicationProtectionContainerMappingsDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>; + beginDelete(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, mappingName: string, removalInput: RemoveProtectionContainerMappingInput, options?: ReplicationProtectionContainerMappingsDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>; beginDeleteAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, mappingName: string, removalInput: RemoveProtectionContainerMappingInput, options?: ReplicationProtectionContainerMappingsDeleteOptionalParams): Promise<void>; - beginPurge(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, mappingName: string, options?: ReplicationProtectionContainerMappingsPurgeOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>; + beginPurge(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, mappingName: string, options?: ReplicationProtectionContainerMappingsPurgeOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>; beginPurgeAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, mappingName: string, options?: ReplicationProtectionContainerMappingsPurgeOptionalParams): Promise<void>; - beginUpdate(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, mappingName: string, updateInput: UpdateProtectionContainerMappingInput, options?: ReplicationProtectionContainerMappingsUpdateOptionalParams): Promise<PollerLike<PollOperationState<ReplicationProtectionContainerMappingsUpdateResponse>, ReplicationProtectionContainerMappingsUpdateResponse>>; + beginUpdate(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, mappingName: string, updateInput: UpdateProtectionContainerMappingInput, options?: ReplicationProtectionContainerMappingsUpdateOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationProtectionContainerMappingsUpdateResponse>, ReplicationProtectionContainerMappingsUpdateResponse>>; beginUpdateAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, mappingName: string, updateInput: UpdateProtectionContainerMappingInput, options?: ReplicationProtectionContainerMappingsUpdateOptionalParams): Promise<ReplicationProtectionContainerMappingsUpdateResponse>; get(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, mappingName: string, options?: ReplicationProtectionContainerMappingsGetOptionalParams): Promise<ReplicationProtectionContainerMappingsGetResponse>; list(resourceName: string, resourceGroupName: string, options?: ReplicationProtectionContainerMappingsListOptionalParams): PagedAsyncIterableIterator<ProtectionContainerMapping>; @@ -5323,13 +5410,13 @@ export type ReplicationProtectionContainerMappingsUpdateResponse = ProtectionCon // @public export interface ReplicationProtectionContainers { - beginCreate(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, creationInput: CreateProtectionContainerInput, options?: ReplicationProtectionContainersCreateOptionalParams): Promise<PollerLike<PollOperationState<ReplicationProtectionContainersCreateResponse>, ReplicationProtectionContainersCreateResponse>>; + beginCreate(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, creationInput: CreateProtectionContainerInput, options?: ReplicationProtectionContainersCreateOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationProtectionContainersCreateResponse>, ReplicationProtectionContainersCreateResponse>>; beginCreateAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, creationInput: CreateProtectionContainerInput, options?: ReplicationProtectionContainersCreateOptionalParams): Promise<ReplicationProtectionContainersCreateResponse>; - beginDelete(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, options?: ReplicationProtectionContainersDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>; + beginDelete(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, options?: ReplicationProtectionContainersDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>; beginDeleteAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, options?: ReplicationProtectionContainersDeleteOptionalParams): Promise<void>; - beginDiscoverProtectableItem(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, discoverProtectableItemRequest: DiscoverProtectableItemRequest, options?: ReplicationProtectionContainersDiscoverProtectableItemOptionalParams): Promise<PollerLike<PollOperationState<ReplicationProtectionContainersDiscoverProtectableItemResponse>, ReplicationProtectionContainersDiscoverProtectableItemResponse>>; + beginDiscoverProtectableItem(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, discoverProtectableItemRequest: DiscoverProtectableItemRequest, options?: ReplicationProtectionContainersDiscoverProtectableItemOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationProtectionContainersDiscoverProtectableItemResponse>, ReplicationProtectionContainersDiscoverProtectableItemResponse>>; beginDiscoverProtectableItemAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, discoverProtectableItemRequest: DiscoverProtectableItemRequest, options?: ReplicationProtectionContainersDiscoverProtectableItemOptionalParams): Promise<ReplicationProtectionContainersDiscoverProtectableItemResponse>; - beginSwitchProtection(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, switchInput: SwitchProtectionInput, options?: ReplicationProtectionContainersSwitchProtectionOptionalParams): Promise<PollerLike<PollOperationState<ReplicationProtectionContainersSwitchProtectionResponse>, ReplicationProtectionContainersSwitchProtectionResponse>>; + beginSwitchProtection(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, switchInput: SwitchProtectionInput, options?: ReplicationProtectionContainersSwitchProtectionOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationProtectionContainersSwitchProtectionResponse>, ReplicationProtectionContainersSwitchProtectionResponse>>; beginSwitchProtectionAndWait(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, switchInput: SwitchProtectionInput, options?: ReplicationProtectionContainersSwitchProtectionOptionalParams): Promise<ReplicationProtectionContainersSwitchProtectionResponse>; get(resourceName: string, resourceGroupName: string, fabricName: string, protectionContainerName: string, options?: ReplicationProtectionContainersGetOptionalParams): Promise<ReplicationProtectionContainersGetResponse>; list(resourceName: string, resourceGroupName: string, options?: ReplicationProtectionContainersListOptionalParams): PagedAsyncIterableIterator<ProtectionContainer>; @@ -5509,25 +5596,25 @@ export type ReplicationProviderSpecificUpdateContainerMappingInputUnion = Replic // @public export interface ReplicationRecoveryPlans { - beginCreate(resourceName: string, resourceGroupName: string, recoveryPlanName: string, input: CreateRecoveryPlanInput, options?: ReplicationRecoveryPlansCreateOptionalParams): Promise<PollerLike<PollOperationState<ReplicationRecoveryPlansCreateResponse>, ReplicationRecoveryPlansCreateResponse>>; + beginCreate(resourceName: string, resourceGroupName: string, recoveryPlanName: string, input: CreateRecoveryPlanInput, options?: ReplicationRecoveryPlansCreateOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationRecoveryPlansCreateResponse>, ReplicationRecoveryPlansCreateResponse>>; beginCreateAndWait(resourceName: string, resourceGroupName: string, recoveryPlanName: string, input: CreateRecoveryPlanInput, options?: ReplicationRecoveryPlansCreateOptionalParams): Promise<ReplicationRecoveryPlansCreateResponse>; - beginDelete(resourceName: string, resourceGroupName: string, recoveryPlanName: string, options?: ReplicationRecoveryPlansDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>; + beginDelete(resourceName: string, resourceGroupName: string, recoveryPlanName: string, options?: ReplicationRecoveryPlansDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>; beginDeleteAndWait(resourceName: string, resourceGroupName: string, recoveryPlanName: string, options?: ReplicationRecoveryPlansDeleteOptionalParams): Promise<void>; - beginFailoverCancel(resourceName: string, resourceGroupName: string, recoveryPlanName: string, options?: ReplicationRecoveryPlansFailoverCancelOptionalParams): Promise<PollerLike<PollOperationState<ReplicationRecoveryPlansFailoverCancelResponse>, ReplicationRecoveryPlansFailoverCancelResponse>>; + beginFailoverCancel(resourceName: string, resourceGroupName: string, recoveryPlanName: string, options?: ReplicationRecoveryPlansFailoverCancelOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationRecoveryPlansFailoverCancelResponse>, ReplicationRecoveryPlansFailoverCancelResponse>>; beginFailoverCancelAndWait(resourceName: string, resourceGroupName: string, recoveryPlanName: string, options?: ReplicationRecoveryPlansFailoverCancelOptionalParams): Promise<ReplicationRecoveryPlansFailoverCancelResponse>; - beginFailoverCommit(resourceName: string, resourceGroupName: string, recoveryPlanName: string, options?: ReplicationRecoveryPlansFailoverCommitOptionalParams): Promise<PollerLike<PollOperationState<ReplicationRecoveryPlansFailoverCommitResponse>, ReplicationRecoveryPlansFailoverCommitResponse>>; + beginFailoverCommit(resourceName: string, resourceGroupName: string, recoveryPlanName: string, options?: ReplicationRecoveryPlansFailoverCommitOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationRecoveryPlansFailoverCommitResponse>, ReplicationRecoveryPlansFailoverCommitResponse>>; beginFailoverCommitAndWait(resourceName: string, resourceGroupName: string, recoveryPlanName: string, options?: ReplicationRecoveryPlansFailoverCommitOptionalParams): Promise<ReplicationRecoveryPlansFailoverCommitResponse>; - beginPlannedFailover(resourceName: string, resourceGroupName: string, recoveryPlanName: string, input: RecoveryPlanPlannedFailoverInput, options?: ReplicationRecoveryPlansPlannedFailoverOptionalParams): Promise<PollerLike<PollOperationState<ReplicationRecoveryPlansPlannedFailoverResponse>, ReplicationRecoveryPlansPlannedFailoverResponse>>; + beginPlannedFailover(resourceName: string, resourceGroupName: string, recoveryPlanName: string, input: RecoveryPlanPlannedFailoverInput, options?: ReplicationRecoveryPlansPlannedFailoverOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationRecoveryPlansPlannedFailoverResponse>, ReplicationRecoveryPlansPlannedFailoverResponse>>; beginPlannedFailoverAndWait(resourceName: string, resourceGroupName: string, recoveryPlanName: string, input: RecoveryPlanPlannedFailoverInput, options?: ReplicationRecoveryPlansPlannedFailoverOptionalParams): Promise<ReplicationRecoveryPlansPlannedFailoverResponse>; - beginReprotect(resourceName: string, resourceGroupName: string, recoveryPlanName: string, options?: ReplicationRecoveryPlansReprotectOptionalParams): Promise<PollerLike<PollOperationState<ReplicationRecoveryPlansReprotectResponse>, ReplicationRecoveryPlansReprotectResponse>>; + beginReprotect(resourceName: string, resourceGroupName: string, recoveryPlanName: string, options?: ReplicationRecoveryPlansReprotectOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationRecoveryPlansReprotectResponse>, ReplicationRecoveryPlansReprotectResponse>>; beginReprotectAndWait(resourceName: string, resourceGroupName: string, recoveryPlanName: string, options?: ReplicationRecoveryPlansReprotectOptionalParams): Promise<ReplicationRecoveryPlansReprotectResponse>; - beginTestFailover(resourceName: string, resourceGroupName: string, recoveryPlanName: string, input: RecoveryPlanTestFailoverInput, options?: ReplicationRecoveryPlansTestFailoverOptionalParams): Promise<PollerLike<PollOperationState<ReplicationRecoveryPlansTestFailoverResponse>, ReplicationRecoveryPlansTestFailoverResponse>>; + beginTestFailover(resourceName: string, resourceGroupName: string, recoveryPlanName: string, input: RecoveryPlanTestFailoverInput, options?: ReplicationRecoveryPlansTestFailoverOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationRecoveryPlansTestFailoverResponse>, ReplicationRecoveryPlansTestFailoverResponse>>; beginTestFailoverAndWait(resourceName: string, resourceGroupName: string, recoveryPlanName: string, input: RecoveryPlanTestFailoverInput, options?: ReplicationRecoveryPlansTestFailoverOptionalParams): Promise<ReplicationRecoveryPlansTestFailoverResponse>; - beginTestFailoverCleanup(resourceName: string, resourceGroupName: string, recoveryPlanName: string, input: RecoveryPlanTestFailoverCleanupInput, options?: ReplicationRecoveryPlansTestFailoverCleanupOptionalParams): Promise<PollerLike<PollOperationState<ReplicationRecoveryPlansTestFailoverCleanupResponse>, ReplicationRecoveryPlansTestFailoverCleanupResponse>>; + beginTestFailoverCleanup(resourceName: string, resourceGroupName: string, recoveryPlanName: string, input: RecoveryPlanTestFailoverCleanupInput, options?: ReplicationRecoveryPlansTestFailoverCleanupOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationRecoveryPlansTestFailoverCleanupResponse>, ReplicationRecoveryPlansTestFailoverCleanupResponse>>; beginTestFailoverCleanupAndWait(resourceName: string, resourceGroupName: string, recoveryPlanName: string, input: RecoveryPlanTestFailoverCleanupInput, options?: ReplicationRecoveryPlansTestFailoverCleanupOptionalParams): Promise<ReplicationRecoveryPlansTestFailoverCleanupResponse>; - beginUnplannedFailover(resourceName: string, resourceGroupName: string, recoveryPlanName: string, input: RecoveryPlanUnplannedFailoverInput, options?: ReplicationRecoveryPlansUnplannedFailoverOptionalParams): Promise<PollerLike<PollOperationState<ReplicationRecoveryPlansUnplannedFailoverResponse>, ReplicationRecoveryPlansUnplannedFailoverResponse>>; + beginUnplannedFailover(resourceName: string, resourceGroupName: string, recoveryPlanName: string, input: RecoveryPlanUnplannedFailoverInput, options?: ReplicationRecoveryPlansUnplannedFailoverOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationRecoveryPlansUnplannedFailoverResponse>, ReplicationRecoveryPlansUnplannedFailoverResponse>>; beginUnplannedFailoverAndWait(resourceName: string, resourceGroupName: string, recoveryPlanName: string, input: RecoveryPlanUnplannedFailoverInput, options?: ReplicationRecoveryPlansUnplannedFailoverOptionalParams): Promise<ReplicationRecoveryPlansUnplannedFailoverResponse>; - beginUpdate(resourceName: string, resourceGroupName: string, recoveryPlanName: string, input: UpdateRecoveryPlanInput, options?: ReplicationRecoveryPlansUpdateOptionalParams): Promise<PollerLike<PollOperationState<ReplicationRecoveryPlansUpdateResponse>, ReplicationRecoveryPlansUpdateResponse>>; + beginUpdate(resourceName: string, resourceGroupName: string, recoveryPlanName: string, input: UpdateRecoveryPlanInput, options?: ReplicationRecoveryPlansUpdateOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationRecoveryPlansUpdateResponse>, ReplicationRecoveryPlansUpdateResponse>>; beginUpdateAndWait(resourceName: string, resourceGroupName: string, recoveryPlanName: string, input: UpdateRecoveryPlanInput, options?: ReplicationRecoveryPlansUpdateOptionalParams): Promise<ReplicationRecoveryPlansUpdateResponse>; get(resourceName: string, resourceGroupName: string, recoveryPlanName: string, options?: ReplicationRecoveryPlansGetOptionalParams): Promise<ReplicationRecoveryPlansGetResponse>; list(resourceName: string, resourceGroupName: string, options?: ReplicationRecoveryPlansListOptionalParams): PagedAsyncIterableIterator<RecoveryPlan>; @@ -5643,13 +5730,13 @@ export type ReplicationRecoveryPlansUpdateResponse = RecoveryPlan; // @public export interface ReplicationRecoveryServicesProviders { - beginCreate(resourceName: string, resourceGroupName: string, fabricName: string, providerName: string, addProviderInput: AddRecoveryServicesProviderInput, options?: ReplicationRecoveryServicesProvidersCreateOptionalParams): Promise<PollerLike<PollOperationState<ReplicationRecoveryServicesProvidersCreateResponse>, ReplicationRecoveryServicesProvidersCreateResponse>>; + beginCreate(resourceName: string, resourceGroupName: string, fabricName: string, providerName: string, addProviderInput: AddRecoveryServicesProviderInput, options?: ReplicationRecoveryServicesProvidersCreateOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationRecoveryServicesProvidersCreateResponse>, ReplicationRecoveryServicesProvidersCreateResponse>>; beginCreateAndWait(resourceName: string, resourceGroupName: string, fabricName: string, providerName: string, addProviderInput: AddRecoveryServicesProviderInput, options?: ReplicationRecoveryServicesProvidersCreateOptionalParams): Promise<ReplicationRecoveryServicesProvidersCreateResponse>; - beginDelete(resourceName: string, resourceGroupName: string, fabricName: string, providerName: string, options?: ReplicationRecoveryServicesProvidersDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>; + beginDelete(resourceName: string, resourceGroupName: string, fabricName: string, providerName: string, options?: ReplicationRecoveryServicesProvidersDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>; beginDeleteAndWait(resourceName: string, resourceGroupName: string, fabricName: string, providerName: string, options?: ReplicationRecoveryServicesProvidersDeleteOptionalParams): Promise<void>; - beginPurge(resourceName: string, resourceGroupName: string, fabricName: string, providerName: string, options?: ReplicationRecoveryServicesProvidersPurgeOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>; + beginPurge(resourceName: string, resourceGroupName: string, fabricName: string, providerName: string, options?: ReplicationRecoveryServicesProvidersPurgeOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>; beginPurgeAndWait(resourceName: string, resourceGroupName: string, fabricName: string, providerName: string, options?: ReplicationRecoveryServicesProvidersPurgeOptionalParams): Promise<void>; - beginRefreshProvider(resourceName: string, resourceGroupName: string, fabricName: string, providerName: string, options?: ReplicationRecoveryServicesProvidersRefreshProviderOptionalParams): Promise<PollerLike<PollOperationState<ReplicationRecoveryServicesProvidersRefreshProviderResponse>, ReplicationRecoveryServicesProvidersRefreshProviderResponse>>; + beginRefreshProvider(resourceName: string, resourceGroupName: string, fabricName: string, providerName: string, options?: ReplicationRecoveryServicesProvidersRefreshProviderOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationRecoveryServicesProvidersRefreshProviderResponse>, ReplicationRecoveryServicesProvidersRefreshProviderResponse>>; beginRefreshProviderAndWait(resourceName: string, resourceGroupName: string, fabricName: string, providerName: string, options?: ReplicationRecoveryServicesProvidersRefreshProviderOptionalParams): Promise<ReplicationRecoveryServicesProvidersRefreshProviderResponse>; get(resourceName: string, resourceGroupName: string, fabricName: string, providerName: string, options?: ReplicationRecoveryServicesProvidersGetOptionalParams): Promise<ReplicationRecoveryServicesProvidersGetResponse>; list(resourceName: string, resourceGroupName: string, options?: ReplicationRecoveryServicesProvidersListOptionalParams): PagedAsyncIterableIterator<RecoveryServicesProvider>; @@ -5723,9 +5810,9 @@ export type ReplicationRecoveryServicesProvidersRefreshProviderResponse = Recove // @public export interface ReplicationStorageClassificationMappings { - beginCreate(resourceName: string, resourceGroupName: string, fabricName: string, storageClassificationName: string, storageClassificationMappingName: string, pairingInput: StorageClassificationMappingInput, options?: ReplicationStorageClassificationMappingsCreateOptionalParams): Promise<PollerLike<PollOperationState<ReplicationStorageClassificationMappingsCreateResponse>, ReplicationStorageClassificationMappingsCreateResponse>>; + beginCreate(resourceName: string, resourceGroupName: string, fabricName: string, storageClassificationName: string, storageClassificationMappingName: string, pairingInput: StorageClassificationMappingInput, options?: ReplicationStorageClassificationMappingsCreateOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationStorageClassificationMappingsCreateResponse>, ReplicationStorageClassificationMappingsCreateResponse>>; beginCreateAndWait(resourceName: string, resourceGroupName: string, fabricName: string, storageClassificationName: string, storageClassificationMappingName: string, pairingInput: StorageClassificationMappingInput, options?: ReplicationStorageClassificationMappingsCreateOptionalParams): Promise<ReplicationStorageClassificationMappingsCreateResponse>; - beginDelete(resourceName: string, resourceGroupName: string, fabricName: string, storageClassificationName: string, storageClassificationMappingName: string, options?: ReplicationStorageClassificationMappingsDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>; + beginDelete(resourceName: string, resourceGroupName: string, fabricName: string, storageClassificationName: string, storageClassificationMappingName: string, options?: ReplicationStorageClassificationMappingsDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>; beginDeleteAndWait(resourceName: string, resourceGroupName: string, fabricName: string, storageClassificationName: string, storageClassificationMappingName: string, options?: ReplicationStorageClassificationMappingsDeleteOptionalParams): Promise<void>; get(resourceName: string, resourceGroupName: string, fabricName: string, storageClassificationName: string, storageClassificationMappingName: string, options?: ReplicationStorageClassificationMappingsGetOptionalParams): Promise<ReplicationStorageClassificationMappingsGetResponse>; list(resourceName: string, resourceGroupName: string, options?: ReplicationStorageClassificationMappingsListOptionalParams): PagedAsyncIterableIterator<StorageClassificationMapping>; @@ -5826,7 +5913,7 @@ export type ReplicationStorageClassificationsListResponse = StorageClassificatio // @public export interface ReplicationVaultHealth { - beginRefresh(resourceName: string, resourceGroupName: string, options?: ReplicationVaultHealthRefreshOptionalParams): Promise<PollerLike<PollOperationState<ReplicationVaultHealthRefreshResponse>, ReplicationVaultHealthRefreshResponse>>; + beginRefresh(resourceName: string, resourceGroupName: string, options?: ReplicationVaultHealthRefreshOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationVaultHealthRefreshResponse>, ReplicationVaultHealthRefreshResponse>>; beginRefreshAndWait(resourceName: string, resourceGroupName: string, options?: ReplicationVaultHealthRefreshOptionalParams): Promise<ReplicationVaultHealthRefreshResponse>; get(resourceName: string, resourceGroupName: string, options?: ReplicationVaultHealthGetOptionalParams): Promise<ReplicationVaultHealthGetResponse>; } @@ -5849,7 +5936,7 @@ export type ReplicationVaultHealthRefreshResponse = VaultHealthDetails; // @public export interface ReplicationVaultSetting { - beginCreate(resourceName: string, resourceGroupName: string, vaultSettingName: string, input: VaultSettingCreationInput, options?: ReplicationVaultSettingCreateOptionalParams): Promise<PollerLike<PollOperationState<ReplicationVaultSettingCreateResponse>, ReplicationVaultSettingCreateResponse>>; + beginCreate(resourceName: string, resourceGroupName: string, vaultSettingName: string, input: VaultSettingCreationInput, options?: ReplicationVaultSettingCreateOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationVaultSettingCreateResponse>, ReplicationVaultSettingCreateResponse>>; beginCreateAndWait(resourceName: string, resourceGroupName: string, vaultSettingName: string, input: VaultSettingCreationInput, options?: ReplicationVaultSettingCreateOptionalParams): Promise<ReplicationVaultSettingCreateResponse>; get(resourceName: string, resourceGroupName: string, vaultSettingName: string, options?: ReplicationVaultSettingGetOptionalParams): Promise<ReplicationVaultSettingGetResponse>; list(resourceName: string, resourceGroupName: string, options?: ReplicationVaultSettingListOptionalParams): PagedAsyncIterableIterator<VaultSetting>; @@ -5887,11 +5974,11 @@ export type ReplicationVaultSettingListResponse = VaultSettingCollection; // @public export interface ReplicationvCenters { - beginCreate(resourceName: string, resourceGroupName: string, fabricName: string, vcenterName: string, addVCenterRequest: AddVCenterRequest, options?: ReplicationvCentersCreateOptionalParams): Promise<PollerLike<PollOperationState<ReplicationvCentersCreateResponse>, ReplicationvCentersCreateResponse>>; + beginCreate(resourceName: string, resourceGroupName: string, fabricName: string, vcenterName: string, addVCenterRequest: AddVCenterRequest, options?: ReplicationvCentersCreateOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationvCentersCreateResponse>, ReplicationvCentersCreateResponse>>; beginCreateAndWait(resourceName: string, resourceGroupName: string, fabricName: string, vcenterName: string, addVCenterRequest: AddVCenterRequest, options?: ReplicationvCentersCreateOptionalParams): Promise<ReplicationvCentersCreateResponse>; - beginDelete(resourceName: string, resourceGroupName: string, fabricName: string, vcenterName: string, options?: ReplicationvCentersDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>; + beginDelete(resourceName: string, resourceGroupName: string, fabricName: string, vcenterName: string, options?: ReplicationvCentersDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>; beginDeleteAndWait(resourceName: string, resourceGroupName: string, fabricName: string, vcenterName: string, options?: ReplicationvCentersDeleteOptionalParams): Promise<void>; - beginUpdate(resourceName: string, resourceGroupName: string, fabricName: string, vcenterName: string, updateVCenterRequest: UpdateVCenterRequest, options?: ReplicationvCentersUpdateOptionalParams): Promise<PollerLike<PollOperationState<ReplicationvCentersUpdateResponse>, ReplicationvCentersUpdateResponse>>; + beginUpdate(resourceName: string, resourceGroupName: string, fabricName: string, vcenterName: string, updateVCenterRequest: UpdateVCenterRequest, options?: ReplicationvCentersUpdateOptionalParams): Promise<SimplePollerLike<OperationState<ReplicationvCentersUpdateResponse>, ReplicationvCentersUpdateResponse>>; beginUpdateAndWait(resourceName: string, resourceGroupName: string, fabricName: string, vcenterName: string, updateVCenterRequest: UpdateVCenterRequest, options?: ReplicationvCentersUpdateOptionalParams): Promise<ReplicationvCentersUpdateResponse>; get(resourceName: string, resourceGroupName: string, fabricName: string, vcenterName: string, options?: ReplicationvCentersGetOptionalParams): Promise<ReplicationvCentersGetResponse>; list(resourceName: string, resourceGroupName: string, options?: ReplicationvCentersListOptionalParams): PagedAsyncIterableIterator<VCenter>; @@ -6109,6 +6196,9 @@ export interface ScriptActionTaskDetails extends TaskTypeDetails { path?: string; } +// @public +export type SecurityType = string; + // @public export interface ServiceError { activityId?: string; @@ -6829,6 +6919,7 @@ export interface VMwareCbtDiskInput { // @public export interface VMwareCbtEnableMigrationInput extends EnableMigrationProviderSpecificInput { + confidentialVmKeyVaultId?: string; dataMoverRunAsAccountId: string; disksToInclude: VMwareCbtDiskInput[]; instanceType: "VMwareCbt"; @@ -6854,6 +6945,7 @@ export interface VMwareCbtEnableMigrationInput extends EnableMigrationProviderSp targetResourceGroupId: string; targetSubnetName?: string; targetVmName?: string; + targetVmSecurityProfile?: VMwareCbtSecurityProfileProperties; targetVmSize?: string; targetVmTags?: { [propertyName: string]: string; @@ -6872,21 +6964,30 @@ export interface VMwareCbtEventDetails extends EventProviderSpecificDetails { // @public export interface VMwareCbtMigrateInput extends MigrateProviderSpecificInput { instanceType: "VMwareCbt"; + osUpgradeVersion?: string; performShutdown: string; } // @public export interface VMwareCbtMigrationDetails extends MigrationProviderSpecificSettings { + readonly applianceMonitoringDetails?: ApplianceMonitoringDetails; + confidentialVmKeyVaultId?: string; readonly dataMoverRunAsAccountId?: string; + readonly deltaSyncProgressPercentage?: number; + readonly deltaSyncRetryCount?: number; readonly firmwareType?: string; + readonly gatewayOperationDetails?: GatewayOperationDetails; readonly initialSeedingProgressPercentage?: number; readonly initialSeedingRetryCount?: number; instanceType: "VMwareCbt"; + readonly isCheckSumResyncCycle?: string; readonly lastRecoveryPointId?: string; readonly lastRecoveryPointReceived?: Date; licenseType?: string; readonly migrationProgressPercentage?: number; readonly migrationRecoveryPointId?: string; + readonly operationName?: string; + readonly osName?: string; readonly osType?: string; performAutoResync?: string; protectedDisks?: VMwareCbtProtectedDiskDetails[]; @@ -6902,6 +7003,7 @@ export interface VMwareCbtMigrationDetails extends MigrationProviderSpecificSett readonly snapshotRunAsAccountId?: string; sqlServerLicenseType?: string; readonly storageAccountId?: string; + supportedOSVersions?: string[]; targetAvailabilitySetId?: string; targetAvailabilityZone?: string; targetBootDiagnosticsStorageAccountId?: string; @@ -6917,6 +7019,7 @@ export interface VMwareCbtMigrationDetails extends MigrationProviderSpecificSett targetProximityPlacementGroupId?: string; targetResourceGroupId?: string; targetVmName?: string; + targetVmSecurityProfile?: VMwareCbtSecurityProfileProperties; targetVmSize?: string; targetVmTags?: { [propertyName: string]: string; @@ -6980,6 +7083,7 @@ export interface VMwareCbtProtectedDiskDetails { readonly diskName?: string; readonly diskPath?: string; diskType?: DiskAccountType; + readonly gatewayOperationDetails?: GatewayOperationDetails; readonly isOSDisk?: string; readonly logStorageAccountId?: string; readonly logStorageAccountSasSecretName?: string; @@ -6992,6 +7096,7 @@ export interface VMwareCbtProtectedDiskDetails { // @public export interface VMwareCbtProtectionContainerMappingDetails extends ProtectionContainerMappingProviderSpecificDetails { + excludedSkus?: string[]; instanceType: "VMwareCbt"; readonly keyVaultId?: string; readonly keyVaultUri?: string; @@ -7016,10 +7121,20 @@ export interface VMwareCbtResyncInput extends ResyncProviderSpecificInput { skipCbtReset: string; } +// @public +export interface VMwareCbtSecurityProfileProperties { + isTargetVmConfidentialEncryptionEnabled?: string; + isTargetVmIntegrityMonitoringEnabled?: string; + isTargetVmSecureBootEnabled?: string; + isTargetVmTpmEnabled?: string; + targetVmSecurityType?: SecurityType; +} + // @public export interface VMwareCbtTestMigrateInput extends TestMigrateProviderSpecificInput { instanceType: "VMwareCbt"; networkId: string; + osUpgradeVersion?: string; recoveryPointId: string; vmNics?: VMwareCbtNicInput[]; } diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/lroImpl.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/lroImpl.ts index 518d5f053b4e..dd803cd5e28c 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/lroImpl.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/lroImpl.ts @@ -6,29 +6,37 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortSignalLike } from "@azure/abort-controller"; import { LongRunningOperation, LroResponse } from "@azure/core-lro"; -export class LroImpl<T> implements LongRunningOperation<T> { - constructor( - private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>, - private args: Record<string, unknown>, - private spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record<string, any>, - public requestPath: string = spec.path!, - public requestMethod: string = spec.httpMethod - ) {} - public async sendInitialRequest(): Promise<LroResponse<T>> { - return this.sendOperationFn(this.args, this.spec); - } - public async sendPollRequest(path: string): Promise<LroResponse<T>> { - const { requestBody, ...restSpec } = this.spec; - return this.sendOperationFn(this.args, { - ...restSpec, - path, - httpMethod: "GET" - }); - } +export function createLroSpec<T>(inputs: { + sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>; + args: Record<string, unknown>; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record<string, any>; +}): LongRunningOperation<T> { + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: ( + path: string, + options?: { abortSignal?: AbortSignalLike } + ) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal + }); + } + }; } diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/models/index.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/models/index.ts index e9bcad71727f..a40156e379bf 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/models/index.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/models/index.ts @@ -2872,6 +2872,34 @@ export interface A2AExtendedLocationDetails { recoveryExtendedLocation?: ExtendedLocation; } +/** ExtendedLocation details data. */ +export interface A2AFabricSpecificLocationDetails { + /** The initial source zone info. */ + initialPrimaryZone?: string; + /** The initial target zone info. */ + initialRecoveryZone?: string; + /** The initial primary ExtendedLocation. */ + initialPrimaryExtendedLocation?: ExtendedLocation; + /** The initial recovery ExtendedLocation. */ + initialRecoveryExtendedLocation?: ExtendedLocation; + /** Initial primary fabric location info. */ + initialPrimaryFabricLocation?: string; + /** The initial recovery fabric location info. */ + initialRecoveryFabricLocation?: string; + /** Source zone info. */ + primaryZone?: string; + /** The target zone info. */ + recoveryZone?: string; + /** The primary ExtendedLocation. */ + primaryExtendedLocation?: ExtendedLocation; + /** The recovery ExtendedLocation. */ + recoveryExtendedLocation?: ExtendedLocation; + /** Primary fabric location info. */ + primaryFabricLocation?: string; + /** The recovery fabric location info. */ + recoveryFabricLocation?: string; +} + /** A2A protected disk details. */ export interface A2AProtectedDiskDetails { /** The disk uri. */ @@ -3147,6 +3175,83 @@ export interface AgentDiskDetails { readonly lunId?: number; } +/** Appliance details of the migration item. */ +export interface ApplianceMonitoringDetails { + /** + * The appliance CPU details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly cpuDetails?: ApplianceResourceDetails; + /** + * The appliance RAM details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ramDetails?: ApplianceResourceDetails; + /** + * The appliance datastore snapshot details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly datastoreSnapshot?: DataStoreUtilizationDetails[]; + /** + * The disk replication details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly disksReplicationDetails?: ApplianceResourceDetails; + /** + * The ESXi NFC buffer details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly esxiNfcBuffer?: ApplianceResourceDetails; + /** + * The appliance network bandwidth details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly networkBandwidth?: ApplianceResourceDetails; +} + +/** Details of the appliance resource. */ +export interface ApplianceResourceDetails { + /** + * A value indicating the total capacity of appliance resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly capacity?: number; + /** + * A value indicating the utilization percentage by gateway agent on appliance. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly processUtilization?: number; + /** + * A value indicating the total utilization percentage for all processes on the appliance. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly totalUtilization?: number; + /** + * A value indicating the status of appliance resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: string; +} + +/** Details of the appliance resource. */ +export interface DataStoreUtilizationDetails { + /** + * The total count of snapshots supported by the datastore. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly totalSnapshotsSupported?: number; + /** + * The total snapshots created for server migration in the datastore. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly totalSnapshotsCreated?: number; + /** + * The datastore name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly dataStoreName?: string; +} + /** Query parameter to get appliance. */ export interface ApplianceQueryParameter { /** The providerType to be used for fetching appliance details. */ @@ -3296,6 +3401,10 @@ export interface EventQueryParameter { export interface FabricQueryParameter { /** A value indicating whether the zone to zone mappings are to be returned. */ zoneToZoneMappings?: string; + /** A value indicating whether the Extended Location mappings are to be returned. */ + extendedLocationMappings?: string; + /** A value indicating whether the location details are to be returned. */ + locationDetails?: string; /** A value indicating whether the agent details are to be fetched. */ fetchAgentDetails?: string; /** The BIOS Id to be used for fetching agent details. */ @@ -3346,6 +3455,50 @@ export interface FailoverReplicationProtectedItemDetails { recoveryPointTime?: Date; } +/** Details of the gateway operation. */ +export interface GatewayOperationDetails { + /** + * A value indicating the state of gateway operation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly state?: string; + /** + * A value indicating the progress percentage of gateway operation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly progressPercentage?: number; + /** + * A value indicating the time elapsed for the operation in milliseconds. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly timeElapsed?: number; + /** + * A value indicating the time remaining for the operation in milliseconds. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly timeRemaining?: number; + /** + * A value indicating the upload speed in bytes per second. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly uploadSpeed?: number; + /** + * A value indicating the ESXi host name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly hostName?: string; + /** + * A value indicating the datastore collection. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly dataStores?: string[]; + /** + * A value indicating the VMware read throughput in bytes per second. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly vmwareReadThroughput?: number; +} + /** Hyper-V host details. */ export interface HyperVHostDetails { /** @@ -3413,6 +3566,20 @@ export interface OSDetails { oSMinorVersion?: string; } +/** Supported OS upgrade versions. */ +export interface OSUpgradeSupportedVersions { + /** + * The source OS version name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly supportedSourceOsVersion?: string; + /** + * The target OS version names. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly supportedTargetOsVersions?: string[]; +} + /** Disk input for update. */ export interface UpdateDiskInput { /** The disk Id. */ @@ -5064,6 +5231,20 @@ export interface VMwareCbtDiskInput { diskEncryptionSetId?: string; } +/** VMwareCbt security profile input. */ +export interface VMwareCbtSecurityProfileProperties { + /** The target VM security type. */ + targetVmSecurityType?: SecurityType; + /** A value indicating whether secure boot to be enabled. */ + isTargetVmSecureBootEnabled?: string; + /** A value indicating whether trusted platform module to be enabled. */ + isTargetVmTpmEnabled?: string; + /** A value indicating whether integrity monitoring to be enabled. */ + isTargetVmIntegrityMonitoringEnabled?: string; + /** A value indicating whether confidential compute encryption to be enabled. */ + isTargetVmConfidentialEncryptionEnabled?: string; +} + /** VMwareCbt protected disk details. */ export interface VMwareCbtProtectedDiskDetails { /** @@ -5130,6 +5311,11 @@ export interface VMwareCbtProtectedDiskDetails { readonly targetBlobUri?: string; /** The name for the target managed disk. */ targetDiskName?: string; + /** + * A value indicating the gateway operation details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly gatewayOperationDetails?: GatewayOperationDetails; } /** VMwareCbt NIC details. */ @@ -5574,6 +5760,8 @@ export interface AzureFabricSpecificDetails extends FabricSpecificDetails { zones?: A2AZoneDetails[]; /** The ExtendedLocations. */ extendedLocations?: A2AExtendedLocationDetails[]; + /** The location details. */ + locationDetails?: A2AFabricSpecificLocationDetails[]; } /** HyperVSite fabric specific details. */ @@ -5927,6 +6115,11 @@ export interface VMwareCbtMigrationDetails * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly osType?: string; + /** + * The name of the OS on the VM. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly osName?: string; /** * The firmware type. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -5973,6 +6166,10 @@ export interface VMwareCbtMigrationDetails targetAvailabilityZone?: string; /** The target proximity placement group Id. */ targetProximityPlacementGroupId?: string; + /** The confidential VM key vault Id for ADE installation. */ + confidentialVmKeyVaultId?: string; + /** The target VM security profile. */ + targetVmSecurityProfile?: VMwareCbtSecurityProfileProperties; /** The target boot diagnostics storage account ARM Id. */ targetBootDiagnosticsStorageAccountId?: string; /** The target VM tags. */ @@ -6022,6 +6219,16 @@ export interface VMwareCbtMigrationDetails * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly resumeProgressPercentage?: number; + /** + * The delta sync progress percentage. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly deltaSyncProgressPercentage?: number; + /** + * A value indicating whether checksum resync cycle is in progress. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isCheckSumResyncCycle?: string; /** * The initial seeding retry count. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -6037,6 +6244,11 @@ export interface VMwareCbtMigrationDetails * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly resumeRetryCount?: number; + /** + * The delta sync retry count. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly deltaSyncRetryCount?: number; /** * A value indicating whether resync is required. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -6053,6 +6265,23 @@ export interface VMwareCbtMigrationDetails seedDiskTags?: { [propertyName: string]: string }; /** The tags for the target disks. */ targetDiskTags?: { [propertyName: string]: string }; + /** A value indicating the inplace OS Upgrade version. */ + supportedOSVersions?: string[]; + /** + * A value indicating the appliance monitoring details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly applianceMonitoringDetails?: ApplianceMonitoringDetails; + /** + * A value indicating the gateway operation details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly gatewayOperationDetails?: GatewayOperationDetails; + /** + * A value indicating the SRS operation name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operationName?: string; } /** VMwareCbt specific enable migration input. */ @@ -6094,6 +6323,10 @@ export interface VMwareCbtEnableMigrationInput targetAvailabilityZone?: string; /** The target proximity placement group ARM Id. */ targetProximityPlacementGroupId?: string; + /** The confidential VM key vault Id for ADE installation. */ + confidentialVmKeyVaultId?: string; + /** The target VM security profile. */ + targetVmSecurityProfile?: VMwareCbtSecurityProfileProperties; /** The target boot diagnostics storage account ARM Id. */ targetBootDiagnosticsStorageAccountId?: string; /** A value indicating whether auto resync is to be done. */ @@ -6155,6 +6388,8 @@ export interface VMwareCbtMigrateInput extends MigrateProviderSpecificInput { instanceType: "VMwareCbt"; /** A value indicating whether VM is to be shutdown. */ performShutdown: string; + /** A value indicating the inplace OS Upgrade version. */ + osUpgradeVersion?: string; } /** VMwareCbt specific resume replication input. */ @@ -6185,6 +6420,8 @@ export interface VMwareCbtTestMigrateInput networkId: string; /** The list of NIC details. */ vmNics?: VMwareCbtNicInput[]; + /** A value indicating the inplace OS Upgrade version. */ + osUpgradeVersion?: string; } /** Single Host fabric provider specific VM settings. */ @@ -6392,6 +6629,11 @@ export interface A2AReplicationDetails recoveryVirtualMachineScaleSetId?: string; /** The recovery capacity reservation group Id. */ recoveryCapacityReservationGroupId?: string; + /** + * A value indicating the churn option selected by user. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly churnOptionSelected?: ChurnOptionSelected; } /** Hyper V Replica Azure provider specific settings. */ @@ -6468,6 +6710,8 @@ export interface HyperVReplicaAzureReplicationDetails targetNicTags?: { [propertyName: string]: string }; /** The list of protected managed disks. */ protectedManagedDisks?: HyperVReplicaAzureManagedDiskDetails[]; + /** A value indicating all available inplace OS Upgrade configurations. */ + allAvailableOSUpgradeConfigurations?: OSUpgradeSupportedVersions[]; } /** Hyper V replica provider specific settings base class. */ @@ -6675,6 +6919,15 @@ export interface InMageAzureV2ReplicationDetails switchProviderBlockingErrorDetails?: InMageAzureV2SwitchProviderBlockingErrorDetails[]; /** The switch provider blocking error information. */ switchProviderDetails?: InMageAzureV2SwitchProviderDetails; + /** A value indicating the inplace OS Upgrade version. */ + supportedOSVersions?: string[]; + /** A value indicating all available inplace OS Upgrade configurations. */ + allAvailableOSUpgradeConfigurations?: OSUpgradeSupportedVersions[]; + /** + * The name of the OS on the VM. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly osName?: string; } /** InMageRcmFailback provider specific details. */ @@ -7551,6 +7804,8 @@ export interface HyperVReplicaAzurePlannedFailoverProviderInput secondaryKekCertificatePfx?: string; /** The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should be passed. */ recoveryPointId?: string; + /** A value indicating the inplace OS Upgrade version. */ + osUpgradeVersion?: string; } /** Provider specific input for InMageRcmFailback failover. */ @@ -7758,6 +8013,8 @@ export interface HyperVReplicaAzureTestFailoverInput secondaryKekCertificatePfx?: string; /** The recovery point id to be passed to test failover to a particular recovery point. In case of latest recovery point, null should be passed. */ recoveryPointId?: string; + /** A value indicating the inplace OS Upgrade version. */ + osUpgradeVersion?: string; } /** InMageAzureV2 provider specific input for test failover. */ @@ -7767,6 +8024,8 @@ export interface InMageAzureV2TestFailoverInput instanceType: "InMageAzureV2"; /** The recovery point id to be passed to test failover to a particular recovery point. In case of latest recovery point, null should be passed. */ recoveryPointId?: string; + /** A value indicating the inplace OS Upgrade version. */ + osUpgradeVersion?: string; } /** InMageRcm provider specific input for test failover. */ @@ -7822,6 +8081,8 @@ export interface InMageAzureV2UnplannedFailoverInput instanceType: "InMageAzureV2"; /** The recovery point id to be passed to failover to a particular recovery point. In case of latest recovery point, null should be passed. */ recoveryPointId?: string; + /** A value indicating the inplace OS Upgrade version. */ + osUpgradeVersion?: string; } /** InMageRcm provider specific input for unplanned failover. */ @@ -7924,6 +8185,8 @@ export interface VMwareCbtProtectionContainerMappingDetails * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly roleSizeToNicCountMap?: { [propertyName: string]: number }; + /** The SKUs to be excluded. */ + excludedSkus?: string[]; } /** A2A container mapping input. */ @@ -9518,6 +9781,24 @@ export enum KnownVmEncryptionType { */ export type VmEncryptionType = string; +/** Known values of {@link ChurnOptionSelected} that the service accepts. */ +export enum KnownChurnOptionSelected { + /** Normal */ + Normal = "Normal", + /** High */ + High = "High" +} + +/** + * Defines values for ChurnOptionSelected. \ + * {@link KnownChurnOptionSelected} can be used interchangeably with ChurnOptionSelected, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Normal** \ + * **High** + */ +export type ChurnOptionSelected = string; + /** Known values of {@link DiskAccountType} that the service accepts. */ export enum KnownDiskAccountType { /** StandardLRS */ @@ -10025,6 +10306,27 @@ export enum KnownRecoveryPlanPointType { */ export type RecoveryPlanPointType = string; +/** Known values of {@link SecurityType} that the service accepts. */ +export enum KnownSecurityType { + /** None */ + None = "None", + /** TrustedLaunch */ + TrustedLaunch = "TrustedLaunch", + /** ConfidentialVM */ + ConfidentialVM = "ConfidentialVM" +} + +/** + * Defines values for SecurityType. \ + * {@link KnownSecurityType} can be used interchangeably with SecurityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **TrustedLaunch** \ + * **ConfidentialVM** + */ +export type SecurityType = string; + /** Optional parameters. */ export interface OperationsListOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/models/mappers.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/models/mappers.ts index 310b5195eb01..12bef903a31b 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/models/mappers.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/models/mappers.ts @@ -7349,6 +7349,91 @@ export const A2AExtendedLocationDetails: coreClient.CompositeMapper = { } }; +export const A2AFabricSpecificLocationDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "A2AFabricSpecificLocationDetails", + modelProperties: { + initialPrimaryZone: { + serializedName: "initialPrimaryZone", + type: { + name: "String" + } + }, + initialRecoveryZone: { + serializedName: "initialRecoveryZone", + type: { + name: "String" + } + }, + initialPrimaryExtendedLocation: { + serializedName: "initialPrimaryExtendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation" + } + }, + initialRecoveryExtendedLocation: { + serializedName: "initialRecoveryExtendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation" + } + }, + initialPrimaryFabricLocation: { + serializedName: "initialPrimaryFabricLocation", + type: { + name: "String" + } + }, + initialRecoveryFabricLocation: { + serializedName: "initialRecoveryFabricLocation", + type: { + name: "String" + } + }, + primaryZone: { + serializedName: "primaryZone", + type: { + name: "String" + } + }, + recoveryZone: { + serializedName: "recoveryZone", + type: { + name: "String" + } + }, + primaryExtendedLocation: { + serializedName: "primaryExtendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation" + } + }, + recoveryExtendedLocation: { + serializedName: "recoveryExtendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation" + } + }, + primaryFabricLocation: { + serializedName: "primaryFabricLocation", + type: { + name: "String" + } + }, + recoveryFabricLocation: { + serializedName: "recoveryFabricLocation", + type: { + name: "String" + } + } + } + } +}; + export const A2AProtectedDiskDetails: coreClient.CompositeMapper = { type: { name: "Composite", @@ -8166,6 +8251,130 @@ export const AgentDiskDetails: coreClient.CompositeMapper = { } }; +export const ApplianceMonitoringDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ApplianceMonitoringDetails", + modelProperties: { + cpuDetails: { + serializedName: "cpuDetails", + type: { + name: "Composite", + className: "ApplianceResourceDetails" + } + }, + ramDetails: { + serializedName: "ramDetails", + type: { + name: "Composite", + className: "ApplianceResourceDetails" + } + }, + datastoreSnapshot: { + serializedName: "datastoreSnapshot", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataStoreUtilizationDetails" + } + } + } + }, + disksReplicationDetails: { + serializedName: "disksReplicationDetails", + type: { + name: "Composite", + className: "ApplianceResourceDetails" + } + }, + esxiNfcBuffer: { + serializedName: "esxiNfcBuffer", + type: { + name: "Composite", + className: "ApplianceResourceDetails" + } + }, + networkBandwidth: { + serializedName: "networkBandwidth", + type: { + name: "Composite", + className: "ApplianceResourceDetails" + } + } + } + } +}; + +export const ApplianceResourceDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ApplianceResourceDetails", + modelProperties: { + capacity: { + serializedName: "capacity", + readOnly: true, + type: { + name: "Number" + } + }, + processUtilization: { + serializedName: "processUtilization", + readOnly: true, + type: { + name: "Number" + } + }, + totalUtilization: { + serializedName: "totalUtilization", + readOnly: true, + type: { + name: "Number" + } + }, + status: { + serializedName: "status", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const DataStoreUtilizationDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataStoreUtilizationDetails", + modelProperties: { + totalSnapshotsSupported: { + serializedName: "totalSnapshotsSupported", + readOnly: true, + type: { + name: "Number" + } + }, + totalSnapshotsCreated: { + serializedName: "totalSnapshotsCreated", + readOnly: true, + type: { + name: "Number" + } + }, + dataStoreName: { + serializedName: "dataStoreName", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const ApplianceQueryParameter: coreClient.CompositeMapper = { type: { name: "Composite", @@ -8532,6 +8741,18 @@ export const FabricQueryParameter: coreClient.CompositeMapper = { name: "String" } }, + extendedLocationMappings: { + serializedName: "extendedLocationMappings", + type: { + name: "String" + } + }, + locationDetails: { + serializedName: "locationDetails", + type: { + name: "String" + } + }, fetchAgentDetails: { serializedName: "fetchAgentDetails", type: { @@ -8674,6 +8895,76 @@ export const FailoverReplicationProtectedItemDetails: coreClient.CompositeMapper } }; +export const GatewayOperationDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GatewayOperationDetails", + modelProperties: { + state: { + serializedName: "state", + readOnly: true, + type: { + name: "String" + } + }, + progressPercentage: { + serializedName: "progressPercentage", + readOnly: true, + type: { + name: "Number" + } + }, + timeElapsed: { + serializedName: "timeElapsed", + readOnly: true, + type: { + name: "Number" + } + }, + timeRemaining: { + serializedName: "timeRemaining", + readOnly: true, + type: { + name: "Number" + } + }, + uploadSpeed: { + serializedName: "uploadSpeed", + readOnly: true, + type: { + name: "Number" + } + }, + hostName: { + serializedName: "hostName", + readOnly: true, + type: { + name: "String" + } + }, + dataStores: { + serializedName: "dataStores", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + vmwareReadThroughput: { + serializedName: "vmwareReadThroughput", + readOnly: true, + type: { + name: "Number" + } + } + } + } +}; + export const HyperVHostDetails: coreClient.CompositeMapper = { type: { name: "Composite", @@ -8836,6 +9127,34 @@ export const OSDetails: coreClient.CompositeMapper = { } }; +export const OSUpgradeSupportedVersions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OSUpgradeSupportedVersions", + modelProperties: { + supportedSourceOsVersion: { + serializedName: "supportedSourceOsVersion", + readOnly: true, + type: { + name: "String" + } + }, + supportedTargetOsVersions: { + serializedName: "supportedTargetOsVersions", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + export const UpdateDiskInput: coreClient.CompositeMapper = { type: { name: "Composite", @@ -12045,6 +12364,45 @@ export const VMwareCbtDiskInput: coreClient.CompositeMapper = { } }; +export const VMwareCbtSecurityProfileProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VMwareCbtSecurityProfileProperties", + modelProperties: { + targetVmSecurityType: { + serializedName: "targetVmSecurityType", + type: { + name: "String" + } + }, + isTargetVmSecureBootEnabled: { + serializedName: "isTargetVmSecureBootEnabled", + type: { + name: "String" + } + }, + isTargetVmTpmEnabled: { + serializedName: "isTargetVmTpmEnabled", + type: { + name: "String" + } + }, + isTargetVmIntegrityMonitoringEnabled: { + serializedName: "isTargetVmIntegrityMonitoringEnabled", + type: { + name: "String" + } + }, + isTargetVmConfidentialEncryptionEnabled: { + serializedName: "isTargetVmConfidentialEncryptionEnabled", + type: { + name: "String" + } + } + } + } +}; + export const VMwareCbtProtectedDiskDetails: coreClient.CompositeMapper = { type: { name: "Composite", @@ -12145,6 +12503,13 @@ export const VMwareCbtProtectedDiskDetails: coreClient.CompositeMapper = { type: { name: "String" } + }, + gatewayOperationDetails: { + serializedName: "gatewayOperationDetails", + type: { + name: "Composite", + className: "GatewayOperationDetails" + } } } } @@ -13249,6 +13614,18 @@ export const AzureFabricSpecificDetails: coreClient.CompositeMapper = { } } } + }, + locationDetails: { + serializedName: "locationDetails", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "A2AFabricSpecificLocationDetails" + } + } + } } } } @@ -14082,6 +14459,13 @@ export const VMwareCbtMigrationDetails: coreClient.CompositeMapper = { name: "String" } }, + osName: { + serializedName: "osName", + readOnly: true, + type: { + name: "String" + } + }, firmwareType: { serializedName: "firmwareType", readOnly: true, @@ -14172,6 +14556,19 @@ export const VMwareCbtMigrationDetails: coreClient.CompositeMapper = { name: "String" } }, + confidentialVmKeyVaultId: { + serializedName: "confidentialVmKeyVaultId", + type: { + name: "String" + } + }, + targetVmSecurityProfile: { + serializedName: "targetVmSecurityProfile", + type: { + name: "Composite", + className: "VMwareCbtSecurityProfileProperties" + } + }, targetBootDiagnosticsStorageAccountId: { serializedName: "targetBootDiagnosticsStorageAccountId", type: { @@ -14277,6 +14674,20 @@ export const VMwareCbtMigrationDetails: coreClient.CompositeMapper = { name: "Number" } }, + deltaSyncProgressPercentage: { + serializedName: "deltaSyncProgressPercentage", + readOnly: true, + type: { + name: "Number" + } + }, + isCheckSumResyncCycle: { + serializedName: "isCheckSumResyncCycle", + readOnly: true, + type: { + name: "String" + } + }, initialSeedingRetryCount: { serializedName: "initialSeedingRetryCount", readOnly: true, @@ -14298,6 +14709,13 @@ export const VMwareCbtMigrationDetails: coreClient.CompositeMapper = { name: "Number" } }, + deltaSyncRetryCount: { + serializedName: "deltaSyncRetryCount", + readOnly: true, + type: { + name: "Number" + } + }, resyncRequired: { serializedName: "resyncRequired", readOnly: true, @@ -14331,6 +14749,38 @@ export const VMwareCbtMigrationDetails: coreClient.CompositeMapper = { name: "Dictionary", value: { type: { name: "String" } } } + }, + supportedOSVersions: { + serializedName: "supportedOSVersions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + applianceMonitoringDetails: { + serializedName: "applianceMonitoringDetails", + type: { + name: "Composite", + className: "ApplianceMonitoringDetails" + } + }, + gatewayOperationDetails: { + serializedName: "gatewayOperationDetails", + type: { + name: "Composite", + className: "GatewayOperationDetails" + } + }, + operationName: { + serializedName: "operationName", + readOnly: true, + type: { + name: "String" + } } } } @@ -14460,6 +14910,19 @@ export const VMwareCbtEnableMigrationInput: coreClient.CompositeMapper = { name: "String" } }, + confidentialVmKeyVaultId: { + serializedName: "confidentialVmKeyVaultId", + type: { + name: "String" + } + }, + targetVmSecurityProfile: { + serializedName: "targetVmSecurityProfile", + type: { + name: "Composite", + className: "VMwareCbtSecurityProfileProperties" + } + }, targetBootDiagnosticsStorageAccountId: { serializedName: "targetBootDiagnosticsStorageAccountId", type: { @@ -14651,6 +15114,12 @@ export const VMwareCbtMigrateInput: coreClient.CompositeMapper = { type: { name: "String" } + }, + osUpgradeVersion: { + serializedName: "osUpgradeVersion", + type: { + name: "String" + } } } } @@ -14732,6 +15201,12 @@ export const VMwareCbtTestMigrateInput: coreClient.CompositeMapper = { } } } + }, + osUpgradeVersion: { + serializedName: "osUpgradeVersion", + type: { + name: "String" + } } } } @@ -15321,6 +15796,13 @@ export const A2AReplicationDetails: coreClient.CompositeMapper = { type: { name: "String" } + }, + churnOptionSelected: { + serializedName: "churnOptionSelected", + readOnly: true, + type: { + name: "String" + } } } } @@ -15558,6 +16040,18 @@ export const HyperVReplicaAzureReplicationDetails: coreClient.CompositeMapper = } } } + }, + allAvailableOSUpgradeConfigurations: { + serializedName: "allAvailableOSUpgradeConfigurations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OSUpgradeSupportedVersions" + } + } + } } } } @@ -16228,6 +16722,36 @@ export const InMageAzureV2ReplicationDetails: coreClient.CompositeMapper = { name: "Composite", className: "InMageAzureV2SwitchProviderDetails" } + }, + supportedOSVersions: { + serializedName: "supportedOSVersions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + allAvailableOSUpgradeConfigurations: { + serializedName: "allAvailableOSUpgradeConfigurations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "OSUpgradeSupportedVersions" + } + } + } + }, + osName: { + serializedName: "osName", + readOnly: true, + type: { + name: "String" + } } } } @@ -18407,6 +18931,12 @@ export const HyperVReplicaAzurePlannedFailoverProviderInput: coreClient.Composit type: { name: "String" } + }, + osUpgradeVersion: { + serializedName: "osUpgradeVersion", + type: { + name: "String" + } } } } @@ -18964,6 +19494,12 @@ export const HyperVReplicaAzureTestFailoverInput: coreClient.CompositeMapper = { type: { name: "String" } + }, + osUpgradeVersion: { + serializedName: "osUpgradeVersion", + type: { + name: "String" + } } } } @@ -18984,6 +19520,12 @@ export const InMageAzureV2TestFailoverInput: coreClient.CompositeMapper = { type: { name: "String" } + }, + osUpgradeVersion: { + serializedName: "osUpgradeVersion", + type: { + name: "String" + } } } } @@ -19114,6 +19656,12 @@ export const InMageAzureV2UnplannedFailoverInput: coreClient.CompositeMapper = { type: { name: "String" } + }, + osUpgradeVersion: { + serializedName: "osUpgradeVersion", + type: { + name: "String" + } } } } @@ -19322,6 +19870,17 @@ export const VMwareCbtProtectionContainerMappingDetails: coreClient.CompositeMap name: "Dictionary", value: { type: { name: "Number" } } } + }, + excludedSkus: { + serializedName: "excludedSkus", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/models/parameters.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/models/parameters.ts index c740483d22df..14a9515a783e 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/models/parameters.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/models/parameters.ts @@ -92,7 +92,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-10-01", + defaultValue: "2023-06-01", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationFabrics.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationFabrics.ts index 0b4bc569d0a5..c87e81148b7c 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationFabrics.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationFabrics.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { SiteRecoveryManagementClient } from "../siteRecoveryManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Fabric, ReplicationFabricsListNextOptionalParams, @@ -183,8 +187,8 @@ export class ReplicationFabricsImpl implements ReplicationFabrics { input: FabricCreationInput, options?: ReplicationFabricsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationFabricsCreateResponse>, + SimplePollerLike< + OperationState<ReplicationFabricsCreateResponse>, ReplicationFabricsCreateResponse > > { @@ -194,7 +198,7 @@ export class ReplicationFabricsImpl implements ReplicationFabrics { ): Promise<ReplicationFabricsCreateResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -227,13 +231,16 @@ export class ReplicationFabricsImpl implements ReplicationFabrics { }; }; - const lro = new LroImpl( - sendOperation, - { resourceName, resourceGroupName, fabricName, input, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, input, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + ReplicationFabricsCreateResponse, + OperationState<ReplicationFabricsCreateResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -279,14 +286,14 @@ export class ReplicationFabricsImpl implements ReplicationFabrics { resourceGroupName: string, fabricName: string, options?: ReplicationFabricsPurgeOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>> { + ): Promise<SimplePollerLike<OperationState<void>, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise<void> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -319,13 +326,13 @@ export class ReplicationFabricsImpl implements ReplicationFabrics { }; }; - const lro = new LroImpl( - sendOperation, - { resourceName, resourceGroupName, fabricName, options }, - purgeOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, options }, + spec: purgeOperationSpec + }); + const poller = await createHttpPoller<void, OperationState<void>>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -369,8 +376,8 @@ export class ReplicationFabricsImpl implements ReplicationFabrics { fabricName: string, options?: ReplicationFabricsCheckConsistencyOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationFabricsCheckConsistencyResponse>, + SimplePollerLike< + OperationState<ReplicationFabricsCheckConsistencyResponse>, ReplicationFabricsCheckConsistencyResponse > > { @@ -380,7 +387,7 @@ export class ReplicationFabricsImpl implements ReplicationFabrics { ): Promise<ReplicationFabricsCheckConsistencyResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -413,13 +420,16 @@ export class ReplicationFabricsImpl implements ReplicationFabrics { }; }; - const lro = new LroImpl( - sendOperation, - { resourceName, resourceGroupName, fabricName, options }, - checkConsistencyOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, options }, + spec: checkConsistencyOperationSpec + }); + const poller = await createHttpPoller< + ReplicationFabricsCheckConsistencyResponse, + OperationState<ReplicationFabricsCheckConsistencyResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -462,14 +472,14 @@ export class ReplicationFabricsImpl implements ReplicationFabrics { resourceGroupName: string, fabricName: string, options?: ReplicationFabricsMigrateToAadOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>> { + ): Promise<SimplePollerLike<OperationState<void>, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise<void> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -502,13 +512,13 @@ export class ReplicationFabricsImpl implements ReplicationFabrics { }; }; - const lro = new LroImpl( - sendOperation, - { resourceName, resourceGroupName, fabricName, options }, - migrateToAadOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, options }, + spec: migrateToAadOperationSpec + }); + const poller = await createHttpPoller<void, OperationState<void>>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -554,8 +564,8 @@ export class ReplicationFabricsImpl implements ReplicationFabrics { failoverProcessServerRequest: FailoverProcessServerRequest, options?: ReplicationFabricsReassociateGatewayOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationFabricsReassociateGatewayResponse>, + SimplePollerLike< + OperationState<ReplicationFabricsReassociateGatewayResponse>, ReplicationFabricsReassociateGatewayResponse > > { @@ -565,7 +575,7 @@ export class ReplicationFabricsImpl implements ReplicationFabrics { ): Promise<ReplicationFabricsReassociateGatewayResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -598,19 +608,22 @@ export class ReplicationFabricsImpl implements ReplicationFabrics { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, failoverProcessServerRequest, options }, - reassociateGatewayOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: reassociateGatewayOperationSpec + }); + const poller = await createHttpPoller< + ReplicationFabricsReassociateGatewayResponse, + OperationState<ReplicationFabricsReassociateGatewayResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -656,14 +669,14 @@ export class ReplicationFabricsImpl implements ReplicationFabrics { resourceGroupName: string, fabricName: string, options?: ReplicationFabricsDeleteOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>> { + ): Promise<SimplePollerLike<OperationState<void>, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise<void> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -696,13 +709,13 @@ export class ReplicationFabricsImpl implements ReplicationFabrics { }; }; - const lro = new LroImpl( - sendOperation, - { resourceName, resourceGroupName, fabricName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller<void, OperationState<void>>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -748,8 +761,8 @@ export class ReplicationFabricsImpl implements ReplicationFabrics { renewCertificate: RenewCertificateInput, options?: ReplicationFabricsRenewCertificateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationFabricsRenewCertificateResponse>, + SimplePollerLike< + OperationState<ReplicationFabricsRenewCertificateResponse>, ReplicationFabricsRenewCertificateResponse > > { @@ -759,7 +772,7 @@ export class ReplicationFabricsImpl implements ReplicationFabrics { ): Promise<ReplicationFabricsRenewCertificateResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -792,19 +805,22 @@ export class ReplicationFabricsImpl implements ReplicationFabrics { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, renewCertificate, options }, - renewCertificateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: renewCertificateOperationSpec + }); + const poller = await createHttpPoller< + ReplicationFabricsRenewCertificateResponse, + OperationState<ReplicationFabricsRenewCertificateResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationJobs.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationJobs.ts index 880ba8b32a89..f50c10803892 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationJobs.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationJobs.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { SiteRecoveryManagementClient } from "../siteRecoveryManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Job, ReplicationJobsListNextOptionalParams, @@ -177,8 +181,8 @@ export class ReplicationJobsImpl implements ReplicationJobs { jobName: string, options?: ReplicationJobsCancelOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationJobsCancelResponse>, + SimplePollerLike< + OperationState<ReplicationJobsCancelResponse>, ReplicationJobsCancelResponse > > { @@ -188,7 +192,7 @@ export class ReplicationJobsImpl implements ReplicationJobs { ): Promise<ReplicationJobsCancelResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -221,13 +225,16 @@ export class ReplicationJobsImpl implements ReplicationJobs { }; }; - const lro = new LroImpl( - sendOperation, - { resourceName, resourceGroupName, jobName, options }, - cancelOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, jobName, options }, + spec: cancelOperationSpec + }); + const poller = await createHttpPoller< + ReplicationJobsCancelResponse, + OperationState<ReplicationJobsCancelResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -271,8 +278,8 @@ export class ReplicationJobsImpl implements ReplicationJobs { jobName: string, options?: ReplicationJobsRestartOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationJobsRestartResponse>, + SimplePollerLike< + OperationState<ReplicationJobsRestartResponse>, ReplicationJobsRestartResponse > > { @@ -282,7 +289,7 @@ export class ReplicationJobsImpl implements ReplicationJobs { ): Promise<ReplicationJobsRestartResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -315,13 +322,16 @@ export class ReplicationJobsImpl implements ReplicationJobs { }; }; - const lro = new LroImpl( - sendOperation, - { resourceName, resourceGroupName, jobName, options }, - restartOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, jobName, options }, + spec: restartOperationSpec + }); + const poller = await createHttpPoller< + ReplicationJobsRestartResponse, + OperationState<ReplicationJobsRestartResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -367,8 +377,8 @@ export class ReplicationJobsImpl implements ReplicationJobs { resumeJobParams: ResumeJobParams, options?: ReplicationJobsResumeOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationJobsResumeResponse>, + SimplePollerLike< + OperationState<ReplicationJobsResumeResponse>, ReplicationJobsResumeResponse > > { @@ -378,7 +388,7 @@ export class ReplicationJobsImpl implements ReplicationJobs { ): Promise<ReplicationJobsResumeResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -411,13 +421,22 @@ export class ReplicationJobsImpl implements ReplicationJobs { }; }; - const lro = new LroImpl( - sendOperation, - { resourceName, resourceGroupName, jobName, resumeJobParams, options }, - resumeOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceName, + resourceGroupName, + jobName, + resumeJobParams, + options + }, + spec: resumeOperationSpec + }); + const poller = await createHttpPoller< + ReplicationJobsResumeResponse, + OperationState<ReplicationJobsResumeResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -464,8 +483,8 @@ export class ReplicationJobsImpl implements ReplicationJobs { jobQueryParameter: JobQueryParameter, options?: ReplicationJobsExportOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationJobsExportResponse>, + SimplePollerLike< + OperationState<ReplicationJobsExportResponse>, ReplicationJobsExportResponse > > { @@ -475,7 +494,7 @@ export class ReplicationJobsImpl implements ReplicationJobs { ): Promise<ReplicationJobsExportResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -508,13 +527,16 @@ export class ReplicationJobsImpl implements ReplicationJobs { }; }; - const lro = new LroImpl( - sendOperation, - { resourceName, resourceGroupName, jobQueryParameter, options }, - exportOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, jobQueryParameter, options }, + spec: exportOperationSpec + }); + const poller = await createHttpPoller< + ReplicationJobsExportResponse, + OperationState<ReplicationJobsExportResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationMigrationItems.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationMigrationItems.ts index d0d9d6d44f67..e1d067b36bcd 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationMigrationItems.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationMigrationItems.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { SiteRecoveryManagementClient } from "../siteRecoveryManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { MigrationItem, ReplicationMigrationItemsListByReplicationProtectionContainersNextOptionalParams, @@ -329,8 +333,8 @@ export class ReplicationMigrationItemsImpl input: EnableMigrationInput, options?: ReplicationMigrationItemsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationMigrationItemsCreateResponse>, + SimplePollerLike< + OperationState<ReplicationMigrationItemsCreateResponse>, ReplicationMigrationItemsCreateResponse > > { @@ -340,7 +344,7 @@ export class ReplicationMigrationItemsImpl ): Promise<ReplicationMigrationItemsCreateResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -373,9 +377,9 @@ export class ReplicationMigrationItemsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -384,10 +388,13 @@ export class ReplicationMigrationItemsImpl input, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + ReplicationMigrationItemsCreateResponse, + OperationState<ReplicationMigrationItemsCreateResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -443,14 +450,14 @@ export class ReplicationMigrationItemsImpl protectionContainerName: string, migrationItemName: string, options?: ReplicationMigrationItemsDeleteOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>> { + ): Promise<SimplePollerLike<OperationState<void>, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise<void> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -483,9 +490,9 @@ export class ReplicationMigrationItemsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -493,10 +500,10 @@ export class ReplicationMigrationItemsImpl migrationItemName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller<void, OperationState<void>>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -552,8 +559,8 @@ export class ReplicationMigrationItemsImpl input: UpdateMigrationItemInput, options?: ReplicationMigrationItemsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationMigrationItemsUpdateResponse>, + SimplePollerLike< + OperationState<ReplicationMigrationItemsUpdateResponse>, ReplicationMigrationItemsUpdateResponse > > { @@ -563,7 +570,7 @@ export class ReplicationMigrationItemsImpl ): Promise<ReplicationMigrationItemsUpdateResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -596,9 +603,9 @@ export class ReplicationMigrationItemsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -607,10 +614,13 @@ export class ReplicationMigrationItemsImpl input, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + ReplicationMigrationItemsUpdateResponse, + OperationState<ReplicationMigrationItemsUpdateResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -669,8 +679,8 @@ export class ReplicationMigrationItemsImpl migrateInput: MigrateInput, options?: ReplicationMigrationItemsMigrateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationMigrationItemsMigrateResponse>, + SimplePollerLike< + OperationState<ReplicationMigrationItemsMigrateResponse>, ReplicationMigrationItemsMigrateResponse > > { @@ -680,7 +690,7 @@ export class ReplicationMigrationItemsImpl ): Promise<ReplicationMigrationItemsMigrateResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -713,9 +723,9 @@ export class ReplicationMigrationItemsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -724,10 +734,13 @@ export class ReplicationMigrationItemsImpl migrateInput, options }, - migrateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: migrateOperationSpec + }); + const poller = await createHttpPoller< + ReplicationMigrationItemsMigrateResponse, + OperationState<ReplicationMigrationItemsMigrateResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -786,8 +799,8 @@ export class ReplicationMigrationItemsImpl pauseReplicationInput: PauseReplicationInput, options?: ReplicationMigrationItemsPauseReplicationOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationMigrationItemsPauseReplicationResponse>, + SimplePollerLike< + OperationState<ReplicationMigrationItemsPauseReplicationResponse>, ReplicationMigrationItemsPauseReplicationResponse > > { @@ -797,7 +810,7 @@ export class ReplicationMigrationItemsImpl ): Promise<ReplicationMigrationItemsPauseReplicationResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -830,9 +843,9 @@ export class ReplicationMigrationItemsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -841,10 +854,13 @@ export class ReplicationMigrationItemsImpl pauseReplicationInput, options }, - pauseReplicationOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: pauseReplicationOperationSpec + }); + const poller = await createHttpPoller< + ReplicationMigrationItemsPauseReplicationResponse, + OperationState<ReplicationMigrationItemsPauseReplicationResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -903,8 +919,8 @@ export class ReplicationMigrationItemsImpl resumeReplicationInput: ResumeReplicationInput, options?: ReplicationMigrationItemsResumeReplicationOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationMigrationItemsResumeReplicationResponse>, + SimplePollerLike< + OperationState<ReplicationMigrationItemsResumeReplicationResponse>, ReplicationMigrationItemsResumeReplicationResponse > > { @@ -914,7 +930,7 @@ export class ReplicationMigrationItemsImpl ): Promise<ReplicationMigrationItemsResumeReplicationResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -947,9 +963,9 @@ export class ReplicationMigrationItemsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -958,10 +974,13 @@ export class ReplicationMigrationItemsImpl resumeReplicationInput, options }, - resumeReplicationOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: resumeReplicationOperationSpec + }); + const poller = await createHttpPoller< + ReplicationMigrationItemsResumeReplicationResponse, + OperationState<ReplicationMigrationItemsResumeReplicationResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1020,8 +1039,8 @@ export class ReplicationMigrationItemsImpl input: ResyncInput, options?: ReplicationMigrationItemsResyncOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationMigrationItemsResyncResponse>, + SimplePollerLike< + OperationState<ReplicationMigrationItemsResyncResponse>, ReplicationMigrationItemsResyncResponse > > { @@ -1031,7 +1050,7 @@ export class ReplicationMigrationItemsImpl ): Promise<ReplicationMigrationItemsResyncResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -1064,9 +1083,9 @@ export class ReplicationMigrationItemsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -1075,10 +1094,13 @@ export class ReplicationMigrationItemsImpl input, options }, - resyncOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: resyncOperationSpec + }); + const poller = await createHttpPoller< + ReplicationMigrationItemsResyncResponse, + OperationState<ReplicationMigrationItemsResyncResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1137,8 +1159,8 @@ export class ReplicationMigrationItemsImpl testMigrateInput: TestMigrateInput, options?: ReplicationMigrationItemsTestMigrateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationMigrationItemsTestMigrateResponse>, + SimplePollerLike< + OperationState<ReplicationMigrationItemsTestMigrateResponse>, ReplicationMigrationItemsTestMigrateResponse > > { @@ -1148,7 +1170,7 @@ export class ReplicationMigrationItemsImpl ): Promise<ReplicationMigrationItemsTestMigrateResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -1181,9 +1203,9 @@ export class ReplicationMigrationItemsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -1192,10 +1214,13 @@ export class ReplicationMigrationItemsImpl testMigrateInput, options }, - testMigrateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: testMigrateOperationSpec + }); + const poller = await createHttpPoller< + ReplicationMigrationItemsTestMigrateResponse, + OperationState<ReplicationMigrationItemsTestMigrateResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1254,8 +1279,8 @@ export class ReplicationMigrationItemsImpl testMigrateCleanupInput: TestMigrateCleanupInput, options?: ReplicationMigrationItemsTestMigrateCleanupOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationMigrationItemsTestMigrateCleanupResponse>, + SimplePollerLike< + OperationState<ReplicationMigrationItemsTestMigrateCleanupResponse>, ReplicationMigrationItemsTestMigrateCleanupResponse > > { @@ -1265,7 +1290,7 @@ export class ReplicationMigrationItemsImpl ): Promise<ReplicationMigrationItemsTestMigrateCleanupResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -1298,9 +1323,9 @@ export class ReplicationMigrationItemsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -1309,10 +1334,13 @@ export class ReplicationMigrationItemsImpl testMigrateCleanupInput, options }, - testMigrateCleanupOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: testMigrateCleanupOperationSpec + }); + const poller = await createHttpPoller< + ReplicationMigrationItemsTestMigrateCleanupResponse, + OperationState<ReplicationMigrationItemsTestMigrateCleanupResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationNetworkMappings.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationNetworkMappings.ts index 3360fdedcaaf..e2e8696e1adf 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationNetworkMappings.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationNetworkMappings.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { SiteRecoveryManagementClient } from "../siteRecoveryManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { NetworkMapping, ReplicationNetworkMappingsListByReplicationNetworksNextOptionalParams, @@ -303,8 +307,8 @@ export class ReplicationNetworkMappingsImpl input: CreateNetworkMappingInput, options?: ReplicationNetworkMappingsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationNetworkMappingsCreateResponse>, + SimplePollerLike< + OperationState<ReplicationNetworkMappingsCreateResponse>, ReplicationNetworkMappingsCreateResponse > > { @@ -314,7 +318,7 @@ export class ReplicationNetworkMappingsImpl ): Promise<ReplicationNetworkMappingsCreateResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -347,9 +351,9 @@ export class ReplicationNetworkMappingsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -358,10 +362,13 @@ export class ReplicationNetworkMappingsImpl input, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + ReplicationNetworkMappingsCreateResponse, + OperationState<ReplicationNetworkMappingsCreateResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -417,14 +424,14 @@ export class ReplicationNetworkMappingsImpl networkName: string, networkMappingName: string, options?: ReplicationNetworkMappingsDeleteOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>> { + ): Promise<SimplePollerLike<OperationState<void>, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise<void> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -457,9 +464,9 @@ export class ReplicationNetworkMappingsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -467,10 +474,10 @@ export class ReplicationNetworkMappingsImpl networkMappingName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller<void, OperationState<void>>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -526,8 +533,8 @@ export class ReplicationNetworkMappingsImpl input: UpdateNetworkMappingInput, options?: ReplicationNetworkMappingsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationNetworkMappingsUpdateResponse>, + SimplePollerLike< + OperationState<ReplicationNetworkMappingsUpdateResponse>, ReplicationNetworkMappingsUpdateResponse > > { @@ -537,7 +544,7 @@ export class ReplicationNetworkMappingsImpl ): Promise<ReplicationNetworkMappingsUpdateResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -570,9 +577,9 @@ export class ReplicationNetworkMappingsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -581,10 +588,13 @@ export class ReplicationNetworkMappingsImpl input, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + ReplicationNetworkMappingsUpdateResponse, + OperationState<ReplicationNetworkMappingsUpdateResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationPolicies.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationPolicies.ts index b873c50bec48..25287c8ea56e 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationPolicies.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationPolicies.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { SiteRecoveryManagementClient } from "../siteRecoveryManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Policy, ReplicationPoliciesListNextOptionalParams, @@ -176,8 +180,8 @@ export class ReplicationPoliciesImpl implements ReplicationPolicies { input: CreatePolicyInput, options?: ReplicationPoliciesCreateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationPoliciesCreateResponse>, + SimplePollerLike< + OperationState<ReplicationPoliciesCreateResponse>, ReplicationPoliciesCreateResponse > > { @@ -187,7 +191,7 @@ export class ReplicationPoliciesImpl implements ReplicationPolicies { ): Promise<ReplicationPoliciesCreateResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -220,13 +224,16 @@ export class ReplicationPoliciesImpl implements ReplicationPolicies { }; }; - const lro = new LroImpl( - sendOperation, - { resourceName, resourceGroupName, policyName, input, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, policyName, input, options }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + ReplicationPoliciesCreateResponse, + OperationState<ReplicationPoliciesCreateResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -272,14 +279,14 @@ export class ReplicationPoliciesImpl implements ReplicationPolicies { resourceGroupName: string, policyName: string, options?: ReplicationPoliciesDeleteOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>> { + ): Promise<SimplePollerLike<OperationState<void>, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise<void> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -312,13 +319,13 @@ export class ReplicationPoliciesImpl implements ReplicationPolicies { }; }; - const lro = new LroImpl( - sendOperation, - { resourceName, resourceGroupName, policyName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, policyName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller<void, OperationState<void>>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -364,8 +371,8 @@ export class ReplicationPoliciesImpl implements ReplicationPolicies { input: UpdatePolicyInput, options?: ReplicationPoliciesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationPoliciesUpdateResponse>, + SimplePollerLike< + OperationState<ReplicationPoliciesUpdateResponse>, ReplicationPoliciesUpdateResponse > > { @@ -375,7 +382,7 @@ export class ReplicationPoliciesImpl implements ReplicationPolicies { ): Promise<ReplicationPoliciesUpdateResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -408,13 +415,16 @@ export class ReplicationPoliciesImpl implements ReplicationPolicies { }; }; - const lro = new LroImpl( - sendOperation, - { resourceName, resourceGroupName, policyName, input, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, policyName, input, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + ReplicationPoliciesUpdateResponse, + OperationState<ReplicationPoliciesUpdateResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationProtectedItems.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationProtectedItems.ts index d230e3590581..45b4ebf016fc 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationProtectedItems.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationProtectedItems.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { SiteRecoveryManagementClient } from "../siteRecoveryManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { ReplicationProtectedItem, ReplicationProtectedItemsListByReplicationProtectionContainersNextOptionalParams, @@ -355,8 +359,8 @@ export class ReplicationProtectedItemsImpl input: EnableProtectionInput, options?: ReplicationProtectedItemsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsCreateResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsCreateResponse>, ReplicationProtectedItemsCreateResponse > > { @@ -366,7 +370,7 @@ export class ReplicationProtectedItemsImpl ): Promise<ReplicationProtectedItemsCreateResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -399,9 +403,9 @@ export class ReplicationProtectedItemsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -410,10 +414,13 @@ export class ReplicationProtectedItemsImpl input, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + ReplicationProtectedItemsCreateResponse, + OperationState<ReplicationProtectedItemsCreateResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -471,14 +478,14 @@ export class ReplicationProtectedItemsImpl protectionContainerName: string, replicatedProtectedItemName: string, options?: ReplicationProtectedItemsPurgeOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>> { + ): Promise<SimplePollerLike<OperationState<void>, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise<void> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -511,9 +518,9 @@ export class ReplicationProtectedItemsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -521,10 +528,10 @@ export class ReplicationProtectedItemsImpl replicatedProtectedItemName, options }, - purgeOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: purgeOperationSpec + }); + const poller = await createHttpPoller<void, OperationState<void>>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -582,8 +589,8 @@ export class ReplicationProtectedItemsImpl updateProtectionInput: UpdateReplicationProtectedItemInput, options?: ReplicationProtectedItemsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsUpdateResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsUpdateResponse>, ReplicationProtectedItemsUpdateResponse > > { @@ -593,7 +600,7 @@ export class ReplicationProtectedItemsImpl ): Promise<ReplicationProtectedItemsUpdateResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -626,9 +633,9 @@ export class ReplicationProtectedItemsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -637,10 +644,13 @@ export class ReplicationProtectedItemsImpl updateProtectionInput, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + ReplicationProtectedItemsUpdateResponse, + OperationState<ReplicationProtectedItemsUpdateResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -699,8 +709,8 @@ export class ReplicationProtectedItemsImpl addDisksInput: AddDisksInput, options?: ReplicationProtectedItemsAddDisksOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsAddDisksResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsAddDisksResponse>, ReplicationProtectedItemsAddDisksResponse > > { @@ -710,7 +720,7 @@ export class ReplicationProtectedItemsImpl ): Promise<ReplicationProtectedItemsAddDisksResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -743,9 +753,9 @@ export class ReplicationProtectedItemsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -754,10 +764,13 @@ export class ReplicationProtectedItemsImpl addDisksInput, options }, - addDisksOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: addDisksOperationSpec + }); + const poller = await createHttpPoller< + ReplicationProtectedItemsAddDisksResponse, + OperationState<ReplicationProtectedItemsAddDisksResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -816,8 +829,8 @@ export class ReplicationProtectedItemsImpl applyRecoveryPointInput: ApplyRecoveryPointInput, options?: ReplicationProtectedItemsApplyRecoveryPointOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsApplyRecoveryPointResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsApplyRecoveryPointResponse>, ReplicationProtectedItemsApplyRecoveryPointResponse > > { @@ -827,7 +840,7 @@ export class ReplicationProtectedItemsImpl ): Promise<ReplicationProtectedItemsApplyRecoveryPointResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -860,9 +873,9 @@ export class ReplicationProtectedItemsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -871,10 +884,13 @@ export class ReplicationProtectedItemsImpl applyRecoveryPointInput, options }, - applyRecoveryPointOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: applyRecoveryPointOperationSpec + }); + const poller = await createHttpPoller< + ReplicationProtectedItemsApplyRecoveryPointResponse, + OperationState<ReplicationProtectedItemsApplyRecoveryPointResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -931,8 +947,8 @@ export class ReplicationProtectedItemsImpl replicatedProtectedItemName: string, options?: ReplicationProtectedItemsFailoverCancelOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsFailoverCancelResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsFailoverCancelResponse>, ReplicationProtectedItemsFailoverCancelResponse > > { @@ -942,7 +958,7 @@ export class ReplicationProtectedItemsImpl ): Promise<ReplicationProtectedItemsFailoverCancelResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -975,9 +991,9 @@ export class ReplicationProtectedItemsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -985,10 +1001,13 @@ export class ReplicationProtectedItemsImpl replicatedProtectedItemName, options }, - failoverCancelOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: failoverCancelOperationSpec + }); + const poller = await createHttpPoller< + ReplicationProtectedItemsFailoverCancelResponse, + OperationState<ReplicationProtectedItemsFailoverCancelResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1042,8 +1061,8 @@ export class ReplicationProtectedItemsImpl replicatedProtectedItemName: string, options?: ReplicationProtectedItemsFailoverCommitOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsFailoverCommitResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsFailoverCommitResponse>, ReplicationProtectedItemsFailoverCommitResponse > > { @@ -1053,7 +1072,7 @@ export class ReplicationProtectedItemsImpl ): Promise<ReplicationProtectedItemsFailoverCommitResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -1086,9 +1105,9 @@ export class ReplicationProtectedItemsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -1096,10 +1115,13 @@ export class ReplicationProtectedItemsImpl replicatedProtectedItemName, options }, - failoverCommitOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: failoverCommitOperationSpec + }); + const poller = await createHttpPoller< + ReplicationProtectedItemsFailoverCommitResponse, + OperationState<ReplicationProtectedItemsFailoverCommitResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1155,8 +1177,8 @@ export class ReplicationProtectedItemsImpl failoverInput: PlannedFailoverInput, options?: ReplicationProtectedItemsPlannedFailoverOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsPlannedFailoverResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsPlannedFailoverResponse>, ReplicationProtectedItemsPlannedFailoverResponse > > { @@ -1166,7 +1188,7 @@ export class ReplicationProtectedItemsImpl ): Promise<ReplicationProtectedItemsPlannedFailoverResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -1199,9 +1221,9 @@ export class ReplicationProtectedItemsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -1210,10 +1232,13 @@ export class ReplicationProtectedItemsImpl failoverInput, options }, - plannedFailoverOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: plannedFailoverOperationSpec + }); + const poller = await createHttpPoller< + ReplicationProtectedItemsPlannedFailoverResponse, + OperationState<ReplicationProtectedItemsPlannedFailoverResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1272,14 +1297,14 @@ export class ReplicationProtectedItemsImpl replicatedProtectedItemName: string, disableProtectionInput: DisableProtectionInput, options?: ReplicationProtectedItemsDeleteOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>> { + ): Promise<SimplePollerLike<OperationState<void>, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise<void> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -1312,9 +1337,9 @@ export class ReplicationProtectedItemsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -1323,10 +1348,10 @@ export class ReplicationProtectedItemsImpl disableProtectionInput, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller<void, OperationState<void>>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1386,8 +1411,8 @@ export class ReplicationProtectedItemsImpl removeDisksInput: RemoveDisksInput, options?: ReplicationProtectedItemsRemoveDisksOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsRemoveDisksResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsRemoveDisksResponse>, ReplicationProtectedItemsRemoveDisksResponse > > { @@ -1397,7 +1422,7 @@ export class ReplicationProtectedItemsImpl ): Promise<ReplicationProtectedItemsRemoveDisksResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -1430,9 +1455,9 @@ export class ReplicationProtectedItemsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -1441,10 +1466,13 @@ export class ReplicationProtectedItemsImpl removeDisksInput, options }, - removeDisksOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: removeDisksOperationSpec + }); + const poller = await createHttpPoller< + ReplicationProtectedItemsRemoveDisksResponse, + OperationState<ReplicationProtectedItemsRemoveDisksResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1502,8 +1530,8 @@ export class ReplicationProtectedItemsImpl replicatedProtectedItemName: string, options?: ReplicationProtectedItemsRepairReplicationOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsRepairReplicationResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsRepairReplicationResponse>, ReplicationProtectedItemsRepairReplicationResponse > > { @@ -1513,7 +1541,7 @@ export class ReplicationProtectedItemsImpl ): Promise<ReplicationProtectedItemsRepairReplicationResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -1546,9 +1574,9 @@ export class ReplicationProtectedItemsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -1556,10 +1584,13 @@ export class ReplicationProtectedItemsImpl replicatedProtectedItemName, options }, - repairReplicationOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: repairReplicationOperationSpec + }); + const poller = await createHttpPoller< + ReplicationProtectedItemsRepairReplicationResponse, + OperationState<ReplicationProtectedItemsRepairReplicationResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1616,8 +1647,8 @@ export class ReplicationProtectedItemsImpl reprotectInput: ReverseReplicationInput, options?: ReplicationProtectedItemsReprotectOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsReprotectResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsReprotectResponse>, ReplicationProtectedItemsReprotectResponse > > { @@ -1627,7 +1658,7 @@ export class ReplicationProtectedItemsImpl ): Promise<ReplicationProtectedItemsReprotectResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -1660,9 +1691,9 @@ export class ReplicationProtectedItemsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -1671,10 +1702,13 @@ export class ReplicationProtectedItemsImpl reprotectInput, options }, - reprotectOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: reprotectOperationSpec + }); + const poller = await createHttpPoller< + ReplicationProtectedItemsReprotectResponse, + OperationState<ReplicationProtectedItemsReprotectResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1733,8 +1767,8 @@ export class ReplicationProtectedItemsImpl resolveHealthInput: ResolveHealthInput, options?: ReplicationProtectedItemsResolveHealthErrorsOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsResolveHealthErrorsResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsResolveHealthErrorsResponse>, ReplicationProtectedItemsResolveHealthErrorsResponse > > { @@ -1744,7 +1778,7 @@ export class ReplicationProtectedItemsImpl ): Promise<ReplicationProtectedItemsResolveHealthErrorsResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -1777,9 +1811,9 @@ export class ReplicationProtectedItemsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -1788,10 +1822,13 @@ export class ReplicationProtectedItemsImpl resolveHealthInput, options }, - resolveHealthErrorsOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: resolveHealthErrorsOperationSpec + }); + const poller = await createHttpPoller< + ReplicationProtectedItemsResolveHealthErrorsResponse, + OperationState<ReplicationProtectedItemsResolveHealthErrorsResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1850,8 +1887,8 @@ export class ReplicationProtectedItemsImpl switchProviderInput: SwitchProviderInput, options?: ReplicationProtectedItemsSwitchProviderOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsSwitchProviderResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsSwitchProviderResponse>, ReplicationProtectedItemsSwitchProviderResponse > > { @@ -1861,7 +1898,7 @@ export class ReplicationProtectedItemsImpl ): Promise<ReplicationProtectedItemsSwitchProviderResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -1894,9 +1931,9 @@ export class ReplicationProtectedItemsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -1905,12 +1942,15 @@ export class ReplicationProtectedItemsImpl switchProviderInput, options }, - switchProviderOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: switchProviderOperationSpec + }); + const poller = await createHttpPoller< + ReplicationProtectedItemsSwitchProviderResponse, + OperationState<ReplicationProtectedItemsSwitchProviderResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "azure-async-operation" + resourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -1968,8 +2008,8 @@ export class ReplicationProtectedItemsImpl testfailoverInput: TestFailoverInput, options?: ReplicationProtectedItemsTestFailoverOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsTestFailoverResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsTestFailoverResponse>, ReplicationProtectedItemsTestFailoverResponse > > { @@ -1979,7 +2019,7 @@ export class ReplicationProtectedItemsImpl ): Promise<ReplicationProtectedItemsTestFailoverResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -2012,9 +2052,9 @@ export class ReplicationProtectedItemsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -2023,10 +2063,13 @@ export class ReplicationProtectedItemsImpl testfailoverInput, options }, - testFailoverOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: testFailoverOperationSpec + }); + const poller = await createHttpPoller< + ReplicationProtectedItemsTestFailoverResponse, + OperationState<ReplicationProtectedItemsTestFailoverResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -2085,8 +2128,8 @@ export class ReplicationProtectedItemsImpl cleanupInput: TestFailoverCleanupInput, options?: ReplicationProtectedItemsTestFailoverCleanupOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsTestFailoverCleanupResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsTestFailoverCleanupResponse>, ReplicationProtectedItemsTestFailoverCleanupResponse > > { @@ -2096,7 +2139,7 @@ export class ReplicationProtectedItemsImpl ): Promise<ReplicationProtectedItemsTestFailoverCleanupResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -2129,9 +2172,9 @@ export class ReplicationProtectedItemsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -2140,10 +2183,13 @@ export class ReplicationProtectedItemsImpl cleanupInput, options }, - testFailoverCleanupOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: testFailoverCleanupOperationSpec + }); + const poller = await createHttpPoller< + ReplicationProtectedItemsTestFailoverCleanupResponse, + OperationState<ReplicationProtectedItemsTestFailoverCleanupResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -2202,8 +2248,8 @@ export class ReplicationProtectedItemsImpl failoverInput: UnplannedFailoverInput, options?: ReplicationProtectedItemsUnplannedFailoverOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsUnplannedFailoverResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsUnplannedFailoverResponse>, ReplicationProtectedItemsUnplannedFailoverResponse > > { @@ -2213,7 +2259,7 @@ export class ReplicationProtectedItemsImpl ): Promise<ReplicationProtectedItemsUnplannedFailoverResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -2246,9 +2292,9 @@ export class ReplicationProtectedItemsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -2257,10 +2303,13 @@ export class ReplicationProtectedItemsImpl failoverInput, options }, - unplannedFailoverOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: unplannedFailoverOperationSpec + }); + const poller = await createHttpPoller< + ReplicationProtectedItemsUnplannedFailoverResponse, + OperationState<ReplicationProtectedItemsUnplannedFailoverResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -2319,8 +2368,8 @@ export class ReplicationProtectedItemsImpl applianceUpdateInput: UpdateApplianceForReplicationProtectedItemInput, options?: ReplicationProtectedItemsUpdateApplianceOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsUpdateApplianceResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsUpdateApplianceResponse>, ReplicationProtectedItemsUpdateApplianceResponse > > { @@ -2330,7 +2379,7 @@ export class ReplicationProtectedItemsImpl ): Promise<ReplicationProtectedItemsUpdateApplianceResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -2363,9 +2412,9 @@ export class ReplicationProtectedItemsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -2374,10 +2423,13 @@ export class ReplicationProtectedItemsImpl applianceUpdateInput, options }, - updateApplianceOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateApplianceOperationSpec + }); + const poller = await createHttpPoller< + ReplicationProtectedItemsUpdateApplianceResponse, + OperationState<ReplicationProtectedItemsUpdateApplianceResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -2438,10 +2490,8 @@ export class ReplicationProtectedItemsImpl updateMobilityServiceRequest: UpdateMobilityServiceRequest, options?: ReplicationProtectedItemsUpdateMobilityServiceOptionalParams ): Promise< - PollerLike< - PollOperationState< - ReplicationProtectedItemsUpdateMobilityServiceResponse - >, + SimplePollerLike< + OperationState<ReplicationProtectedItemsUpdateMobilityServiceResponse>, ReplicationProtectedItemsUpdateMobilityServiceResponse > > { @@ -2451,7 +2501,7 @@ export class ReplicationProtectedItemsImpl ): Promise<ReplicationProtectedItemsUpdateMobilityServiceResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -2484,9 +2534,9 @@ export class ReplicationProtectedItemsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -2495,12 +2545,15 @@ export class ReplicationProtectedItemsImpl updateMobilityServiceRequest, options }, - updateMobilityServiceOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateMobilityServiceOperationSpec + }); + const poller = await createHttpPoller< + ReplicationProtectedItemsUpdateMobilityServiceResponse, + OperationState<ReplicationProtectedItemsUpdateMobilityServiceResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + resourceLocationConfig: "location" }); await poller.poll(); return poller; diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationProtectionContainerMappings.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationProtectionContainerMappings.ts index bae366e88075..d8fdab4f3866 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationProtectionContainerMappings.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationProtectionContainerMappings.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { SiteRecoveryManagementClient } from "../siteRecoveryManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { ProtectionContainerMapping, ReplicationProtectionContainerMappingsListByReplicationProtectionContainersNextOptionalParams, @@ -313,8 +317,8 @@ export class ReplicationProtectionContainerMappingsImpl creationInput: CreateProtectionContainerMappingInput, options?: ReplicationProtectionContainerMappingsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectionContainerMappingsCreateResponse>, + SimplePollerLike< + OperationState<ReplicationProtectionContainerMappingsCreateResponse>, ReplicationProtectionContainerMappingsCreateResponse > > { @@ -324,7 +328,7 @@ export class ReplicationProtectionContainerMappingsImpl ): Promise<ReplicationProtectionContainerMappingsCreateResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -357,9 +361,9 @@ export class ReplicationProtectionContainerMappingsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -368,10 +372,13 @@ export class ReplicationProtectionContainerMappingsImpl creationInput, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + ReplicationProtectionContainerMappingsCreateResponse, + OperationState<ReplicationProtectionContainerMappingsCreateResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -427,14 +434,14 @@ export class ReplicationProtectionContainerMappingsImpl protectionContainerName: string, mappingName: string, options?: ReplicationProtectionContainerMappingsPurgeOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>> { + ): Promise<SimplePollerLike<OperationState<void>, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise<void> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -467,9 +474,9 @@ export class ReplicationProtectionContainerMappingsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -477,10 +484,10 @@ export class ReplicationProtectionContainerMappingsImpl mappingName, options }, - purgeOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: purgeOperationSpec + }); + const poller = await createHttpPoller<void, OperationState<void>>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -536,8 +543,8 @@ export class ReplicationProtectionContainerMappingsImpl updateInput: UpdateProtectionContainerMappingInput, options?: ReplicationProtectionContainerMappingsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectionContainerMappingsUpdateResponse>, + SimplePollerLike< + OperationState<ReplicationProtectionContainerMappingsUpdateResponse>, ReplicationProtectionContainerMappingsUpdateResponse > > { @@ -547,7 +554,7 @@ export class ReplicationProtectionContainerMappingsImpl ): Promise<ReplicationProtectionContainerMappingsUpdateResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -580,9 +587,9 @@ export class ReplicationProtectionContainerMappingsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -591,10 +598,13 @@ export class ReplicationProtectionContainerMappingsImpl updateInput, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + ReplicationProtectionContainerMappingsUpdateResponse, + OperationState<ReplicationProtectionContainerMappingsUpdateResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -652,14 +662,14 @@ export class ReplicationProtectionContainerMappingsImpl mappingName: string, removalInput: RemoveProtectionContainerMappingInput, options?: ReplicationProtectionContainerMappingsDeleteOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>> { + ): Promise<SimplePollerLike<OperationState<void>, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise<void> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -692,9 +702,9 @@ export class ReplicationProtectionContainerMappingsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -703,10 +713,10 @@ export class ReplicationProtectionContainerMappingsImpl removalInput, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller<void, OperationState<void>>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationProtectionContainers.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationProtectionContainers.ts index def9eaffd024..9a872a19ddfe 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationProtectionContainers.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationProtectionContainers.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { SiteRecoveryManagementClient } from "../siteRecoveryManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { ProtectionContainer, ReplicationProtectionContainersListByReplicationFabricsNextOptionalParams, @@ -290,8 +294,8 @@ export class ReplicationProtectionContainersImpl creationInput: CreateProtectionContainerInput, options?: ReplicationProtectionContainersCreateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectionContainersCreateResponse>, + SimplePollerLike< + OperationState<ReplicationProtectionContainersCreateResponse>, ReplicationProtectionContainersCreateResponse > > { @@ -301,7 +305,7 @@ export class ReplicationProtectionContainersImpl ): Promise<ReplicationProtectionContainersCreateResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -334,9 +338,9 @@ export class ReplicationProtectionContainersImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -344,10 +348,13 @@ export class ReplicationProtectionContainersImpl creationInput, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + ReplicationProtectionContainersCreateResponse, + OperationState<ReplicationProtectionContainersCreateResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -401,8 +408,8 @@ export class ReplicationProtectionContainersImpl discoverProtectableItemRequest: DiscoverProtectableItemRequest, options?: ReplicationProtectionContainersDiscoverProtectableItemOptionalParams ): Promise< - PollerLike< - PollOperationState< + SimplePollerLike< + OperationState< ReplicationProtectionContainersDiscoverProtectableItemResponse >, ReplicationProtectionContainersDiscoverProtectableItemResponse @@ -414,7 +421,7 @@ export class ReplicationProtectionContainersImpl ): Promise<ReplicationProtectionContainersDiscoverProtectableItemResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -447,9 +454,9 @@ export class ReplicationProtectionContainersImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -457,10 +464,15 @@ export class ReplicationProtectionContainersImpl discoverProtectableItemRequest, options }, - discoverProtectableItemOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: discoverProtectableItemOperationSpec + }); + const poller = await createHttpPoller< + ReplicationProtectionContainersDiscoverProtectableItemResponse, + OperationState< + ReplicationProtectionContainersDiscoverProtectableItemResponse + > + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -511,14 +523,14 @@ export class ReplicationProtectionContainersImpl fabricName: string, protectionContainerName: string, options?: ReplicationProtectionContainersDeleteOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>> { + ): Promise<SimplePollerLike<OperationState<void>, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise<void> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -551,19 +563,19 @@ export class ReplicationProtectionContainersImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, protectionContainerName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller<void, OperationState<void>>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -614,10 +626,8 @@ export class ReplicationProtectionContainersImpl switchInput: SwitchProtectionInput, options?: ReplicationProtectionContainersSwitchProtectionOptionalParams ): Promise< - PollerLike< - PollOperationState< - ReplicationProtectionContainersSwitchProtectionResponse - >, + SimplePollerLike< + OperationState<ReplicationProtectionContainersSwitchProtectionResponse>, ReplicationProtectionContainersSwitchProtectionResponse > > { @@ -627,7 +637,7 @@ export class ReplicationProtectionContainersImpl ): Promise<ReplicationProtectionContainersSwitchProtectionResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -660,9 +670,9 @@ export class ReplicationProtectionContainersImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -670,10 +680,13 @@ export class ReplicationProtectionContainersImpl switchInput, options }, - switchProtectionOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: switchProtectionOperationSpec + }); + const poller = await createHttpPoller< + ReplicationProtectionContainersSwitchProtectionResponse, + OperationState<ReplicationProtectionContainersSwitchProtectionResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationRecoveryPlans.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationRecoveryPlans.ts index d303ca773504..b5be72e7b38e 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationRecoveryPlans.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationRecoveryPlans.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { SiteRecoveryManagementClient } from "../siteRecoveryManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { RecoveryPlan, ReplicationRecoveryPlansListNextOptionalParams, @@ -194,8 +198,8 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { input: CreateRecoveryPlanInput, options?: ReplicationRecoveryPlansCreateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationRecoveryPlansCreateResponse>, + SimplePollerLike< + OperationState<ReplicationRecoveryPlansCreateResponse>, ReplicationRecoveryPlansCreateResponse > > { @@ -205,7 +209,7 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { ): Promise<ReplicationRecoveryPlansCreateResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -238,13 +242,22 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { }; }; - const lro = new LroImpl( - sendOperation, - { resourceName, resourceGroupName, recoveryPlanName, input, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceName, + resourceGroupName, + recoveryPlanName, + input, + options + }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + ReplicationRecoveryPlansCreateResponse, + OperationState<ReplicationRecoveryPlansCreateResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -290,14 +303,14 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { resourceGroupName: string, recoveryPlanName: string, options?: ReplicationRecoveryPlansDeleteOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>> { + ): Promise<SimplePollerLike<OperationState<void>, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise<void> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -330,13 +343,13 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { }; }; - const lro = new LroImpl( - sendOperation, - { resourceName, resourceGroupName, recoveryPlanName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, recoveryPlanName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller<void, OperationState<void>>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -382,8 +395,8 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { input: UpdateRecoveryPlanInput, options?: ReplicationRecoveryPlansUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationRecoveryPlansUpdateResponse>, + SimplePollerLike< + OperationState<ReplicationRecoveryPlansUpdateResponse>, ReplicationRecoveryPlansUpdateResponse > > { @@ -393,7 +406,7 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { ): Promise<ReplicationRecoveryPlansUpdateResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -426,13 +439,22 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { }; }; - const lro = new LroImpl( - sendOperation, - { resourceName, resourceGroupName, recoveryPlanName, input, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceName, + resourceGroupName, + recoveryPlanName, + input, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + ReplicationRecoveryPlansUpdateResponse, + OperationState<ReplicationRecoveryPlansUpdateResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -479,8 +501,8 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { recoveryPlanName: string, options?: ReplicationRecoveryPlansFailoverCancelOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationRecoveryPlansFailoverCancelResponse>, + SimplePollerLike< + OperationState<ReplicationRecoveryPlansFailoverCancelResponse>, ReplicationRecoveryPlansFailoverCancelResponse > > { @@ -490,7 +512,7 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { ): Promise<ReplicationRecoveryPlansFailoverCancelResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -523,13 +545,16 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { }; }; - const lro = new LroImpl( - sendOperation, - { resourceName, resourceGroupName, recoveryPlanName, options }, - failoverCancelOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, recoveryPlanName, options }, + spec: failoverCancelOperationSpec + }); + const poller = await createHttpPoller< + ReplicationRecoveryPlansFailoverCancelResponse, + OperationState<ReplicationRecoveryPlansFailoverCancelResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -573,8 +598,8 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { recoveryPlanName: string, options?: ReplicationRecoveryPlansFailoverCommitOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationRecoveryPlansFailoverCommitResponse>, + SimplePollerLike< + OperationState<ReplicationRecoveryPlansFailoverCommitResponse>, ReplicationRecoveryPlansFailoverCommitResponse > > { @@ -584,7 +609,7 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { ): Promise<ReplicationRecoveryPlansFailoverCommitResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -617,13 +642,16 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { }; }; - const lro = new LroImpl( - sendOperation, - { resourceName, resourceGroupName, recoveryPlanName, options }, - failoverCommitOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, recoveryPlanName, options }, + spec: failoverCommitOperationSpec + }); + const poller = await createHttpPoller< + ReplicationRecoveryPlansFailoverCommitResponse, + OperationState<ReplicationRecoveryPlansFailoverCommitResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -669,8 +697,8 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { input: RecoveryPlanPlannedFailoverInput, options?: ReplicationRecoveryPlansPlannedFailoverOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationRecoveryPlansPlannedFailoverResponse>, + SimplePollerLike< + OperationState<ReplicationRecoveryPlansPlannedFailoverResponse>, ReplicationRecoveryPlansPlannedFailoverResponse > > { @@ -680,7 +708,7 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { ): Promise<ReplicationRecoveryPlansPlannedFailoverResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -713,13 +741,22 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { }; }; - const lro = new LroImpl( - sendOperation, - { resourceName, resourceGroupName, recoveryPlanName, input, options }, - plannedFailoverOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceName, + resourceGroupName, + recoveryPlanName, + input, + options + }, + spec: plannedFailoverOperationSpec + }); + const poller = await createHttpPoller< + ReplicationRecoveryPlansPlannedFailoverResponse, + OperationState<ReplicationRecoveryPlansPlannedFailoverResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -766,8 +803,8 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { recoveryPlanName: string, options?: ReplicationRecoveryPlansReprotectOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationRecoveryPlansReprotectResponse>, + SimplePollerLike< + OperationState<ReplicationRecoveryPlansReprotectResponse>, ReplicationRecoveryPlansReprotectResponse > > { @@ -777,7 +814,7 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { ): Promise<ReplicationRecoveryPlansReprotectResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -810,13 +847,16 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { }; }; - const lro = new LroImpl( - sendOperation, - { resourceName, resourceGroupName, recoveryPlanName, options }, - reprotectOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, recoveryPlanName, options }, + spec: reprotectOperationSpec + }); + const poller = await createHttpPoller< + ReplicationRecoveryPlansReprotectResponse, + OperationState<ReplicationRecoveryPlansReprotectResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -862,8 +902,8 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { input: RecoveryPlanTestFailoverInput, options?: ReplicationRecoveryPlansTestFailoverOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationRecoveryPlansTestFailoverResponse>, + SimplePollerLike< + OperationState<ReplicationRecoveryPlansTestFailoverResponse>, ReplicationRecoveryPlansTestFailoverResponse > > { @@ -873,7 +913,7 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { ): Promise<ReplicationRecoveryPlansTestFailoverResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -906,13 +946,22 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { }; }; - const lro = new LroImpl( - sendOperation, - { resourceName, resourceGroupName, recoveryPlanName, input, options }, - testFailoverOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceName, + resourceGroupName, + recoveryPlanName, + input, + options + }, + spec: testFailoverOperationSpec + }); + const poller = await createHttpPoller< + ReplicationRecoveryPlansTestFailoverResponse, + OperationState<ReplicationRecoveryPlansTestFailoverResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -961,8 +1010,8 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { input: RecoveryPlanTestFailoverCleanupInput, options?: ReplicationRecoveryPlansTestFailoverCleanupOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationRecoveryPlansTestFailoverCleanupResponse>, + SimplePollerLike< + OperationState<ReplicationRecoveryPlansTestFailoverCleanupResponse>, ReplicationRecoveryPlansTestFailoverCleanupResponse > > { @@ -972,7 +1021,7 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { ): Promise<ReplicationRecoveryPlansTestFailoverCleanupResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -1005,13 +1054,22 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { }; }; - const lro = new LroImpl( - sendOperation, - { resourceName, resourceGroupName, recoveryPlanName, input, options }, - testFailoverCleanupOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceName, + resourceGroupName, + recoveryPlanName, + input, + options + }, + spec: testFailoverCleanupOperationSpec + }); + const poller = await createHttpPoller< + ReplicationRecoveryPlansTestFailoverCleanupResponse, + OperationState<ReplicationRecoveryPlansTestFailoverCleanupResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1060,8 +1118,8 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { input: RecoveryPlanUnplannedFailoverInput, options?: ReplicationRecoveryPlansUnplannedFailoverOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationRecoveryPlansUnplannedFailoverResponse>, + SimplePollerLike< + OperationState<ReplicationRecoveryPlansUnplannedFailoverResponse>, ReplicationRecoveryPlansUnplannedFailoverResponse > > { @@ -1071,7 +1129,7 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { ): Promise<ReplicationRecoveryPlansUnplannedFailoverResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -1104,13 +1162,22 @@ export class ReplicationRecoveryPlansImpl implements ReplicationRecoveryPlans { }; }; - const lro = new LroImpl( - sendOperation, - { resourceName, resourceGroupName, recoveryPlanName, input, options }, - unplannedFailoverOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceName, + resourceGroupName, + recoveryPlanName, + input, + options + }, + spec: unplannedFailoverOperationSpec + }); + const poller = await createHttpPoller< + ReplicationRecoveryPlansUnplannedFailoverResponse, + OperationState<ReplicationRecoveryPlansUnplannedFailoverResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationRecoveryServicesProviders.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationRecoveryServicesProviders.ts index 372a380890fb..3046bf2b0db7 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationRecoveryServicesProviders.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationRecoveryServicesProviders.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { SiteRecoveryManagementClient } from "../siteRecoveryManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { RecoveryServicesProvider, ReplicationRecoveryServicesProvidersListByReplicationFabricsNextOptionalParams, @@ -283,8 +287,8 @@ export class ReplicationRecoveryServicesProvidersImpl addProviderInput: AddRecoveryServicesProviderInput, options?: ReplicationRecoveryServicesProvidersCreateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationRecoveryServicesProvidersCreateResponse>, + SimplePollerLike< + OperationState<ReplicationRecoveryServicesProvidersCreateResponse>, ReplicationRecoveryServicesProvidersCreateResponse > > { @@ -294,7 +298,7 @@ export class ReplicationRecoveryServicesProvidersImpl ): Promise<ReplicationRecoveryServicesProvidersCreateResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -327,9 +331,9 @@ export class ReplicationRecoveryServicesProvidersImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -337,10 +341,13 @@ export class ReplicationRecoveryServicesProvidersImpl addProviderInput, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + ReplicationRecoveryServicesProvidersCreateResponse, + OperationState<ReplicationRecoveryServicesProvidersCreateResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -391,14 +398,14 @@ export class ReplicationRecoveryServicesProvidersImpl fabricName: string, providerName: string, options?: ReplicationRecoveryServicesProvidersPurgeOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>> { + ): Promise<SimplePollerLike<OperationState<void>, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise<void> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -431,13 +438,19 @@ export class ReplicationRecoveryServicesProvidersImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceName, resourceGroupName, fabricName, providerName, options }, - purgeOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceName, + resourceGroupName, + fabricName, + providerName, + options + }, + spec: purgeOperationSpec + }); + const poller = await createHttpPoller<void, OperationState<void>>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -486,8 +499,8 @@ export class ReplicationRecoveryServicesProvidersImpl providerName: string, options?: ReplicationRecoveryServicesProvidersRefreshProviderOptionalParams ): Promise< - PollerLike< - PollOperationState< + SimplePollerLike< + OperationState< ReplicationRecoveryServicesProvidersRefreshProviderResponse >, ReplicationRecoveryServicesProvidersRefreshProviderResponse @@ -499,7 +512,7 @@ export class ReplicationRecoveryServicesProvidersImpl ): Promise<ReplicationRecoveryServicesProvidersRefreshProviderResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -532,13 +545,24 @@ export class ReplicationRecoveryServicesProvidersImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceName, resourceGroupName, fabricName, providerName, options }, - refreshProviderOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceName, + resourceGroupName, + fabricName, + providerName, + options + }, + spec: refreshProviderOperationSpec + }); + const poller = await createHttpPoller< + ReplicationRecoveryServicesProvidersRefreshProviderResponse, + OperationState< + ReplicationRecoveryServicesProvidersRefreshProviderResponse + > + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -586,14 +610,14 @@ export class ReplicationRecoveryServicesProvidersImpl fabricName: string, providerName: string, options?: ReplicationRecoveryServicesProvidersDeleteOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>> { + ): Promise<SimplePollerLike<OperationState<void>, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise<void> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -626,13 +650,19 @@ export class ReplicationRecoveryServicesProvidersImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceName, resourceGroupName, fabricName, providerName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceName, + resourceGroupName, + fabricName, + providerName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller<void, OperationState<void>>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationStorageClassificationMappings.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationStorageClassificationMappings.ts index 90ed0ff727f0..aaabd3b3e792 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationStorageClassificationMappings.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationStorageClassificationMappings.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { SiteRecoveryManagementClient } from "../siteRecoveryManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { StorageClassificationMapping, ReplicationStorageClassificationMappingsListByReplicationStorageClassificationsNextOptionalParams, @@ -308,10 +312,8 @@ export class ReplicationStorageClassificationMappingsImpl pairingInput: StorageClassificationMappingInput, options?: ReplicationStorageClassificationMappingsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState< - ReplicationStorageClassificationMappingsCreateResponse - >, + SimplePollerLike< + OperationState<ReplicationStorageClassificationMappingsCreateResponse>, ReplicationStorageClassificationMappingsCreateResponse > > { @@ -321,7 +323,7 @@ export class ReplicationStorageClassificationMappingsImpl ): Promise<ReplicationStorageClassificationMappingsCreateResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -354,9 +356,9 @@ export class ReplicationStorageClassificationMappingsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -365,10 +367,13 @@ export class ReplicationStorageClassificationMappingsImpl pairingInput, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + ReplicationStorageClassificationMappingsCreateResponse, + OperationState<ReplicationStorageClassificationMappingsCreateResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -424,14 +429,14 @@ export class ReplicationStorageClassificationMappingsImpl storageClassificationName: string, storageClassificationMappingName: string, options?: ReplicationStorageClassificationMappingsDeleteOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>> { + ): Promise<SimplePollerLike<OperationState<void>, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise<void> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -464,9 +469,9 @@ export class ReplicationStorageClassificationMappingsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -474,10 +479,10 @@ export class ReplicationStorageClassificationMappingsImpl storageClassificationMappingName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller<void, OperationState<void>>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationVaultHealth.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationVaultHealth.ts index 799a38658696..ca48a8c79fab 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationVaultHealth.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationVaultHealth.ts @@ -11,8 +11,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { SiteRecoveryManagementClient } from "../siteRecoveryManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { ReplicationVaultHealthGetOptionalParams, ReplicationVaultHealthGetResponse, @@ -62,8 +66,8 @@ export class ReplicationVaultHealthImpl implements ReplicationVaultHealth { resourceGroupName: string, options?: ReplicationVaultHealthRefreshOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationVaultHealthRefreshResponse>, + SimplePollerLike< + OperationState<ReplicationVaultHealthRefreshResponse>, ReplicationVaultHealthRefreshResponse > > { @@ -73,7 +77,7 @@ export class ReplicationVaultHealthImpl implements ReplicationVaultHealth { ): Promise<ReplicationVaultHealthRefreshResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -106,13 +110,16 @@ export class ReplicationVaultHealthImpl implements ReplicationVaultHealth { }; }; - const lro = new LroImpl( - sendOperation, - { resourceName, resourceGroupName, options }, - refreshOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, options }, + spec: refreshOperationSpec + }); + const poller = await createHttpPoller< + ReplicationVaultHealthRefreshResponse, + OperationState<ReplicationVaultHealthRefreshResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationVaultSetting.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationVaultSetting.ts index 047614c7244a..7149557f4a58 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationVaultSetting.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationVaultSetting.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { SiteRecoveryManagementClient } from "../siteRecoveryManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { VaultSetting, ReplicationVaultSettingListNextOptionalParams, @@ -172,8 +176,8 @@ export class ReplicationVaultSettingImpl implements ReplicationVaultSetting { input: VaultSettingCreationInput, options?: ReplicationVaultSettingCreateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationVaultSettingCreateResponse>, + SimplePollerLike< + OperationState<ReplicationVaultSettingCreateResponse>, ReplicationVaultSettingCreateResponse > > { @@ -183,7 +187,7 @@ export class ReplicationVaultSettingImpl implements ReplicationVaultSetting { ): Promise<ReplicationVaultSettingCreateResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -216,13 +220,22 @@ export class ReplicationVaultSettingImpl implements ReplicationVaultSetting { }; }; - const lro = new LroImpl( - sendOperation, - { resourceName, resourceGroupName, vaultSettingName, input, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceName, + resourceGroupName, + vaultSettingName, + input, + options + }, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + ReplicationVaultSettingCreateResponse, + OperationState<ReplicationVaultSettingCreateResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationvCenters.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationvCenters.ts index f0da56a891ba..20927493adee 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationvCenters.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operations/replicationvCenters.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { SiteRecoveryManagementClient } from "../siteRecoveryManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { VCenter, ReplicationvCentersListByReplicationFabricsNextOptionalParams, @@ -280,8 +284,8 @@ export class ReplicationvCentersImpl implements ReplicationvCenters { addVCenterRequest: AddVCenterRequest, options?: ReplicationvCentersCreateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationvCentersCreateResponse>, + SimplePollerLike< + OperationState<ReplicationvCentersCreateResponse>, ReplicationvCentersCreateResponse > > { @@ -291,7 +295,7 @@ export class ReplicationvCentersImpl implements ReplicationvCenters { ): Promise<ReplicationvCentersCreateResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -324,9 +328,9 @@ export class ReplicationvCentersImpl implements ReplicationvCenters { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -334,10 +338,13 @@ export class ReplicationvCentersImpl implements ReplicationvCenters { addVCenterRequest, options }, - createOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOperationSpec + }); + const poller = await createHttpPoller< + ReplicationvCentersCreateResponse, + OperationState<ReplicationvCentersCreateResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -388,14 +395,14 @@ export class ReplicationvCentersImpl implements ReplicationvCenters { fabricName: string, vcenterName: string, options?: ReplicationvCentersDeleteOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>> { + ): Promise<SimplePollerLike<OperationState<void>, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise<void> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -428,13 +435,19 @@ export class ReplicationvCentersImpl implements ReplicationvCenters { }; }; - const lro = new LroImpl( - sendOperation, - { resourceName, resourceGroupName, fabricName, vcenterName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceName, + resourceGroupName, + fabricName, + vcenterName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller<void, OperationState<void>>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -485,8 +498,8 @@ export class ReplicationvCentersImpl implements ReplicationvCenters { updateVCenterRequest: UpdateVCenterRequest, options?: ReplicationvCentersUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationvCentersUpdateResponse>, + SimplePollerLike< + OperationState<ReplicationvCentersUpdateResponse>, ReplicationvCentersUpdateResponse > > { @@ -496,7 +509,7 @@ export class ReplicationvCentersImpl implements ReplicationvCenters { ): Promise<ReplicationvCentersUpdateResponse> => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -529,9 +542,9 @@ export class ReplicationvCentersImpl implements ReplicationvCenters { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceName, resourceGroupName, fabricName, @@ -539,10 +552,13 @@ export class ReplicationvCentersImpl implements ReplicationvCenters { updateVCenterRequest, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + ReplicationvCentersUpdateResponse, + OperationState<ReplicationvCentersUpdateResponse> + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationFabrics.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationFabrics.ts index 6eadc043321f..1e76e0021609 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationFabrics.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationFabrics.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Fabric, ReplicationFabricsListOptionalParams, @@ -74,8 +74,8 @@ export interface ReplicationFabrics { input: FabricCreationInput, options?: ReplicationFabricsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationFabricsCreateResponse>, + SimplePollerLike< + OperationState<ReplicationFabricsCreateResponse>, ReplicationFabricsCreateResponse > >; @@ -108,7 +108,7 @@ export interface ReplicationFabrics { resourceGroupName: string, fabricName: string, options?: ReplicationFabricsPurgeOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>>; + ): Promise<SimplePollerLike<OperationState<void>, void>>; /** * The operation to purge(force delete) an Azure Site Recovery fabric. * @param resourceName The name of the recovery services vault. @@ -137,8 +137,8 @@ export interface ReplicationFabrics { fabricName: string, options?: ReplicationFabricsCheckConsistencyOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationFabricsCheckConsistencyResponse>, + SimplePollerLike< + OperationState<ReplicationFabricsCheckConsistencyResponse>, ReplicationFabricsCheckConsistencyResponse > >; @@ -169,7 +169,7 @@ export interface ReplicationFabrics { resourceGroupName: string, fabricName: string, options?: ReplicationFabricsMigrateToAadOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>>; + ): Promise<SimplePollerLike<OperationState<void>, void>>; /** * The operation to migrate an Azure Site Recovery fabric to AAD. * @param resourceName The name of the recovery services vault. @@ -200,8 +200,8 @@ export interface ReplicationFabrics { failoverProcessServerRequest: FailoverProcessServerRequest, options?: ReplicationFabricsReassociateGatewayOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationFabricsReassociateGatewayResponse>, + SimplePollerLike< + OperationState<ReplicationFabricsReassociateGatewayResponse>, ReplicationFabricsReassociateGatewayResponse > >; @@ -234,7 +234,7 @@ export interface ReplicationFabrics { resourceGroupName: string, fabricName: string, options?: ReplicationFabricsDeleteOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>>; + ): Promise<SimplePollerLike<OperationState<void>, void>>; /** * The operation to delete or remove an Azure Site Recovery fabric. * @param resourceName The name of the recovery services vault. @@ -265,8 +265,8 @@ export interface ReplicationFabrics { renewCertificate: RenewCertificateInput, options?: ReplicationFabricsRenewCertificateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationFabricsRenewCertificateResponse>, + SimplePollerLike< + OperationState<ReplicationFabricsRenewCertificateResponse>, ReplicationFabricsRenewCertificateResponse > >; diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationJobs.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationJobs.ts index ea545225e90d..bfc12181f6fb 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationJobs.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationJobs.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Job, ReplicationJobsListOptionalParams, @@ -68,8 +68,8 @@ export interface ReplicationJobs { jobName: string, options?: ReplicationJobsCancelOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationJobsCancelResponse>, + SimplePollerLike< + OperationState<ReplicationJobsCancelResponse>, ReplicationJobsCancelResponse > >; @@ -101,8 +101,8 @@ export interface ReplicationJobs { jobName: string, options?: ReplicationJobsRestartOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationJobsRestartResponse>, + SimplePollerLike< + OperationState<ReplicationJobsRestartResponse>, ReplicationJobsRestartResponse > >; @@ -136,8 +136,8 @@ export interface ReplicationJobs { resumeJobParams: ResumeJobParams, options?: ReplicationJobsResumeOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationJobsResumeResponse>, + SimplePollerLike< + OperationState<ReplicationJobsResumeResponse>, ReplicationJobsResumeResponse > >; @@ -171,8 +171,8 @@ export interface ReplicationJobs { jobQueryParameter: JobQueryParameter, options?: ReplicationJobsExportOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationJobsExportResponse>, + SimplePollerLike< + OperationState<ReplicationJobsExportResponse>, ReplicationJobsExportResponse > >; diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationMigrationItems.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationMigrationItems.ts index b3e63c41e65c..1a60b2db6869 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationMigrationItems.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationMigrationItems.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { MigrationItem, ReplicationMigrationItemsListByReplicationProtectionContainersOptionalParams, @@ -110,8 +110,8 @@ export interface ReplicationMigrationItems { input: EnableMigrationInput, options?: ReplicationMigrationItemsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationMigrationItemsCreateResponse>, + SimplePollerLike< + OperationState<ReplicationMigrationItemsCreateResponse>, ReplicationMigrationItemsCreateResponse > >; @@ -152,7 +152,7 @@ export interface ReplicationMigrationItems { protectionContainerName: string, migrationItemName: string, options?: ReplicationMigrationItemsDeleteOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>>; + ): Promise<SimplePollerLike<OperationState<void>, void>>; /** * The operation to delete an ASR migration item. * @param resourceName The name of the recovery services vault. @@ -191,8 +191,8 @@ export interface ReplicationMigrationItems { input: UpdateMigrationItemInput, options?: ReplicationMigrationItemsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationMigrationItemsUpdateResponse>, + SimplePollerLike< + OperationState<ReplicationMigrationItemsUpdateResponse>, ReplicationMigrationItemsUpdateResponse > >; @@ -236,8 +236,8 @@ export interface ReplicationMigrationItems { migrateInput: MigrateInput, options?: ReplicationMigrationItemsMigrateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationMigrationItemsMigrateResponse>, + SimplePollerLike< + OperationState<ReplicationMigrationItemsMigrateResponse>, ReplicationMigrationItemsMigrateResponse > >; @@ -281,8 +281,8 @@ export interface ReplicationMigrationItems { pauseReplicationInput: PauseReplicationInput, options?: ReplicationMigrationItemsPauseReplicationOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationMigrationItemsPauseReplicationResponse>, + SimplePollerLike< + OperationState<ReplicationMigrationItemsPauseReplicationResponse>, ReplicationMigrationItemsPauseReplicationResponse > >; @@ -326,8 +326,8 @@ export interface ReplicationMigrationItems { resumeReplicationInput: ResumeReplicationInput, options?: ReplicationMigrationItemsResumeReplicationOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationMigrationItemsResumeReplicationResponse>, + SimplePollerLike< + OperationState<ReplicationMigrationItemsResumeReplicationResponse>, ReplicationMigrationItemsResumeReplicationResponse > >; @@ -371,8 +371,8 @@ export interface ReplicationMigrationItems { input: ResyncInput, options?: ReplicationMigrationItemsResyncOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationMigrationItemsResyncResponse>, + SimplePollerLike< + OperationState<ReplicationMigrationItemsResyncResponse>, ReplicationMigrationItemsResyncResponse > >; @@ -416,8 +416,8 @@ export interface ReplicationMigrationItems { testMigrateInput: TestMigrateInput, options?: ReplicationMigrationItemsTestMigrateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationMigrationItemsTestMigrateResponse>, + SimplePollerLike< + OperationState<ReplicationMigrationItemsTestMigrateResponse>, ReplicationMigrationItemsTestMigrateResponse > >; @@ -461,8 +461,8 @@ export interface ReplicationMigrationItems { testMigrateCleanupInput: TestMigrateCleanupInput, options?: ReplicationMigrationItemsTestMigrateCleanupOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationMigrationItemsTestMigrateCleanupResponse>, + SimplePollerLike< + OperationState<ReplicationMigrationItemsTestMigrateCleanupResponse>, ReplicationMigrationItemsTestMigrateCleanupResponse > >; diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationNetworkMappings.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationNetworkMappings.ts index 4a71f49db459..e2775f0ab60b 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationNetworkMappings.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationNetworkMappings.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { NetworkMapping, ReplicationNetworkMappingsListByReplicationNetworksOptionalParams, @@ -92,8 +92,8 @@ export interface ReplicationNetworkMappings { input: CreateNetworkMappingInput, options?: ReplicationNetworkMappingsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationNetworkMappingsCreateResponse>, + SimplePollerLike< + OperationState<ReplicationNetworkMappingsCreateResponse>, ReplicationNetworkMappingsCreateResponse > >; @@ -134,7 +134,7 @@ export interface ReplicationNetworkMappings { networkName: string, networkMappingName: string, options?: ReplicationNetworkMappingsDeleteOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>>; + ): Promise<SimplePollerLike<OperationState<void>, void>>; /** * The operation to delete a network mapping. * @param resourceName The name of the recovery services vault. @@ -173,8 +173,8 @@ export interface ReplicationNetworkMappings { input: UpdateNetworkMappingInput, options?: ReplicationNetworkMappingsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationNetworkMappingsUpdateResponse>, + SimplePollerLike< + OperationState<ReplicationNetworkMappingsUpdateResponse>, ReplicationNetworkMappingsUpdateResponse > >; diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationPolicies.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationPolicies.ts index bc7964724aed..2567a3ce5b8e 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationPolicies.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationPolicies.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Policy, ReplicationPoliciesListOptionalParams, @@ -67,8 +67,8 @@ export interface ReplicationPolicies { input: CreatePolicyInput, options?: ReplicationPoliciesCreateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationPoliciesCreateResponse>, + SimplePollerLike< + OperationState<ReplicationPoliciesCreateResponse>, ReplicationPoliciesCreateResponse > >; @@ -101,7 +101,7 @@ export interface ReplicationPolicies { resourceGroupName: string, policyName: string, options?: ReplicationPoliciesDeleteOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>>; + ): Promise<SimplePollerLike<OperationState<void>, void>>; /** * The operation to delete a replication policy. * @param resourceName The name of the recovery services vault. @@ -132,8 +132,8 @@ export interface ReplicationPolicies { input: UpdatePolicyInput, options?: ReplicationPoliciesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationPoliciesUpdateResponse>, + SimplePollerLike< + OperationState<ReplicationPoliciesUpdateResponse>, ReplicationPoliciesUpdateResponse > >; diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationProtectedItems.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationProtectedItems.ts index 888d8611d615..80ac194b2907 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationProtectedItems.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationProtectedItems.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { ReplicationProtectedItem, ReplicationProtectedItemsListByReplicationProtectionContainersOptionalParams, @@ -136,8 +136,8 @@ export interface ReplicationProtectedItems { input: EnableProtectionInput, options?: ReplicationProtectedItemsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsCreateResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsCreateResponse>, ReplicationProtectedItemsCreateResponse > >; @@ -180,7 +180,7 @@ export interface ReplicationProtectedItems { protectionContainerName: string, replicatedProtectedItemName: string, options?: ReplicationProtectedItemsPurgeOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>>; + ): Promise<SimplePollerLike<OperationState<void>, void>>; /** * The operation to delete or purge a replication protected item. This operation will force delete the * replication protected item. Use the remove operation on replication protected item to perform a @@ -221,8 +221,8 @@ export interface ReplicationProtectedItems { updateProtectionInput: UpdateReplicationProtectedItemInput, options?: ReplicationProtectedItemsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsUpdateResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsUpdateResponse>, ReplicationProtectedItemsUpdateResponse > >; @@ -266,8 +266,8 @@ export interface ReplicationProtectedItems { addDisksInput: AddDisksInput, options?: ReplicationProtectedItemsAddDisksOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsAddDisksResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsAddDisksResponse>, ReplicationProtectedItemsAddDisksResponse > >; @@ -311,8 +311,8 @@ export interface ReplicationProtectedItems { applyRecoveryPointInput: ApplyRecoveryPointInput, options?: ReplicationProtectedItemsApplyRecoveryPointOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsApplyRecoveryPointResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsApplyRecoveryPointResponse>, ReplicationProtectedItemsApplyRecoveryPointResponse > >; @@ -354,8 +354,8 @@ export interface ReplicationProtectedItems { replicatedProtectedItemName: string, options?: ReplicationProtectedItemsFailoverCancelOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsFailoverCancelResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsFailoverCancelResponse>, ReplicationProtectedItemsFailoverCancelResponse > >; @@ -395,8 +395,8 @@ export interface ReplicationProtectedItems { replicatedProtectedItemName: string, options?: ReplicationProtectedItemsFailoverCommitOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsFailoverCommitResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsFailoverCommitResponse>, ReplicationProtectedItemsFailoverCommitResponse > >; @@ -438,8 +438,8 @@ export interface ReplicationProtectedItems { failoverInput: PlannedFailoverInput, options?: ReplicationProtectedItemsPlannedFailoverOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsPlannedFailoverResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsPlannedFailoverResponse>, ReplicationProtectedItemsPlannedFailoverResponse > >; @@ -483,7 +483,7 @@ export interface ReplicationProtectedItems { replicatedProtectedItemName: string, disableProtectionInput: DisableProtectionInput, options?: ReplicationProtectedItemsDeleteOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>>; + ): Promise<SimplePollerLike<OperationState<void>, void>>; /** * The operation to disable replication on a replication protected item. This will also remove the * item. @@ -525,8 +525,8 @@ export interface ReplicationProtectedItems { removeDisksInput: RemoveDisksInput, options?: ReplicationProtectedItemsRemoveDisksOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsRemoveDisksResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsRemoveDisksResponse>, ReplicationProtectedItemsRemoveDisksResponse > >; @@ -569,8 +569,8 @@ export interface ReplicationProtectedItems { replicatedProtectedItemName: string, options?: ReplicationProtectedItemsRepairReplicationOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsRepairReplicationResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsRepairReplicationResponse>, ReplicationProtectedItemsRepairReplicationResponse > >; @@ -613,8 +613,8 @@ export interface ReplicationProtectedItems { reprotectInput: ReverseReplicationInput, options?: ReplicationProtectedItemsReprotectOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsReprotectResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsReprotectResponse>, ReplicationProtectedItemsReprotectResponse > >; @@ -658,8 +658,8 @@ export interface ReplicationProtectedItems { resolveHealthInput: ResolveHealthInput, options?: ReplicationProtectedItemsResolveHealthErrorsOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsResolveHealthErrorsResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsResolveHealthErrorsResponse>, ReplicationProtectedItemsResolveHealthErrorsResponse > >; @@ -703,8 +703,8 @@ export interface ReplicationProtectedItems { switchProviderInput: SwitchProviderInput, options?: ReplicationProtectedItemsSwitchProviderOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsSwitchProviderResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsSwitchProviderResponse>, ReplicationProtectedItemsSwitchProviderResponse > >; @@ -748,8 +748,8 @@ export interface ReplicationProtectedItems { testfailoverInput: TestFailoverInput, options?: ReplicationProtectedItemsTestFailoverOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsTestFailoverResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsTestFailoverResponse>, ReplicationProtectedItemsTestFailoverResponse > >; @@ -793,8 +793,8 @@ export interface ReplicationProtectedItems { cleanupInput: TestFailoverCleanupInput, options?: ReplicationProtectedItemsTestFailoverCleanupOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsTestFailoverCleanupResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsTestFailoverCleanupResponse>, ReplicationProtectedItemsTestFailoverCleanupResponse > >; @@ -838,8 +838,8 @@ export interface ReplicationProtectedItems { failoverInput: UnplannedFailoverInput, options?: ReplicationProtectedItemsUnplannedFailoverOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsUnplannedFailoverResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsUnplannedFailoverResponse>, ReplicationProtectedItemsUnplannedFailoverResponse > >; @@ -883,8 +883,8 @@ export interface ReplicationProtectedItems { applianceUpdateInput: UpdateApplianceForReplicationProtectedItemInput, options?: ReplicationProtectedItemsUpdateApplianceOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectedItemsUpdateApplianceResponse>, + SimplePollerLike< + OperationState<ReplicationProtectedItemsUpdateApplianceResponse>, ReplicationProtectedItemsUpdateApplianceResponse > >; @@ -930,10 +930,8 @@ export interface ReplicationProtectedItems { updateMobilityServiceRequest: UpdateMobilityServiceRequest, options?: ReplicationProtectedItemsUpdateMobilityServiceOptionalParams ): Promise< - PollerLike< - PollOperationState< - ReplicationProtectedItemsUpdateMobilityServiceResponse - >, + SimplePollerLike< + OperationState<ReplicationProtectedItemsUpdateMobilityServiceResponse>, ReplicationProtectedItemsUpdateMobilityServiceResponse > >; diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationProtectionContainerMappings.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationProtectionContainerMappings.ts index e52c2e0cbfa8..253cc5b4999d 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationProtectionContainerMappings.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationProtectionContainerMappings.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { ProtectionContainerMapping, ReplicationProtectionContainerMappingsListByReplicationProtectionContainersOptionalParams, @@ -94,8 +94,8 @@ export interface ReplicationProtectionContainerMappings { creationInput: CreateProtectionContainerMappingInput, options?: ReplicationProtectionContainerMappingsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectionContainerMappingsCreateResponse>, + SimplePollerLike< + OperationState<ReplicationProtectionContainerMappingsCreateResponse>, ReplicationProtectionContainerMappingsCreateResponse > >; @@ -136,7 +136,7 @@ export interface ReplicationProtectionContainerMappings { protectionContainerName: string, mappingName: string, options?: ReplicationProtectionContainerMappingsPurgeOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>>; + ): Promise<SimplePollerLike<OperationState<void>, void>>; /** * The operation to purge(force delete) a protection container mapping. * @param resourceName The name of the recovery services vault. @@ -175,8 +175,8 @@ export interface ReplicationProtectionContainerMappings { updateInput: UpdateProtectionContainerMappingInput, options?: ReplicationProtectionContainerMappingsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectionContainerMappingsUpdateResponse>, + SimplePollerLike< + OperationState<ReplicationProtectionContainerMappingsUpdateResponse>, ReplicationProtectionContainerMappingsUpdateResponse > >; @@ -219,7 +219,7 @@ export interface ReplicationProtectionContainerMappings { mappingName: string, removalInput: RemoveProtectionContainerMappingInput, options?: ReplicationProtectionContainerMappingsDeleteOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>>; + ): Promise<SimplePollerLike<OperationState<void>, void>>; /** * The operation to delete or remove a protection container mapping. * @param resourceName The name of the recovery services vault. diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationProtectionContainers.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationProtectionContainers.ts index 09432a58ba29..8f947beda6cd 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationProtectionContainers.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationProtectionContainers.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { ProtectionContainer, ReplicationProtectionContainersListByReplicationFabricsOptionalParams, @@ -89,8 +89,8 @@ export interface ReplicationProtectionContainers { creationInput: CreateProtectionContainerInput, options?: ReplicationProtectionContainersCreateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationProtectionContainersCreateResponse>, + SimplePollerLike< + OperationState<ReplicationProtectionContainersCreateResponse>, ReplicationProtectionContainersCreateResponse > >; @@ -130,8 +130,8 @@ export interface ReplicationProtectionContainers { discoverProtectableItemRequest: DiscoverProtectableItemRequest, options?: ReplicationProtectionContainersDiscoverProtectableItemOptionalParams ): Promise< - PollerLike< - PollOperationState< + SimplePollerLike< + OperationState< ReplicationProtectionContainersDiscoverProtectableItemResponse >, ReplicationProtectionContainersDiscoverProtectableItemResponse @@ -170,7 +170,7 @@ export interface ReplicationProtectionContainers { fabricName: string, protectionContainerName: string, options?: ReplicationProtectionContainersDeleteOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>>; + ): Promise<SimplePollerLike<OperationState<void>, void>>; /** * Operation to remove a protection container. * @param resourceName The name of the recovery services vault. @@ -205,10 +205,8 @@ export interface ReplicationProtectionContainers { switchInput: SwitchProtectionInput, options?: ReplicationProtectionContainersSwitchProtectionOptionalParams ): Promise< - PollerLike< - PollOperationState< - ReplicationProtectionContainersSwitchProtectionResponse - >, + SimplePollerLike< + OperationState<ReplicationProtectionContainersSwitchProtectionResponse>, ReplicationProtectionContainersSwitchProtectionResponse > >; diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationRecoveryPlans.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationRecoveryPlans.ts index 4ce5ccb496bb..1698eecd2ba1 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationRecoveryPlans.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationRecoveryPlans.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { RecoveryPlan, ReplicationRecoveryPlansListOptionalParams, @@ -85,8 +85,8 @@ export interface ReplicationRecoveryPlans { input: CreateRecoveryPlanInput, options?: ReplicationRecoveryPlansCreateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationRecoveryPlansCreateResponse>, + SimplePollerLike< + OperationState<ReplicationRecoveryPlansCreateResponse>, ReplicationRecoveryPlansCreateResponse > >; @@ -119,7 +119,7 @@ export interface ReplicationRecoveryPlans { resourceGroupName: string, recoveryPlanName: string, options?: ReplicationRecoveryPlansDeleteOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>>; + ): Promise<SimplePollerLike<OperationState<void>, void>>; /** * Delete a recovery plan. * @param resourceName The name of the recovery services vault. @@ -150,8 +150,8 @@ export interface ReplicationRecoveryPlans { input: UpdateRecoveryPlanInput, options?: ReplicationRecoveryPlansUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationRecoveryPlansUpdateResponse>, + SimplePollerLike< + OperationState<ReplicationRecoveryPlansUpdateResponse>, ReplicationRecoveryPlansUpdateResponse > >; @@ -185,8 +185,8 @@ export interface ReplicationRecoveryPlans { recoveryPlanName: string, options?: ReplicationRecoveryPlansFailoverCancelOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationRecoveryPlansFailoverCancelResponse>, + SimplePollerLike< + OperationState<ReplicationRecoveryPlansFailoverCancelResponse>, ReplicationRecoveryPlansFailoverCancelResponse > >; @@ -218,8 +218,8 @@ export interface ReplicationRecoveryPlans { recoveryPlanName: string, options?: ReplicationRecoveryPlansFailoverCommitOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationRecoveryPlansFailoverCommitResponse>, + SimplePollerLike< + OperationState<ReplicationRecoveryPlansFailoverCommitResponse>, ReplicationRecoveryPlansFailoverCommitResponse > >; @@ -253,8 +253,8 @@ export interface ReplicationRecoveryPlans { input: RecoveryPlanPlannedFailoverInput, options?: ReplicationRecoveryPlansPlannedFailoverOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationRecoveryPlansPlannedFailoverResponse>, + SimplePollerLike< + OperationState<ReplicationRecoveryPlansPlannedFailoverResponse>, ReplicationRecoveryPlansPlannedFailoverResponse > >; @@ -288,8 +288,8 @@ export interface ReplicationRecoveryPlans { recoveryPlanName: string, options?: ReplicationRecoveryPlansReprotectOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationRecoveryPlansReprotectResponse>, + SimplePollerLike< + OperationState<ReplicationRecoveryPlansReprotectResponse>, ReplicationRecoveryPlansReprotectResponse > >; @@ -323,8 +323,8 @@ export interface ReplicationRecoveryPlans { input: RecoveryPlanTestFailoverInput, options?: ReplicationRecoveryPlansTestFailoverOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationRecoveryPlansTestFailoverResponse>, + SimplePollerLike< + OperationState<ReplicationRecoveryPlansTestFailoverResponse>, ReplicationRecoveryPlansTestFailoverResponse > >; @@ -360,8 +360,8 @@ export interface ReplicationRecoveryPlans { input: RecoveryPlanTestFailoverCleanupInput, options?: ReplicationRecoveryPlansTestFailoverCleanupOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationRecoveryPlansTestFailoverCleanupResponse>, + SimplePollerLike< + OperationState<ReplicationRecoveryPlansTestFailoverCleanupResponse>, ReplicationRecoveryPlansTestFailoverCleanupResponse > >; @@ -397,8 +397,8 @@ export interface ReplicationRecoveryPlans { input: RecoveryPlanUnplannedFailoverInput, options?: ReplicationRecoveryPlansUnplannedFailoverOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationRecoveryPlansUnplannedFailoverResponse>, + SimplePollerLike< + OperationState<ReplicationRecoveryPlansUnplannedFailoverResponse>, ReplicationRecoveryPlansUnplannedFailoverResponse > >; diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationRecoveryServicesProviders.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationRecoveryServicesProviders.ts index f3676a4743ad..e63cc9ebb6fa 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationRecoveryServicesProviders.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationRecoveryServicesProviders.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { RecoveryServicesProvider, ReplicationRecoveryServicesProvidersListByReplicationFabricsOptionalParams, @@ -86,8 +86,8 @@ export interface ReplicationRecoveryServicesProviders { addProviderInput: AddRecoveryServicesProviderInput, options?: ReplicationRecoveryServicesProvidersCreateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationRecoveryServicesProvidersCreateResponse>, + SimplePollerLike< + OperationState<ReplicationRecoveryServicesProvidersCreateResponse>, ReplicationRecoveryServicesProvidersCreateResponse > >; @@ -124,7 +124,7 @@ export interface ReplicationRecoveryServicesProviders { fabricName: string, providerName: string, options?: ReplicationRecoveryServicesProvidersPurgeOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>>; + ): Promise<SimplePollerLike<OperationState<void>, void>>; /** * The operation to purge(force delete) a recovery services provider from the vault. * @param resourceName The name of the recovery services vault. @@ -157,8 +157,8 @@ export interface ReplicationRecoveryServicesProviders { providerName: string, options?: ReplicationRecoveryServicesProvidersRefreshProviderOptionalParams ): Promise< - PollerLike< - PollOperationState< + SimplePollerLike< + OperationState< ReplicationRecoveryServicesProvidersRefreshProviderResponse >, ReplicationRecoveryServicesProvidersRefreshProviderResponse @@ -195,7 +195,7 @@ export interface ReplicationRecoveryServicesProviders { fabricName: string, providerName: string, options?: ReplicationRecoveryServicesProvidersDeleteOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>>; + ): Promise<SimplePollerLike<OperationState<void>, void>>; /** * The operation to removes/delete(unregister) a recovery services provider from the vault. * @param resourceName The name of the recovery services vault. diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationStorageClassificationMappings.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationStorageClassificationMappings.ts index fb9f19a0c0d9..aab9d0b6daeb 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationStorageClassificationMappings.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationStorageClassificationMappings.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { StorageClassificationMapping, ReplicationStorageClassificationMappingsListByReplicationStorageClassificationsOptionalParams, @@ -89,10 +89,8 @@ export interface ReplicationStorageClassificationMappings { pairingInput: StorageClassificationMappingInput, options?: ReplicationStorageClassificationMappingsCreateOptionalParams ): Promise< - PollerLike< - PollOperationState< - ReplicationStorageClassificationMappingsCreateResponse - >, + SimplePollerLike< + OperationState<ReplicationStorageClassificationMappingsCreateResponse>, ReplicationStorageClassificationMappingsCreateResponse > >; @@ -133,7 +131,7 @@ export interface ReplicationStorageClassificationMappings { storageClassificationName: string, storageClassificationMappingName: string, options?: ReplicationStorageClassificationMappingsDeleteOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>>; + ): Promise<SimplePollerLike<OperationState<void>, void>>; /** * The operation to delete a storage classification mapping. * @param resourceName The name of the recovery services vault. diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationVaultHealth.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationVaultHealth.ts index ce649d41cc1d..5c44405bcd00 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationVaultHealth.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationVaultHealth.ts @@ -6,7 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { ReplicationVaultHealthGetOptionalParams, ReplicationVaultHealthGetResponse, @@ -40,8 +40,8 @@ export interface ReplicationVaultHealth { resourceGroupName: string, options?: ReplicationVaultHealthRefreshOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationVaultHealthRefreshResponse>, + SimplePollerLike< + OperationState<ReplicationVaultHealthRefreshResponse>, ReplicationVaultHealthRefreshResponse > >; diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationVaultSetting.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationVaultSetting.ts index b202755cd41d..b3b89a2c486d 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationVaultSetting.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationVaultSetting.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { VaultSetting, ReplicationVaultSettingListOptionalParams, @@ -63,8 +63,8 @@ export interface ReplicationVaultSetting { input: VaultSettingCreationInput, options?: ReplicationVaultSettingCreateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationVaultSettingCreateResponse>, + SimplePollerLike< + OperationState<ReplicationVaultSettingCreateResponse>, ReplicationVaultSettingCreateResponse > >; diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationvCenters.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationvCenters.ts index e00f37f06a96..e2b8739b9990 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationvCenters.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/operationsInterfaces/replicationvCenters.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { VCenter, ReplicationvCentersListByReplicationFabricsOptionalParams, @@ -86,8 +86,8 @@ export interface ReplicationvCenters { addVCenterRequest: AddVCenterRequest, options?: ReplicationvCentersCreateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationvCentersCreateResponse>, + SimplePollerLike< + OperationState<ReplicationvCentersCreateResponse>, ReplicationvCentersCreateResponse > >; @@ -124,7 +124,7 @@ export interface ReplicationvCenters { fabricName: string, vcenterName: string, options?: ReplicationvCentersDeleteOptionalParams - ): Promise<PollerLike<PollOperationState<void>, void>>; + ): Promise<SimplePollerLike<OperationState<void>, void>>; /** * The operation to remove(unregister) a registered vCenter server from the vault. * @param resourceName The name of the recovery services vault. @@ -159,8 +159,8 @@ export interface ReplicationvCenters { updateVCenterRequest: UpdateVCenterRequest, options?: ReplicationvCentersUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState<ReplicationvCentersUpdateResponse>, + SimplePollerLike< + OperationState<ReplicationvCentersUpdateResponse>, ReplicationvCentersUpdateResponse > >; diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/siteRecoveryManagementClient.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/siteRecoveryManagementClient.ts index fa3e9f053620..9e829bb4e92b 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/siteRecoveryManagementClient.ts +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/src/siteRecoveryManagementClient.ts @@ -108,7 +108,7 @@ export class SiteRecoveryManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-recoveryservices-siterecovery/5.0.2`; + const packageDetails = `azsdk-js-arm-recoveryservices-siterecovery/5.1.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -161,7 +161,7 @@ export class SiteRecoveryManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-10-01"; + this.apiVersion = options.apiVersion || "2023-06-01"; this.operations = new OperationsImpl(this); this.replicationAlertSettings = new ReplicationAlertSettingsImpl(this); this.replicationAppliances = new ReplicationAppliancesImpl(this); diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/test/sampleTest.ts b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record<string, string> = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/tsconfig.json b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/tsconfig.json index b23a972336c8..3e6ae96443f3 100644 --- a/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/tsconfig.json +++ b/sdk/recoveryservicessiterecovery/arm-recoveryservices-siterecovery/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-recoveryservices-siterecovery": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"