diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index e98423baaf92..f0d37b0d6b75 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -4030,7 +4030,7 @@ packages: dependencies: semver: 7.3.8 shelljs: 0.8.5 - typescript: 5.1.0-dev.20230308 + typescript: 5.1.0-dev.20230309 dev: false /ecdsa-sig-formatter/1.0.11: @@ -8961,8 +8961,8 @@ packages: hasBin: true dev: false - /typescript/5.1.0-dev.20230308: - resolution: {integrity: sha512-CSITPpBYNdPYujl36d9VhNNCLE+isuwm/ArFbYgPsWsLniLCcfBl+NcaOkVqyjV0XEjP+uN1yywiglCkEzed1w==} + /typescript/5.1.0-dev.20230309: + resolution: {integrity: sha512-pCqgzbHDsuACtq0v+pjNY6Zf7cdWZstY38Jq7FfD1HqAeEGnFKhrZgSRh7kS/QE5UOctGAqbp1ynTGdVI7s4Mw==} engines: {node: '>=4.2.0'} hasBin: true dev: false @@ -10052,7 +10052,7 @@ packages: dev: false file:projects/app-configuration.tgz: - resolution: {integrity: sha512-11s7ELWUeURBhvG90Ip9QP+D7uTS5DHZn7dZutSnzjDw4dBouxuHwLTuxXxEWx/SN30pCbc52inHwNVVb6RufA==, tarball: file:projects/app-configuration.tgz} + resolution: {integrity: sha512-CLn6BAgagKUJw0cSu2Ku91Zxkk7GoUYJ4z++Nu0D2QPN7hymevKMong9VGUFrCp9WomQF1+qW7qNzxyOXuWrdA==, tarball: file:projects/app-configuration.tgz} name: '@rush-temp/app-configuration' version: 0.0.0 dependencies: @@ -14240,10 +14240,11 @@ packages: dev: false file:projects/arm-recoveryservicesbackup.tgz: - resolution: {integrity: sha512-aoOhK2ZrHvNN8i08OnZUB7SV6RHcrPoYc2gaVJSqBdQ1XsNTCY6XHbUYZ7nhHhgyUSAghI5S1sRcbog7i6A2QQ==, tarball: file:projects/arm-recoveryservicesbackup.tgz} + resolution: {integrity: sha512-h0M0XLXFqhYhXtPjt2dZTx8F0tqsoBYAi7TeVHhPeavZFZYE6UasAkDM8OOaIq9Y7m7Ufo1QpyjB90IPRdZbsg==, tarball: file:projects/arm-recoveryservicesbackup.tgz} name: '@rush-temp/arm-recoveryservicesbackup' version: 0.0.0 dependencies: + '@azure-tools/test-recorder': 2.0.0 '@azure/identity': 2.1.0 '@microsoft/api-extractor': 7.34.4_@types+node@14.18.37 '@rollup/plugin-commonjs': 24.0.1_rollup@2.79.1 @@ -14255,7 +14256,7 @@ packages: chai: 4.3.7 cross-env: 7.0.3 dotenv: 16.0.3 - mkdirp: 1.0.4 + mkdirp: 2.1.5 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 @@ -14264,6 +14265,7 @@ packages: typescript: 4.8.4 uglify-js: 3.17.4 transitivePeerDependencies: + - encoding - supports-color dev: false @@ -17465,7 +17467,7 @@ packages: dev: false file:projects/identity.tgz: - resolution: {integrity: sha512-PNVGSQgrV74ZaOtZm6TtRIFPjkRsml2P7B7UhyT9EiQ0F1WLTv4nvg5VO0o74HN4qK0ZDLXxjg3CNEgxqd5LTg==, tarball: file:projects/identity.tgz} + resolution: {integrity: sha512-D6xmkAXr5zwZ2B2DbCiC9wxYe0i7auXwa/E5SMB7/Amy9mnzJDRuO9dNDdHM6Ib0VjRzZ45rf1eGwBs+eOBjqA==, tarball: file:projects/identity.tgz} name: '@rush-temp/identity' version: 0.0.0 dependencies: @@ -17615,7 +17617,7 @@ packages: dev: false file:projects/keyvault-admin.tgz: - resolution: {integrity: sha512-1aR1s+cEC5T8rkebkJA2gFgWPwR5RVR7qOAyWvslFGqg4Up4bqVNI6q8YhpL/15gPijjjk5RTcUOT22wqfwnJw==, tarball: file:projects/keyvault-admin.tgz} + resolution: {integrity: sha512-s4NxTw0qqENCSJYvtlPyCXPgueoVmiy1iB5nUV6ZZIXDein+SiGbPDe9AqhQaMLIIPYuOIYqNqUZzSkF/UVsow==, tarball: file:projects/keyvault-admin.tgz} name: '@rush-temp/keyvault-admin' version: 0.0.0 dependencies: @@ -17645,7 +17647,7 @@ packages: dev: false file:projects/keyvault-certificates.tgz: - resolution: {integrity: sha512-g8Wgna15TiEQooet1FkrlWzfZDl1cUueV0s3kd3y+g55OuL34cOTY5k0Q7Jc6lpQ8aB629YDfkDw6L7zgFdj7Q==, tarball: file:projects/keyvault-certificates.tgz} + resolution: {integrity: sha512-bAOUuJYxu7UjhLiiTrxlGZh1kv+QqyLkBI1f10AdzZxOsd3bWAqdO/wnFr1WT7irLzYkrx3e1M2yNZsSlZG1yQ==, tarball: file:projects/keyvault-certificates.tgz} name: '@rush-temp/keyvault-certificates' version: 0.0.0 dependencies: @@ -18669,7 +18671,7 @@ packages: dev: false file:projects/perf-keyvault-certificates.tgz: - resolution: {integrity: sha512-VRd1Fnp27eLm8oKYYFQCcXvnz2trIEutUMv6Ii6/DAUdPCzQm5yXJZmEO07bxwXKv1vSdMDZknW62M/nDQ+Dag==, tarball: file:projects/perf-keyvault-certificates.tgz} + resolution: {integrity: sha512-y0b7TFibUwxWIft7IQU79eCCYEEjeDQpLM3naIAbL5kd0OoY4FbGeweB1vbG2vqtmqUQLWQxdFkxzUNsOVjEYw==, tarball: file:projects/perf-keyvault-certificates.tgz} name: '@rush-temp/perf-keyvault-certificates' version: 0.0.0 dependencies: @@ -18692,7 +18694,7 @@ packages: dev: false file:projects/perf-keyvault-keys.tgz: - resolution: {integrity: sha512-ueAWRbfdi9lmOGge9FsNKesnXqDFeZVEzpEx0oTDYZK2vhIKaEvJjlysfzxUe3eyNPIsUsi30wa2jHrOk9g5qQ==, tarball: file:projects/perf-keyvault-keys.tgz} + resolution: {integrity: sha512-hA+SW0QnCcnQtEuOYvyXBVQnbMy373bLX/wVDpzcWqMSipB79qJZqccf4idCdMsdqLyLyNq+rgpYvVrYp5s+hA==, tarball: file:projects/perf-keyvault-keys.tgz} name: '@rush-temp/perf-keyvault-keys' version: 0.0.0 dependencies: @@ -18715,7 +18717,7 @@ packages: dev: false file:projects/perf-keyvault-secrets.tgz: - resolution: {integrity: sha512-uNewvxAIj7J9/amvOLrSo6/ofWG8sbxRz55gPJjJxPSpuk4iYjM+jETM7sE9XW+qI6Jr4gGDqDs9rBpLwHtfnA==, tarball: file:projects/perf-keyvault-secrets.tgz} + resolution: {integrity: sha512-QEpuPQgCBR4qGDKkWOzbCN+z0jOsboUOvPuel0wImAEprlJcsnpzEHrR2MRb9oPy/ZiJDnuJaobp2ysdnUXzUw==, tarball: file:projects/perf-keyvault-secrets.tgz} name: '@rush-temp/perf-keyvault-secrets' version: 0.0.0 dependencies: diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/CHANGELOG.md b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/CHANGELOG.md index 1e5bc8be956e..393c6895f70f 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/CHANGELOG.md +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/CHANGELOG.md @@ -1,15 +1,22 @@ # Release History + +## 10.1.0 (2023-03-10) + +**Features** -## 10.0.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Added Interface ExtendedLocation + - Added Interface SecuredVMDetails + - Added Interface TargetDiskNetworkAccessSettings + - Added Type Alias TargetDiskNetworkAccessOption + - Interface BmsrpQueryObject has a new optional parameter includeSoftDeletedRP + - Interface IaasVMRecoveryPoint has a new optional parameter isPrivateAccessEnabledOnAnyDisk + - Interface IaasVMRecoveryPoint has a new optional parameter securityType + - Interface IaasVMRestoreRequest has a new optional parameter extendedLocation + - Interface IaasVMRestoreRequest has a new optional parameter securedVMDetails + - Interface IaasVMRestoreRequest has a new optional parameter targetDiskNetworkAccessSettings + - Interface RecoveryPointProperties has a new optional parameter isSoftDeleted + + ## 10.0.0 (2023-01-18) **Features** diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/_meta.json b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/_meta.json index e82a9b550866..5702164c5388 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/_meta.json +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/_meta.json @@ -1,8 +1,8 @@ { - "commit": "0e20dd2e4e2a40e83840c30cce2efc4847fd9cb9", + "commit": "88b603741ec8139e5b6bff56816898f25bca8fa6", "readme": "specification/recoveryservicesbackup/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=F:\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\recoveryservicesbackup\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.7 --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/recoveryservicesbackup/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.9", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.5.4", - "use": "@autorest/typescript@6.0.0-rc.7" + "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", + "use": "@autorest/typescript@6.0.0-rc.9" } \ No newline at end of file diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json index 2b677d56fae1..f3b4a810a782 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/package.json @@ -3,15 +3,15 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for RecoveryServicesBackupClient.", - "version": "10.0.1", + "version": "10.1.0", "engines": { "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.0", "@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,7 +33,7 @@ "@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": "~4.8.0", @@ -41,7 +41,7 @@ "rimraf": "^3.0.0", "dotenv": "^16.0.0", "@azure/identity": "^2.0.1", - "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-recorder": "^2.0.0", "@azure-tools/test-credential": "^1.0.0", "mocha": "^7.1.1", "@types/chai": "^4.2.8", @@ -111,13 +111,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/recoveryservicesbackup/arm-recoveryservicesbackup", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-recoveryservicesbackup?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/recoveryservicesbackup/arm-recoveryservicesbackup" +} \ No newline at end of file diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/review/arm-recoveryservicesbackup.api.md b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/review/arm-recoveryservicesbackup.api.md index 8998529a9331..04ca9974b8e0 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/review/arm-recoveryservicesbackup.api.md +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/review/arm-recoveryservicesbackup.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 type AcquireStorageAccountLock = string; @@ -1280,6 +1280,7 @@ export interface BMSRefreshContainersQueryObject { export interface BmsrpQueryObject { endDate?: Date; extendedInfo?: boolean; + includeSoftDeletedRP?: boolean; moveReadyRPOnly?: boolean; restorePointQueryType?: RestorePointQueryType; startDate?: Date; @@ -1594,6 +1595,12 @@ export interface ExportJobsOperationResultsGetOptionalParams extends coreClient. // @public export type ExportJobsOperationResultsGetResponse = OperationResultInfoBaseResource; +// @public +export interface ExtendedLocation { + name?: string; + type?: string; +} + // @public export interface ExtendedProperties { diskExclusionProperties?: DiskExclusionProperties; @@ -1745,6 +1752,7 @@ export type IaaSVMProtectableItemUnion = IaaSVMProtectableItem | AzureIaaSClassi export interface IaasVMRecoveryPoint extends RecoveryPoint { isInstantIlrSessionActive?: boolean; isManagedVirtualMachine?: boolean; + isPrivateAccessEnabledOnAnyDisk?: boolean; isSourceVMEncrypted?: boolean; keyAndSecret?: KeyAndSecretDetails; objectType: "IaasVMRecoveryPoint"; @@ -1759,6 +1767,7 @@ export interface IaasVMRecoveryPoint extends RecoveryPoint { recoveryPointTierDetails?: RecoveryPointTierInformationV2[]; recoveryPointTime?: Date; recoveryPointType?: string; + securityType?: string; sourceVMStorageType?: string; virtualMachineSize?: string; zones?: string[]; @@ -1770,6 +1779,7 @@ export interface IaasVMRestoreRequest extends RestoreRequest { createNewCloudService?: boolean; diskEncryptionSetId?: string; encryptionDetails?: EncryptionDetails; + extendedLocation?: ExtendedLocation; identityBasedRestoreDetails?: IdentityBasedRestoreDetails; identityInfo?: IdentityInfo; objectType: "IaasVMRestoreRequest" | "IaasVMRestoreWithRehydrationRequest"; @@ -1779,9 +1789,11 @@ export interface IaasVMRestoreRequest extends RestoreRequest { region?: string; restoreDiskLunList?: number[]; restoreWithManagedDisks?: boolean; + securedVMDetails?: SecuredVMDetails; sourceResourceId?: string; storageAccountId?: string; subnetId?: string; + targetDiskNetworkAccessSettings?: TargetDiskNetworkAccessSettings; targetDomainNameId?: string; targetResourceGroupId?: string; targetVirtualMachineId?: string; @@ -2908,9 +2920,9 @@ export type PrivateEndpointConnectionGetResponse = PrivateEndpointConnectionReso // @public export interface PrivateEndpointConnectionOperations { - beginDelete(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionDeleteOptionalParams): Promise, void>>; + beginDelete(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionDeleteOptionalParams): Promise; - beginPut(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, parameters: PrivateEndpointConnectionResource, options?: PrivateEndpointConnectionPutOptionalParams): Promise, PrivateEndpointConnectionPutResponse>>; + beginPut(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, parameters: PrivateEndpointConnectionResource, options?: PrivateEndpointConnectionPutOptionalParams): Promise, PrivateEndpointConnectionPutResponse>>; beginPutAndWait(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, parameters: PrivateEndpointConnectionResource, options?: PrivateEndpointConnectionPutOptionalParams): Promise; get(vaultName: string, resourceGroupName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionGetOptionalParams): Promise; } @@ -3250,7 +3262,7 @@ export type ProtectionIntentValidateResponse = PreValidateEnableBackupResponse; // @public export interface ProtectionPolicies { - beginDelete(vaultName: string, resourceGroupName: string, policyName: string, options?: ProtectionPoliciesDeleteOptionalParams): Promise, void>>; + beginDelete(vaultName: string, resourceGroupName: string, policyName: string, options?: ProtectionPoliciesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(vaultName: string, resourceGroupName: string, policyName: string, options?: ProtectionPoliciesDeleteOptionalParams): Promise; createOrUpdate(vaultName: string, resourceGroupName: string, policyName: string, parameters: ProtectionPolicyResource, options?: ProtectionPoliciesCreateOrUpdateOptionalParams): Promise; get(vaultName: string, resourceGroupName: string, policyName: string, options?: ProtectionPoliciesGetOptionalParams): Promise; @@ -3363,6 +3375,7 @@ export interface RecoveryPointMoveReadinessInfo { // @public export interface RecoveryPointProperties { expiryTime?: string; + isSoftDeleted?: boolean; ruleName?: string; } @@ -3490,11 +3503,11 @@ export class RecoveryServicesBackupClient extends coreClient.ServiceClient { backupUsageSummaries: BackupUsageSummaries; // (undocumented) backupWorkloadItems: BackupWorkloadItems; - beginBMSPrepareDataMove(vaultName: string, resourceGroupName: string, parameters: PrepareDataMoveRequest, options?: BMSPrepareDataMoveOptionalParams): Promise, void>>; + beginBMSPrepareDataMove(vaultName: string, resourceGroupName: string, parameters: PrepareDataMoveRequest, options?: BMSPrepareDataMoveOptionalParams): Promise, void>>; beginBMSPrepareDataMoveAndWait(vaultName: string, resourceGroupName: string, parameters: PrepareDataMoveRequest, options?: BMSPrepareDataMoveOptionalParams): Promise; - beginBMSTriggerDataMove(vaultName: string, resourceGroupName: string, parameters: TriggerDataMoveRequest, options?: BMSTriggerDataMoveOptionalParams): Promise, void>>; + beginBMSTriggerDataMove(vaultName: string, resourceGroupName: string, parameters: TriggerDataMoveRequest, options?: BMSTriggerDataMoveOptionalParams): Promise, void>>; beginBMSTriggerDataMoveAndWait(vaultName: string, resourceGroupName: string, parameters: TriggerDataMoveRequest, options?: BMSTriggerDataMoveOptionalParams): Promise; - beginMoveRecoveryPoint(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, recoveryPointId: string, parameters: MoveRPAcrossTiersRequest, options?: MoveRecoveryPointOptionalParams): Promise, void>>; + beginMoveRecoveryPoint(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, recoveryPointId: string, parameters: MoveRPAcrossTiersRequest, options?: MoveRecoveryPointOptionalParams): Promise, void>>; beginMoveRecoveryPointAndWait(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, recoveryPointId: string, parameters: MoveRPAcrossTiersRequest, options?: MoveRecoveryPointOptionalParams): Promise; // (undocumented) bMSPrepareDataMoveOperationResult: BMSPrepareDataMoveOperationResult; @@ -3721,7 +3734,7 @@ export type RestoreRequestUnion = RestoreRequest | AzureFileShareRestoreRequest // @public export interface Restores { - beginTrigger(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, recoveryPointId: string, parameters: RestoreRequestResource, options?: RestoresTriggerOptionalParams): Promise, void>>; + beginTrigger(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, recoveryPointId: string, parameters: RestoreRequestResource, options?: RestoresTriggerOptionalParams): Promise, void>>; beginTriggerAndWait(vaultName: string, resourceGroupName: string, fabricName: string, containerName: string, protectedItemName: string, recoveryPointId: string, parameters: RestoreRequestResource, options?: RestoresTriggerOptionalParams): Promise; } @@ -3762,6 +3775,11 @@ export type SchedulePolicyUnion = SchedulePolicy | LogSchedulePolicy | LongTermS // @public export type ScheduleRunType = string; +// @public +export interface SecuredVMDetails { + securedVMOsDiskEncryptionSetId?: string; +} + // @public export interface SecurityPinBase { resourceGuardOperationRequests?: string[]; @@ -3858,6 +3876,15 @@ export interface TargetAFSRestoreInfo { targetResourceId?: string; } +// @public +export type TargetDiskNetworkAccessOption = "SameAsOnSourceDisks" | "EnablePrivateAccessForAllDisks" | "EnablePublicAccessForAllDisks"; + +// @public +export interface TargetDiskNetworkAccessSettings { + targetDiskAccessId?: string; + targetDiskNetworkAccessOption?: TargetDiskNetworkAccessOption; +} + // @public export interface TargetRestoreInfo { containerId?: string; @@ -3919,7 +3946,7 @@ export interface ValidateIaasVMRestoreOperationRequest extends ValidateRestoreOp // @public export interface ValidateOperation { - beginTrigger(vaultName: string, resourceGroupName: string, parameters: ValidateOperationRequestUnion, options?: ValidateOperationTriggerOptionalParams): Promise, void>>; + beginTrigger(vaultName: string, resourceGroupName: string, parameters: ValidateOperationRequestUnion, options?: ValidateOperationTriggerOptionalParams): Promise, void>>; beginTriggerAndWait(vaultName: string, resourceGroupName: string, parameters: ValidateOperationRequestUnion, options?: ValidateOperationTriggerOptionalParams): Promise; } diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/lroImpl.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/lroImpl.ts index 518d5f053b4e..dd803cd5e28c 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/lroImpl.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/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 implements LongRunningOperation { - constructor( - private sendOperationFn: (args: any, spec: any) => Promise>, - private args: Record, - private spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record, - public requestPath: string = spec.path!, - public requestMethod: string = spec.httpMethod - ) {} - public async sendInitialRequest(): Promise> { - return this.sendOperationFn(this.args, this.spec); - } - public async sendPollRequest(path: string): Promise> { - const { requestBody, ...restSpec } = this.spec; - return this.sendOperationFn(this.args, { - ...restSpec, - path, - httpMethod: "GET" - }); - } +export function createLroSpec(inputs: { + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; +}): LongRunningOperation { + 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/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts index 2e99f73fc0e7..599628f304d7 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/index.ts @@ -1103,6 +1103,8 @@ export interface RecoveryPointProperties { expiryTime?: string; /** Rule name tagged on Recovery Point that governs life cycle */ ruleName?: string; + /** Bool to indicate whether RP is in soft delete state or not */ + isSoftDeleted?: boolean; } /** Restore file specs like file path, type and target folder path info. */ @@ -1466,6 +1468,8 @@ export interface BmsrpQueryObject { extendedInfo?: boolean; /** Whether the RP can be moved to another tier */ moveReadyRPOnly?: boolean; + /** Flag to indicate whether Soft Deleted RPs should be included/excluded from result. */ + includeSoftDeletedRP?: boolean; } /** Disk information */ @@ -1673,6 +1677,28 @@ export interface RecoveryPointDiskConfiguration { excludedDiskList?: DiskInformation[]; } +/** The extended location of Recovery point where VM was present. */ +export interface ExtendedLocation { + /** Name of the extended location. */ + name?: string; + /** Type of the extended location. Possible values include: 'EdgeZone' */ + type?: string; +} + +/** Restore request parameters for Secured VMs */ +export interface SecuredVMDetails { + /** Gets or Sets Disk Encryption Set Id for Secured VM OS Disk */ + securedVMOsDiskEncryptionSetId?: string; +} + +/** Specifies target network access settings for disks of VM to be restored. */ +export interface TargetDiskNetworkAccessSettings { + /** Network access settings to be used for restored disks */ + targetDiskNetworkAccessOption?: TargetDiskNetworkAccessOption; + /** Gets or sets the ARM resource ID of the target disk access to be used when TargetDiskNetworkAccessOption is set to TargetDiskNetworkAccessOption.UseNew */ + targetDiskAccessId?: string; +} + /** Filters to list the jobs. */ export interface JobQueryObject { /** Status of the job. */ @@ -2628,8 +2654,12 @@ export interface IaasVMRecoveryPoint extends RecoveryPoint { recoveryPointMoveReadinessInfo?: { [propertyName: string]: RecoveryPointMoveReadinessInfo; }; + /** Security Type of the Disk */ + securityType?: string; /** Properties of Recovery Point */ recoveryPointProperties?: RecoveryPointProperties; + /** This flag denotes if any of the disks in the VM are using Private access network setting */ + isPrivateAccessEnabledOnAnyDisk?: boolean; } /** AzureFileShare Restore Request */ @@ -2744,6 +2774,15 @@ export interface IaasVMRestoreRequest extends RestoreRequest { identityInfo?: IdentityInfo; /** IaaS VM workload specific restore details for restores using managed identity. */ identityBasedRestoreDetails?: IdentityBasedRestoreDetails; + /** + * Target extended location where the VM should be restored, + * should be null if restore is to be done in public cloud + */ + extendedLocation?: ExtendedLocation; + /** Stores Secured VM Details */ + securedVMDetails?: SecuredVMDetails; + /** Specifies target network access settings for disks of VM to be restored, */ + targetDiskNetworkAccessSettings?: TargetDiskNetworkAccessSettings; } /** Azure VM (Mercury) workload-specific backup policy. */ @@ -5483,6 +5522,11 @@ export type DayOfWeek = | "Thursday" | "Friday" | "Saturday"; +/** Defines values for TargetDiskNetworkAccessOption. */ +export type TargetDiskNetworkAccessOption = + | "SameAsOnSourceDisks" + | "EnablePrivateAccessForAllDisks" + | "EnablePublicAccessForAllDisks"; /** Defines values for WeekOfMonth. */ export type WeekOfMonth = | "First" diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/mappers.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/mappers.ts index 8d62fe2dcceb..64e597009710 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/mappers.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/mappers.ts @@ -2378,6 +2378,12 @@ export const RecoveryPointProperties: coreClient.CompositeMapper = { type: { name: "String" } + }, + isSoftDeleted: { + serializedName: "isSoftDeleted", + type: { + name: "Boolean" + } } } } @@ -3352,6 +3358,12 @@ export const BmsrpQueryObject: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + includeSoftDeletedRP: { + serializedName: "includeSoftDeletedRP", + type: { + name: "Boolean" + } } } } @@ -3945,6 +3957,68 @@ export const RecoveryPointDiskConfiguration: coreClient.CompositeMapper = { } }; +export const ExtendedLocation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExtendedLocation", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const SecuredVMDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SecuredVMDetails", + modelProperties: { + securedVMOsDiskEncryptionSetId: { + serializedName: "securedVMOsDiskEncryptionSetId", + type: { + name: "String" + } + } + } + } +}; + +export const TargetDiskNetworkAccessSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TargetDiskNetworkAccessSettings", + modelProperties: { + targetDiskNetworkAccessOption: { + serializedName: "targetDiskNetworkAccessOption", + type: { + name: "Enum", + allowedValues: [ + "SameAsOnSourceDisks", + "EnablePrivateAccessForAllDisks", + "EnablePublicAccessForAllDisks" + ] + } + }, + targetDiskAccessId: { + serializedName: "targetDiskAccessId", + type: { + name: "String" + } + } + } + } +}; + export const JobQueryObject: coreClient.CompositeMapper = { type: { name: "Composite", @@ -6636,12 +6710,24 @@ export const IaasVMRecoveryPoint: coreClient.CompositeMapper = { } } }, + securityType: { + serializedName: "securityType", + type: { + name: "String" + } + }, recoveryPointProperties: { serializedName: "recoveryPointProperties", type: { name: "Composite", className: "RecoveryPointProperties" } + }, + isPrivateAccessEnabledOnAnyDisk: { + serializedName: "isPrivateAccessEnabledOnAnyDisk", + type: { + name: "Boolean" + } } } } @@ -6901,6 +6987,27 @@ export const IaasVMRestoreRequest: coreClient.CompositeMapper = { name: "Composite", className: "IdentityBasedRestoreDetails" } + }, + extendedLocation: { + serializedName: "extendedLocation", + type: { + name: "Composite", + className: "ExtendedLocation" + } + }, + securedVMDetails: { + serializedName: "securedVMDetails", + type: { + name: "Composite", + className: "SecuredVMDetails" + } + }, + targetDiskNetworkAccessSettings: { + serializedName: "targetDiskNetworkAccessSettings", + type: { + name: "Composite", + className: "TargetDiskNetworkAccessSettings" + } } } } diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/parameters.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/parameters.ts index 645e4572a4db..20f56c8be745 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/parameters.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/models/parameters.ts @@ -63,7 +63,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2023-01-01", + defaultValue: "2023-02-01", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/privateEndpointConnectionOperations.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/privateEndpointConnectionOperations.ts index 1b935ac98b73..31129a2c81e6 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/privateEndpointConnectionOperations.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/privateEndpointConnectionOperations.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 { RecoveryServicesBackupClient } from "../recoveryServicesBackupClient"; -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 { PrivateEndpointConnectionGetOptionalParams, PrivateEndpointConnectionGetResponse, @@ -71,8 +75,8 @@ export class PrivateEndpointConnectionOperationsImpl parameters: PrivateEndpointConnectionResource, options?: PrivateEndpointConnectionPutOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PrivateEndpointConnectionPutResponse > > { @@ -82,7 +86,7 @@ export class PrivateEndpointConnectionOperationsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -115,19 +119,22 @@ export class PrivateEndpointConnectionOperationsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { vaultName, resourceGroupName, privateEndpointConnectionName, parameters, options }, - putOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: putOperationSpec + }); + const poller = await createHttpPoller< + PrivateEndpointConnectionPutResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -173,14 +180,14 @@ export class PrivateEndpointConnectionOperationsImpl resourceGroupName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -213,13 +220,18 @@ export class PrivateEndpointConnectionOperationsImpl }; }; - const lro = new LroImpl( - sendOperation, - { vaultName, resourceGroupName, privateEndpointConnectionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + vaultName, + resourceGroupName, + privateEndpointConnectionName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionPolicies.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionPolicies.ts index 0dd00cd52b76..ecbf6d525e57 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionPolicies.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/protectionPolicies.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 { RecoveryServicesBackupClient } from "../recoveryServicesBackupClient"; -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 { ProtectionPoliciesGetOptionalParams, ProtectionPoliciesGetResponse, @@ -95,14 +99,14 @@ export class ProtectionPoliciesImpl implements ProtectionPolicies { resourceGroupName: string, policyName: string, options?: ProtectionPoliciesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -135,13 +139,13 @@ export class ProtectionPoliciesImpl implements ProtectionPolicies { }; }; - const lro = new LroImpl( - sendOperation, - { vaultName, resourceGroupName, policyName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { vaultName, resourceGroupName, policyName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/restores.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/restores.ts index 3c2951e1a699..22bd616c80bf 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/restores.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/restores.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 { RecoveryServicesBackupClient } from "../recoveryServicesBackupClient"; -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 { RestoreRequestResource, RestoresTriggerOptionalParams @@ -53,14 +57,14 @@ export class RestoresImpl implements Restores { recoveryPointId: string, parameters: RestoreRequestResource, options?: RestoresTriggerOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -93,9 +97,9 @@ export class RestoresImpl implements Restores { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { vaultName, resourceGroupName, fabricName, @@ -105,10 +109,10 @@ export class RestoresImpl implements Restores { parameters, options }, - triggerOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: triggerOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/validateOperation.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/validateOperation.ts index 3805b219a39a..a35cda7aef47 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/validateOperation.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operations/validateOperation.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 { RecoveryServicesBackupClient } from "../recoveryServicesBackupClient"; -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 { ValidateOperationRequestUnion, ValidateOperationTriggerOptionalParams @@ -44,14 +48,14 @@ export class ValidateOperationImpl implements ValidateOperation { resourceGroupName: string, parameters: ValidateOperationRequestUnion, options?: ValidateOperationTriggerOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -84,13 +88,13 @@ export class ValidateOperationImpl implements ValidateOperation { }; }; - const lro = new LroImpl( - sendOperation, - { vaultName, resourceGroupName, parameters, options }, - triggerOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { vaultName, resourceGroupName, parameters, options }, + spec: triggerOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operationsInterfaces/privateEndpointConnectionOperations.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operationsInterfaces/privateEndpointConnectionOperations.ts index 64fa569c4cad..5afeb39d1165 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operationsInterfaces/privateEndpointConnectionOperations.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operationsInterfaces/privateEndpointConnectionOperations.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 { PrivateEndpointConnectionGetOptionalParams, PrivateEndpointConnectionGetResponse, @@ -48,8 +48,8 @@ export interface PrivateEndpointConnectionOperations { parameters: PrivateEndpointConnectionResource, options?: PrivateEndpointConnectionPutOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PrivateEndpointConnectionPutResponse > >; @@ -82,7 +82,7 @@ export interface PrivateEndpointConnectionOperations { resourceGroupName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete Private Endpoint requests. This call is made by Backup Admin. * @param vaultName The name of the recovery services vault. diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operationsInterfaces/protectionPolicies.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operationsInterfaces/protectionPolicies.ts index 39c37919f91d..2e15350b7795 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operationsInterfaces/protectionPolicies.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operationsInterfaces/protectionPolicies.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 { ProtectionPoliciesGetOptionalParams, ProtectionPoliciesGetResponse, @@ -67,7 +67,7 @@ export interface ProtectionPolicies { resourceGroupName: string, policyName: string, options?: ProtectionPoliciesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous * operation. Status of the diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operationsInterfaces/restores.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operationsInterfaces/restores.ts index 1c8ee61b5f50..3c1146f03e10 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operationsInterfaces/restores.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operationsInterfaces/restores.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 { RestoreRequestResource, RestoresTriggerOptionalParams @@ -37,7 +37,7 @@ export interface Restores { recoveryPointId: string, parameters: RestoreRequestResource, options?: RestoresTriggerOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Restores the specified backed up data. This is an asynchronous operation. To know the status of this * API call, use diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operationsInterfaces/validateOperation.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operationsInterfaces/validateOperation.ts index 1d4be28c7112..94fe398c9348 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operationsInterfaces/validateOperation.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/operationsInterfaces/validateOperation.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 { ValidateOperationRequestUnion, ValidateOperationTriggerOptionalParams @@ -28,7 +28,7 @@ export interface ValidateOperation { resourceGroupName: string, parameters: ValidateOperationRequestUnion, options?: ValidateOperationTriggerOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Validate operation for specified backed up item in the form of an asynchronous operation. Returns * tracking headers which can be tracked using GetValidateOperationResult API. diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts index caa8bcbb6b27..1c4e19e8ee6f 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/src/recoveryServicesBackupClient.ts @@ -14,8 +14,12 @@ import { SendRequest } from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; -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 { BackupResourceStorageConfigsNonCRRImpl, ProtectionIntentOperationsImpl, @@ -164,7 +168,7 @@ export class RecoveryServicesBackupClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-recoveryservicesbackup/10.0.1`; + const packageDetails = `azsdk-js-arm-recoveryservicesbackup/10.1.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -217,7 +221,7 @@ export class RecoveryServicesBackupClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2023-01-01"; + this.apiVersion = options.apiVersion || "2023-02-01"; this.backupResourceStorageConfigsNonCRR = new BackupResourceStorageConfigsNonCRRImpl( this ); @@ -357,14 +361,14 @@ export class RecoveryServicesBackupClient extends coreClient.ServiceClient { resourceGroupName: string, parameters: PrepareDataMoveRequest, options?: BMSPrepareDataMoveOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -397,13 +401,13 @@ export class RecoveryServicesBackupClient extends coreClient.ServiceClient { }; }; - const lro = new LroImpl( - sendOperation, - { vaultName, resourceGroupName, parameters, options }, - bMSPrepareDataMoveOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { vaultName, resourceGroupName, parameters, options }, + spec: bMSPrepareDataMoveOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -446,14 +450,14 @@ export class RecoveryServicesBackupClient extends coreClient.ServiceClient { resourceGroupName: string, parameters: TriggerDataMoveRequest, options?: BMSTriggerDataMoveOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -486,13 +490,13 @@ export class RecoveryServicesBackupClient extends coreClient.ServiceClient { }; }; - const lro = new LroImpl( - sendOperation, - { vaultName, resourceGroupName, parameters, options }, - bMSTriggerDataMoveOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { vaultName, resourceGroupName, parameters, options }, + spec: bMSTriggerDataMoveOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -543,14 +547,14 @@ export class RecoveryServicesBackupClient extends coreClient.ServiceClient { recoveryPointId: string, parameters: MoveRPAcrossTiersRequest, options?: MoveRecoveryPointOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -583,9 +587,9 @@ export class RecoveryServicesBackupClient extends coreClient.ServiceClient { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { vaultName, resourceGroupName, fabricName, @@ -595,10 +599,10 @@ export class RecoveryServicesBackupClient extends coreClient.ServiceClient { parameters, options }, - moveRecoveryPointOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: moveRecoveryPointOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/tsconfig.json b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/tsconfig.json index a7e9eaf1a49b..3e6ae96443f3 100644 --- a/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/tsconfig.json +++ b/sdk/recoveryservicesbackup/arm-recoveryservicesbackup/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-recoveryservicesbackup": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"