From 6922069731b23bcd1b10482a0043349407cbad9e Mon Sep 17 00:00:00 2001 From: Himanshu Agarwal Date: Wed, 17 May 2023 10:28:26 +0530 Subject: [PATCH 1/6] Added autorest based commands for Bakcup Policy. Added examples and test cases. --- .../.gitattributes | 1 + .../.gitignore | 16 + .../Az.RecoveryServices.psd1 | 24 + .../Az.RecoveryServices.sln | 25 + .../README.md | 109 ++ ...rvicesBackupSchedulePolicyClientObject.ps1 | 392 ++++++ ...vicesBackupRetentionPolicyClientObject.ps1 | 1051 ++++++++++++++ .../Get-AzRecoveryServicesPolicyTemplate.ps1 | 24 + .../New-AzRecoveryServicesBackupPolicy.ps1 | 201 +++ .../custom/Enums/Enums.cs | 153 +++ .../custom/Helpers/BackupScheduleHelpers.ps1 | 377 +++++ .../custom/Helpers/PolicyHelpers.ps1 | 909 ++++++++++++ .../custom/Helpers/commonhelper.ps1 | 20 + .../custom/README.md | 41 + .../custom/manifests/AzureVM.json | 100 ++ .../custom/manifests/DatasourceTypesInfo.json | 29 + .../custom/manifests/MSSQL.json | 120 ++ .../custom/manifests/ManifestLoader.ps1 | 40 + .../custom/manifests/SAPHANA.json | 120 ++ .../custom/manifests/default.json | 3 + .../docs/Az.RecoveryServices.md | 35 + ...ervicesBackupSchedulePolicyClientObject.md | 454 ++++++ ...rvicesBackupRetentionPolicyClientObject.md | 1224 +++++++++++++++++ .../Get-AzRecoveryServicesBackupPolicy.md | 165 +++ .../Get-AzRecoveryServicesPolicyTemplate.md | 77 ++ .../New-AzRecoveryServicesBackupPolicy.md | 320 +++++ .../docs/README.md | 11 + .../Remove-AzRecoveryServicesBackupPolicy.md | 220 +++ ...ervicesBackupSchedulePolicyClientObject.md | 157 +++ ...rvicesBackupRetentionPolicyClientObject.md | 680 +++++++++ .../Get-AzRecoveryServicesBackupPolicy.md | 35 + .../Get-AzRecoveryServicesPolicyTemplate.md | 21 + .../New-AzRecoveryServicesBackupPolicy.md | 64 + .../Remove-AzRecoveryServicesBackupPolicy.md | 6 + .../how-to.md | 58 + .../license.txt | 227 +++ .../resources/README.md | 11 + ...zRecoveryServicesConfigureBackup.Tests.ps1 | 21 + ...pSchedulePolicyClientObject.Recording.json | 814 +++++++++++ ...BackupSchedulePolicyClientObject.Tests.ps1 | 293 ++++ ...RetentionPolicyClientObject.Recording.json | 698 ++++++++++ ...ackupRetentionPolicyClientObject.Tests.ps1 | 258 ++++ .../Export-AzRecoveryServicesJob.Tests.ps1 | 25 + ...t-AzRecoveryServicesBackupEngine.Tests.ps1 | 29 + .../Get-AzRecoveryServicesBackupJob.Tests.ps1 | 21 + ...eryServicesBackupOperationResult.Tests.ps1 | 25 + ...yServicesBackupOperationStatuses.Tests.ps1 | 25 + ...t-AzRecoveryServicesBackupPolicy.Tests.ps1 | 21 + ...eryServicesBackupProtectableItem.Tests.ps1 | 21 + ...overyServicesBackupProtectedItem.Tests.ps1 | 21 + ...ervicesBackupProtectionContainer.Tests.ps1 | 21 + ...ryServicesBackupProtectionIntent.Tests.ps1 | 21 + ...esBackupResourceEncryptionConfig.Tests.ps1 | 25 + ...ckupResourceStorageConfigsNonCrr.Tests.ps1 | 25 + ...ervicesBackupResourceVaultConfig.Tests.ps1 | 25 + ...t-AzRecoveryServicesBackupStatus.Tests.ps1 | 33 + ...coveryServicesBackupUsageSummary.Tests.ps1 | 21 + ...coveryServicesBackupWorkloadItem.Tests.ps1 | 21 + ...msPrepareDataMoveOperationResult.Tests.ps1 | 25 + ...rvicesDeletedProtectionContainer.Tests.ps1 | 21 + ...ervicesExportJobsOperationResult.Tests.ps1 | 25 + .../Get-AzRecoveryServicesJobDetail.Tests.ps1 | 25 + ...coveryServicesJobOperationResult.Tests.ps1 | 25 + ...zRecoveryServicesOperationStatus.Tests.ps1 | 25 + ...AzRecoveryServicesPolicyTemplate.Tests.ps1 | 21 + ...ervicesPrivateEndpointConnection.Tests.ps1 | 25 + ...esPrivateEndpointOperationStatus.Tests.ps1 | 25 + ...veryServicesProtectableContainer.Tests.ps1 | 21 + ...-AzRecoveryServicesProtectedItem.Tests.ps1 | 25 + ...icesProtectedItemOperationResult.Tests.ps1 | 25 + ...esProtectedItemOperationStatuses.Tests.ps1 | 25 + ...overyServicesProtectionContainer.Tests.ps1 | 25 + ...otectionContainerOperationResult.Tests.ps1 | 25 + ...nContainerRefreshOperationResult.Tests.ps1 | 25 + ...RecoveryServicesProtectionIntent.Tests.ps1 | 25 + ...RecoveryServicesProtectionPolicy.Tests.ps1 | 25 + ...sProtectionPolicyOperationResult.Tests.ps1 | 25 + ...rotectionPolicyOperationStatuses.Tests.ps1 | 25 + ...-AzRecoveryServicesRecoveryPoint.Tests.ps1 | 29 + ...RecoveryPointsRecommendedForMove.Tests.ps1 | 25 + ...coveryServicesResourceGuardProxy.Tests.ps1 | 33 + ...et-AzRecoveryServicesSecurityPiN.Tests.ps1 | 33 + ...yServicesValidateOperationResult.Tests.ps1 | 25 + ...ervicesValidateOperationStatuses.Tests.ps1 | 25 + ...rvicesInquireProtectionContainer.Tests.ps1 | 25 + ...Invoke-AzRecoveryServicesPrepare.Tests.ps1 | 33 + ...-AzRecoveryServicesRecoveryPoint.Tests.ps1 | 33 + ...w-AzRecoveryServicesBackupPolicy.Tests.ps1 | 21 + ...vicesItemLevelRecoveryConnection.Tests.ps1 | 33 + ...-AzRecoveryServicesProtectedItem.Tests.ps1 | 33 + ...RecoveryServicesProtectionIntent.Tests.ps1 | 33 + ...RecoveryServicesProtectionPolicy.Tests.ps1 | 33 + .../test/README.md | 17 + ...overyServicesProtectionContainer.Tests.ps1 | 33 + ...e-AzRecoveryServicesBackupPolicy.Tests.ps1 | 21 + ...ervicesPrivateEndpointConnection.Tests.ps1 | 25 + ...-AzRecoveryServicesProtectedItem.Tests.ps1 | 25 + ...RecoveryServicesProtectionIntent.Tests.ps1 | 25 + ...RecoveryServicesProtectionPolicy.Tests.ps1 | 25 + ...coveryServicesResourceGuardProxy.Tests.ps1 | 25 + ...vicesItemLevelRecoveryConnection.Tests.ps1 | 25 + ...t-AzRecoveryServicesBackupPolicy.Tests.ps1 | 25 + ...esBackupResourceEncryptionConfig.Tests.ps1 | 25 + ...ckupResourceStorageConfigsNonCrr.Tests.ps1 | 25 + ...ervicesBackupResourceVaultConfig.Tests.ps1 | 25 + ...ervicesPrivateEndpointConnection.Tests.ps1 | 25 + ...-AzRecoveryServicesProtectedItem.Tests.ps1 | 25 + ...RecoveryServicesProtectionIntent.Tests.ps1 | 25 + ...RecoveryServicesProtectionPolicy.Tests.ps1 | 25 + ...coveryServicesResourceGuardProxy.Tests.ps1 | 25 + .../test/Start-AzRecoveryServices.Tests.ps1 | 33 + .../Start-AzRecoveryServicesBackup.Tests.ps1 | 33 + ...zRecoveryServicesJobCancellation.Tests.ps1 | 25 + .../Start-AzRecoveryServicesRestore.Tests.ps1 | 33 + ...ecoveryServicesValidateOperation.Tests.ps1 | 33 + ...AzRecoveryServicesFeatureSupport.Tests.ps1 | 33 + ...RecoveryServicesProtectionIntent.Tests.ps1 | 33 + ...ServicesResourceGuardProxyDelete.Tests.ps1 | 33 + ...overyServicesProtectionContainer.Tests.ps1 | 25 + ...ckupResourceStorageConfigsNonCrr.Tests.ps1 | 33 + ...ervicesBackupResourceVaultConfig.Tests.ps1 | 33 + ...overyServicesProtectionContainer.Tests.ps1 | 25 + .../test/env.json | 16 + .../test/loadEnv.ps1 | 21 + .../test/utils.ps1 | 51 + .../utils/Unprotect-SecureString.ps1 | 16 + .../readme.azure.noprofile.md | 48 + 127 files changed, 11856 insertions(+) create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/.gitattributes create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/.gitignore create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/Az.RecoveryServices.psd1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/Az.RecoveryServices.sln create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/README.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Get-AzRecoveryServicesPolicyTemplate.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/New-AzRecoveryServicesBackupPolicy.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Enums/Enums.cs create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/BackupScheduleHelpers.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/PolicyHelpers.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/commonhelper.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/README.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/AzureVM.json create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/DatasourceTypesInfo.json create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/MSSQL.json create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/ManifestLoader.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/SAPHANA.json create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/default.json create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Az.RecoveryServices.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupPolicy.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesPolicyTemplate.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/New-AzRecoveryServicesBackupPolicy.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/README.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Remove-AzRecoveryServicesBackupPolicy.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupPolicy.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesPolicyTemplate.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/New-AzRecoveryServicesBackupPolicy.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Remove-AzRecoveryServicesBackupPolicy.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/how-to.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/license.txt create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/resources/README.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Disable-AzRecoveryServicesConfigureBackup.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Recording.json create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.Recording.json create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Export-AzRecoveryServicesJob.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupEngine.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupJob.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationResult.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationStatuses.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupPolicy.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectableItem.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectedItem.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionContainer.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionIntent.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupStatus.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupUsageSummary.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupWorkloadItem.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBmsPrepareDataMoveOperationResult.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesDeletedProtectionContainer.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesExportJobsOperationResult.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobDetail.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobOperationResult.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesOperationStatus.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPolicyTemplate.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointOperationStatus.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectableContainer.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItem.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationResult.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationStatuses.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainer.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerOperationResult.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerRefreshOperationResult.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionIntent.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicy.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationResult.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationStatuses.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPoint.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPointsRecommendedForMove.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesResourceGuardProxy.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesSecurityPiN.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationResult.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationStatuses.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesInquireProtectionContainer.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesPrepare.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Move-AzRecoveryServicesRecoveryPoint.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesBackupPolicy.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectedItem.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectionIntent.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectionPolicy.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/README.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesProtectionContainer.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesBackupPolicy.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectedItem.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectionIntent.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectionPolicy.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesResourceGuardProxy.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Revoke-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupPolicy.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectedItem.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectionIntent.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectionPolicy.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesResourceGuardProxy.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServices.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesBackup.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesJobCancellation.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesRestore.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesValidateOperation.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesFeatureSupport.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesProtectionIntent.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unlock-AzRecoveryServicesResourceGuardProxyDelete.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unregister-AzRecoveryServicesProtectionContainer.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesProtectionContainer.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/env.json create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/loadEnv.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/utils.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/utils/Unprotect-SecureString.ps1 create mode 100644 src/RecoveryServices/readme.azure.noprofile.md diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/.gitattributes b/src/RecoveryServices/RecoveryServices.Backup.Autorest/.gitattributes new file mode 100644 index 000000000000..2125666142eb --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/.gitattributes @@ -0,0 +1 @@ +* text=auto \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/.gitignore b/src/RecoveryServices/RecoveryServices.Backup.Autorest/.gitignore new file mode 100644 index 000000000000..3c3d57339c8b --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/.gitignore @@ -0,0 +1,16 @@ +bin +obj +.vs +generated +internal +exports +tools +custom/*.psm1 +custom/autogen-model-cmdlets +test/*-TestResults.xml +/*.ps1 +/*.ps1xml +/*.psm1 +/*.snk +/*.csproj +/*.nuspec \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/Az.RecoveryServices.psd1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/Az.RecoveryServices.psd1 new file mode 100644 index 000000000000..2e388a3e004c --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/Az.RecoveryServices.psd1 @@ -0,0 +1,24 @@ +@{ + GUID = '37eaf44e-78f7-4a5a-82d1-f6350681704b' + RootModule = './Az.RecoveryServices.psm1' + ModuleVersion = '0.1.0' + CompatiblePSEditions = 'Core', 'Desktop' + Author = 'Microsoft Corporation' + CompanyName = 'Microsoft Corporation' + Copyright = 'Microsoft Corporation. All rights reserved.' + Description = 'Microsoft Azure PowerShell: RecoveryServices cmdlets' + PowerShellVersion = '5.1' + DotNetFrameworkVersion = '4.7.2' + RequiredAssemblies = './bin/Az.RecoveryServices.private.dll' + FormatsToProcess = './Az.RecoveryServices.format.ps1xml' + FunctionsToExport = 'Edit-AzrecoveryServicesBackupRetentionPolicyClientObject', 'Edit-AzRecoveryServicesBackupSchedulePolicyClientObject', 'Get-AzRecoveryServicesBackupPolicy', 'Get-AzRecoveryServicesPolicyTemplate', 'New-AzRecoveryServicesBackupPolicy', 'Remove-AzRecoveryServicesBackupPolicy', '*' + AliasesToExport = '*' + PrivateData = @{ + PSData = @{ + Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'RecoveryServices' + LicenseUri = 'https://aka.ms/azps-license' + ProjectUri = 'https://github.com/Azure/azure-powershell' + ReleaseNotes = '' + } + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/Az.RecoveryServices.sln b/src/RecoveryServices/RecoveryServices.Backup.Autorest/Az.RecoveryServices.sln new file mode 100644 index 000000000000..bb6d6f5c3989 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/Az.RecoveryServices.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.6.33801.468 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Az.RecoveryServices", "Az.RecoveryServices.csproj", "{5563E5F1-639E-4CBB-B519-B54953845E82}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5563E5F1-639E-4CBB-B519-B54953845E82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5563E5F1-639E-4CBB-B519-B54953845E82}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5563E5F1-639E-4CBB-B519-B54953845E82}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5563E5F1-639E-4CBB-B519-B54953845E82}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8B92C282-12D5-4864-A16A-0A324F47C0C3} + EndGlobalSection +EndGlobal diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/README.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/README.md new file mode 100644 index 000000000000..9a9d03fc68da --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/README.md @@ -0,0 +1,109 @@ + +# Az.RecoveryServices +This directory contains the PowerShell module for the RecoveryServices service. + +--- +## Status +[![Az.RecoveryServices](https://img.shields.io/powershellgallery/v/Az.RecoveryServices.svg?style=flat-square&label=Az.RecoveryServices "Az.RecoveryServices")](https://www.powershellgallery.com/packages/Az.RecoveryServices/) + +## Info +- Modifiable: yes +- Generated: all +- Committed: yes +- Packaged: yes + +--- +## Detail +This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension. + +## Module Requirements +- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.7.5 or greater + +## Authentication +AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent. + +## Development +For information on how to develop for `Az.RecoveryServices`, see [how-to.md](how-to.md). + + +# My API + +This file contains the configuration for generating My API from the OpenAPI specification. + +> see https://aka.ms/autorest + +``` yaml +# it's the same options as command line options, just drop the double-dash! +branch: c94569d116a82ee11a94c5dfb190650dd675a1bf +require: + - $(this-folder)/../readme.azure.noprofile.md +input-file: + - $(repo)/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/bms.json +title: RecoveryServices +directive: + - where: + verb: New + subject: ProtectionPolicy + variant: ^CreateViaIdentityExpanded$|^CreateExpanded$|^CreateViaIdentity$ + remove: true + - where: + verb: New + subject: ProtectionPolicy + variant: Create + hide: true + - where: + verb: Remove + subject: ProtectionPolicy + variant: DeleteViaIdentity + remove: true + - where: + verb: Get + subject: ProtectedItem + variant: GetViaIdentity + remove: true + - where: + verb: Get + subject: ProtectionPolicy + variant: GetViaIdentity + remove: true + - where: + subject: ProtectionPolicy + set: + subject: BackupPolicy + - where: + subject: Job|BackupEngine|OperationResult|OperationStatuses|ProtectableItem|Item|ProtectionContainer|ProtectionIntent|EncryptionConfig|StorageConfigsNonCrr|VaultConfig|BackupStatus|BackupUsageSummary|JobDetail|OperationStatus|PrivateEndpointConnection|RecoveryPoint|RecommendedForMove|ResourceGuardProxy|SecurityPiN|ItemLevelRecoveryConnection|Restore|Cancellation|ValidateOperation|ResourceGuardProxyDelete|ProtectableContainer|Prepare|FeatureSupport + remove: true + - where: + verb: Start + remove: true + - where: + verb: Set + subject: BackupPolicy + remove: true + - no-inline: + - DailyRetentionSchedule + - HourlySchedule + - MonthlyRetentionSchedule + - Settings + - SubProtectionPolicyTieringPolicy + - TieringPolicy + - WeeklyRetentionSchedule + - YearlyRetentionSchedule + - from: source-file-csharp + where: $ + transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicy Property', 'public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicy Property'); + - from: source-file-csharp + where: $ + transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IRetentionPolicy RetentionPolicy', 'public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IRetentionPolicy RetentionPolicy'); + - from: source-file-csharp + where: $ + transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.ISchedulePolicy SchedulePolicy', 'public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.ISchedulePolicy SchedulePolicy'); +``` + +## Alternate settings + +This section is only activated if the `--make-it-rain` switch is added to the command line + +``` yaml $(make-it-rain) +namespace: MyCompany.Special.Rest +``` diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.ps1 new file mode 100644 index 000000000000..3971998304f5 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.ps1 @@ -0,0 +1,392 @@ +function Edit-AzRecoveryServicesBackupSchedulePolicyClientObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicy')] + [CmdletBinding(PositionalBinding=$false)] + # RsvRef: should we call it workload type + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Description('Edits the schedule policy in the specified backup policy object.')] + + param ( + [Parameter(ParameterSetName='ModifySchedulePolicy', Mandatory, HelpMessage='Specifies the policy to be edited.')] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicy] + ${Policy}, + + # AzureVM specific parameters + + [Parameter(ParameterSetName='ModifySchedulePolicy', HelpMessage='Specifies the policy sub type for AzureVM.')] + [ValidateSet("Standard", "Enhanced", ErrorMessage = "Invalid value for PolicySubType. Please provide a valid policy sub type. Valid values are 'Standard' and 'Enhanced'.")] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.PolicySubTypes] + ${PolicySubType} = "Standard", + + [Parameter(ParameterSetName='ModifySchedulePolicy', HelpMessage='Specifies the interval between backups in hours.')] + [ValidateSet(4, 6, 8, 12, ErrorMessage = "Invalid value for HourlyInterval. Please provide a valid interval. Valid values are 4, 6, 8, and 12.")] + [AllowNull()] + [System.Nullable[int]] + ${HourlyInterval} = $null, + + [Parameter(ParameterSetName='ModifySchedulePolicy', HelpMessage='Specifies the duration over which backup is taken in hours.')] + [ValidateSet(4, 8, 12, 16, 20, 24, ErrorMessage = "Invalid value for HourlyScheduleWindowDuration. Please provide a valid duration. Valid values are 4, 8, 12, 16, 20, and 24.")] + [AllowNull()] + [System.Nullable[int]] + ${HourlyScheduleWindowDuration} = $null, + + # SAPHANA specific parameters + + [Parameter(ParameterSetName='ModifySchedulePolicy', HelpMessage='Specifies whether the user needs to make a log backup')] + [AllowNull()] + [Nullable[Boolean]] + ${EnableLogBackup}, + + [Parameter(ParameterSetName='ModifySchedulePolicy', HelpMessage='Specifies the frequency of log backups in minutes')] + [ValidateSet(15, 30, 60, 120, 240, 480, 720, 1440, ErrorMessage = "Invalid value for LogBackupFrequencyInMin. Please provide a valid frequency. Valid values are 15, 30, 60, 120, 240, 480, 720, and 1440.")] + [AllowNull()] + [System.Nullable[int]] + ${LogBackupFrequencyInMin} = $null, + + [Parameter(ParameterSetName='ModifySchedulePolicy', HelpMessage='Specifies whether the user wants to enable differential backup.')] + [AllowNull()] + [Nullable[Boolean]] + ${EnableDifferentialBackup} = 0, + + [Parameter(ParameterSetName='ModifySchedulePolicy', HelpMessage='Specifies the days of the week for differential backup.')] + [ValidateScript({ + if ($_ -ne $null) { + $allowedDays = "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" + foreach ($day in $_) { + if (-not ($day -in $allowedDays)) { + throw "Invalid day of the week: $day. Please provide a valid day of the week." + } + } + } + + return $true + })] + [AllowNull()] + [string[]] + ${DifferentialRunDay} = $null, + + [Parameter(ParameterSetName='ModifySchedulePolicy', HelpMessage='Specifies the time at which differential backup must be taken.')] + [ValidatePattern("^[string]::Empty$|^([1-9]|1[0-2]):(00|30) (AM|PM)$", ErrorMessage = "Invalid value for DifferentialScheduleTime. Please provide a valid time in the format HH:00 or HH:30 AM/PM.")] + [AllowEmptyString()] + [string] + ${DifferentialScheduleTime} = [string]::Empty, + + [Parameter(ParameterSetName='ModifySchedulePolicy', HelpMessage='Specifies whether the user wants to enable incremental backup.')] + [AllowNull()] + [Nullable[Boolean]] + ${EnableIncrementalBackup} = 0, + + [Parameter(ParameterSetName='ModifySchedulePolicy', HelpMessage='Specifies the days of the week for incremental backup.')] + [ValidateScript({ + if ($_ -ne $null) { + $allowedDays = "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" + foreach ($day in $_) { + if (-not ($day -in $allowedDays)) { + throw "Invalid day of the week: $day. Please provide a valid day of the week." + } + } + } + + return $true + })] + [AllowNull()] + [string[]] + ${IncrementalRunDay} = $null, + + [Parameter(ParameterSetName='ModifySchedulePolicy', HelpMessage='Specifies the time at which incremental backup must be taken.')] + [ValidatePattern("^[string]::Empty$|^([1-9]|1[0-2]):(00|30) (AM|PM)$", ErrorMessage = "Invalid value for IncrementalScheduleTime. Please provide a valid time in the format HH:00 or HH:30 AM/PM.")] + [AllowEmptyString()] + [string] + ${IncrementalScheduleTime} = [string]::Empty, + + [Parameter(ParameterSetName='ModifySchedulePolicy', HelpMessage='Specifies the frequency of backup.')] + [ValidateSet("Daily", "Weekly", "Hourly", ErrorMessage = "Invalid value for BackupFrequency. Please provide a valid value. Valid values are 'Daily', 'Weekly', and 'Hourly'.")] + [AllowEmptyString()] + [string] + ${BackupFrequency} = [string]::Empty, + + [Parameter(ParameterSetName='ModifySchedulePolicy', HelpMessage='Specifies the days of the week for weekly backup.')] + [ValidateScript({ + if ($_ -ne $null) { + $allowedDays = "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" + foreach ($day in $_) { + if (-not ($day -in $allowedDays)) { + throw "Invalid day of the week: $day. Please provide a valid day of the week." + } + } + } + + return $true + })] + [AllowNull()] + [string[]] + ${ScheduleRunDay} = $null, + + [Parameter(ParameterSetName='ModifySchedulePolicy', HelpMessage='Specifies the time at which backup must be taken.')] + [ValidatePattern("^[string]::Empty$|^([1-9]|1[0-2]):(00|30) (AM|PM)$", ErrorMessage = "Invalid value for ScheduleTime. Please provide a valid time in the format HH:00 or HH:30 AM/PM.")] + [AllowEmptyString()] + [string] + ${ScheduleTime} = [string]::Empty, + + [Parameter(ParameterSetName='ModifySchedulePolicy', HelpMessage='Specifies the standard time zone.')] + [AllowEmptyString()] + [string] + # TODO: Validate timezone + ${TimeZone} = "UTC" + ) + + begin { + $DatasourceType = $Policy.BackupManagementType -eq "AzureIaasVM" ? "AzureVM" : ($Policy.WorkLoadType -eq "SAPHanaDatabase" ? "SAPHANA" : "MSSQL") + + Write-Debug -Message "BackupFrequency before : $BackupFrequency" + + ValidateBackupScheduleOptions -Policy $Policy -DatasourceType $DatasourceType -PolicySubType ([ref]$PolicySubType) -HourlyInterval ([ref]$HourlyInterval) -HourlyScheduleWindowDuration ([ref]$HourlyScheduleWindowDuration) -BackupFrequency ([ref]$BackupFrequency) -ScheduleRunDay ([ref]$ScheduleRunDay) -ScheduleTime ([ref]$ScheduleTime) -EnableIncrementalBackup ([ref]$EnableIncrementalBackup) -IncrementalRunDay ([ref]$IncrementalRunDay) -IncrementalScheduleTime ([ref]$IncrementalScheduleTime) -EnableDifferentialBackup ([ref]$EnableDifferentialBackup) -DifferentialRunDay ([ref]$DifferentialRunDay) -DifferentialScheduleTime ([ref]$DifferentialScheduleTime) -EnableLogBackup ([ref]$EnableLogBackup) -LogBackupFrequencyInMin ([ref]$LogBackupFrequencyInMin) + + Write-Debug -Message "BackupFrequency after : $BackupFrequency" + + Write-Debug "Validation successful" + } + + process { + + $policyObject = $Policy + + if ($ScheduleTime) { + # Get current date and time + $currentDateTime = Get-Date + + # Parse user input as time + $givenTime = [DateTime]::ParseExact($ScheduleTime, "h:mm tt", $null) + + Write-Debug -Message "Given Time: $givenTime" + Write-Debug -Message "Current Date Time: $currentDateTime" + + # Combine current date, given time, and UTC offset to form the desired format + $convertedDateTime = [DateTime]::SpecifyKind( + [DateTime]::new($currentDateTime.Year, $currentDateTime.Month, $currentDateTime.Day, $givenTime.Hour, $givenTime.Minute, $givenTime.Second), + [System.DateTimeKind]::Utc + ) + } + + $policyJson = $policyObject | ConvertTo-Json -Depth 10 + Write-Debug -Message "Policy Details: $policyJson" + + $manifest = LoadManifest -DatasourceType $DatasourceType + + if ($manifest.allowedSubProtectionPolicyTypes.Count -gt 1) { + + Write-Debug "In SAPHANA" + + $FullBackupPolicy = $policyObject.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Full" } + $Index = $policyObject.SubProtectionPolicy.IndexOf($FullBackupPolicy) + + switch($BackupFrequency) { + + "Daily" { + $FullBackupPolicy.SchedulePolicy.ScheduleRunFrequency = "Daily" + + $FullBackupPolicy.SchedulePolicy.ScheduleRunTime[0] = $convertedDateTime + $FullBackupPolicy.RetentionPolicy.DailySchedule.RetentionTime[0] = $convertedDateTime + $FullBackupPolicy.RetentionPolicy.MonthlySchedule.RetentionTime[0] = $convertedDateTime + $FullBackupPolicy.RetentionPolicy.WeeklySchedule.RetentionTime[0] = $convertedDateTime + $FullBackupPolicy.RetentionPolicy.YearlySchedule.RetentionTime[0] = $convertedDateTime + + $policyObject.SubProtectionPolicy[$Index] = $FullBackupPolicy + + $policyObject.Setting.TimeZone = $TimeZone + } + + "Weekly" { + + $FullBackupPolicy.SchedulePolicy.ScheduleRunFrequency = "Weekly" + + $FullBackupPolicy.SchedulePolicy.ScheduleRunDay = $ScheduleRunDay + $FullBackupPolicy.RetentionPolicy.WeeklySchedule.DaysOfTheWeek = $ScheduleRunDay + + $FullBackupPolicy.SchedulePolicy.ScheduleRunTime[0] = $convertedDateTime + $FullBackupPolicy.RetentionPolicy.MonthlySchedule.RetentionTime[0] = $convertedDateTime + $FullBackupPolicy.RetentionPolicy.WeeklySchedule.RetentionTime[0] = $convertedDateTime + $FullBackupPolicy.RetentionPolicy.YearlySchedule.RetentionTime[0] = $convertedDateTime + + $policyObject.Setting.TimeZone = $TimeZone + + $policyObject.SubProtectionPolicy[$Index] = $FullBackupPolicy + } + } + + if($EnableLogBackup) { + $LogBackupPolicy = $policyObject.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Log" } + $Index = $policyObject.SubProtectionPolicy.IndexOf($LogBackupPolicy) + + $LogBackupPolicy.SchedulePolicy.ScheduleFrequencyInMin = $LogBackupFrequencyInMin + + $policyObject.SubProtectionPolicy[$Index] = $LogBackupPolicy + } + + if ($EnableDifferentialBackup) { + + $givenTime = [DateTime]::ParseExact($DifferentialScheduleTime, "h:mm tt", $null) + + $convertedDateTime = [DateTime]::SpecifyKind( + [DateTime]::new($currentDateTime.Year, $currentDateTime.Month, $currentDateTime.Day, $givenTime.Hour, $givenTime.Minute, $givenTime.Second), + [System.DateTimeKind]::Utc + ) + + $DifferentialPolicy = $policyObject.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Differential" } + + # Add a new sub protection policy for differential backup if it doesn't exist already + if (-not $DifferentialPolicy) { + $policyObject.SubProtectionPolicy += [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.SubProtectionPolicy]::new() + $DifferentialPolicy = $policyObject.SubProtectionPolicy[$policyObject.SubProtectionPolicy.Length - 1] + } + + $Index = $policyObject.SubProtectionPolicy.IndexOf($DifferentialPolicy) + + $DifferentialPolicy.PolicyType = "Differential" + $DifferentialPolicy.SchedulePolicy = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.SimpleSchedulePolicy]::new() + $DifferentialPolicy.SchedulePolicy.ScheduleRunFrequency = "Weekly" + $DifferentialPolicy.SchedulePolicy.ScheduleRunDay = $DifferentialRunDay + $DifferentialPolicy.SchedulePolicy.ScheduleRunTime = $convertedDateTime + $DifferentialPolicy.SchedulePolicy.Type = "SimpleSchedulePolicy" + $DifferentialPolicy.SchedulePolicy.ScheduleWeeklyFrequency = 0 + + $policyObject.SubProtectionPolicy[$Index] = $DifferentialPolicy + } + elseif ($EnableDifferentialBackup -eq $false) { + $DifferentialPolicy = $policyObject.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Differential" } + + if ($DifferentialPolicy) { + $Index = $policyObject.SubProtectionPolicy.IndexOf($DifferentialPolicy) + $policyObject.SubProtectionPolicy.RemoveAt($Index) + } + } + + if ($EnableIncrementalBackup) { + + $givenTime = [DateTime]::ParseExact($IncrementalScheduleTime, "h:mm tt", $null) + + $convertedDateTime = [DateTime]::SpecifyKind( + [DateTime]::new($currentDateTime.Year, $currentDateTime.Month, $currentDateTime.Day, $givenTime.Hour, $givenTime.Minute, $givenTime.Second), + [System.DateTimeKind]::Utc + ) + + $IncrementalPolicy = $policyObject.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Incremental" } + + # Add a new sub protection policy for incremental backup if it doesn't exist already + if (-not $IncrementalPolicy) { + $policyObject.SubProtectionPolicy += [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.SubProtectionPolicy]::new() + $IncrementalPolicy = $policyObject.SubProtectionPolicy[$policyObject.SubProtectionPolicy.Length - 1] + } + + $Index = $policyObject.SubProtectionPolicy.IndexOf($IncrementalPolicy) + + $IncrementalPolicy.PolicyType = "Incremental" + $IncrementalPolicy.SchedulePolicy = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.SimpleSchedulePolicy]::new() + $IncrementalPolicy.SchedulePolicy.ScheduleRunFrequency = "Weekly" + $IncrementalPolicy.SchedulePolicy.ScheduleRunDay = $IncrementalRunDay + $IncrementalPolicy.SchedulePolicy.ScheduleRunTime = $convertedDateTime + $IncrementalPolicy.SchedulePolicy.Type = "SimpleSchedulePolicy" + $IncrementalPolicy.SchedulePolicy.ScheduleWeeklyFrequency = 0 + + $policyObject.SubProtectionPolicy[$Index] = $IncrementalPolicy + } + elseif ($EnableIncrementalPolicy -eq $false) { + $IncrementalPolicy = $policyObject.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Incremental" } + + if ($IncrementalPolicy) { + $Index = $policyObject.SubProtectionPolicy.IndexOf($IncrementalPolicy) + $policyObject.SubProtectionPolicy.RemoveAt($Index) + } + } + + } + else { + + Write-Debug "In AzureVM" + + if ($PolicySubType) { + $policyObject.PolicyType = ($PolicySubType -eq "Standard") ? "V1" : "V2" + } + + if ($PolicySubType -eq "Enhanced") { + $policyObject.SchedulePolicy = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.SimpleSchedulePolicyV2]::new() + } + + $policyJson = $policyObject | ConvertTo-Json -Depth 10 + Write-Debug $policyJson + + switch($BackupFrequency) { + "Daily" { + + if ($PolicySubType -eq "Enhanced") { + $policyObject.SchedulePolicy.DailyScheduleRunTime = @() + $policyObject.SchedulePolicy.DailyScheduleRunTime += $convertedDateTime + + $policyObject.SchedulePolicy.Type = "SimpleSchedulePolicyV2" + $policyObject.SchedulePolicyType = "SimpleSchedulePolicyV2" + } + else { + $policyObject.SchedulePolicy.ScheduleRunTime[0] = $convertedDateTime + } + + $policyObject.RetentionPolicy.DailySchedule.RetentionTime[0] = $convertedDateTime + + $policyObject.SchedulePolicy.ScheduleRunFrequency = "Daily" + + $policyObject.TimeZone = $TimeZone + } + + "Weekly" { + + if ($PolicySubType -eq "Enhanced") { + $policyObject.SchedulePolicy.WeeklyScheduleRunDay = $ScheduleRunDay + $policyObject.SchedulePolicy.WeeklyScheduleRunTime = @() + $policyObject.SchedulePolicy.WeeklyScheduleRunTime += $convertedDateTime + + $policyObject.SchedulePolicy.Type = "SimpleSchedulePolicyV2" + $policyObject.SchedulePolicyType = "SimpleSchedulePolicyV2" + } + else { + $policyObject.SchedulePolicy.ScheduleRunDay = $ScheduleRunDay + $policyObject.SchedulePolicy.ScheduleRunTime[0] = $convertedDateTime + } + + $policyObject.SchedulePolicy.ScheduleRunFrequency = "Weekly" + + $policyObject.RetentionPolicy.WeeklySchedule.DaysOfTheWeek = $ScheduleRunDay + $policyObject.RetentionPolicy.WeeklySchedule.RetentionTime[0] = $convertedDateTime + + $policyObject.TimeZone = $TimeZone + + $policyObject.InstantRpRetentionRangeInDay = 5 + } + + "Hourly" { + Write-Debug "In Hourly" + + $policyJson = $policyObject | ConvertTo-Json -Depth 10 + Write-Debug $policyJson + + $policyObject.SchedulePolicy.ScheduleRunFrequency = "Hourly" + $policyObject.SchedulePolicy.HourlySchedule.Interval = $HourlyInterval + $policyObject.SchedulePolicy.HourlySchedule.ScheduleWindowDuration = $HourlyScheduleWindowDuration + + $policyObject.SchedulePolicy.HourlySchedule.ScheduleWindowStartTime = $convertedDateTime + $policyObject.RetentionPolicy.DailySchedule.RetentionTime[0] = $convertedDateTime + + $policyObject.TimeZone = $TimeZone + + $policyObject.SchedulePolicy.Type = "SimpleSchedulePolicyV2" + $policyObject.SchedulePolicyType = "SimpleSchedulePolicyV2" + + $policyJson = $policyObject | ConvertTo-Json -Depth 10 + Write-Debug $policyJson + } + } + } + + $policyJson = $policyObject | ConvertTo-Json -Depth 10 + Write-Debug $policyJson + + # Return the modified $policyObject + $policyObject + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.ps1 new file mode 100644 index 000000000000..4099d4e69765 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.ps1 @@ -0,0 +1,1051 @@ + + +function Edit-AzrecoveryServicesBackupRetentionPolicyClientObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicy')] + [CmdletBinding(PositionalBinding=$false)] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Description('Edits the retention settings for the policy client object')] + + param( + [Parameter(ParameterSetName="ModifyRetentionPolicy",Mandatory=$true, HelpMessage='Specifies the policy to be edited.')] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicy] + ${Policy}, + + [Parameter(ParameterSetName="ModifyRetentionPolicy",Mandatory=$true, HelpMessage='Datasource Type')] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.DatasourceTypes] + ${DatasourceType}, + + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Switch parameter to modify FullBackup retention policy. You can use this parameter for DataSourceType: MSSQL, SAPHANA')] + [switch] + ${ModifyFullBackup}, + + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Switch parameter to modify differential backup retention policy. You can use this parameter for DataSourceType: MSSQL, SAPHANA')] + [switch] + ${ModifyDifferentialBackup}, + + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Switch parameter to modify incremental backup retention policy. You can use this parameter for DataSourceType: MSSQL, SAPHANA')] + [switch] + ${ModifyIncrementalBackup}, + + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Switch parameter to modify log backup retention policy. You can use this parameter for DataSourceType: MSSQL, SAPHANA')] + [switch] + ${ModifyLogBackup}, + + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Boolean parameter to Enable/Disable Daily retention')] + [Nullable[Boolean]] + ${EnableDailyRetention}, + + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage ='Boolean parameter to Enable/Disable Weekly retention')] + [Nullable[Boolean]] + ${EnableWeeklyRetention}, + + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage ='Boolean parameter to Enable/Disable Monthly retention')] + [Nullable[Boolean]] + ${EnableMonthlyRetention}, + + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage ='Boolean parameter to Enable/Disable Yearly retention')] + [Nullable[Boolean]] + ${EnableYearlyRetention}, + + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Specifies the daily schedule duration in days.')] + [ValidateRange(7, 9999)] + [Nullable[int]] + ${DailyRetentionDurationInDays}, + + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Specifies the weekly schedule duration in weeks.')] + [ValidateRange(1, 5163)] + [Nullable[int]] + ${WeeklyRetentionDurationInWeeks}, + + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Specifies the days of the week for the weekly schedule.')] + [string[]] + ${WeeklyRetentionDaysOfTheWeek}, + + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Specifies the retention schedule type for the monthly schedule: Week Based/Day Based')] + [ValidateSet("Daily", "Weekly", ErrorMessage = "Invalid value for Monthly Retention ScheduleType. Please provide a valid value. Valid values are 'Daily', 'Weekly'.")] + [string] + ${MonthlyRetentionScheduleType}, + + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Specifies the retention schedule type for the yearly schedule.')] + [ValidateSet("Daily", "Weekly", ErrorMessage = "Invalid value for Yearly Retention ScheduleType. Please provide a valid value. Valid values are 'Daily', 'Weekly'.")] + [string] + ${YearlyRetentionScheduleType}, + + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Specifies the monthly schedule duration in months.')] + [ValidateRange(1, 1188)] + [Nullable[int]] + ${MonthlyRetentionDurationInMonths}, + + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Specifies the days of the month for the monthly schedule.')] + [ValidateRange(1, 28)] + [int[]] + ${MonthlyRetentionDaysOfTheMonth}, + + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Boolean parameter to enable the day based monthly retention on last day of the month.')] + [Nullable[bool]] + ${MonthlyRetentionIsLastDayIncluded}, + + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Specifies the days of the week for the monthly schedule.')] + [string[]] + ${MonthlyRetentionDaysOfTheWeek}, + + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Specifies the weeks of the month for the monthly schedule.')] + [string[]] + ${MonthlyRetentionWeeksOfTheMonth}, + + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Specifies the yearly schedule duration in years.')] + [ValidateRange(1, 99)] + [Nullable[int]] + ${YearlyRetentionDurationInYears}, + + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Specifies the months of the year for the yearly schedule.')] + [string[]] + ${YearlyRetentionMonthsOfTheYear}, + + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Specifies the days of the week for the yearly schedule.')] + [string[]] + ${YearlyRetentionDaysOfTheWeek}, + + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Specifies the days of the month for the monthly schedule.')] + [ValidateRange(1, 28)] + [int[]] + ${YearlyRetentionDaysOfTheMonth}, + + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Boolean parameter to enable the day based yearly retention on last day of the month.')] + [Nullable[bool]] + ${YearlyRetentionIsLastDayIncluded}, + + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Specifies the weeks of the month for the monthly schedule.')] + [string[]] + ${YearlyRetentionWeeksOfTheMonth}, + + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Specifies the retention period for Differential Backup')] + [ValidateRange(7, 180)] + [Nullable[int]] + ${DifferentialRetentionPeriodInDays}, + + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Specifies the retention period for Incremental Backup')] + [ValidateRange(7, 180)] + [Nullable[int]] + ${IncrementalRetentionPeriodInDays}, + + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Specifies the retention period for Log Backup')] + [ValidateRange(7, 35)] + [Nullable[int]] + ${LogRetentionPeriodInDays} + ) + + process + { + $manifest = LoadManifest -DatasourceType $DatasourceType.ToString() + + #Validation part begins + + $parametersToTest = @{} + $commandParameters = (Get-Command Edit-AzrecoveryServicesBackupRetentionPolicyClientObject).Parameters + # Retrieve the parameter names and their default values + foreach ($parameter in $commandParameters.Values) { + $parameterName = $parameter.Name + $defaultValue = $parameter.DefaultValue + # Skip parameters with default value of null or empty string + if ($defaultValue -ne $null -and $defaultValue -ne '') { + $parametersToTest[$parameterName] = $defaultValue + } + } + ValidateRetentionParameters -Policy $Policy -DatasourceType $DatasourceType -parametersToTest $parametersToTest + ValidateDaysOfTheWeek -DatasourceType $DatasourceType -WeeklyRetentionDaysOfTheWeek $WeeklyRetentionDaysOfTheWeek -MonthlyRetentionDaysOfTheWeek $MonthlyRetentionDaysOfTheWeek -YearlyRetentionDaysOfTheWeek $YearlyRetentionDaysOfTheWeek + ValidateMonthsOfTheYear -DatasourceType $DatasourceType -YearlyRetentionMonthsOfTheYear $YearlyRetentionMonthsOfTheYear + ValidateWeeksOfTheMonth -DatasourceType $DatasourceType -MonthlyRetentionWeeksOfTheMonth $MonthlyRetentionWeeksOfTheMonth -YearlyRetentionWeeksOfTheMonth $YearlyRetentionWeeksOfTheMonth + + # main code begins + $policyObject = $Policy + if(-not($ModifyFullBackup)) + { + if($policyObject.SchedulePolicy.ScheduleRunFrequency -eq "Weekly" -and ($policyObject.RetentionPolicy.DailySchedule.RetentionDuration.Count -ne $null) -and ($policyObject.RetentionPolicy.DailySchedule.RetentionDuration.Count -ne 0)) + { + $policyObject.RetentionPolicy.DailySchedule = $null + Write-Warning "Daily Retention is disabled when Schedule run frequency is weekly" + } + elseif ($EnableDailyRetention -eq $false) + { + if($policyObject.SchedulePolicy.ScheduleRunFrequency -eq "Daily") + { + $errormsg = "Daily retention can't be disabled when backup schedule frequency is Daily" + throw $errormsg + } + else + { + $policyObject.RetentionPolicy.DailySchedule = $null + } + } + elseif ($EnableDailyRetention -eq $true) + { + if($policyObject.SchedulePolicy.ScheduleRunFrequency -eq "Weekly") + { + $policyObject.RetentionPolicy.DailySchedule = $null + $errormsg="Daily retention can't be enabled with weekly backup schedule." + throw $errormsg + } + if (($policyObject.RetentionPolicy.DailySchedule.RetentionDuration.Count -ne $null) -and ($policyObject.RetentionPolicy.DailySchedule.RetentionDuration.Count -ne 0)) + { + # DailySchedule exists, check retentionDuration + if ( $DailyRetentionDurationInDays -ne $null ) + { + $policyObject.RetentionPolicy.DailySchedule.RetentionDuration.Count = $DailyRetentionDurationInDays + } + } + else + { + # DailySchedule doesn't exist, create a new one + $policyObject.RetentionPolicy.DailySchedule = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionSchedule]::new() + $policyObject.RetentionPolicy.DailySchedule.retentionDuration = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration]::new() + $policyObject.RetentionPolicy.DailySchedule.RetentionDuration.Count = $DailyRetentionDurationInDays + $policyObject.RetentionPolicy.dailySchedule.retentionDuration.durationType = "Days" + } + } + if(($policyObject.RetentionPolicy.DailySchedule.RetentionDuration.Count -ne $null) -and ($policyObject.RetentionPolicy.DailySchedule.RetentionDuration.Count -ne 0)) + { + if($policyObject.SchedulePolicy.ScheduleRunFrequency -eq "Hourly") + { + $policyObject.RetentionPolicy.DailySchedule.RetentionTime=$policyObject.SchedulePolicy.HourlySchedule.ScheduleWindowStartTime + } + else + { + $policyObject.RetentionPolicy.DailySchedule.RetentionTime=$policyObject.SchedulePolicy.ScheduleRunTime + } + } + + + if($EnableWeeklyRetention -eq $false) + { + if($policyObject.SchedulePolicy.ScheduleRunFrequency -eq "Weekly") + { + $errormsg = "Weekly retention can't be disabled." + throw $errormsg + } + else + { + $policyObject.RetentionPolicy.WeeklySchedule=$null + } + } + elseif ($EnableWeeklyRetention -eq $true ) + { + # Set weekly retention properties + if (($policyObject.RetentionPolicy.WeeklySchedule.RetentionDuration.Count -ne $null) -and ($policyObject.RetentionPolicy.WeeklySchedule.RetentionDuration.Count -ne 0)) + { + if ($WeeklyRetentionDaysOfTheWeek -ne $null) + { + if($policyObject.SchedulePolicy.ScheduleRunFrequency -eq "Daily") + { + $policyObject.RetentionPolicy.WeeklySchedule.DaysOfTheWeek=$WeeklyRetentionDaysOfTheWeek + } + elseif($policyObject.SchedulePolicy.ScheduleRunFrequency -eq "Weekly") + { + $policyObject.RetentionPolicy.WeeklySchedule.DaysOfTheWeek=$policyObject.SchedulePolicy.ScheduleRunDay + Write-Host "Weekly retention days of the week can be modified only if schedule run days are modified for weekly schedule frequency" + } + } + if($WeeklyRetentionDurationInWeeks -ne $null) + { + $policyObject.RetentionPolicy.WeeklySchedule.RetentionDuration[0].Count = $WeeklyRetentionDurationInWeeks + } + } + else + { + $policyObject.RetentionPolicy.WeeklySchedule = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionSchedule]::new() + $policyObject.RetentionPolicy.WeeklySchedule.RetentionDuration = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration]::new() + $policyObject.RetentionPolicy.WeeklySchedule.RetentionDuration[0].Count = $WeeklyRetentionDurationInWeeks + $policyObject.RetentionPolicy.WeeklySchedule.RetentionDuration[0].DurationType = "Weeks" + if($policyObject.SchedulePolicy.ScheduleRunFrequency -eq "Daily") + { + $policyObject.RetentionPolicy.WeeklySchedule.DaysOfTheWeek =$WeeklyRetentionDaysOfTheWeek + } + elseif($policyObject.SchedulePolicy.ScheduleRunFrequency -eq "Weekly") + { + $policyObject.RetentionPolicy.WeeklySchedule.DaysOfTheWeek=$policyObject.SchedulePolicy.ScheduleRunDay + } + } + } + if (($policyObject.RetentionPolicy.WeeklySchedule.RetentionDuration.Count -ne $null) -and ($policyObject.RetentionPolicy.WeeklySchedule.RetentionDuration.Count -ne 0)) + { + if($policyObject.SchedulePolicy.ScheduleRunFrequency -eq "Hourly") + { + $policyObject.RetentionPolicy.WeeklySchedule.RetentionTime=$policyObject.SchedulePolicy.HourlySchedule.ScheduleWindowStartTime + } + else + { + $policyObject.RetentionPolicy.WeeklySchedule.RetentionTime=$policyObject.SchedulePolicy.ScheduleRunTime + } + } + + + if($EnableMonthlyRetention -eq $false ) + { + $policyObject.RetentionPolicy.MonthlySchedule = $null + } + elseif ($EnableMonthlyRetention -eq $true ) + { + if($MonthlyRetentionScheduleType -ne $null) + { + $policyObject.RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType=$MonthlyRetentionScheduleType + } + if($policyObject.RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType -eq "Daily" -and $policyObject.SchedulePolicy.ScheduleRunFrequency -eq "Weekly") + { + $errormsg1 = "Day Based monthly Retention can only be set with Daily Backup Schedule Frequency" + throw $errormsg1 + } + # Set monthly retention properties + if (($policyObject.RetentionPolicy.MonthlySchedule.RetentionDuration[0].Count -ne $null) -and ($policyObject.RetentionPolicy.MonthlySchedule.RetentionDuration[0].Count -ne 0)) + { + if($MonthlyRetentionDurationInMonths -ne $null) + { + $policyObject.RetentionPolicy.MonthlySchedule.RetentionDuration[0].Count = $MonthlyRetentionDurationInMonths + } + if($policyObject.RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType -eq "Weekly") + { + if ($MonthlyRetentionDaysOfTheWeek -ne $null) + { + if($policyObject.SchedulePolicy.ScheduleRunFrequency -eq "Daily") + { + $policyObject.RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly[0].DaysOfTheWeek=$MonthlyRetentionDaysOfTheWeek + } + elseif($policyObject.SchedulePolicy.ScheduleRunFrequency -eq "Weekly") + { + $validDaysOfWeek = $policyObject.SchedulePolicy.ScheduleRunDay + $selectedDays = $MonthlyRetentionDaysOfTheWeek | Where-Object { $validDaysOfWeek -contains $_ } + if ($selectedDays.Count -ne $MonthlyRetentionDaysOfTheWeek.Count) + { + throw "Only schedule run days are valid for weekly schedule." + } + else + { + $policyObject.RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly[0].DaysOfTheWeek = $selectedDays + } + } + } + if($MonthlyRetentionWeeksOfTheMonth -ne $null) + { + $policyObject.RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly[0].WeeksOfTheMonth=$MonthlyRetentionWeeksOfTheMonth + } + } + elseif($policyObject.RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType -eq "Daily") + { + if($MonthlyRetentionDaysOfTheMonth -ne $null) + { + $policyObject.RetentionPolicy.MonthlySchedule.RetentionScheduleDaily = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat]::new() + $policyObject.RetentionPolicy.MonthlySchedule.RetentionScheduleDaily.DaysOfTheMonth += foreach ($day in $MonthlyRetentionDaysOfTheMonth) { + $existingDay = $policyObject.RetentionPolicy.MonthlySchedule.RetentionScheduleDaily.DaysOfTheMonth | Where-Object { $_.Date -eq $day } + if ($existingDay -eq $null) { + $dayObject = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.Day]::new() + $dayObject.Date = $day + $dayObject + } + } + } + if($MonthlyRetentionIsLastDayIncluded -eq $true) + { + $dayObject = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.Day]::new() + $dayObject.Date = 0 + $dayObject.IsLast = $true + $policyObject.RetentionPolicy.MonthlySchedule.RetentionScheduleDaily.DaysOfTheMonth +=$dayObject + } + } + } + elseif($MonthlyRetentionScheduleType -eq "Daily") # monthly retention is null and retention schedule type is daily + { + $policyObject.RetentionPolicy.MonthlySchedule = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.MonthlyRetentionSchedule]::new() + $policyObject.RetentionPolicy.MonthlySchedule.RetentionDuration = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration]::new() + $policyObject.RetentionPolicy.MonthlySchedule.RetentionDuration.Count = $MonthlyRetentionDurationInMonths + $policyObject.RetentionPolicy.MonthlySchedule.RetentionDuration.DurationType = "Months" + $policyObject.RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType=$MonthlyRetentionScheduleType + $policyObject.RetentionPolicy.MonthlySchedule.RetentionScheduleDaily = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat]::new() + $policyObject.RetentionPolicy.MonthlySchedule.RetentionScheduleDaily.DaysOfTheMonth += foreach ($day in $MonthlyRetentionDaysOfTheMonth) { + $existingDay = $policyObject.RetentionPolicy.MonthlySchedule.RetentionScheduleDaily.DaysOfTheMonth | Where-Object { $_.Date -eq $day } + if ($existingDay -eq $null) { + $dayObject = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.Day]::new() + $dayObject.Date = $day + $dayObject + } + } + if($MonthlyRetentionIsLastDayIncluded -eq $true) + { + $dayObject = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.Day]::new() + $dayObject.Date = 0 + $dayObject.IsLast = $true + $policyObject.RetentionPolicy.MonthlySchedule.RetentionScheduleDaily.DaysOfTheMonth +=$dayObject + } + } + elseif($MonthlyRetentionScheduleType -eq "Weekly") # monthly retention is null and retention schedule type is weekly + { + $policyObject.RetentionPolicy.MonthlySchedule = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.MonthlyRetentionSchedule]::new() + $policyObject.RetentionPolicy.MonthlySchedule.RetentionDuration = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration]::new() + $policyObject.RetentionPolicy.MonthlySchedule.RetentionDuration.Count = $MonthlyRetentionDurationInMonths + $policyObject.RetentionPolicy.MonthlySchedule.RetentionDuration.DurationType = "Months" + #$policyObject.RetentionPolicy.MonthlySchedule.RetentionTime=$policyObject.SchedulePolicy.ScheduleRunTime + $policyObject.RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat]::new() + $validDaysOfWeek = $policyObject.SchedulePolicy.ScheduleRunDay + $selectedDays = $MonthlyRetentionDaysOfTheWeek | Where-Object { $validDaysOfWeek -contains $_ } + if ($selectedDays.Count -eq 0) + { + throw "Only schedule run days are valid for weekly schedule." + } + else + { + $policyObject.RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly[0].DaysOfTheWeek = $selectedDays + } + $policyObject.RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly[0].WeeksOfTheMonth = $MonthlyRetentionWeeksOfTheMonth + } + } + if (($policyObject.RetentionPolicy.MonthlySchedule.RetentionDuration.Count -ne $null) -and ($policyObject.RetentionPolicy.MonthlySchedule.RetentionDuration.Count -ne 0)) + { + if($policyObject.SchedulePolicy.ScheduleRunFrequency -eq "Hourly") + { + $policyObject.RetentionPolicy.MonthlySchedule.RetentionTime=$policyObject.SchedulePolicy.HourlySchedule.ScheduleWindowStartTime + } + else + { + $policyObject.RetentionPolicy.MonthlySchedule.RetentionTime=$policyObject.SchedulePolicy.ScheduleRunTime + } + } + + + if($EnableYearlyRetention -eq $false) + { + $policyObject.RetentionPolicy.YearlySchedule = $null + } + elseif ($EnableYearlyRetention -eq $true ) + { + if($YearlyRetentionScheduleType -ne $null) + { + $policyObject.RetentionPolicy.YearlySchedule.RetentionScheduleFormatType=$YearlyRetentionScheduleType + } + if(($policyObject.RetentionPolicy.YearlySchedule.RetentionScheduleFormatType -eq "Daily") -and ($policyObject.SchedulePolicy.ScheduleRunFrequency -eq "Weekly")) + { + $errormsg1 = "Day Based Yearly Retention can only be set with Daily Backup Schedule Frequency" + throw $errormsg1 + } + # Set yearly retention properties + if (($policyObject.RetentionPolicy.YearlySchedule.RetentionDuration.Count -ne $null) -and ($policyObject.RetentionPolicy.YearlySchedule.RetentionDuration.Count -ne 0)) + { + if($YearlyRetentionDurationInYears -ne $null) + { + $policyObject.RetentionPolicy.YearlySchedule.RetentionDuration.Count = $YearlyRetentionDurationInYears + } + if($YearlyRetentionMonthsOfTheYear -ne $null) + { + $policyObject.RetentionPolicy.YearlySchedule.MonthsOfYear=$YearlyRetentionMonthsOfTheYear + } + if($policyObject.RetentionPolicy.YearlySchedule.RetentionScheduleFormatType -eq "Daily") + { + $policyObject.RetentionPolicy.YearlySchedule.RetentionScheduleDaily = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat]::new() + if($YearlyRetentionDaysOfTheMonth -ne $null) + { + $policyObject.RetentionPolicy.YearlySchedule.RetentionScheduleDaily.DaysOfTheMonth += foreach ($day in $YearlyRetentionDaysOfTheMonth) { + $existingDay = $policyObject.RetentionPolicy.YearlySchedule.RetentionScheduleDaily.DaysOfTheMonth | Where-Object { $_.Date -eq $day } + if ($existingDay -eq $null) { + $dayObject = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.Day]::new() + $dayObject.Date = $day + $dayObject + } + } + } + if($YearlyRetentionIsLastDayIncluded -eq $true) + { + $dayObject = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.Day]::new() + $dayObject.Date = 0 + $dayObject.IsLast = $true + $policyObject.RetentionPolicy.YearlySchedule.RetentionScheduleDaily.DaysOfTheMonth +=$dayObject + } + } + elseif($policyObject.RetentionPolicy.YearlySchedule.RetentionScheduleFormatType -eq "Weekly") + { + if($YearlyRetentionDaysOfTheWeek -ne $null) + { + if($policyObject.SchedulePolicy.ScheduleRunFrequency -eq "Daily") + { + $policyObject.RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.DaysOfTheWeek =$YearlyRetentionDaysOfTheWeek + } + elseif($policyObject.SchedulePolicy.ScheduleRunFrequency -eq "Weekly") + { + $validDaysOfWeek = $policyObject.SchedulePolicy.ScheduleRunDay + $selectedDays = $YearlyRetentionDaysOfTheWeek | Where-Object { $validDaysOfWeek -contains $_ } + if ($selectedDays.Count -ne $YearlyRetentionDaysOfTheWeek.Count) + { + $errormsg="Only schedule run days are valid for weekly schedule." + throw $errormsg + } + else + { + $policyObject.RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.DaysOfTheWeek = $selectedDays + } + } + } + if($YearlyRetentionWeeksOfTheMonth -ne $null) + { + $policyObject.RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.WeeksOfTheMonth =$YearlyRetentionWeeksOfTheMonth + } + } + } + else # yearly retention is null + { + $policyObject.RetentionPolicy.YearlySchedule = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.YearlyRetentionSchedule]::new() + $policyObject.RetentionPolicy.YearlySchedule.RetentionDuration = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration]::new() + $policyObject.RetentionPolicy.YearlySchedule.RetentionDuration.Count = $YearlyRetentionDurationInYears + $policyObject.RetentionPolicy.YearlySchedule.RetentionScheduleFormatType=$YearlyRetentionScheduleType + $policyObject.RetentionPolicy.YearlySchedule.RetentionDuration.DurationType = "Years" + + $policyObject.RetentionPolicy.YearlySchedule.MonthsOfYear+=foreach ($monthOfYear in $YearlyRetentionMonthsOfTheYear){[Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.MonthOfYear]::new()| + Add-Member -MemberType NoteProperty -Name "MonthOfYear" -Value $monthOfYear -PassThru} + $policyObject.RetentionPolicy.YearlySchedule.MonthsOfYear =$YearlyRetentionMonthsOfTheYear + + if($YearlyRetentionScheduleType -eq "Daily") # yearly retention is null and retention schedule type is daily + { + $policyObject.RetentionPolicy.YearlySchedule.RetentionScheduleDaily = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat]::new() + if($YearlyRetentionIsLastDayIncluded -eq $true) + { + $dayObject = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.Day]::new() + $dayObject.Date = 0 + $dayObject.IsLast = $true + $policyObject.RetentionPolicy.YearlySchedule.RetentionScheduleDaily.DaysOfTheMonth =$dayObject + } + $policyObject.RetentionPolicy.YearlySchedule.RetentionScheduleDaily.DaysOfTheMonth += foreach ($day in $YearlyRetentionDaysOfTheMonth) { + $existingDay = $policyObject.RetentionPolicy.YearlySchedule.RetentionScheduleDaily.DaysOfTheMonth | Where-Object { $_.Date -eq $day } + if ($existingDay -eq $null) { + $dayObject = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.Day]::new() + $dayObject.Date = $day + $dayObject + } + } + + } + elseif($YearlyRetentionScheduleType -eq "Weekly") # yearly retention is null and retention schedule type is Weekly + { + $policyObject.RetentionPolicy.YearlySchedule.RetentionScheduleWeekly = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat]::new() + if($policyObject.SchedulePolicy.ScheduleRunFrequency -eq "Daily") + { + $policyObject.RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.DaysOfTheWeek = foreach ($DayOfWeek in $YearlyRetentionDaysOfTheWeek){[Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.DayOfWeek]::new()| + Add-Member -MemberType NoteProperty -Name "DayOfWeek" -Value $DayOfWeek -PassThru} + $policyObject.RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.DaysOfTheWeek =$YearlyRetentionDaysOfTheWeek + } + elseif($policyObject.SchedulePolicy.ScheduleRunFrequency -eq "Weekly") + { + $validDaysOfWeek = $policyObject.SchedulePolicy.ScheduleRunDay + $selectedDays = $YearlyRetentionDaysOfTheWeek | Where-Object { $validDaysOfWeek -contains $_ } + if ($selectedDays.Count -ne $YearlyRetentionDaysOfTheWeek.Count) + { + throw "Only schedule run days are valid for weekly schedule." + } + else + { + $policyObject.RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.DaysOfTheWeek = $selectedDays + } + } + + $policyObject.RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.WeeksOfTheMonth = foreach ($WeekOfMonth in $YearlyRetentionWeeksOfTheMonth){[Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.WeekOfMonth]::new()| + Add-Member -MemberType NoteProperty -Name "WeekOfMonth" -Value $WeekOfMonth -PassThru} + $policyObject.RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.WeeksOfTheMonth =$YearlyRetentionWeeksOfTheMonth + } + } + } + if (($policyObject.RetentionPolicy.YearlySchedule.RetentionDuration.Count -ne $null) -and ($policyObject.RetentionPolicy.YearlySchedule.RetentionDuration.Count -ne 0)) + { + if($policyObject.SchedulePolicy.ScheduleRunFrequency -eq "Hourly") + { + $policyObject.RetentionPolicy.YearlySchedule.RetentionTime=$policyObject.SchedulePolicy.HourlySchedule.ScheduleWindowStartTime + } + else + { + $policyObject.RetentionPolicy.YearlySchedule.RetentionTime=$policyObject.SchedulePolicy.ScheduleRunTime + } + } + + } + + if($ModifyDifferentialBackup) + { + $FullBackupPolicy = $policyObject.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Full" } + $Index1 = $policyObject.SubProtectionPolicy.IndexOf($FullBackupPolicy) + + if($ModifyIncrementalBackup) + { + $errormsg= "Incremental backup is not allowed when Differential backup is enabled" + throw $errormsg + } + if($policyObject.SubProtectionPolicy[$Index1].SchedulePolicy.ScheduleRunFrequency -eq "Daily") + { + $errormsg="Differential backup is not allowed for daily full backups." + throw $errormsg + } + else + { + $policyObject.SubProtectionPolicy[$Index1].RetentionPolicy.DailySchedule=$null + $DifferentialPolicy = $policyObject.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Differential" } + if (-not $DifferentialPolicy ) + { + $errormsg= "Differential policy dosen't exist. Please use the Edit-AzRecoveryServicesBackupSchedulePolicyClientObject command to initiate Differential backup." + } + else + { + $Index = $policyObject.SubProtectionPolicy.IndexOf($DifferentialPolicy) + if(($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.RetentionDurationCount -eq $null) -or ($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.RetentionDurationCount -eq 0)) + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.SimpleRetentionPolicy]::new() + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.Type = "SimpleRetentionPolicy" + $policyObject.SubProtectionPolicy[$Index].RetentionPolicyType = "SimpleRetentionPolicy" + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.RetentionDurationType = "Days" + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.RetentionDurationCount = $DifferentialRetentionPeriodInDays + } + elseif(($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.RetentionDurationCount -ne $null -or $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.RetentionDurationCount -ne 0) -and ($DifferentialRetentionPeriodInDays -ne $null) ) + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.RetentionDurationCount = $DifferentialRetentionPeriodInDays + } + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.RetentionDurationType="Days" + } + } + #Write-Host "Retention period for differential backups: $($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.RetentionDurationCount)" + } + + if($ModifyIncrementalBackup) + { + $FullBackupPolicy = $policyObject.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Full" } + $Index1 = $policyObject.SubProtectionPolicy.IndexOf($FullBackupPolicy) + + if($ModifyDifferentialBackup) + { + $errormsg2= "Differential backup is not allowed when Incremental backup is enabled" + throw $errormsg2 + } + if($policyObject.SubProtectionPolicy[$Index1].SchedulePolicy.ScheduleRunFrequency -eq "Daily") + { + $errormsg="Incremental backup is not allowed for daily full backups." + throw $errormsg + } + else + { + $policyObject.SubProtectionPolicy[$Index1].RetentionPolicy.DailySchedule=$null + $IncrementalPolicy = $policyObject.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Incremental" } + if (-not $IncrementalPolicy) + { + $errormsg= "Incremental policy dosen't exist. Please use the Edit-AzRecoveryServicesBackupSchedulePolicyClientObject command to initiate Incremental backup." + } + else + { + $Index = $policyObject.SubProtectionPolicy.IndexOf($IncrementalPolicy) + if(($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.RetentionDurationCount -eq $null) -or ($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.RetentionDurationCount -eq 0)) + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.SimpleRetentionPolicy]::new() + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.Type = "SimpleRetentionPolicy" + $policyObject.SubProtectionPolicy[$Index].RetentionPolicyType = "SimpleRetentionPolicy" + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.RetentionDurationType = "Days" + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.RetentionDurationCount = $IncrementalRetentionPeriodInDays + } + elseif(($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.RetentionDurationCount -ne $null -or $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.RetentionDurationCount -ne 0) -and ($IncrementalRetentionPeriodInDays -ne $null) ) + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.RetentionDurationCount = $IncrementalRetentionPeriodInDays + } + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.RetentionDurationType="Days" + } + } + #Write-Host "Retention period for incremental backups: $($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.RetentionDurationCount)" + } + + if($ModifyLogBackup) + { + $LogBackupPolicy = $policyObject.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Log" } + $Index = $policyObject.SubProtectionPolicy.IndexOf($LogBackupPolicy) + if ($policyObject.SubProtectionPolicy[$index] -ne $null ) + { + if($LogRetentionPeriodInDays -ne $null) + { + $policyObject.SubProtectionPolicy[$index].RetentionPolicy.RetentionDurationCount = $LogRetentionPeriodInDays + } + $policyObject.SubProtectionPolicy[$index].RetentionPolicy.RetentionDurationType="Days" + # Write-Host "Retention period for log backups: $($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.RetentionDurationCount)" + } + } + + if($ModifyFullBackup) + { + $FullBackupPolicy = $policyObject.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Full" } + $Index = $policyObject.SubProtectionPolicy.IndexOf($FullBackupPolicy) + if($policyObject.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunFrequency -eq "Weekly" -and ($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.DailySchedule.RetentionDuration.Count -ne $null) -and ($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.DailySchedule.RetentionDuration.Count -ne 0)) + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.DailySchedule = $null + Write-Warning "Daily Retention has been disabled since Schedule run frequency is weekly" + } + elseif ($EnableDailyRetention -eq $false) + { + if($policyObject.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunFrequency -eq "Daily") + { + $errormsg = "Daily retention can't be disabled when backup schedule frequency is Daily." + throw $errormsg + } + else + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.DailySchedule = $null + } + } + elseif ($EnableDailyRetention -eq $true) + { + if($policyObject.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunFrequency -eq "Weekly") + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.DailySchedule = $null + $errormsg="Daily retention can't be enabled with weekly backup schedule." + throw $errormsg + } + if (($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.DailySchedule.RetentionDuration.Count -ne $null) -and ($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.DailySchedule.RetentionDuration.Count -ne 0)) + { + # DailySchedule exists, check retentionDuration + if ( $DailyRetentionDurationInDays -ne $null ) + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.DailySchedule.RetentionDuration.Count = $DailyRetentionDurationInDays + } + } + else + { + # DailySchedule doesn't exist, create a new one + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.DailySchedule = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionSchedule]::new() + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.DailySchedule.retentionDuration = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration]::new() + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.DailySchedule.RetentionDuration.Count = $DailyRetentionDurationInDays + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.dailySchedule.retentionDuration.durationType = "Days" + } + } + if (($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.DailySchedule.RetentionDuration.Count -ne $null) -and ($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.DailySchedule.RetentionDuration.Count -ne 0)) + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.DailySchedule.RetentionTime=$policyObject.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunTime + } + + + + if($EnableWeeklyRetention -eq $false) + { + if($policyObject.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunFrequency -eq "Weekly") + { + $errormsg = "Weekly retention can't be disabled." + throw $errormsg + } + else + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.WeeklySchedule=$null + } + } + elseif ($EnableWeeklyRetention -eq $true ) + { + # Set weekly retention properties + + if (($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.WeeklySchedule.RetentionDuration.Count -ne $null) -and ($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.WeeklySchedule.RetentionDuration.Count -ne 0)) + { + if ($WeeklyRetentionDaysOfTheWeek -ne $null) + { + if($policyObject.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunFrequency -eq "Daily") + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.WeeklySchedule.DaysOfTheWeek = $WeeklyRetentionDaysOfTheWeek + } + elseif($policyObject.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunFrequency -eq "Weekly") + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.WeeklySchedule.DaysOfTheWeek=$policyObject.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunDay + Write-Host "Weekly retention days of the week can be modified only if schedule run days are modified for weekly schedule frequency" + } + } + if($WeeklyRetentionDurationInWeeks -ne $null) + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.WeeklySchedule.RetentionDuration[0].Count = $WeeklyRetentionDurationInWeeks + } + } + else + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.WeeklySchedule = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionSchedule]::new() + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.WeeklySchedule.RetentionDuration = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration]::new() + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.WeeklySchedule.RetentionDuration[0].Count = $WeeklyRetentionDurationInWeeks + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.WeeklySchedule.RetentionDuration[0].DurationType = "Weeks" + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.WeeklySchedule.RetentionTime=$policyObject.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunTime + if($policyObject.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunFrequency -eq "Weekly") + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.WeeklySchedule.DaysOfTheWeek=$policyObject.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunDay + } + elseif($policyObject.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunFrequency -eq "Daily") + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.WeeklySchedule.DaysOfTheWeek =$WeeklyRetentionDaysOfTheWeek + } + } + } + if (($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.WeeklySchedule.RetentionDuration.Count -ne $null) -and ($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.WeeklySchedule.RetentionDuration.Count -ne 0)) + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.WeeklySchedule.RetentionTime=$policyObject.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunTime + } + + + if($EnableMonthlyRetention -eq $false ) + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule = $null + } + elseif ($EnableMonthlyRetention -eq $true ) + { + if($MonthlyRetentionScheduleType -ne $null) + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType=$MonthlyRetentionScheduleType + + } + if($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType -eq "Daily" -and $policyObject.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunFrequency -eq "Weekly") + { + $errormsg1 = "Day Based monthly Retention can only be set with Daily Backup Schedule Frequency" + throw $errormsg1 + } + # Set monthly retention properties + if (($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionDuration[0].Count -ne $null) -and ($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionDuration[0].Count -ne 0)) + { + if($MonthlyRetentionDurationInMonths -ne $null) + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionDuration[0].Count = $MonthlyRetentionDurationInMonths + } + if($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType -eq "Weekly") + { + if ($MonthlyRetentionDaysOfTheWeek -ne $null) + { + if($policyObject.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunFrequency -eq "Daily") + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly[0].DaysOfTheWeek=$MonthlyRetentionDaysOfTheWeek + } + elseif($policyObject.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunFrequency -eq "Weekly") + { + $validDaysOfWeek = $policyObject.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunDay + $selectedDays = $MonthlyRetentionDaysOfTheWeek | Where-Object { $validDaysOfWeek -contains $_ } + if ($selectedDays.Count -ne $MonthlyRetentionDaysOfTheWeek.Count) + { + throw "Only schedule run days are valid for weekly schedule." + } + else + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly[0].DaysOfTheWeek = $selectedDays + } + } + } + if($MonthlyRetentionWeeksOfTheMonth -ne $null) + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly[0].WeeksOfTheMonth=$MonthlyRetentionWeeksOfTheMonth + } + } + elseif($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType -eq "Daily") + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleDaily = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat]::new() + if($MonthlyRetentionDaysOfTheMonth -ne $null) + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleDaily.DaysOfTheMonth += foreach ($day in $MonthlyRetentionDaysOfTheMonth) { + $existingDay = $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleDaily.DaysOfTheMonth | Where-Object { $_.Date -eq $day } + if ($existingDay -eq $null) { + $dayObject = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.Day]::new() + $dayObject.Date = $day + $dayObject + } + } + } + if($MonthlyRetentionIsLastDayIncluded -eq $true) + { + $dayObject = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.Day]::new() + $dayObject.Date = 0 + $dayObject.IsLast = $true + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleDaily.DaysOfTheMonth +=$dayObject + } + } + } + elseif($MonthlyRetentionScheduleType -eq "Daily") # monthly retention is null and retention schedule type is daily + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.MonthlyRetentionSchedule]::new() + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionDuration = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration]::new() + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionDuration.Count = $MonthlyRetentionDurationInMonths + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionDuration.DurationType = "Months" + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType=$MonthlyRetentionScheduleType + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionTime=$policyObject.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunTime + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleDaily = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat]::new() + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleDaily.DaysOfTheMonth += foreach ($day in $MonthlyRetentionDaysOfTheMonth) { + $existingDay = $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleDaily.DaysOfTheMonth | Where-Object { $_.Date -eq $day } + if ($existingDay -eq $null) { + $dayObject = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.Day]::new() + $dayObject.Date = $day + $dayObject + } + } + if($MonthlyRetentionIsLastDayIncluded -eq $true) + { + $dayObject = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.Day]::new() + $dayObject.Date = 0 + $dayObject.IsLast = $true + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleDaily.DaysOfTheMonth +=$dayObject + } + } + elseif($MonthlyRetentionScheduleType -eq "Weekly") # monthly retention is null and retention schedule type is weekly + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.MonthlyRetentionSchedule]::new() + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionDuration = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration]::new() + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionDuration.Count = $MonthlyRetentionDurationInMonths + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionDuration.DurationType = "Months" + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat]::new() + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly[0].WeeksOfTheMonth = $MonthlyRetentionWeeksOfTheMonth + $validDaysOfWeek = $policyObject.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunDay + $selectedDays = $MonthlyRetentionDaysOfTheWeek | Where-Object { $validDaysOfWeek -contains $_ } + if ($selectedDays.Count -eq 0) + { + throw "Only schedule run days are valid for weekly schedule." + } + else + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly[0].DaysOfTheWeek = $selectedDays + } + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly[0].WeeksOfTheMonth = $MonthlyRetentionWeeksOfTheMonth + } + } + if (($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionDuration[0].Count -ne $null) -and ($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionDuration[0].Count -ne 0)) + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionTime=$policyObject.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunTime + } + + + if($EnableYearlyRetention -eq $false) + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule = $null + } + elseif ($EnableYearlyRetention -eq $true ) + { + if($YearlyRetentionScheduleType -ne $null) + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleFormatType=$YearlyRetentionScheduleType + + } + if($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleFormatType -eq "Daily" -and $policyObject.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunFrequency -eq "Weekly") + { + $errormsg1 = "Day Based yearly Retention can only be set with Daily Backup Schedule Frequency" + throw $errormsg1 + } + # Set yearly retention properties + if (( $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionDuration.Count -ne $null) -and ($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionDuration.Count -ne 0)) + { + if($YearlyRetentionDurationInYears -ne $null) + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionDuration.Count = $YearlyRetentionDurationInYears + } + if($YearlyRetentionMonthsOfTheYear -ne $null) + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.MonthsOfYear=$YearlyRetentionMonthsOfTheYear + } + if($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleFormatType -eq "Daily") + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleDaily = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat]::new() + if($YearlyRetentionDaysOfTheMonth -ne $null) + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleDaily.DaysOfTheMonth = foreach ($day in $YearlyRetentionDaysOfTheMonth) { + $existingDay = $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleDaily.DaysOfTheMonth | Where-Object { $_.Date -eq $day } + if ($existingDay -eq $null) { + $dayObject = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.Day]::new() + $dayObject.Date = $day + $dayObject + } + } + } + if($YearlyRetentionIsLastDayIncluded -eq $true) + { + $dayObject = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.Day]::new() + $dayObject.Date = 0 + $dayObject.IsLast = $true + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleDaily.DaysOfTheMonth +=$dayObject + } + } + elseif($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleFormatType -eq "Weekly") + { + if($YearlyRetentionDaysOfTheWeek -ne $null) + { + if($policyObject.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunFrequency -eq "Daily") + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.DaysOfTheWeek =$YearlyRetentionDaysOfTheWeek + } + elseif($policyObject.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunFrequency -eq "Weekly") + { + $validDaysOfWeek = $policyObject.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunDay + $selectedDays = $YearlyRetentionDaysOfTheWeek | Where-Object { $validDaysOfWeek -contains $_ } + if ($selectedDays.Count -ne $YearlyRetentionDaysOfTheWeek.Count) + { + throw "Only schedule run days are valid for weekly schedule." + } + else + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleWeekly[0].DaysOfTheWeek = $selectedDays + } + } + } + if($YearlyRetentionWeeksOfTheMonth -ne $null) + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.WeeksOfTheMonth =$YearlyRetentionWeeksOfTheMonth + } + } + } + else # yearly retention is null + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.YearlyRetentionSchedule]::new() + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionDuration = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration]::new() + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionDuration.Count = $YearlyRetentionDurationInYears + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleFormatType=$YearlyRetentionScheduleType + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionDuration.DurationType = "Years" + + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.MonthsOfYear=foreach ($monthOfYear in $YearlyRetentionMonthsOfTheYear){[Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.MonthOfYear]::new()| + Add-Member -MemberType NoteProperty -Name "MonthOfYear" -Value $monthOfYear -PassThru} + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.MonthsOfYear =$YearlyRetentionMonthsOfTheYear + + if($YearlyRetentionScheduleType -eq "Daily") # yearly retention is null and retention schedule type is daily + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleDaily = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat]::new() + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleDaily.DaysOfTheMonth = foreach ($day in $YearlyRetentionDaysOfTheMonth) { + $existingDay = $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleDaily.DaysOfTheMonth | Where-Object { $_.Date -eq $day } + if ($existingDay -eq $null) { + $dayObject = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.Day]::new() + $dayObject.Date = $day + $dayObject + } + } + if($YearlyRetentionIsLastDayIncluded -eq $true) + { + $dayObject = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.Day]::new() + $dayObject.Date = 0 + $dayObject.IsLast = $true + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleDaily.DaysOfTheMonth +=$dayObject + } + } + elseif($YearlyRetentionScheduleType -eq "Weekly") # yearly retention is null and retention schedule type is Weekly + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleWeekly = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat]::new() + + if($policyObject.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunFrequency -eq "Daily") + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.DaysOfTheWeek = foreach ($DayOfWeek in $YearlyRetentionDaysOfTheWeek){[Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.DayOfWeek]::new()| + Add-Member -MemberType NoteProperty -Name "DayOfWeek" -Value $DayOfWeek -PassThru} + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.DaysOfTheWeek =$YearlyRetentionDaysOfTheWeek + } + elseif($policyObject.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunFrequency -eq "Weekly") + { + $validDaysOfWeek = $policyObject.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunDay + $selectedDays = $YearlyRetentionDaysOfTheWeek | Where-Object { $validDaysOfWeek -contains $_ } + if ($selectedDays.Count -eq 0) + { + throw "Only schedule run days are valid for weekly schedule." + } + else + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleWeekly[0].DaysOfTheWeek = $selectedDays + } + } + + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.WeeksOfTheMonth = foreach ($WeekOfMonth in $YearlyRetentionWeeksOfTheMonth){[Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.WeekOfMonth]::new()| + Add-Member -MemberType NoteProperty -Name "WeekOfMonth" -Value $WeekOfMonth -PassThru} + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.WeeksOfTheMonth =$YearlyRetentionWeeksOfTheMonth + } + } + } + if (( $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionDuration.Count -ne $null) -and ($policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionDuration.Count -ne 0)) + { + $policyObject.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionTime=$policyObject.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunTime + } + + } + ValidateMandatoryFields -Policy $policyObject -DatasourceType $DatasourceType -EnableDailyRetention $EnableDailyRetention -EnableWeeklyRetention $EnableWeeklyRetention -EnableMonthlyRetention $EnableMonthlyRetention -EnableYearlyRetention $EnableYearlyRetention -DailyRetentionDurationInDays $DailyRetentionDurationInDays -WeeklyRetentionDurationInWeeks $WeeklyRetentionDurationInWeeks -WeeklyRetentionDaysOfTheWeek $WeeklyRetentionDaysOfTheWeek -MonthlyRetentionDurationInMonths $MonthlyRetentionDurationInMonths -MonthlyRetentionDaysOfTheMonth $MonthlyRetentionDaysOfTheMonth -MonthlyRetentionDaysOfTheWeek $MonthlyRetentionDaysOfTheWeek -MonthlyRetentionWeeksOfTheMonth $MonthlyRetentionWeeksOfTheMonth -YearlyRetentionDurationInYears $YearlyRetentionDurationInYears -YearlyRetentionMonthsOfTheYear $YearlyRetentionMonthsOfTheYear -YearlyRetentionDaysOfTheWeek $YearlyRetentionDaysOfTheWeek -YearlyRetentionDaysOfTheMonth $YearlyRetentionDaysOfTheMonth -YearlyRetentionWeeksOfTheMonth $YearlyRetentionWeeksOfTheMonth + + # Return the modified $policyObject + $policyObject + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Get-AzRecoveryServicesPolicyTemplate.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Get-AzRecoveryServicesPolicyTemplate.ps1 new file mode 100644 index 000000000000..e8caa2e2f09b --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Get-AzRecoveryServicesPolicyTemplate.ps1 @@ -0,0 +1,24 @@ + + +function Get-AzRecoveryServicesPolicyTemplate { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.ProtectionPolicy')] + [CmdletBinding(PositionalBinding=$false)] + # RsvRef: should we call it workload type + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Description('Gets default policy template for a selected datasource type.')] + + param( + [Parameter(Mandatory, HelpMessage='Datasource Type')] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.DatasourceTypes] + ${DatasourceType} # RsvRef : should we call it workload type ? + ) + + process { + $manifest = LoadManifest -DatasourceType $DatasourceType + $manifestPolicyObject = $manifest.policySettings.defaultPolicy + + $jsonPolicyString = $manifestPolicyObject | ConvertTo-Json -Depth 100 + $defaultPolicy = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.ProtectionPolicy]::FromJsonString($jsonPolicyString) + + return $defaultPolicy + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/New-AzRecoveryServicesBackupPolicy.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/New-AzRecoveryServicesBackupPolicy.ps1 new file mode 100644 index 000000000000..e2a72e36f955 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/New-AzRecoveryServicesBackupPolicy.ps1 @@ -0,0 +1,201 @@ +function New-AzRecoveryServicesBackupPolicy +{ + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicyResource')] + [CmdletBinding(PositionalBinding=$false, SupportsShouldProcess)] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Description('Creates a new backup policy in a given recovery services vault')] + + param( + [Parameter(Mandatory=$false, HelpMessage='Subscription Id')] + [System.String] + ${SubscriptionId}, + + [Parameter(Mandatory, HelpMessage='The name of the resource group where the recovery services vault is present.')] + [System.String] + ${ResourceGroupName}, + + [Parameter(Mandatory, HelpMessage='The name of the recovery services vault.')] + [System.String] + ${VaultName}, + + [Parameter(Mandatory, HelpMessage='Policy Name for the policy to be created')] + [System.String] + ${PolicyName}, + + [Parameter(Mandatory, HelpMessage='Workload specific Backup policy object.')] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicy] + ${Policy}, + + [Parameter(Mandatory=$false)] + [ValidateRange(1, 5)] + [Nullable[int]] + ${SnapshotRetentionDurationInDays}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials}, + + [Parameter(Mandatory=$false)] + [Nullable[System.Boolean]] + ${MoveToArchiveTier}, + + [Parameter(Mandatory=$false)] + [ValidateSet('TierRecommended', 'TierAfter')] + [string] + ${TieringMode}, + + [Parameter(Mandatory=$false)] + [Nullable[int]] + ${TierAfterDuration}, + + [Parameter(Mandatory=$false)] + [ValidateSet("Days", "Months", ErrorMessage = "Invalid value for DurationType. Please provide a valid value. Valid values are Days/Months")] + [string] + ${TierAfterDurationType} + + ) + + process + { + #get datasource type + $BackupManagementType = $policy.BackupManagementType + $WorkloadType = $policy.WorkLoadType + $DataSourceType = Get-DataSourceType -BackupManagementType $BackupManagementType -WorkloadType $WorkloadType + $manifest = LoadManifest -DatasourceType $DatasourceType.ToString() + + if($SnapshotRetentionDurationInDays -ne $null) + { + $policy.instantRpRetentionRangeInDay=$SnapshotRetentionDurationInDays + if(($policy.SchedulePolicy.ScheduleRunFrequency -eq "Weekly") -and ($policy.instantRpRetentionRangeInDay -ne 5)) + { + $errormsg="SnapshotRetentionDuration value must be 5 for backup policy with frequency of schedule as Weekly" + throw $errormsg + } + } + + if($MoveToArchiveTier -ne $null) + { + if($manifest.allowedSubProtectionPolicyTypes.Count -lt 2) + { + $tieringdetails = $policy.tieringPolicy.AdditionalProperties.ArchivedRP + } + elseif($manifest.allowedSubProtectionPolicyTypes.Count -gt 2) + { + $FullBackupPolicy = $policy.SubProtectionPolicy | where { $_.PolicyType -match "Full" } + $Index = $policy.SubProtectionPolicy.IndexOf($FullBackupPolicy) + $tieringdetails =$policy.SubProtectionPolicy[$Index].tieringPolicy.AdditionalProperties.ArchivedRP + } + if($manifest.IsSmartTieringSupported -ne $true) + { + $errormsg="Smart tiering not supported for given workload type" + throw $errormsg + } + if($MoveToArchiveTier -eq $false) #if tiering disabled + { + if(($TieringMode -ne "") -or ($TierAfterDuration -ne $null) -or ($TierAfterDurationType -ne "")) + { + $errormsg= "Invalid parameters for disable tiering" + throw $errormsg + } + $tieringdetails.tieringMode="DoNotTier" + $tieringdetails.duration=$null + $tieringdetails.durationType=$null + } + else #if tiering enabled + { + if($TieringMode -ne $null){ + $tieringdetails.tieringMode=$TieringMode + } + if($TierAfterDuration -ne $null){ + $tieringdetails.duration=$TierAfterDuration + } + if($TierAfterDurationType -ne $null){ + $tieringdetails.durationType=$TierAfterDurationType + } + if($manifest.allowedSubProtectionPolicyTypes.Count -gt 2){ + if($tieringdetails.durationType -ne "Days" -and $tieringdetails.tieringMode -eq "TierAfter") + { + $errormsg="DurationType for AzureWorkload should be days" + throw $errormsg + } + } + elseif($manifest.allowedSubProtectionPolicyTypes.Count -lt 2){ + if($tieringdetails.durationType -ne "Months" -and $tieringdetails.tieringMode -eq "TierAfter") + { + $errormsg="DurationType for AzureVM should be Months" + throw $errormsg + } + } + if($tieringdetails.tieringMode -eq "TierRecommended") + { + $tieringdetails.duration=0 + $tieringdetails.durationType="Invalid" + } + if(($manifest.allowedSubProtectionPolicyTypes.Count -gt 2) -and ($tieringdetails.tieringMode -eq "TierRecommended")) + { + $errormsg="TierRecommended not supported for AzureWorkload" + throw $errormsg + } + } + #Validation + ValidateTieringPolicy + } + $null = $PSBoundParameters.Remove("SnapshotRetentionDurationInDays") + $null = $PSBoundParameters.Remove("MoveToArchiveTier") + $null = $PSBoundParameters.Remove("TieringMode") + $null = $PSBoundParameters.Remove("TierAfterDuration") + $null = $PSBoundParameters.Remove("TierAfterDurationType") + + + # RsvRef + # public string[] ResourceGuardOperationRequest --- this should be a parameter (check in SDK code) ? If yes, optional parameters ? + + # RsvRef : add policy validation (preferably one entry point) + + $policyObject = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.ProtectionPolicyResource]::new() + $policyObject.Property = $Policy + + + + $null = $PSBoundParameters.Remove("Policy") + $null = $PSBoundParameters.Add("Parameter", $policyObject) + + # RsvRef : change command name while taking a pull or modify the directive + Az.RecoveryServices.Internal\New-AzRecoveryServicesBackupPolicy @PSBoundParameters + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Enums/Enums.cs b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Enums/Enums.cs new file mode 100644 index 000000000000..f7dcef2e2df4 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Enums/Enums.cs @@ -0,0 +1,153 @@ + + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support +{ + // RsvRef: check all the types in this file are used. if not, remove. + public enum DatasourceTypes + { + AzureVM = 0, + MSSQL, + SAPHANA + /* AzureFiles, + */ + } + + public enum StorageSettingType + { + GeoRedundant = 0, + LocallyRedundant, + ZoneRedundant + } + + public enum DataStoreType + { + ArchiveStore = 0, + OperationalStore, + VaultStore + } + + public enum DurationType + { + Days = 0, + Weeks, + Months, + Years + } + + public enum CopyOption + { + CustomCopyOption = 0, + ImmediateCopyOption, + CopyOnExpiryOption + } + + public enum BackupFrequency + { + Daily = 0, + Weekly, + Hourly + } + + public enum PolicySubTypes + { + Standard = 0, + Enhanced + } + + public enum RetentionRuleName + { + Default = 0, + Daily, + Weekly, + Monthly, + Yearly + } + + public enum TagName + { + Daily = 0, + Weekly, + Monthly, + Yearly + } + + public enum AbsoluteTagCriteria + { + AllBackup = 0, + FirstOfDay, + FirstOfMonth, + FirstOfWeek, + FirstOfYear + } + + public enum WeeksOfMonth + { + First = 0, + Second, + Third, + Fourth, + Last + } + + public enum MonthsOfYear + { + January = 0, + February, + March, + April, + May, + June, + July, + August, + September, + October, + November, + December + } + + public enum DaysOfWeek + { + Sunday = 0, + Monday, + Tuesday, + Wednesday, + Thursday, + Friday, + Saturday + } + + public enum RestoreMode + { + RecoveryPointBased = 0, + PointInTimeBased + } + + public enum RestoreTargetType + { + AlternateLocation = 0, + OriginalLocation, + RestoreAsFiles + } + + /*public enum ProtectionStatus + { + ConfiguringProtection = 0, + ProtectionConfigured, + ConfiguringProtectionFailed, + ProtectionError + } +*/ + public enum JobOperation + { + OnDemandBackup = 0, + ScheduledBackup, + Restore + } + + /*public enum JobStatus + { + InProgress = 0, + Completed, + Failed + }*/ +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/BackupScheduleHelpers.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/BackupScheduleHelpers.ps1 new file mode 100644 index 000000000000..95527fee7b7d --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/BackupScheduleHelpers.ps1 @@ -0,0 +1,377 @@ + + +function ValidateBackupScheduleOptions { + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.DoNotExportAttribute()] + param( + [Parameter(Mandatory)] + [ValidateNotNullOrEmpty()] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicy] + ${Policy}, + + [Parameter(Mandatory)] + [ValidateNotNullOrEmpty()] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.DatasourceTypes] + ${DatasourceType}, + + [Parameter(Mandatory)] + [ref] + ${PolicySubType}, + + [Parameter(Mandatory)] + [ref] + ${HourlyInterval}, + + [Parameter(Mandatory)] + [ref] + ${HourlyScheduleWindowDuration}, + + [Parameter(Mandatory)] + [ref] + ${EnableLogBackup}, + + [Parameter(Mandatory)] + [ref] + ${LogBackupFrequencyInMin}, + + [Parameter(Mandatory)] + [ref] + ${EnableDifferentialBackup}, + + [Parameter(Mandatory)] + [ref] + ${DifferentialRunDay}, + + [Parameter(Mandatory)] + [ref] + ${DifferentialScheduleTime}, + + [Parameter(Mandatory)] + [ref] + ${EnableIncrementalBackup}, + + [Parameter(Mandatory)] + [ref] + ${IncrementalRunDay}, + + [Parameter(Mandatory)] + [ref] + ${IncrementalScheduleTime}, + + [Parameter(Mandatory)] + [ref] + ${BackupFrequency}, + + [Parameter(Mandatory)] + [ref] + ${ScheduleRunDay}, + + [Parameter(Mandatory)] + [ref] + ${ScheduleTime} + ) + + process + { + Write-Debug "Validating Backup Schedule Options" + Write-Debug -Message $DatasourceType + + # Log all the parameters + Write-Debug -Message "Policy: $Policy" + Write-Debug -Message "DatasourceType: $DatasourceType" + Write-Debug -Message "PolicySubType: $PolicySubType.Value" + Write-Debug -Message "HourlyInterval: $HourlyInterval.Value" + Write-Debug -Message "HourlyScheduleWindowDuration: $HourlyScheduleWindowDuration.Value" + Write-Debug -Message "EnableLogBackup: $EnableLogBackup.Value" + Write-Debug -Message "LogBackupFrequencyInMin: $LogBackupFrequencyInMin.Value" + Write-Debug -Message "EnableDifferentialBackup: $EnableDifferentialBackup.Value" + Write-Debug -Message "DifferentialRunDay: $DifferentialRunDay.Value" + Write-Debug -Message "DifferentialScheduleTime: $DifferentialScheduleTime.Value" + Write-Debug -Message "EnableIncrementalBackup: $EnableIncrementalBackup.Value" + Write-Debug -Message "IncrementalRunDay: $IncrementalRunDay.Value" + Write-Debug -Message "IncrementalScheduleTime: $IncrementalScheduleTime.Value" + Write-Debug -Message "BackupFrequency: $BackupFrequency.Value" + Write-Debug -Message "ScheduleRunDay: $ScheduleRunDay.Value" + Write-Debug -Message "ScheduleTime: $ScheduleTime.Value" + + $manifest = LoadManifest -DatasourceType $DatasourceType + + Write-Debug -Message "Manifest: $manifest" + + $FullBackupPolicy = $Policy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Full" } + $LogBackupPolicy = $Policy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Log" } + $DifferentialPolicy = $Policy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Differential" } + $IncrementalPolicy = $Policy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Incremental" } + + # Validate BackupFrequency + + if(-not $BackupFrequency.Value) { + Write-Debug "BackupFrequency is empty" + if ($manifest.allowedSubProtectionPolicyTypes.Count -gt 2) { + # SAPHANA case + if(-not $FullBackupPolicy.SchedulePolicy.ScheduleRunFrequency) { + $errormsg = "BackupFrequency cannot be empty for FullBackup" + throw $errormsg + } + else { + $BackupFrequency.Value = $FullBackupPolicy.SchedulePolicy.ScheduleRunFrequency + } + } + else { + # AzureVM case + Write-Debug "AzureVM case" + if(-not $Policy.SchedulePolicy.ScheduleRunFrequency) { + $errormsg = "BackupFrequency cannot be empty for FullBackup" + throw $errormsg + } + else { + Write-Debug "assigning BackupFrequency" + $BackupFrequency.Value = $Policy.SchedulePolicy.ScheduleRunFrequency + } + } + } + + Write-Debug -Message $BackupFrequency.Value + + if (-not $manifest.allowedBackupFrequencies.Contains($BackupFrequency.Value)) { + $allowedValues = [System.String]::Join(', ', $manifest.allowedBackupFrequencies) + $errormsg = "Specified BackupFrequency " + $BackupFrequency.Value + " is not supported for DatasourceType " + $DatasourceType + "`nAllowed values are: " + $allowedValues + throw $errormsg + } + + # Validate ScheduleTime + + if(-not $ScheduleTime.Value) { + if ($manifest.allowedSubProtectionPolicyTypes.Count -gt 2) { + # SAPHANA case + Write-Debug "SAPHANA case" + if($FullBackupPolicy.SchedulePolicy.ScheduleRunTime.Count -lt 1) { + $errormsg = "ScheduleTime cannot be empty for FullBackup" + throw $errormsg + } + else { + Write-Debug "$FullBackupPolicy.SchedulePolicy.ScheduleRunTime[0]" + $ScheduleTime.Value = ($FullBackupPolicy.SchedulePolicy.ScheduleRunTime[0]).toString("h:mm tt") + } + } + else { + # AzureVM case + if($Policy.SchedulePolicy.ScheduleRunTime.Count -lt 1) { + $errormsg = "ScheduleTime cannot be empty for FullBackup" + throw $errormsg + } + else { + Write-Debug "$Policy.SchedulePolicy.ScheduleRunTime[0]" + $ScheduleTime.Value = ($Policy.SchedulePolicy.ScheduleRunTime[0]).ToString("h:mm tt") + } + } + } + + # Validate ScheduleRunDay + + if( (-not $ScheduleRunDay.Value) -and ($BackupFrequency.Value -eq "Weekly") ) { + if ($manifest.allowedSubProtectionPolicyTypes.Count -gt 2) { + # SAPHANA case + if(-not $FullBackupPolicy.SchedulePolicy.ScheduleRunDays) { + $errormsg = "ScheduleRunDay cannot be empty for Weekly FullBackup" + throw $errormsg + } + else { + $ScheduleRunDay.Value = $FullBackupPolicy.SchedulePolicy.ScheduleRunDays + } + } + else { + # AzureVM case + if(-not $Policy.SchedulePolicy.ScheduleRunDay) { + $errormsg = "ScheduleRunDay cannot be empty for Weekly FullBackup" + throw $errormsg + } + else { + $ScheduleRunDay.Value = $Policy.SchedulePolicy.ScheduleRunDays + } + } + } + + # Validate PolicySubType + + if($PolicySubType.Value -eq "Enhanced") { + if(-not $manifest.supportsEnhanced) { + $errormsg = "Enhanced backup policies are not supported by " + $DatasourceType + throw $errormsg + } + } + + # Validate Hourly specific parameters + + if ($HourlyInterval.Value -or $HourlyScheduleWindowDuration.Value) { + Write-Debug "Checking Hourly" + Write-Debug -Message "BackupFrequency is $BackupFrequency.Value and PolicySubType is $PolicySubType.Value" + if (-not ( ($BackupFrequency.Value -eq "Hourly") -and ($PolicySubType.Value -eq "Enhanced") )) { + $errormsg = "Hourly parameters can only be set for Enhanced Hourly backups" + throw $errormsg + } + } + + if ($BackupFrequency.Value -eq "Hourly") { + if(-not $HourlyInterval.Value) { + if(-not $Policy.SchedulePolicy.HourlySchedule.Interval) { + $errormsg = "HourlyInterval cannot be empty for Hourly backups" + } + else { + $HourlyInterval.Value = $policyObject.SchedulePolicy.HourlySchedule.Interval + } + } + + if(-not $HourlyScheduleWindowDuration.Value) { + if(-not $Policy.SchedulePolicy.HourlySchedule.ScheduleWindowDuration) { + $errormsg = "HourlyScheduleWindowDuration cannot be empty for Hourly backups" + } + else { + $HourlyScheduleWindowDuration.Value = $policyObject.SchedulePolicy.HourlySchedule.ScheduleWindowDuration + } + } + + if($HourlyScheduleWindowDuration.Value % $HourlyInterval.Value -ne 0) { + $errormsg = "HourlyScheduleWindowDuration must be greater than and a multiple of HourlyInterval" + throw $errormsg + } + + } + + + # Validate Log Backup parameters + + if($EnableLogBackup.Value) { + if (-not $manifest.allowedSubProtectionPolicyTypes.Contains("Log")) { + $errormsg = "LogBackup is not supported for DatasourceType " + $DatasourceType + throw $errormsg + } + + if (-not $LogBackupFrequencyInMin.Value) { + if($LogBackupPolicy.SchedulePolicy.ScheduleFrequencyInMin) { + $LogBackupFrequencyInMin.Value = $LogBackupPolicy.SchedulePolicy.ScheduleFrequencyInMin + } + else { + $errormsg = "LogBackupFrequencyInMin cannot be empty for LogBackup" + throw $errormsg + } + } + } + + # Validate Differential parameters + + if ($EnableDifferentialBackup.Value -or ($DifferentialRunDay.Value) -or ($DifferentialScheduleTime.Value)) { + if(-not $EnableDifferentialBackup.Value) { + $errormsg = "Differential backup parameters cannot be set when EnableDifferentialBackup is not set to True, please pass EnableDifferentialBackup as True to enable it." + throw $errormsg + } + + if( ( -not $manifest.allowedSubProtectionPolicyTypes.Contains("Differential") ) -or ( ($BackupFrequency.Value -ne "Weekly") ) ) { + $errormsg = "Differential backups are not supported for " + $BackupFrequency.Value + " " + $DatasourceType + " backups" + throw $errormsg + } + + if (($IncrementalPolicy -ne $null) -and ($EnableIncrementalBackup.Value -ne "False") ) { + $errormsg = "Differential backup cannot be enabled when Incremental backup is enabled, pass EnableIncrementalBackup as False to disable it" + throw $errormsg + } + } + + if ($EnableDifferentialBackup.Value) { + if (-not $DifferentialRunDay.Value) { + if (-not $DifferentialPolicy.SchedulePolicy.ScheduleRunDay) { + $errormsg = "DifferentialRunDay cannot be empty for Differential backups" + throw $errormsg + } + else { + $DifferentialRunDay.Value = $DifferentialPolicy.SchedulePolicy.ScheduleRunDays + } + } + + $commonDays = Compare-Object -ReferenceObject $ScheduleRunDay.Value -DifferenceObject $DifferentialRunDay.Value -IncludeEqual -ExcludeDifferent + + if ($commonDays.Count -gt 0) { + $errormsg = "Differential backups cannot be scheduled on same days as Full backups." + throw $errormsg + } + + if (-not $DifferentialScheduleTime.Value) { + if (-not $DifferentialPolicy.SchedulePolicy.ScheduleRunTime) { + $errormsg = "DifferentialScheduleTime cannot be empty for Differential backups" + throw $errormsg + } + else { + $DifferentialScheduleTime.Value = $DifferentialPolicy.SchedulePolicy.ScheduleRunTime[0] + } + } + } + + # Validate Incremental parameters + + if ($EnableIncrementalBackup.Value -or ($IncrementalRunDay.Value) -or ($IncrementalScheduleTime.Value)) { + + if (-not $EnableIncrementalBackup.Value) { + $errormsg = "Incremental backup parameters cannot be set when EnableIncrementalBackup is not set to True, please pass EnableIncrementalBackup as True to enable it." + throw $errormsg + } + + if( ( -not $manifest.allowedSubProtectionPolicyTypes.Contains("Incremental") ) -or ( ($BackupFrequency.Value -ne "Weekly") ) ) { + $errormsg = "Incremental backups are not supported for " + $BackupFrequency.Value + " " + $DatasourceType + " backups" + throw $errormsg + } + + if (($DifferentialPolicy -ne $null) -and ($EnableDifferentialBackup.Value -ne "False") ) { + $errormsg = "Incremental backup cannot be enabled when Differential backup is enabled, pass EnableDifferentialBackup as False to disable it" + throw $errormsg + } + } + + if ($EnableIncrementalBackup.Value) { + if (-not $IncrementalRunDay.Value) { + if (-not $IncrementalPolicy.SchedulePolicy.ScheduleRunDay) { + $errormsg = "IncrementalRunDay cannot be empty for Incremental backups" + throw $errormsg + } + else { + $IncrementalRunDay.Value = $IncrementalPolicy.SchedulePolicy.ScheduleRunDays + } + } + + $commonDays = Compare-Object -ReferenceObject $ScheduleRunDay.Value -DifferenceObject $IncrementalRunDay.Value -IncludeEqual -ExcludeDifferent + + if ($commonDays.Count -gt 0) { + $errormsg = "Incremental backups cannot be scheduled on same days as Full backups." + throw $errormsg + } + + if (-not $IncrementalScheduleTime.Value) { + if (-not $IncrementalPolicy.SchedulePolicy.ScheduleRunTime) { + $errormsg = "IncrementalScheduleTime cannot be empty for Incremental backups" + throw $errormsg + } + else { + $IncrementalScheduleTime.Value = $IncrementalPolicy.SchedulePolicy.ScheduleRunTime[0] + } + } + } + + Write-Debug "Validating parameters completed" + + # Print all parameters to be returned + Write-Debug -Message "Policy: $Policy" + Write-Debug -Message "DatasourceType: $DatasourceType" + Write-Debug -Message "PolicySubType: $PolicySubType.Value" + Write-Debug -Message "HourlyInterval: $HourlyInterval.Value" + Write-Debug -Message "HourlyScheduleWindowDuration: $HourlyScheduleWindowDuration.Value" + Write-Debug -Message "EnableLogBackup: $EnableLogBackup.Value" + Write-Debug -Message "LogBackupFrequencyInMin: $LogBackupFrequencyInMin.Value" + Write-Debug -Message "EnableDifferentialBackup: $EnableDifferentialBackup.Value" + Write-Debug -Message "DifferentialRunDay: $DifferentialRunDay.Value" + Write-Debug -Message "DifferentialScheduleTime: $DifferentialScheduleTime.Value" + Write-Debug -Message "EnableIncrementalBackup: $EnableIncrementalBackup.Value" + Write-Debug -Message "IncrementalRunDay: $IncrementalRunDay.Value" + Write-Debug -Message "IncrementalScheduleTime: $IncrementalScheduleTime.Value" + Write-Debug -Message "BackupFrequency: $BackupFrequency.Value" + Write-Debug -Message "ScheduleRunDay: $ScheduleRunDay.Value" + Write-Debug -Message "ScheduleTime: $ScheduleTime.Value" + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/PolicyHelpers.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/PolicyHelpers.ps1 new file mode 100644 index 000000000000..1f2fd0904e7d --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/PolicyHelpers.ps1 @@ -0,0 +1,909 @@ + +function ValidateDaysOfTheWeek { + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.DoNotExportAttribute()] + param( + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [System.String] + $DatasourceType, + + [Parameter(Mandatory=$false)] + [string[]] + ${WeeklyRetentionDaysOfTheWeek}, + + [Parameter(Mandatory=$false)] + [string[]] + ${MonthlyRetentionDaysOfTheWeek}, + + [Parameter(Mandatory=$false)] + [string[]] + ${YearlyRetentionDaysOfTheWeek} + + ) + + process + { + Write-Debug "Validating Days of the week Options" + Write-Debug -Message $DatasourceType + Write-Debug -Message ($WeeklyRetentionDaysOfTheWeek -join ', ') + Write-Debug -Message ($MonthlyRetentionDaysOfTheWeek -join ', ') + Write-Debug -Message ($YearlyRetentionDaysOfTheWeek -join ', ') + + $manifest = LoadManifest -DatasourceType $DatasourceType.ToString() + $allowedValues = [System.String]::Join(', ', $manifest.allowedDaysOfTheWeek) + + foreach ($day in $WeeklyRetentionDaysOfTheWeek) + { + if ($day -notin $manifest.allowedDaysOfTheWeek) + { + $errormsg = "Specified WeekDay is not supported: $day. Allowed values are: $allowedValues" + throw $errormsg + } + } + + foreach ($day in $MonthlyRetentionDaysOfTheWeek) { + if ($day -notin $manifest.allowedDaysOfTheWeek) { + $errormsg = "Specified WeekDay is not supported: $day. Allowed values are: $allowedValues" + throw $errormsg + } + } + + foreach ($day in $YearlyRetentionDaysOfTheWeek) + { + if ($day -notin $manifest.allowedDaysOfTheWeek) + { + $errormsg = "Specified WeekDay is not supported: $day. Allowed values are: $allowedValues" + throw $errormsg + } + } + } +} + +function ValidateMonthsOfTheYear { + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.DoNotExportAttribute()] + param( + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [System.String] + $DatasourceType, + + [Parameter(Mandatory=$false)] + [string[]] + ${YearlyRetentionMonthsOfTheYear} + + ) + + process + { + Write-Debug "Validating Months of the year Options" + Write-Debug -Message $DatasourceType + Write-Debug -Message ($YearlyRetentionMonthsOfTheYear -join ', ') + + + $manifest = LoadManifest -DatasourceType $DatasourceType.ToString() + $allowedValues = [System.String]::Join(', ', $manifest.allowedMonthsOfTheYear) + + foreach ($month in $YearlyRetentionMonthsOfTheYear) + { + if ($month -notin $manifest.allowedMonthsOfTheYear) + { + $errormsg = "Specified month is not supported: $month. Allowed values are: $allowedValues" + throw $errormsg + } + } + + } +} + +function ValidateWeeksOfTheMonth { + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.DoNotExportAttribute()] + param( + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [System.String] + $DatasourceType, + + [Parameter(Mandatory=$false)] + [string[]] + ${MonthlyRetentionWeeksOfTheMonth}, + + [Parameter(Mandatory=$false)] + [string[]] + ${YearlyRetentionWeeksOfTheMonth} + + ) + + process + { + Write-Debug "Validating Months of the year Options" + Write-Debug -Message $DatasourceType + Write-Debug -Message ($MonthlyRetentionWeeksOfTheMonth -join ', ') + Write-Debug -Message ($YearlyRetentionWeeksOfTheMonth -join ', ') + + + $manifest = LoadManifest -DatasourceType $DatasourceType.ToString() + $allowedValues = [System.String]::Join(', ', $manifest.allowedWeeksOfTheMonth) + + foreach ($week in $MonthlyRetentionWeeksOfTheMonth) { + if ($week -notin $manifest.allowedWeeksOfTheMonth) { + $errormsg = "Specified weekOfMonth is not supported: $week. Allowed values are: $allowedValues" + throw $errormsg + } + } + + foreach ($week in $YearlyRetentionWeeksOfTheMonth) { + if ($week -notin $manifest.allowedWeeksOfTheMonth) { + $errormsg = "Specified weekOfMonth is not supported: $week. Allowed values are: $allowedValues" + throw $errormsg + } + } + } +} + +# which parameter can be used under which other params +function ValidateRetentionParameters { + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.DoNotExportAttribute()] + param ( + [Parameter(Mandatory=$true)] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicy] + $Policy, + + [Parameter(Mandatory=$true)] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.DatasourceTypes] + $DatasourceType, + + [Parameter(Mandatory=$true)] + [hashtable] + $parametersToTest + ) + + process + { + Write-Debug "Validating parameter combinations" + Write-Debug -Message $DatasourceType + + $manifest = LoadManifest -DatasourceType $DatasourceType.ToString() + if($manifest.allowedSubProtectionPolicyTypes.Count -gt 2) + { + if(-not($ModifyFullBackup -or $ModifyDifferentialBackup -or $ModifyIncrementalBackup -or $ModifyLogBackup) ) + { + $errormsg="Retention policy for SAPHANA/MSSQL workloads can only be modified on switching to ModifyFullBackup/ModifyDifferentialBackup/ModifyIncrementalBackup/ModifyLogBackup" + throw $errormsg + } + } + $Index=1 + + if($ModifyFullBackup) + { + $FullBackupPolicy = $Policy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Full" } + $Index = $Policy.SubProtectionPolicy.IndexOf($FullBackupPolicy) + } + + # Validate Daily Retention Parameters + + if ($DailyRetentionDurationInDays -ne $null) + { + $parametersEntered = [System.Collections.ArrayList]::new() + if ($DailyRetentionDurationInDays -ne $null) + { + $parametersEntered.Add("DailyRetentionDurationInDays") > $null + } + if ($EnableDailyRetention -ne $true) + { + $errormsg = $parametersEntered + " can only be used when Daily retention is enabled" + throw $errormsg + } + } + # Validate Weekly Retention Parameters + + if ($WeeklyRetentionDurationInWeeks -or $WeeklyRetentionDaysOfTheWeek) + { + $parametersEntered = [System.Collections.ArrayList]::new() + if ($WeeklyRetentionDurationInWeeks) + { + $parametersEntered.Add("WeeklyRetentionDurationInWeeks") > $null + } + if ($WeeklyRetentionDaysOfTheWeek) + { + $parametersEntered.Add("WeeklyRetentionDaysOfTheWeek") > $null + } + if ($EnableWeeklyRetention -ne $true) + { + $errormsg = $parametersEntered + " can only be used when Weekly retention is enabled" + throw $errormsg + } + } + + # Validate Monthly Retention Parameters + if($MonthlyRetentionScheduleType -or $MonthlyRetentionDurationInMonths -or $MonthlyRetentionDaysOfTheWeek -or $MonthlyRetentionWeeksOfTheMonth -or $MonthlyRetentionDaysOfTheMonth ) + { + $parametersEntered = [System.Collections.ArrayList]::new() + if ($MonthlyRetentionScheduleType) + { + $parametersEntered.Add("MonthlyRetentionScheduleType") > $null + } + if ($MonthlyRetentionDurationInMonths) + { + $parametersEntered.Add("MonthlyRetentionDurationInMonths") > $null + } + if ($EnableMonthlyRetention -ne $true) + { + $errormsg = $parametersEntered + " can only be used when Monthly retention is enabled" + throw $errormsg + } + if($MonthlyRetentionScheduleType -ne "") + { + if($DatasourceType -eq "AzureVM") + { + $Policy.RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType=$MonthlyRetentionScheduleType + } + else + { + if(-not($ModifyFullBackup)) + { + $errormsg="Monthly retention policy for SAPHANA/MSSQL workloads can only be modified on switching to ModifyFullBackup" + throw $errormsg + } + $Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType=$MonthlyRetentionScheduleType + } + } + if(($MonthlyRetentionScheduleType -eq "Weekly") -or ($DataSourceType -eq "AzureVM" -and $Policy.RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType -eq "Weekly") -or ((($DatasourceType -eq "SAPHANA") -or ($DatasourceType -eq "MSSQL")) -and ($Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType -eq "Weekly"))) + { + $parametersEntered = [System.Collections.ArrayList]::new() + if ($MonthlyRetentionDaysOfTheMonth) + { + $parametersEntered.Add("MonthlyRetentionDaysOfTheMonth") > $null + $errormsg = $parametersEntered + " can only be used when day based Monthly retention is enabled" + throw $errormsg + } + if ($MonthlyRetentionIsLastDayIncluded) + { + $parametersEntered.Add("MonthlyRetentionIsLastDayIncluded") > $null + $errormsg = $parametersEntered + " can only be used when day based Monthly retention is enabled" + throw $errormsg + } + if ($EnableMonthlyRetention -ne $true) + { + $errormsg = $parametersEntered + " can only be used when day based Monthly retention is enabled" + throw $errormsg + } + } + elseif( ($MonthlyRetentionScheduleType -eq "Daily") -or ($DataSourceType -eq "AzureVM" -and $Policy.RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType -eq "Daily") -or ((($DatasourceType -eq "SAPHANA") -or ($DatasourceType -eq "MSSQL")) -and ($Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType -eq "Daily"))) + { + $parametersEntered = [System.Collections.ArrayList]::new() + if ($MonthlyRetentionDaysOfTheWeek) + { + $parametersEntered.Add("MonthlyRetentionDaysOfTheWeek") > $null + $errormsg = $parametersEntered + " can only be used when week based Monthly retention is enabled" + throw $errormsg + } + if ($MonthlyRetentionWeeksOfTheMonth) + { + $parametersEntered.Add("MonthlyRetentionWeeksOfTheMonth") > $null + $errormsg = $parametersEntered + " can only be used when week based Monthly retention is enabled" + throw $errormsg + } + if ($EnableMonthlyRetention -ne $true ) + { + $errormsg = $parametersEntered + " can only be used when week based Monthly retention is enabled" + throw $errormsg + } + } + else + { + $errormsg= "Please specify Retention Schedule format type for monthly retention: weekly/daily" + throw $errormsg + } + } + + # Validate Yearly Retention Parameters + + if( $YearlyRetentionScheduleType -or $YearlyRetentionDurationInYears -or $YearlyRetentionMonthsOfTheYear -or $YearlyRetentionDaysOfTheWeek -or $YearlyRetentionWeeksOfTheMonth -or $YearlyRetentionDaysOfTheMonth -or $YearlyRetentionIsLastDayIncluded) + { + $parametersEntered = [System.Collections.ArrayList]::new() + if ($YearlyRetentionScheduleType) + { + $parametersEntered.Add("YearlyRetentionScheduleType") > $null + } + if ($YearlyRetentionDurationInYears) + { + $parametersEntered.Add("YearlyRetentionDurationInYears") > $null + } + if ($YearlyRetentionMonthsOfTheYear) + { + $parametersEntered.Add("YearlyRetentionMonthsOfTheYear") > $null + } + if ($EnableYearlyRetention -ne $true) + { + $errormsg = $parametersEntered + " can only be used when Yearly retention is enabled" + throw $errormsg + } + if($YearlyRetentionScheduleType -ne "") + { + if($DatasourceType -eq "AzureVM") + { + $Policy.RetentionPolicy.YearlySchedule.RetentionScheduleFormatType = $YearlyRetentionScheduleType + } + else + { + if(-not($ModifyFullBackup)) + { + $errormsg="Yearly retention policy for SAPHANA/MSSQL workloads can only be modified on switching to ModifyFullBackup" + throw $errormsg + } + + $Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleFormatType = $YearlyRetentionScheduleType + } + + } + if( ($YearlyRetentionScheduleType -eq "Weekly") -or ($DataSourceType -eq "AzureVM" -and $Policy.RetentionPolicy.YearlySchedule.RetentionScheduleFormatType -eq "Weekly" ) -or ((($DatasourceType -eq "SAPHANA") -or ($DatasourceType -eq "MSSQL")) -and ($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleFormatType -eq "Weekly"))) + { + $parametersEntered = [System.Collections.ArrayList]::new() + if ($YearlyRetentionDaysOfTheMonth) + { + $parametersEntered.Add("YearlyRetentionDaysOfTheMonth") > $null + $errormsg = $parametersEntered + " can only be used when day based Yearly retention is enabled" + throw $errormsg + } + if ($YearlyRetentionIsLastDayIncluded) + { + $parametersEntered.Add("YearlyRetentionIsLastDayIncluded") > $null + $errormsg = $parametersEntered + " can only be used when day based Yearly retention is enabled" + throw $errormsg + } + if ($EnableYearlyRetention -ne $true) + { + $errormsg = $parametersEntered + " can only be used when day based Yearly retention is enabled" + throw $errormsg + } + } + elseif(($YearlyRetentionScheduleType -eq "Daily") -or ($DataSourceType -eq "AzureVM" -and $Policy.RetentionPolicy.YearlySchedule.RetentionScheduleFormatType -eq "Daily") -or ((($DatasourceType -eq "SAPHANA") -or ($DatasourceType -eq "MSSQL")) -and ($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleFormatType -eq "Daily"))) + { + $parametersEntered = [System.Collections.ArrayList]::new() + if ($YearlyRetentionDaysOfTheWeek) + { + $parametersEntered.Add("YearlyRetentionDaysOfTheWeek") > $null + $errormsg = $parametersEntered + " can only be used when week based Yearly retention is enabled" + throw $errormsg + } + if ($YearlyRetentionWeeksOfTheMonth) + { + $parametersEntered.Add("YearlyRetentionWeeksOfTheMonth") > $null + $errormsg = $parametersEntered + " can only be used when week based Yearly retention is enabled" + throw $errormsg + } + if ($EnableYearlyRetention -ne $true) + { + $errormsg = $parametersEntered + " can only be used when week based Yearly retention is enabled" + throw $errormsg + } + } + else + { + $errormsg= "Please specify Retention Schedule format type for yearly retention: weekly/daily" + throw $errormsg + } + } + + if ($DifferentialRetentionPeriodInDays) + { + $parametersEntered = [System.Collections.ArrayList]::new() + if ($DifferentialRetentionPeriodInDays) + { + $parametersEntered.Add("DifferentialRetentionPeriodInDays") > $null + } + # check whether differential backup is supported for given DatasourceType + $unsupportedParams = $parametersEntered | Where-Object { $param = $_; $param -notin $manifest.allowedDifferentialParams } + if ($unsupportedParams.Count -gt 0) { + $unsupportedParamsString = $unsupportedParams -join ', ' + $errormsg = " $DatasourceType 'dosen't support the following parameters:' $unsupportedParamsString" + throw $errormsg + } + # check whether differential backup is enabled + if(-not($ModifyDifferentialBackup)) + { + $errormsg = $parametersEntered + " can only be used for modifying differential backup after switching to -ModifyDifferentialBackup" + throw $errormsg + } + } + + if ($IncrementalRetentionPeriodInDays) + { + $parametersEntered = [System.Collections.ArrayList]::new() + if ($IncrementalRetentionPeriodInDays) + { + $parametersEntered.Add("IncrementalRetentionPeriodInDays") > $null + } + $unsupportedParams = $parametersEntered | Where-Object { $param = $_; $param -notin $manifest.allowedIncrementalParams } + if ($unsupportedParams.Count -gt 0) { + $unsupportedParamsString = $unsupportedParams -join ', ' + $errormsg = " $DatasourceType 'dosen't support the following parameters:' $unsupportedParamsString" + throw $errormsg + } + if(-not($ModifyIncrementalBackup)) + { + $errormsg = $parametersEntered + " can only be used for modifying incremental backup after switching to -ModifyIncrementalBackup" + throw $errormsg + } + } + + if ( $LogRetentionPeriodInDays) + { + $parametersEntered = [System.Collections.ArrayList]::new() + + if ($LogRetentionPeriodInDays) + { + $parametersEntered.Add("LogRetentionPeriodInDays") > $null + } + $unsupportedParams = $parametersEntered | Where-Object { $param = $_; $param -notin $manifest.allowedLogParams } + if ($unsupportedParams.Count -gt 0) { + $unsupportedParamsString = $unsupportedParams -join ', ' + $errormsg = " $DatasourceType 'dosen't support the following parameters:' $unsupportedParamsString" + throw $errormsg + } + if(-not($ModifyLogBackup)) + { + $errormsg = $parametersEntered + " can only be used after switching to -ModifyLogBackup " + throw $errormsg + } + } + } +} + + +function ValidateMandatoryFields { + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.DoNotExportAttribute()] + param( + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicy] + $Policy, + + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.DatasourceTypes] + ${DatasourceType}, + + [Parameter(Mandatory=$false)] + [Nullable[Boolean]] + ${EnableDailyRetention}, + + [Parameter(Mandatory=$false)] + [Nullable[Boolean]] + ${EnableWeeklyRetention}, + + [Parameter(Mandatory=$false)] + [Nullable[Boolean]] + ${EnableMonthlyRetention}, + + [Parameter(Mandatory=$false)] + [Nullable[Boolean]] + ${EnableYearlyRetention}, + + [Parameter(Mandatory=$false)] + [Nullable[int]] + ${DailyRetentionDurationInDays}, + + [Parameter(Mandatory=$false)] + [Nullable[int]] + ${WeeklyRetentionDurationInWeeks}, + + [Parameter(Mandatory=$false)] + [string[]] + ${WeeklyRetentionDaysOfTheWeek}, + + [Parameter(Mandatory=$false)] + [Nullable[int]] + ${MonthlyRetentionDurationInMonths}, + + [Parameter(Mandatory=$false)] + [int[]] + ${MonthlyRetentionDaysOfTheMonth}, + + [Parameter(Mandatory=$false)] + [string[]] + ${MonthlyRetentionDaysOfTheWeek}, + + [Parameter(Mandatory=$false)] + [string[]] + ${MonthlyRetentionWeeksOfTheMonth}, + + [Parameter(Mandatory=$false)] + [Nullable[int]] + ${YearlyRetentionDurationInYears}, + + [Parameter(Mandatory=$false)] + [string[]] + ${YearlyRetentionMonthsOfTheYear}, + + [Parameter(Mandatory=$false)] + [string[]] + ${YearlyRetentionDaysOfTheWeek}, + + [Parameter(Mandatory=$false)] + [int[]] + ${YearlyRetentionDaysOfTheMonth}, + + [Parameter(Mandatory=$false)] + [string[]] + ${YearlyRetentionWeeksOfTheMonth} + ) + + process + { + Write-Debug "Validating mandatory parameters" + Write-Debug -Message $DatasourceType + + $manifest = LoadManifest -DatasourceType $DatasourceType.ToString() + + $Index=1 + if($ModifyFullBackup) + { + $FullBackupPolicy = $Policy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Full" } + $Index = $Policy.SubProtectionPolicy.IndexOf($FullBackupPolicy) + } + + # Validate Daily Retention Parameters + + if ($EnableDailyRetention -eq $true ) + { + if($manifest.allowedSubProtectionPolicyTypes.Count -gt 2 -and $policy.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunFrequency -ne "Weekly") #SAPHANA/MSSQL + { + if(($Policy.SubProtectionPolicy[$Index].RetentionPolicy.DailySchedule.RetentionDuration.Count -eq $null) -or ($Policy.SubProtectionPolicy[$Index].RetentionPolicy.DailySchedule.RetentionDuration.Count -eq 0) ) + { + $errormsg = "Daily retention duration in days must not be empty " + throw $errormsg + } + #Write-Host "Daily retention duration in days: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.DailySchedule.RetentionDuration.Count)" + } + elseif($manifest.allowedSubProtectionPolicyTypes.Count -lt 2 -and $policy.SchedulePolicy.ScheduleRunFrequency -ne "Weekly") #AzureVM + { + if(($Policy.RetentionPolicy.DailySchedule.RetentionDuration.Count -eq $null) -or ($Policy.RetentionPolicy.DailySchedule.RetentionDuration.Count -eq 0)) + { + $errormsg = "Daily retention duration in days must not be empty " + throw $errormsg + } + #Write-Host "Daily retention duration in days: $($policy.RetentionPolicy.DailySchedule.RetentionDuration.Count)" + } + } + + # Validate Weekly Retention Parameters + + if ($EnableWeeklyRetention -eq $true) + { + if($manifest.allowedSubProtectionPolicyTypes.Count -gt 2) #SAPHANA/MSSQL + { + if(($Policy.SubProtectionPolicy[$Index].RetentionPolicy.WeeklySchedule.DaysOfTheWeek.Count -eq 0) -or ($Policy.SubProtectionPolicy[$Index].RetentionPolicy.WeeklySchedule.DaysOfTheWeek.Count -eq $null) ) + { + $errormsg = "Weekly retention days of the week must not be empty " + throw $errormsg + } + if(($Policy.SubProtectionPolicy[$Index].RetentionPolicy.WeeklySchedule.RetentionDuration.Count -eq $null) -or ($Policy.SubProtectionPolicy[$Index].RetentionPolicy.WeeklySchedule.RetentionDuration.Count -eq 0)) + { + $errormsg = "Weekly retention duration in weeks must not be empty " + throw $errormsg + } + #Write-Host "Weekly retention duration in weeks: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.WeeklySchedule.RetentionDuration.Count)" + #Write-Host "Weekly retention days of the week: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.WeeklySchedule.DaysOfTheWeek)" + } + else #AzureVM + { + if($Policy.RetentionPolicy.WeeklySchedule.DaysOfTheWeek.Count -eq 0) + { + $errormsg = "Weekly retention days of the week must not be empty" + throw $errormsg + } + if($Policy.RetentionPolicy.WeeklySchedule.RetentionDuration.Count -eq ($null -or 0)) + { + $errormsg = "Weekly retention duration in weeks must not be empty " + throw $errormsg + } + #Write-Host "Weekly retention duration in weeks: $($Policy.RetentionPolicy.WeeklySchedule.RetentionDuration.Count)" + #Write-Host "Weekly retention days of the week: $($Policy.RetentionPolicy.WeeklySchedule.DaysOfTheWeek)" + } + } + + # Validate Monthly Retention Parameters + if ($EnableMonthlyRetention -eq $true) + { + if($manifest.allowedSubProtectionPolicyTypes.Count -gt 2) #SAPHANA/MSSQL + { + if(($Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionDuration[0].Count -eq $null) -or ($Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionDuration[0].Count -eq 0)) + { + $errormsg = "Monthly retention duration in months must not be empty " + throw $errormsg + } + if($Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType -eq "Weekly") + { + if($Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly.DaysOfTheWeek.Count -eq 0) + { + $errormsg = "Days of the week must not be empty for week based monthly retention." + throw $errormsg + } + if($Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly.weeksOfTheMonth.Count -eq 0) + { + $errormsg = "Weeks of the month must not be empty for week based monthly retention." + throw $errormsg + } + #Write-Host "Monthly retention duration in months: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionDuration.Count)" + #Write-Host "Monthly retention: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType)" + #Write-Host "Monthly retention Days of the week: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly.DaysOfTheWeek)" + #Write-Host "Monthly retention Weeks of the month: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly.weeksOfTheMonth)" + } + elseif($Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType -eq "Daily") + { + if($Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleDaily.DaysOfTheMonth.Count -eq 0) + { + $errormsg = "Days of the month must not be empty for day based monthly retention." + throw $errormsg + } + #Write-Host "Monthly retention duration in months: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionDuration.Count)" + #Write-Host "Monthly retention: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType)" + #$days = $pol1.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleDaily.DaysOfTheMonth + #Write-Host "Monthly retention Days of the month:" + #foreach ($day in $days) { + # $dayValue = $day.Date + # Write-Host $dayValu$Index + #} + } + } + else #AzureVM + { + if(($Policy.RetentionPolicy.MonthlySchedule.RetentionDuration.Count -eq $null) -or ($Policy.RetentionPolicy.MonthlySchedule.RetentionDuration.Count -eq 0 )) + { + $errormsg = "Monthly retention duration in months must not be empty " + throw $errormsg + } + if($Policy.RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType -eq "Weekly") + { + if($Policy.RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly.DaysOfTheWeek.Count -eq 0) + { + $errormsg = "Days of the week must not be empty for week based monthly retention." + throw $errormsg + } + if($Policy.RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly.weeksOfTheMonth.Count -eq 0) + { + $errormsg = "Weeks of the month must not be empty for week based monthly retention." + throw $errormsg + } + #Write-Host "Monthly retention duration in months: $($Policy.RetentionPolicy.MonthlySchedule.RetentionDuration.Count)" + #Write-Host "Monthly retention: $($Policy.RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType)" + #Write-Host "Monthly retention Days of the week: $($Policy.RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly.DaysOfTheWeek)" + #Write-Host "Monthly retention Weeks of the month: $($Policy.RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly.weeksOfTheMonth)" + } + elseif($Policy.RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType -eq "Daily") + { + if($Policy.RetentionPolicy.MonthlySchedule.RetentionScheduleDaily.DaysOfTheMonth.Count -eq 0) + { + $errormsg = "Days of the month must not be empty for day based monthly retention." + throw $errormsg + } + #Write-Host "Monthly retention duration in months: $($Policy.RetentionPolicy.MonthlySchedule.RetentionDuration.Count)" + #Write-Host "Monthly retention: $($Policy.RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType)" + #$days = $pol1.RetentionPolicy.MonthlySchedule.RetentionScheduleDaily.DaysOfTheMonth + #Write-Host "Monthly retention Days of the month:" + #foreach ($day in $days) { + # $dayValue = $day.Date + # Write-Host $dayValue + #} + } + } + } + + # Validate Yearly Retention Parameters + + if ($EnableYearlyRetention -eq $true) + { + if($manifest.allowedSubProtectionPolicyTypes.Count -gt 2) #SAPHANA/MSSQL + { + if(($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionDuration.Count -eq $null) -or ($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionDuration.Count -eq 0)) + { + $errormsg = "Yearly retention duration in years must not be empty " + throw $errormsg + } + if($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleFormatType -eq "Weekly") + { + if($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.DaysOfTheWeek.Count -eq 0) + { + $errormsg = "Days of the week must not be empty for week based Yearly retention." + throw $errormsg + } + if($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.weeksOfTheMonth.Count -eq 0) + { + $errormsg = "Weeks of the month must not be empty for week based Yearly retention." + throw $errormsg + } + if($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.monthsOfYear.Count -eq 0) + { + $errormsg = "Months of the year must not be empty for week based Yearly retention." + throw $errormsg + } + #Write-Host "Yearly retention duration in years: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionDuration.Count)" + #Write-Host "Yearly retention: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleFormatType)" + #Write-Host "Yearly retention Days of the week: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.DaysOfTheWeek)" + #Write-Host "Yearly retention Weeks of the month: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.weeksOfTheMonth)" + #Write-Host "Yearly retention Months of the year: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.monthsOfYear)" + } + elseif($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleFormatType -eq "Daily") + { + if($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.monthsOfYear.Count -eq 0) + { + $errormsg = "Months of the year must not be empty for day based Yearly retention." + throw $errormsg + } + if($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleDaily.DaysOfTheMonth.Count -eq 0) + { + $errormsg = "Days of the month must not be empty for day based Yearly retention." + throw $errormsg + } + #Write-Host "Yearly retention duration in years: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionDuration.Count)" + #Write-Host "Yearly retention: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleFormatType)" + #Write-Host "Yearly retention Months of the year: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.monthsOfYear)" + #$days = $pol1.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleDaily.DaysOfTheMonth + #Write-Host "Yearly retention Days of the month:" + #foreach ($day in $days) { + # $dayValue = $day.Date + # Write-Host $dayValue + #} + } + } + else #AzureVM + { + if(($Policy.RetentionPolicy.YearlySchedule.RetentionDuration.Count -eq $null) -or ($Policy.RetentionPolicy.YearlySchedule.RetentionDuration.Count -eq 0)) + { + $errormsg = "Yearly retention duration in years must not be empty " + throw $errormsg + } + if($Policy.RetentionPolicy.YearlySchedule.RetentionScheduleFormatType -eq "Weekly") + { + if($Policy.RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.DaysOfTheWeek.Count -eq 0) + { + $errormsg = "Days of the week must not be empty for week based Yearly retention." + throw $errormsg + } + if($Policy.RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.weeksOfTheMonth.Count -eq 0) + { + $errormsg = "Weeks of the month must not be empty for week based Yearly retention." + throw $errormsg + } + if($Policy.RetentionPolicy.YearlySchedule.monthsOfYear.Count -eq 0) + { + $errormsg = "Months of the year must not be empty for week based Yearly retention." + throw $errormsg + } + #Write-Host "Yearly retention duration in years: $($Policy.RetentionPolicy.YearlySchedule.RetentionDuration.Count)" + #Write-Host "Yearly retention: $($Policy.RetentionPolicy.YearlySchedule.RetentionScheduleFormatType)" + #Write-Host "Yearly retention Days of the week: $($Policy.RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.DaysOfTheWeek)" + #Write-Host "Yearly retention Weeks of the month: $($Policy.RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.weeksOfTheMonth)" + #Write-Host "Yearly retention Months of the year: $($Policy.RetentionPolicy.YearlySchedule.monthsOfYear)" + } + elseif($Policy.RetentionPolicy.YearlySchedule.RetentionScheduleFormatType -eq "Daily") + { + if($Policy.RetentionPolicy.YearlySchedule.monthsOfYear.Count -eq 0) + { + $errormsg = "Months of the year must not be empty for day based Yearly retention." + throw $errormsg + } + if($Policy.RetentionPolicy.YearlySchedule.RetentionScheduleDaily.DaysOfTheMonth.Count -eq 0 ) + { + $errormsg = "Days of the month must not be empty for day based Yearly retention." + throw $errormsg + } + #Write-Host "Yearly retention duration in years: $($Policy.RetentionPolicy.YearlySchedule.RetentionDuration.Count)" + #Write-Host "Yearly retention: $($Policy.RetentionPolicy.YearlySchedule.RetentionScheduleFormatType)" + #Write-Host "Yearly retention Months of the year: $($Policy.RetentionPolicy.YearlySchedule.monthsOfYear)" + #$days = $pol1.RetentionPolicy.YearlySchedule.RetentionScheduleDaily.DaysOfTheMonth + #Write-Host "Yearly retention Days of the month:" + #foreach ($day in $days) { + # $dayValue = $day.Date + # Write-Host $dayValue + #} + } + } + } + } +} + + + +function ValidateTieringPolicy +{ + if($tieringdetails.TieringMode -eq "") + { + $errormsg="Please specify the tiering mode" + throw $errormsg + } + if( ($tieringdetails.TieringMode -eq "DoNotTier") -or ($tieringdetails.TieringMode -eq "TierRecommended")) + { + if(($tieringdetails.Duration -ne $null -or $tieringdetails.DurationType -ne $null) -and ($tieringdetails.Duration -gt 0 -and $tieringdetails.durationType -ne "Invalid")) + { + $errormsg="Invalid parameters TierAfterDuration, TierAfterDurationType for the given TieringMode" + throw $errormsg + } + } + elseif($tieringdetails.TieringMode -eq "TierAfter") + { + if( ($tieringdetails.Duration -eq $null) -or ($tieringdetails.Duration -eq 0) -or ($tieringdetails.DurationType -eq "") -or ($tieringdetails.DurationType -eq $null) ) + { + $errormsg="Missing parameter values for TierAfter Mode" + throw $errormsg + } + } + # To enable Archive(either TierRecommended or TierAfter), Monthly or Yearly retention needs to be set + if($tieringdetails.TieringMode -ne "" -and $tieringdetails.TieringMode -ne "DoNotTier" -and $manifest.allowedSubProtectionPolicyTypes.Count -lt 2) + { + if ( (($policy.RetentionPolicy.MonthlySchedule.RetentionDuration[0].Count -eq $null) -or ($policy.RetentionPolicy.MonthlySchedule.RetentionDuration[0].Count -eq 0)) -and (($policy.RetentionPolicy.YearlySchedule.RetentionDuration.Count -eq $null) -or ($policy.RetentionPolicy.YearlySchedule.RetentionDuration.Count -eq 0)) ) + { + $errormsg="Monthly or Yearly retention needs to be set to enable Archive smart tiering. Please modify retention or disable smart tiering. Please note that disabling smart tiering may involve additional costs." + throw $errormsg + } + + # For TierRecommended policy: At least one of monthly or yearly retention should be >= 9 months. + if ($tieringdetails.TieringMode -eq "TierRecommend") + { + if ( ( (($policy.RetentionPolicy.MonthlySchedule.RetentionDuration[0].Count -eq $null) -or ($policy.RetentionPolicy.MonthlySchedule.RetentionDuration[0].Count -eq 0)) -or ($policy.RetentionPolicy.MonthlySchedule.RetentionDuration.Count -lt 9)) -and ( (($policy.RetentionPolicy.YearlySchedule.RetentionDuration.Count -eq $null) -or ($policy.RetentionPolicy.YearlySchedule.RetentionDuration.Count -eq 0)) -or ($policy.RetentionPolicy.YearlySchedule.RetentionDuration.Count * 12) -lt 9) ) + { + $errormsg="At least one of monthly or yearly retention should be >= 9 months for enabling TierRecommended mode for smart tiering. Please modify retention or disable smart tiering. Please note that disabling smart tiering may involve additional costs." + throw $errormsg + } + } + #For TierAfter policy: TierAfter duration needs to be >= 3 months, At least one of monthly or yearly retention should be >= (TierAfter + 6) months. + # e.g. if TierAfter is specified as 6 months, at least one of monthly or yearly retention should be at least 12 months. + if($tieringdetails.TieringMode -eq "TierAfter") + { + if($tieringdetails.duration -lt 3 -or (( (($policy.RetentionPolicy.MonthlySchedule.RetentionDuration[0].Count -eq $null) -or ($policy.RetentionPolicy.MonthlySchedule.RetentionDuration[0].Count -eq 0)) -or $policy.RetentionPolicy.MonthlySchedule.RetentionDuration[0].Count -lt $tieringdetails.duration + 6) -and ( (($policy.RetentionPolicy.YearlySchedule.RetentionDuration.Count -eq $null) -or ($policy.RetentionPolicy.YearlySchedule.RetentionDuration.Count -eq 0)) -or ($policy.RetentionPolicy.YearlySchedule.RetentionDuration.Count * 12) -lt $tieringdetails.duration + 6))) + { + $errormsg="TierAfterDuration needs to be >= 3 months, at least one of monthly or yearly retention should be >= (TierAfterDuration + 6) months for smart tiering. Please modify retention or disable smart tiering. Please note that disabling smart tiering may involve additional costs." + throw $errormsg + } + } + } + + if($tieringdetails.TieringMode -ne "" -and $tieringdetails.TieringMode -ne "DoNotTier" -and $manifest.allowedSubProtectionPolicyTypes.Count -gt 2) + { + # To enable Archive, Full Backup Policy needs to be set. + if ($policy.SubProtectionPolicy[$Index].SchedulePolicy.ScheduleRunFrequency -eq "" -and $MoveToArchiveTier -eq $true) + { + $errormsg="FullBackupRetentionPolicy can't be null while enabling Archive smart tiering for BackupManagementType AzureWorkload" + throw $errormsg + } + + # For TierAfter policy: TierAfter duration needs to be >= 45 days, at least one retention policy for full backup (daily / weekly / monthly / yearly) should be >= (TierAfter + 180) days. + # e.g. if TierAfter is specified as 100 days, at least one retention policy for Full Backup needs to be greater than or equal to 280 days. + $daily=$true + if(($policy.SubProtectionPolicy[$Index].RetentionPolicy.DailySchedule.RetentionDuration.Count -eq $null) -or ($policy.SubProtectionPolicy[$Index].RetentionPolicy.DailySchedule.RetentionDuration.Count -eq 0)) + { + $daily=$false + } + $weekly=$true + if(($policy.SubProtectionPolicy[$Index].RetentionPolicy.WeeklySchedule.RetentionDuration.Count -eq $null) -or ($policy.SubProtectionPolicy[$Index].RetentionPolicy.WeeklySchedule.RetentionDuration.Count -eq 0)) + { + $weekly=$false + } + $monthly=$true + if(($policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionDuration[0].Count -eq $null) -or ($policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionDuration[0].Count -eq 0)) + { + $monthly=$false + } + $yearly=$true + if(($policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionDuration.Count -eq $null) -or ($policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionDuration.Count -eq 0)) + { + $yearly=$false + } + if ($tieringdetails.TieringMode -eq "TierAfter") + { + if( + $tieringdetails.duration -lt 45 -or + ( + ($daily -eq $false -or ($policy.SubProtectionPolicy[$Index].RetentionPolicy.DailySchedule.RetentionDuration.Count) -lt ($tieringdetails.duration + 180)) -and (($weekly -eq $false) -or (($policy.SubProtectionPolicy[$Index].RetentionPolicy.WeeklySchedule.RetentionDuration[0].Count * 7) -lt ($tieringdetails.duration + 180))) -and (($monthly -eq $false) -or (($policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionDuration[0].Count * 30) -lt ($tieringdetails.duration + 180))) -and (($yearly -eq $false -or ($policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionDuration.Count * 365) -lt ($tieringdetails.duration + 180))) + )) + { + $errormsg= "TierAfterDuration needs to be >= 45 Days, at least one retention policy for full backup (daily / weekly / monthly / yearly) should be >= (TierAfter + 180) days for smart tiering. Please modify retention or disable smart tiering. Please note that disabling smart tiering may involve additional costs." + throw $errormsg + } + } + } + +} + + \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/commonhelper.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/commonhelper.ps1 new file mode 100644 index 000000000000..ef9a67602ea8 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/commonhelper.ps1 @@ -0,0 +1,20 @@ +# takes bacvkupmanagement type and workload type as i/p & gives dataspurce type +function Get-DataSourceType { + param( + [string]$BackupManagementType, + [string]$WorkloadType + ) + + if ($BackupManagementType -eq "AzureWorkload") { + if ($WorkloadType -eq "SAPHanaDatabase") { + return "SAPHANA" + } elseif ($WorkloadType -eq "SQLDataBase") { + return "MSSQL" + } + } elseif ($BackupManagementType -eq "AzureIaasVM") { + return "AzureVM" + } + + # Return null if no match found + return $null +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/README.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/README.md new file mode 100644 index 000000000000..541525557fc8 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/README.md @@ -0,0 +1,41 @@ +# Custom +This directory contains custom implementation for non-generated cmdlets for the `Az.RecoveryServices` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `..\exports` folder. The only generated file into this folder is the `Az.RecoveryServices.custom.psm1`. This file should not be modified. + +## Info +- Modifiable: yes +- Generated: partial +- Committed: yes +- Packaged: yes + +## Details +For `Az.RecoveryServices` to use custom cmdlets, it does this two different ways. We **highly recommend** creating script cmdlets, as they are easier to write and allow access to the other exported cmdlets. C# cmdlets *cannot access exported cmdlets*. + +For C# cmdlets, they are compiled with the rest of the generated low-level cmdlets into the `./bin/Az.RecoveryServices.private.dll`. The names of the cmdlets (methods) and files must follow the `[cmdletName]_[variantName]` syntax used for generated cmdlets. The `variantName` is used as the `ParameterSetName`, so use something appropriate that doesn't clash with already created variant or parameter set names. You cannot use the `ParameterSetName` property in the `Parameter` attribute on C# cmdlets. Each cmdlet must be separated into variants using the same pattern as seen in the `generated/cmdlets` folder. + +For script cmdlets, these are loaded via the `Az.RecoveryServices.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundamental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build. + +## Purpose +This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `..\exports` folder. + +## Usage +The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `..\exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters: +- Break +- DefaultProfile +- HttpPipelineAppend +- HttpPipelinePrepend +- Proxy +- ProxyCredential +- ProxyUseDefaultCredentials + +These provide functionality to our HTTP pipeline and other useful features. In script, you can forward these parameters using `$PSBoundParameters` to the other cmdlets you're calling within `Az.RecoveryServices`. For C#, follow the usage seen in the `ProcessRecordAsync` method. + +### Attributes +For processing the cmdlets, we've created some additional attributes: +- `Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.DescriptionAttribute` + - Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts. +- `Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.DoNotExportAttribute` + - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.RecoveryServices`. +- `Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.InternalExportAttribute` + - Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.RecoveryServices`. For more information, see [README.md](..\internal/README.md) in the `..\internal` folder. +- `Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.ProfileAttribute` + - Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules. \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/AzureVM.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/AzureVM.json new file mode 100644 index 000000000000..75adbdcf362b --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/AzureVM.json @@ -0,0 +1,100 @@ +{ + "allowedSubProtectionPolicyTypes": [ "Full" ], + "allowedBackupFrequencies": [ "Daily", "Weekly", "Hourly" ], + "supportsEnhanced": true, + "allowedDifferentialParams": [], + "allowedIncrementalParams": [], + "allowedLogParams": [], + "allowedDaysOfTheWeek": [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], + "allowedMonthsOfTheYear": [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ], + "allowedWeeksOfTheMonth": [ "First", "Second", "Third", "Fourth", "Last" ], + "IsSmartTieringSupported": true, + "policySettings": { + "defaultPolicy": { + "backupManagementType": "AzureIaasVM", + "policyType": "V1", + "instantRPDetails": {}, + "schedulePolicy": { + "schedulePolicyType": "SimpleSchedulePolicy", + "scheduleRunFrequency": "Daily", + "scheduleRunTimes": [ + "2023-05-22T14:00:00Z" + ], + "scheduleWeeklyFrequency": 0 + }, + "retentionPolicy": { + "retentionPolicyType": "LongTermRetentionPolicy", + "dailySchedule": { + "retentionTimes": [ + "2023-05-22T14:00:00Z" + ], + "retentionDuration": { + "count": 180, + "durationType": "Days" + } + }, + "weeklySchedule": { + "daysOfTheWeek": [ + "Sunday" + ], + "retentionTimes": [ + "2023-05-22T14:00:00Z" + ], + "retentionDuration": { + "count": 12, + "durationType": "Weeks" + } + }, + "monthlySchedule": { + "retentionScheduleFormatType": "Weekly", + "retentionScheduleWeekly": { + "daysOfTheWeek": [ + "Sunday" + ], + "weeksOfTheMonth": [ + "First" + ] + }, + "retentionTimes": [ + "2023-05-22T14:00:00Z" + ], + "retentionDuration": { + "count": 60, + "durationType": "Months" + } + }, + "yearlySchedule": { + "retentionScheduleFormatType": "Weekly", + "monthsOfYear": [ + "January" + ], + "retentionScheduleWeekly": { + "daysOfTheWeek": [ + "Sunday" + ], + "weeksOfTheMonth": [ + "First" + ] + }, + "retentionTimes": [ + "2023-05-22T14:00:00Z" + ], + "retentionDuration": { + "count": 10, + "durationType": "Years" + } + } + }, + "tieringPolicy": { + "ArchivedRP": { + "tieringMode": "DoNotTier", + "duration": 0, + "durationType": "Invalid" + } + }, + "instantRpRetentionRangeInDays": 2, + "timeZone": "UTC", + "protectedItemsCount": 0 + } + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/DatasourceTypesInfo.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/DatasourceTypesInfo.json new file mode 100644 index 000000000000..609321f2100f --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/DatasourceTypesInfo.json @@ -0,0 +1,29 @@ +{ + "supportedDatasourceTypes": [ + { + "serviceBackupManagementType": "AzureIaasVM", + "serviceWorkloadType": "", + "clientDatasourceType": "AzureVM" + }, + { + "backupManagementType": "AzureWorkload", + "workloadType": "SQLDatabase", + "clientDatasourceType": "MSSQL" + }, + { + "backupManagementType": "AzureStorage", + "workloadType": "", + "clientDatasourceType": "AzureFiles" + }, + { + "backupManagementType": "AzureWorkload", + "workloadType": "SAPHanaDatabase", + "clientDatasourceType": "SAPHANA" + }, + { + "backupManagementType": "AzureWorkload", + "workloadType": "SAPHanaDBInstance", + "clientDatasourceType": "SAPHANAWithSnapshot" + } + ] +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/MSSQL.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/MSSQL.json new file mode 100644 index 000000000000..03e1c5c6c9ea --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/MSSQL.json @@ -0,0 +1,120 @@ +{ + "allowedSubProtectionPolicyTypes": [ "Full", "Differential", "Log" ], + "allowedBackupFrequencies": [ "Daily", "Weekly" ], + "supportsEnhanced": false, + "allowedDifferentialParams": [ "DifferentialRetentionPeriodInDays" ], + "allowedIncrementalParams": [ "IncrementalRetentionPeriodInDays" ], + "allowedLogParams": [ "LogRetentionPeriodInDays" ], + "allowedDaysOfTheWeek": [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], + "allowedMonthsOfTheYear": [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ], + "allowedWeeksOfTheMonth": [ "First", "Second", "Third", "Fourth", "Last" ], + "IsSmartTieringSupported": true, + "policySettings": { + "defaultPolicy": { + "backupManagementType": "AzureWorkload", + "workLoadType": "SQLDataBase", + "settings": { + "timeZone": "UTC", + "issqlcompression": false, + "isCompression": false + }, + "subProtectionPolicy": [ + { + "policyType": "Full", + "schedulePolicy": { + "schedulePolicyType": "SimpleSchedulePolicy", + "scheduleRunFrequency": "Daily", + "scheduleRunTimes": [ + "2020-09-30T19:30:00Z" + ], + "scheduleWeeklyFrequency": 0 + }, + "retentionPolicy": { + "retentionPolicyType": "LongTermRetentionPolicy", + "dailySchedule": { + "retentionTimes": [ + "2020-09-30T19:30:00Z" + ], + "retentionDuration": { + "count": 180, + "durationType": "Days" + } + }, + "weeklySchedule": { + "daysOfTheWeek": [ + "Sunday" + ], + "retentionTimes": [ + "2020-09-30T19:30:00Z" + ], + "retentionDuration": { + "count": 104, + "durationType": "Weeks" + } + }, + "monthlySchedule": { + "retentionScheduleFormatType": "Weekly", + "retentionScheduleWeekly": { + "daysOfTheWeek": [ + "Sunday" + ], + "weeksOfTheMonth": [ + "First" + ] + }, + "retentionTimes": [ + "2020-09-30T19:30:00Z" + ], + "retentionDuration": { + "count": 60, + "durationType": "Months" + } + }, + "yearlySchedule": { + "retentionScheduleFormatType": "Weekly", + "monthsOfYear": [ + "January" + ], + "retentionScheduleWeekly": { + "daysOfTheWeek": [ + "Sunday" + ], + "weeksOfTheMonth": [ + "First" + ] + }, + "retentionTimes": [ + "2020-09-30T19:30:00Z" + ], + "retentionDuration": { + "count": 10, + "durationType": "Years" + } + } + }, + "tieringPolicy": { + "ArchivedRP": { + "tieringMode": "DoNotTier", + "duration": 0, + "durationType": "Invalid" + } + } + }, + { + "policyType": "Log", + "schedulePolicy": { + "schedulePolicyType": "LogSchedulePolicy", + "scheduleFrequencyInMins": 120 + }, + "retentionPolicy": { + "retentionPolicyType": "SimpleRetentionPolicy", + "retentionDuration": { + "count": 15, + "durationType": "Days" + } + } + } + ] + } + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/ManifestLoader.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/ManifestLoader.ps1 new file mode 100644 index 000000000000..734afaaa507c --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/ManifestLoader.ps1 @@ -0,0 +1,40 @@ + +function LoadManifest { + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.DoNotExportAttribute()] + [OutputType('PSObject')] + [CmdletBinding(PositionalBinding=$false)] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Description('Prepares Datasource object for backup')] + + param( + [Parameter(ParameterSetName='GetByDatasourceType', Mandatory, HelpMessage='Datasource Type')] + [System.String] + ${DatasourceType} + ) + + process { + # validate datasource type is valid + $manifestPath = $PSScriptRoot + "\" + $DatasourceType + ".json" + $manifest = Get-Content -Path $manifestPath | ConvertFrom-Json + + return $manifest + } +} + +# RsvRef : get DSTypes - check this code +function GetDatasourceTypes { + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.DoNotExportAttribute()] + [OutputType('PSObject')] + [CmdletBinding(PositionalBinding=$false)] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Description('Prepares Datasource object for backup')] + + param( + ) + + process { + # validate datasource type is valid + $manifestPath = $PSScriptRoot + "/DatasourceTypesInfo.json" + $manifest = Get-Content -Path $manifestPath | ConvertFrom-Json + + return $manifest + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/SAPHANA.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/SAPHANA.json new file mode 100644 index 000000000000..c52323e256ba --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/SAPHANA.json @@ -0,0 +1,120 @@ +{ + "allowedSubProtectionPolicyTypes": [ "Full", "Differential", "Incremental", "Log" ], + "allowedBackupFrequencies": [ "Daily", "Weekly" ], + "supportsEnhanced": false, + "allowedDifferentialParams": [ "DifferentialRetentionPeriodInDays" ], + "allowedIncrementalParams": [ "IncrementalRetentionPeriodInDays" ], + "allowedLogParams": [ "LogRetentionPeriodInDays" ], + "allowedDaysOfTheWeek": [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], + "allowedMonthsOfTheYear": [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ], + "allowedWeeksOfTheMonth": [ "First", "Second", "Third", "Fourth", "Last" ], + "IsSmartTieringSupported": true, + "policySettings": { + "defaultPolicy": { + "backupManagementType": "AzureWorkload", + "workLoadType": "SAPHanaDatabase", + "settings": { + "timeZone": "UTC", + "issqlcompression": false, + "isCompression": false + }, + "subProtectionPolicy": [ + { + "policyType": "Full", + "schedulePolicy": { + "schedulePolicyType": "SimpleSchedulePolicy", + "scheduleRunFrequency": "Daily", + "scheduleRunTimes": [ + "2020-09-30T19:30:00Z" + ], + "scheduleWeeklyFrequency": 0 + }, + "retentionPolicy": { + "retentionPolicyType": "LongTermRetentionPolicy", + "dailySchedule": { + "retentionTimes": [ + "2020-09-30T19:30:00Z" + ], + "retentionDuration": { + "count": 180, + "durationType": "Days" + } + }, + "weeklySchedule": { + "daysOfTheWeek": [ + "Sunday" + ], + "retentionTimes": [ + "2020-09-30T19:30:00Z" + ], + "retentionDuration": { + "count": 104, + "durationType": "Weeks" + } + }, + "monthlySchedule": { + "retentionScheduleFormatType": "Weekly", + "retentionScheduleWeekly": { + "daysOfTheWeek": [ + "Sunday" + ], + "weeksOfTheMonth": [ + "First" + ] + }, + "retentionTimes": [ + "2020-09-30T19:30:00Z" + ], + "retentionDuration": { + "count": 60, + "durationType": "Months" + } + }, + "yearlySchedule": { + "retentionScheduleFormatType": "Weekly", + "monthsOfYear": [ + "January" + ], + "retentionScheduleWeekly": { + "daysOfTheWeek": [ + "Sunday" + ], + "weeksOfTheMonth": [ + "First" + ] + }, + "retentionTimes": [ + "2020-09-30T19:30:00Z" + ], + "retentionDuration": { + "count": 10, + "durationType": "Years" + } + } + }, + "tieringPolicy": { + "ArchivedRP": { + "tieringMode": "DoNotTier", + "duration": 0, + "durationType": "Invalid" + } + } + }, + { + "policyType": "Log", + "schedulePolicy": { + "schedulePolicyType": "LogSchedulePolicy", + "scheduleFrequencyInMins": 120 + }, + "retentionPolicy": { + "retentionPolicyType": "SimpleRetentionPolicy", + "retentionDuration": { + "count": 15, + "durationType": "Days" + } + } + } + ] + } + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/default.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/default.json new file mode 100644 index 000000000000..29091fa5825d --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/default.json @@ -0,0 +1,3 @@ +{ + +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Az.RecoveryServices.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Az.RecoveryServices.md new file mode 100644 index 000000000000..b1f29e2d0ba3 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Az.RecoveryServices.md @@ -0,0 +1,35 @@ +--- +Module Name: Az.RecoveryServices +Module Guid: 37eaf44e-78f7-4a5a-82d1-f6350681704b +Download Help Link: https://docs.microsoft.com/powershell/module/az.recoveryservices +Help Version: 1.0.0.0 +Locale: en-US +--- + +# Az.RecoveryServices Module +## Description +Microsoft Azure PowerShell: RecoveryServices cmdlets + +## Az.RecoveryServices Cmdlets +### [Edit-AzrecoveryServicesBackupRetentionPolicyClientObject](Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.md) +Edits the retention settings for the policy client object + +### [Edit-AzRecoveryServicesBackupSchedulePolicyClientObject](Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.md) +Edits the schedule policy in the specified backup policy object. + +### [Get-AzRecoveryServicesBackupPolicy](Get-AzRecoveryServicesBackupPolicy.md) +Provides the details of the backup policies associated to Recovery Services Vault. +This is an asynchronous\r\noperation. +Status of the operation can be fetched using GetPolicyOperationResult API. + +### [Get-AzRecoveryServicesPolicyTemplate](Get-AzRecoveryServicesPolicyTemplate.md) +Gets default policy template for a selected datasource type. + +### [New-AzRecoveryServicesBackupPolicy](New-AzRecoveryServicesBackupPolicy.md) +Creates a new backup policy in a given recovery services vault + +### [Remove-AzRecoveryServicesBackupPolicy](Remove-AzRecoveryServicesBackupPolicy.md) +Deletes specified backup policy from your Recovery Services Vault. +This is an asynchronous operation. +Status of the\r\noperation can be fetched using GetProtectionPolicyOperationResult API. + diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.md new file mode 100644 index 000000000000..040463ae99ab --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.md @@ -0,0 +1,454 @@ +--- +external help file: +Module Name: Az.RecoveryServices +online version: https://docs.microsoft.com/powershell/module/az.recoveryservices/edit-azrecoveryservicesbackupschedulepolicyclientobject +schema: 2.0.0 +--- + +# Edit-AzRecoveryServicesBackupSchedulePolicyClientObject + +## SYNOPSIS +Edits the schedule policy in the specified backup policy object. + +## SYNTAX + +``` +Edit-AzRecoveryServicesBackupSchedulePolicyClientObject -Policy + [-BackupFrequency ] [-DifferentialRunDay ] [-DifferentialScheduleTime ] + [-EnableDifferentialBackup ] [-EnableIncrementalBackup ] [-EnableLogBackup ] + [-HourlyInterval ] [-HourlyScheduleWindowDuration ] [-IncrementalRunDay ] + [-IncrementalScheduleTime ] [-LogBackupFrequencyInMin ] [-PolicySubType ] + [-ScheduleRunDay ] [-ScheduleTime ] [-TimeZone ] [] +``` + +## DESCRIPTION +Edits the schedule policy in the specified backup policy object. + +## EXAMPLES + +### Example 1: Editing AzureVM backup schedule policy to standard daily full backup +```powershell +$pol = Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM +$editedPolicy = Edit-AzRecoveryServicesBackupSchedulePolicyClientObject -Policy $pol -PolicySubType "Standard" -BackupFrequency "Daily" -ScheduleTime "1:30 PM" -TimeZone "Tokyo Standard Time" +$editedPolicy.SchedulePolicy | fl +``` + +```output +HourlySchedule : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.HourlySchedule +ScheduleRunDay : +ScheduleRunFrequency : Daily +ScheduleRunTime : {6/19/2023 1:30:00 PM} +ScheduleWeeklyFrequency : 0 +Type : SimpleSchedulePolicy +``` + +This creates a standard daily full backup schedule for AzureVM + +### Example 2: Editing AzureVM backup schedule policy to enhanced weekly full backup +```powershell +$pol = Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM +$editedPolicy = Edit-AzRecoveryServicesBackupSchedulePolicyClientObject -Policy $pol -PolicySubType "Enhanced" -BackupFrequency "Weekly" -ScheduleRunDay @("Monday", "Thursday") -ScheduleTime "1:30 PM" -TimeZone "Tokyo Standard Time" +$editedPolicy.SchedulePolicy | fl +``` + +```output +DailyScheduleRunTime : +HourlySchedule : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.HourlySchedule +ScheduleRunFrequency : Weekly +Type : SimpleSchedulePolicyV2 +WeeklyScheduleRunDay : {Monday, Thursday} +WeeklyScheduleRunTime : {6/19/2023 1:30:00 PM} +``` + +This creates an enhanced weekly full backup schedule for AzureVM + +### Example 3: Editing AzureVM backup schedule policy to enhanced hourly full backup +```powershell +$pol = Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM +$editedPolicy = Edit-AzRecoveryServicesBackupSchedulePolicyClientObject -Policy $pol -PolicySubType "Enhanced" -BackupFrequency "Hourly" -HourlyInterval 4 -HourlyScheduleWindowDuration 24 -ScheduleTime "1:30 PM" -TimeZone "Tokyo Standard Time" +$editedPolicy.SchedulePolicy | fl +$editedPolicy.SchedulePolicy.HourlySchedule | fl +``` + +```output +DailyScheduleRunTime : +HourlySchedule : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.HourlySchedule +ScheduleRunFrequency : Hourly +Type : SimpleSchedulePolicyV2 +WeeklyScheduleRunDay : +WeeklyScheduleRunTime : + +Interval : 4 +ScheduleWindowDuration : 24 +ScheduleWindowStartTime : 6/19/2023 1:30:00 PM +``` + +This creates an enhanced hourly full backup schedule for AzureVM + +### Example 4: Editing SAPHANA backup schedule policy to daily or weekly full backup +```powershell +$pol = Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA +$editedPolicy = Edit-AzRecoveryServicesBackupSchedulePolicyClientObject -Policy $pol -BackupFrequency "Daily" -ScheduleTime "1:30 PM" -TimeZone "Tokyo Standard Time" +$FullBackupPolicy = $editedPolicy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Full" } +$FullBackupPolicy.SchedulePolicy | fl + +$pol = Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA +$editedPolicy = Edit-AzRecoveryServicesBackupSchedulePolicyClientObject -Policy $pol -BackupFrequency "Weekly" -ScheduleRunDay @("Monday", "Thursday") -ScheduleTime "1:30 PM" -TimeZone "Tokyo Standard Time" +$FullBackupPolicy = $editedPolicy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Full" } +$FullBackupPolicy.SchedulePolicy | fl +``` + +```output +HourlySchedule : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.HourlySchedule +ScheduleRunDay : +ScheduleRunFrequency : Daily +ScheduleRunTime : {6/19/2023 1:30:00 PM} +ScheduleWeeklyFrequency : 0 +Type : SimpleSchedulePolicy + +HourlySchedule : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.HourlySchedule +ScheduleRunDay : {Monday, Thursday} +ScheduleRunFrequency : Weekly +ScheduleRunTime : {6/19/2023 1:30:00 PM} +ScheduleWeeklyFrequency : 0 +Type : SimpleSchedulePolicy +``` + +This creates daily and weekly full backup schedules respectively for SAPHANA + +### Example 5: Editing SAPHANA backup schedule policy to differential or incremental backup +```powershell +$pol = Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA +$editedPolicy = Edit-AzRecoveryServicesBackupSchedulePolicyClientObject -Policy $pol -BackupFrequency "Weekly" -ScheduleRunDay @("Monday", "Thursday") -EnableDifferentialBackup 1 -DifferentialRunDay @("Tuesday", "Friday") -DifferentialScheduleTime "2:00 AM" -ScheduleTime "1:30 PM" -TimeZone "Tokyo Standard Time" +$FullBackupPolicy = $editedPolicy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Full" } +$FullBackupPolicy.SchedulePolicy | fl +$DifferentialPolicy = $editedPolicy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Differential" } +$DifferentialPolicy.SchedulePolicy | fl + +$pol = Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA +$editedPolicy = Edit-AzRecoveryServicesBackupSchedulePolicyClientObject -Policy $pol -BackupFrequency "Weekly" -ScheduleRunDay @("Monday", "Thursday") -EnableIncrementalBackup 1 -IncrementalRunDay @("Tuesday", "Friday") -IncrementalScheduleTime "2:00 AM" -ScheduleTime "1:30 PM" -TimeZone "Tokyo Standard Time" +$FullBackupPolicy = $editedPolicy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Full" } +$FullBackupPolicy.SchedulePolicy | fl +$IncrementalPolicy = $editedPolicy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Incremental" } +$IncrementalPolicy.SchedulePolicy | fl +``` + +```output +Differential + +HourlySchedule : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.HourlySchedule +ScheduleRunDay : {Monday, Thursday} +ScheduleRunFrequency : Weekly +ScheduleRunTime : {6/20/2023 1:30:00 PM} +ScheduleWeeklyFrequency : 0 +Type : SimpleSchedulePolicySAPHanaDatabase + +HourlySchedule : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.HourlySchedule +ScheduleRunDay : {Tuesday, Friday} +ScheduleRunFrequency : Weekly +ScheduleRunTime : {6/20/2023 2:00:00 AM} +ScheduleWeeklyFrequency : 0 +Type : SimpleSchedulePolicy + +Incremental + +HourlySchedule : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.HourlySchedule +ScheduleRunDay : {Monday, Thursday} +ScheduleRunFrequency : Weekly +ScheduleRunTime : {6/20/2023 1:30:00 PM} +ScheduleWeeklyFrequency : 0 +Type : SimpleSchedulePolicy + +HourlySchedule : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.HourlySchedule +ScheduleRunDay : {Tuesday, Friday} +ScheduleRunFrequency : Weekly +ScheduleRunTime : {6/20/2023 2:00:00 AM} +ScheduleWeeklyFrequency : 0 +Type : SimpleSchedulePolicy +``` + +This creates differential and incremental backup schedules respectively for SAPHANA + +### Example 6: Editing SAPHANA backup schedule policy Log Backup +```powershell +$pol = Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA +$editedPolicy = Edit-AzRecoveryServicesBackupSchedulePolicyClientObject -Policy $pol -EnableLogBackup 1 -LogBackupFrequencyInMin 120 +$LogBackupPolicy = $editedPolicy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Log" } +$LogBackupPolicy.SchedulePolicy | fl +``` + +```output +ScheduleFrequencyInMin : 120 +Type : LogSchedulePolicy +``` + +This edits the Log backup frequency to 120 minutes for SAPHANA backup schedule policy + +## PARAMETERS + +### -BackupFrequency +Specifies the frequency of backup. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DifferentialRunDay +Specifies the days of the week for differential backup. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DifferentialScheduleTime +Specifies the time at which differential backup must be taken. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EnableDifferentialBackup +Specifies whether the user wants to enable differential backup. + +```yaml +Type: System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EnableIncrementalBackup +Specifies whether the user wants to enable incremental backup. + +```yaml +Type: System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EnableLogBackup +Specifies whether the user needs to make a log backup + +```yaml +Type: System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HourlyInterval +Specifies the interval between backups in hours. + +```yaml +Type: System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HourlyScheduleWindowDuration +Specifies the duration over which backup is taken in hours. + +```yaml +Type: System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IncrementalRunDay +Specifies the days of the week for incremental backup. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IncrementalScheduleTime +Specifies the time at which incremental backup must be taken. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LogBackupFrequencyInMin +Specifies the frequency of log backups in minutes + +```yaml +Type: System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Policy +Specifies the policy to be edited. +To construct, see NOTES section for POLICY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicy +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PolicySubType +Specifies the policy sub type for AzureVM. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.PolicySubTypes +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScheduleRunDay +Specifies the days of the week for weekly backup. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScheduleTime +Specifies the time at which backup must be taken. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TimeZone +Specifies the standard time zone. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicy + +## NOTES + +ALIASES + +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + + +`POLICY `: Specifies the policy to be edited. + - `BackupManagementType `: This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + - `[ProtectedItemsCount ]`: Number of items associated with this policy. + - `[ResourceGuardOperationRequest ]`: ResourceGuard Operation Requests + +## RELATED LINKS + diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.md new file mode 100644 index 000000000000..d06218772942 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.md @@ -0,0 +1,1224 @@ +--- +external help file: +Module Name: Az.RecoveryServices +online version: https://docs.microsoft.com/powershell/module/az.recoveryservices/edit-azrecoveryservicesbackupretentionpolicyclientobject +schema: 2.0.0 +--- + +# Edit-AzrecoveryServicesBackupRetentionPolicyClientObject + +## SYNOPSIS +Edits the retention settings for the policy client object + +## SYNTAX + +``` +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -DatasourceType + -Policy [-DailyRetentionDurationInDays ] + [-DifferentialRetentionPeriodInDays ] [-EnableDailyRetention ] + [-EnableMonthlyRetention ] [-EnableWeeklyRetention ] [-EnableYearlyRetention ] + [-IncrementalRetentionPeriodInDays ] [-LogRetentionPeriodInDays ] [-ModifyDifferentialBackup] + [-ModifyFullBackup] [-ModifyIncrementalBackup] [-ModifyLogBackup] [-MonthlyRetentionDaysOfTheMonth ] + [-MonthlyRetentionDaysOfTheWeek ] [-MonthlyRetentionDurationInMonths ] + [-MonthlyRetentionIsLastDayIncluded ] [-MonthlyRetentionScheduleType ] + [-MonthlyRetentionWeeksOfTheMonth ] [-WeeklyRetentionDaysOfTheWeek ] + [-WeeklyRetentionDurationInWeeks ] [-YearlyRetentionDaysOfTheMonth ] + [-YearlyRetentionDaysOfTheWeek ] [-YearlyRetentionDurationInYears ] + [-YearlyRetentionIsLastDayIncluded ] [-YearlyRetentionMonthsOfTheYear ] + [-YearlyRetentionScheduleType ] [-YearlyRetentionWeeksOfTheMonth ] [] +``` + +## DESCRIPTION +Edits the retention settings for the policy client object + +## EXAMPLES + +### Example 1: Edit the daily retention +```powershell +$pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableDailyRetention $true -DailyRetentionDurationInDays 56 +$pol1.RetentionPolicy.DailySchedule.RetentionDuration | fl +``` + +```output + +Count : 56 +DurationType : Days +``` + +The first command gets the default policy template for a given DatasourceType. +The second command modifies daily retention parameter in the obtained policy. +The third command is to display the modified policy. + +### Example 2: Disable the daily retention +```powershell +$pol1.SchedulePolicy.ScheduleRunFrequency="Weekly" +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableDailyRetention $false +$pol1.RetentionPolicy.DailySchedule.RetentionDuration | fl +``` + +```output + +Count : +DurationType : +``` + +The first command sets the Schedule run frequency to Weekly. +The second command disables the daily retention. +The third command is to display the modified policy. + +### Example 3: Edit the weekly retention +```powershell +$pol1.SchedulePolicy.ScheduleRunDay="Monday", "Tuesday", "Wednesday" +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableWeeklyRetention $true -WeeklyRetentionDurationInWeeks 34 -WeeklyRetentionDaysOfTheWeek Sunday,Monday +$pol1.RetentionPolicy.WeeklySchedule.RetentionDuration | fl +$pol1.RetentionPolicy.WeeklySchedule | fl +``` + +```output + +Count : 34 +DurationType : Weeks + + + +DaysOfTheWeek : {Monday, Tuesday, Wednesday} +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDura + tion +RetentionTime : {5/22/2023 2:00:00 PM} +``` + +The first command sets the schedule run days. +The second command is used to modify the weekly retention fields in the policy. +Note that WeeklyRetentionDaysOfTheWeek can't modify days of the week for weekly schedule but parameter needs to be passed. +The 3-4 command is to display the modified policy. + +### Example 4: Disable the weekly retention +```powershell +$pol1.SchedulePolicy.ScheduleRunFrequency="Daily" +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableWeeklyRetention $false +$pol1.RetentionPolicy.WeeklySchedule.RetentionDuration | fl +$pol1.RetentionPolicy.WeeklySchedule | fl +``` + +```output +Count : +DurationType : + + + +DaysOfTheWeek : +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDura + tion +RetentionTime : +``` + +The first command sets the schedule run frequency to daily. +The second command disables the weekly retention. +The 3-4 command is to display the modified policy. + +### Example 5: Edit the week based monthly retention when schedule run frequency is weekly +```powershell +$pol1.SchedulePolicy.ScheduleRunDay +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 34 -MonthlyRetentionDaysOfTheWeek "Monday","Tuesday" -MonthlyRetentionWeeksOfTheMonth Second, Fourth +$pol1.RetentionPolicy.MonthlySchedule | fl +$pol1.RetentionPolicy.MonthlySchedule.RetentionDuration | fl +$pol1.RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly | fl +``` + +```output + +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : Weekly +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : {5/22/2023 2:00:00 PM} + + + +Count : 34 +DurationType : Months + + + +DaysOfTheWeek : {Monday, Tuesday} +WeeksOfTheMonth : {Second, Fourth} +``` + +The first command fetches the schedule run days for assigning values to days of week. +The second command edits the week based monthly retention policy. +The 3-5 command is to display the modified policy. + +### Example 6: Edit the week based monthly retention when schedule run frequency is daily +```powershell +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 34 -MonthlyRetentionDaysOfTheWeek "Monday","Saturday" -MonthlyRetentionWeeksOfTheMonth Second, Fourth +$pol1.RetentionPolicy.MonthlySchedule | fl +$pol1.RetentionPolicy.MonthlySchedule.RetentionDuration | fl +$pol1.RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly | fl +``` + +```output + +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : Weekly +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : {5/22/2023 2:00:00 PM} + + + +Count : 34 +DurationType : Months + + + +DaysOfTheWeek : {Monday, Saturday} +WeeksOfTheMonth : {Second, Fourth} +``` + +This command edits the week based monthly retention policy. +The 2-4 command is to display the modified policy. + +### Example 7: Edit the day based monthly retention +```powershell +$pol1.SchedulePolicy.ScheduleRunFrequency="Daily" +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Daily -MonthlyRetentionDurationInMonths 45 -MonthlyRetentionDaysOfTheMonth 1,6,28 +$pol1.RetentionPolicy.MonthlySchedule | fl +$pol1.RetentionPolicy.MonthlySchedule.RetentionDuration | fl +$pol1.RetentionPolicy.MonthlySchedule.RetentionScheduleDaily.DaysOfTheMonth | fl +``` + +```output + +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : Daily +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : {5/22/2023 2:00:00 PM} + + + +Count : 45 +DurationType : Months + + + +Date : 1 +IsLast : + +Date : 6 +IsLast : + +Date : 28 +IsLast : +``` + +The first command changes the schedule run frequency to daily. +The second command edits the day based monthly retention policy. +The 3-5 command is to display the modified policy. + +### Example 8: Disable the monthly retention +```powershell +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $false +$pol1.RetentionPolicy.MonthlySchedule | fl +$pol1.RetentionPolicy.MonthlySchedule.RetentionDuration | fl +``` + +```output + +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : + + + +Count : +DurationType : +``` + +This command disables the monthly retention. +The 2-3 command is to display the modified policy. + +### Example 9: Edit the week based yearly retention when schedule run frequency is weekly +```powershell +$pol1.SchedulePolicy.ScheduleRunDay +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableYearlyRetention $true -YearlyRetentionScheduleType Weekly -YearlyRetentionDurationInYears 34 -YearlyRetentionMonthsOfTheYear @("May", "June") -YearlyRetentionDaysOfTheWeek Monday, Tuesday -YearlyRetentionWeeksOfTheMonth First, Third +$pol1.RetentionPolicy.YearlySchedule | fl +$pol1.RetentionPolicy.YearlySchedule.RetentionDuration | fl +$pol1.RetentionPolicy.YearlySchedule.RetentionScheduleWeekly | fl +``` + +```output + +MonthsOfYear : {May, June} +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : Weekly +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : {5/22/2023 2:00:00 PM} + + + +Count : 34 +DurationType : Years + + + +DaysOfTheWeek : {Monday, Tuesday} +WeeksOfTheMonth : {First, Third} +``` + +The first command fetches the schedule run days for assigning values to days of week. +The second command edits the week based yearly retention policy when schedule run frequency is weekly. +The 3-5 command is to display the modified policy. + +### Example 10: Edit the week based yearly retention when schedule run frequency is daily +```powershell +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableYearlyRetention $true -YearlyRetentionScheduleType Weekly -YearlyRetentionDurationInYears 67 -YearlyRetentionMonthsOfTheYear @("May", "June") -YearlyRetentionDaysOfTheWeek Monday, Saturday -YearlyRetentionWeeksOfTheMonth First, Third +$pol1.RetentionPolicy.YearlySchedule | fl +$pol1.RetentionPolicy.YearlySchedule.RetentionDuration | fl +$pol1.RetentionPolicy.YearlySchedule.RetentionScheduleWeekly | fl +``` + +```output + +MonthsOfYear : {May, June} +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : Weekly +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : {5/22/2023 2:00:00 PM} + + + +Count : 67 +DurationType : Years + + + +DaysOfTheWeek : {Monday, Saturday} +WeeksOfTheMonth : {First, Third} +``` + +This command edits the week based yearly retention policy when schedule run frequency is daily. +The 2-4 command is to display the modified policy. + +### Example 11: Edit the day based yearly retention +```powershell +$pol1.SchedulePolicy.ScheduleRunFrequency="Daily" +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableYearlyRetention $true -YearlyRetentionScheduleType Daily -YearlyRetentionMonthsOfTheYear May,April -YearlyRetentionDaysOfTheMonth 1,2,3 -YearlyRetentionDurationInYears 43 +$pol1.RetentionPolicy.YearlySchedule | fl +$pol1.RetentionPolicy.YearlySchedule.RetentionDuration | fl +$pol1.RetentionPolicy.YearlySchedule.RetentionScheduleDaily.DaysOfTheMonth | fl +``` + +```output + +MonthsOfYear : {May, April} +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : Daily +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : {5/22/2023 2:00:00 PM} + + + +Count : 43 +DurationType : Years + + + +Date : 1 +IsLast : + +Date : 2 +IsLast : + +Date : 3 +IsLast : +``` + +The first command changes the schedule run frequency to daily. +The second command edits the day based yearly retention policy. +The 3-5 command is to display the modified policy. + +### Example 12: Disable the yearly retention +```powershell +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableYearlyRetention $false +$pol1.RetentionPolicy.YearlySchedule | fl +$pol1.RetentionPolicy.YearlySchedule.RetentionDuration | fl +``` + +```output + +MonthsOfYear : +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : + + + +Count : +DurationType : +``` + +This command disables the yearly retention. +The 2-3 command is to display the modified policy. + + +# SAPHANA Policies + +### Example 1: Edit the Full Backup daily retention +```powershell +$pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableDailyRetention $true -DailyRetentionDurationInDays 32 +$pol1.SubProtectionPolicy[0].RetentionPolicy.DailySchedule.RetentionDuration | fl +``` + +```output + +Count : 32 +DurationType : Days +``` + +The first command gets the default policy template for a given DatasourceType. +The second command modifies the full backup daily retention parameter in the obtained policy. +The third command is to display the modified policy. + +### Example 2: Disable the full backup daily retention +```powershell +$pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunFrequency="Weekly" +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableDailyRetention $false +$pol1.SubProtectionPolicy[0].RetentionPolicy.DailySchedule.RetentionDuration | fl +``` + +```output + +Count : +DurationType : +``` + +The first command sets the Schedule run frequency to Weekly. +The second command disables the daily retention for full backup. +The third command is to display the modified policy. + +### Example 3: Edit the full backup weekly retention +```powershell +$pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunDay="Monday","Tuesday","Wednesday" +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableWeeklyRetention $true -WeeklyRetentionDurationInWeeks 11 -WeeklyRetentionDaysOfTheWeek Sunday +$pol1.SubProtectionPolicy[0].RetentionPolicy.WeeklySchedule.RetentionDuration | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.WeeklySchedule | fl +``` + +```output + +DaysOfTheWeek : {Monday, Tuesday, Wednesday} +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionTime : {9/30/2020 7:30:00 PM} + + + +Count : 11 +DurationType : Weeks +``` + +This command is used to modify the full backup weekly retention fields in the policy. +Note that WeeklyRetentionDaysOfTheWeek can't modify days of week for weekly schedule but parameter needs to be passed. +The 3-4 command is to display the modified policy. + +### Example 4: Disable the weekly retention +```powershell +$pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunFrequency="Daily" +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableWeeklyRetention $false +$pol1.SubProtectionPolicy[0].RetentionPolicy.WeeklySchedule.RetentionDuration | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.WeeklySchedule | fl +``` + +```output + +Count : +DurationType : + + + +DaysOfTheWeek : +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionTime : +``` + +This command disables the full backup weekly retention. +The 3-4 command is to display the modified policy. + +### Example 5: Edit the week based monthly retention when schedule run frequency is weekly +```powershell +$pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunDay +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 34 -MonthlyRetentionDaysOfTheWeek Monday -MonthlyRetentionWeeksOfTheMonth First, Last +$pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule.RetentionDuration | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly | fl +``` + +```output + +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : Weekly +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : {9/30/2020 7:30:00 PM} + + + +Count : 34 +DurationType : Months + + + +DaysOfTheWeek : {Monday} +WeeksOfTheMonth : {First, Last} +``` + +The first command fetches the schedule run days for assigning values to days of week. +The second command edits the full backup week based monthly retention policy. +The 3-5 command is to display the modified policy. + +### Example 6: Edit the week based monthly retention when schedule run frequency is daily +```powershell +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 34 -MonthlyRetentionDaysOfTheWeek Monday,Sunday +$pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule.RetentionDuration | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly | fl +``` + +```output + +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : Weekly +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : {9/30/2020 7:30:00 PM} + + + +Count : 34 +DurationType : Months + + + +DaysOfTheWeek : {Monday, Sunday} +WeeksOfTheMonth : {First, Last} +``` + +This command edits the full backup week based monthly retention policy. +The 2-4 command is to display the modified policy. + +### Example 7: Edit the day based monthly retention +```powershell +$pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunFrequency="Daily" +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Daily -MonthlyRetentionDaysOfTheMonth 1,2,3 -MonthlyRetentionDurationInMonths 67 +$pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule.RetentionDuration | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule.RetentionScheduleDaily.DaysOfTheMonth | fl +``` + +```output + +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : Daily +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : {9/30/2020 7:30:00 PM} + + + +Count : 67 +DurationType : Months + + + +Date : 1 +IsLast : + +Date : 2 +IsLast : + +Date : 3 +IsLast : +``` + +The first command changes the full backup schedule run frequency to daily. +The second command edits the day based monthly retention policy. +The 3-5 command is to display the modified policy. + +### Example 8: Disable the full backup monthly retention +```powershell +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableMonthlyRetention $false +$pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule.RetentionDuration | fl +``` + +```output + +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : + + + +Count : +DurationType : +``` + +This command disables the full backup monthly retention. +The 2-3 command is to display the modified policy. + +### Example 9: Edit the full backup week based yearly retention when schedule run frequency is weekly +```powershell +$pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunDay +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableYearlyRetention $true -YearlyRetentionScheduleType Weekly -YearlyRetentionDurationInYears 47 -YearlyRetentionMonthsOfTheYear May,June -YearlyRetentionDaysOfTheWeek Monday -YearlyRetentionWeeksOfTheMonth Last,First +$pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule.RetentionDuration | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule.RetentionScheduleWeekly | fl +``` + +```output + +MonthsOfYear : {May, June} +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : Weekly +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : {9/30/2020 7:30:00 PM} + + + +Count : 47 +DurationType : Years + + + +DaysOfTheWeek : {Monday} +WeeksOfTheMonth : {Last, First} +``` + +The first command fetches the schedule run days for assigning values to days of week. +The second command edits the full backup week based yearly retention policy when schedule run frequency is weekly. +The 3-5 command is to display the modified policy. + +### Example 10: Edit the full backup week based yearly retention when schedule run frequency is daily +```powershell +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableYearlyRetention $true -YearlyRetentionScheduleType Weekly -YearlyRetentionDurationInYears 47 -YearlyRetentionMonthsOfTheYear May,June -YearlyRetentionDaysOfTheWeek Monday -YearlyRetentionWeeksOfTheMonth Last,First +$pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule.RetentionDuration | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule.RetentionScheduleWeekly | fl +``` + +```output + +MonthsOfYear : {May, June} +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : Weekly +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : {9/30/2020 7:30:00 PM} + + + +Count : 47 +DurationType : Years + + + +DaysOfTheWeek : {Monday} +WeeksOfTheMonth : {Last, First} +``` + +This command edits the full backup week based yearly retention policy when schedule run frequency is daily. +The 2-4 command is to display the modified policy. + +### Example 11: Edit the full backup day based yearly retention +```powershell +$pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunFrequency="Daily" +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableYearlyRetention $true -YearlyRetentionScheduleType Daily -YearlyRetentionDurationInYears 76 -YearlyRetentionMonthsOfTheYear May,July -YearlyRetentionDaysOfTheMonth 7,17,27 +$pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule.RetentionDuration | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule.RetentionScheduleDaily.DaysOfTheMonth | fl +``` + +```output + +MonthsOfYear : {May, July} +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : Daily +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : {9/30/2020 7:30:00 PM} + + + +Count : 76 +DurationType : Years + + + +Date : 7 +IsLast : + +Date : 17 +IsLast : + +Date : 27 +IsLast : +``` + +The first command changes the full backup schedule run frequency to daily. +The second command edits the day based yearly retention policy. +The 3-5 command is to display the modified policy. + +### Example 12: Disable the yearly retention +```powershell +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableYearlyRetention $false +$pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule.RetentionDuration | fl +``` + +```output + +MonthsOfYear : +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : + + + +Count : +DurationType : +``` + +This command disables the full backup yearly retention. +The 2-3 command is to display the modified policy. + +### Example 13: Modify Differential backup retention policy +```powershell +$pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunFrequency="Weekly" +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyDifferentialBackup -DifferentialRetentionPeriodInDays 23 +$pol1.SubProtectionPolicy[2].RetentionPolicy | fl +``` + +```output + +RetentionDurationCount : 23 +RetentionDurationType : Days +Type : SimpleRetentionPolicy +``` + +This command modifies the differential backup retention policy. +The third command is to display the modified policy. + +### Example 14: Modify Incremental backup retention policy +```powershell +$pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunFrequency="Weekly" +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -IncrementalRetentionPeriodInDays 64 -ModifyIncrementalBackup +$pol1.SubProtectionPolicy[2].RetentionPolicy | fl +``` + +```output + +RetentionDurationCount : 23 +RetentionDurationType : Days +Type : SimpleRetentionPolicy +``` + +This command modifies the incremental backup retention policy. +The third command is to display the modified policy. + +### Example 15: Modify Log backup retention policy +```powershell +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -LogRetentionPeriodInDays 23 -ModifyLogBackup +$pol1.SubProtectionPolicy[1].RetentionPolicy | fl +``` + +```output + +RetentionDurationCount : 23 +RetentionDurationType : Days +Type : SimpleRetentionPolicy +``` + +This command modifies the log backup retention policy. +The third command is to display the modified policy. + +## PARAMETERS + +### -DailyRetentionDurationInDays +Specifies the daily schedule duration in days. + +```yaml +Type: System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatasourceType +Datasource Type + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.DatasourceTypes +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DifferentialRetentionPeriodInDays +Specifies the retention period for Differential Backup + +```yaml +Type: System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EnableDailyRetention +Boolean parameter to Enable/Disable Daily retention + +```yaml +Type: System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EnableMonthlyRetention +Boolean parameter to Enable/Disable Monthly retention + +```yaml +Type: System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EnableWeeklyRetention +Boolean parameter to Enable/Disable Weekly retention + +```yaml +Type: System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EnableYearlyRetention +Boolean parameter to Enable/Disable Yearly retention + +```yaml +Type: System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IncrementalRetentionPeriodInDays +Specifies the retention period for Incremental Backup + +```yaml +Type: System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LogRetentionPeriodInDays +Specifies the retention period for Log Backup + +```yaml +Type: System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ModifyDifferentialBackup +Switch parameter to modify differential backup retention policy. +You can use this parameter for DataSourceType: MSSQL, SAPHANA + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ModifyFullBackup +Switch parameter to modify FullBackup retention policy. +You can use this parameter for DataSourceType: MSSQL, SAPHANA + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ModifyIncrementalBackup +Switch parameter to modify incremental backup retention policy. +You can use this parameter for DataSourceType: MSSQL, SAPHANA + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ModifyLogBackup +Switch parameter to modify log backup retention policy. +You can use this parameter for DataSourceType: MSSQL, SAPHANA + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MonthlyRetentionDaysOfTheMonth +Specifies the days of the month for the monthly schedule. + +```yaml +Type: System.Int32[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MonthlyRetentionDaysOfTheWeek +Specifies the days of the week for the monthly schedule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MonthlyRetentionDurationInMonths +Specifies the monthly schedule duration in months. + +```yaml +Type: System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MonthlyRetentionIsLastDayIncluded +Boolean parameter to enable the day based monthly retention on last day of the month. + +```yaml +Type: System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MonthlyRetentionScheduleType +Specifies the retention schedule type for the monthly schedule: Week Based/Day Based + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MonthlyRetentionWeeksOfTheMonth +Specifies the weeks of the month for the monthly schedule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Policy +Specifies the policy to be edited. +To construct, see NOTES section for POLICY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicy +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WeeklyRetentionDaysOfTheWeek +Specifies the days of the week for the weekly schedule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WeeklyRetentionDurationInWeeks +Specifies the weekly schedule duration in weeks. + +```yaml +Type: System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -YearlyRetentionDaysOfTheMonth +Specifies the days of the month for the monthly schedule. + +```yaml +Type: System.Int32[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -YearlyRetentionDaysOfTheWeek +Specifies the days of the week for the yearly schedule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -YearlyRetentionDurationInYears +Specifies the yearly schedule duration in years. + +```yaml +Type: System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -YearlyRetentionIsLastDayIncluded +Boolean parameter to enable the day based yearly retention on last day of the month. + +```yaml +Type: System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -YearlyRetentionMonthsOfTheYear +Specifies the months of the year for the yearly schedule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -YearlyRetentionScheduleType +Specifies the retention schedule type for the yearly schedule. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -YearlyRetentionWeeksOfTheMonth +Specifies the weeks of the month for the monthly schedule. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicy + +## NOTES + +ALIASES + +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + + +`POLICY `: Specifies the policy to be edited. + - `BackupManagementType `: This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + - `[ProtectedItemsCount ]`: Number of items associated with this policy. + - `[ResourceGuardOperationRequest ]`: ResourceGuard Operation Requests + +## RELATED LINKS + diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupPolicy.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupPolicy.md new file mode 100644 index 000000000000..43eeddda7b51 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupPolicy.md @@ -0,0 +1,165 @@ +--- +external help file: +Module Name: Az.RecoveryServices +online version: https://docs.microsoft.com/powershell/module/az.recoveryservices/get-azrecoveryservicesbackuppolicy +schema: 2.0.0 +--- + +# Get-AzRecoveryServicesBackupPolicy + +## SYNOPSIS +Provides the details of the backup policies associated to Recovery Services Vault. +This is an asynchronous\r\noperation. +Status of the operation can be fetched using GetPolicyOperationResult API. + +## SYNTAX + +### List (Default) +``` +Get-AzRecoveryServicesBackupPolicy -ResourceGroupName -VaultName + [-SubscriptionId ] [-Filter ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzRecoveryServicesBackupPolicy -PolicyName -ResourceGroupName -VaultName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +## DESCRIPTION +Provides the details of the backup policies associated to Recovery Services Vault. +This is an asynchronous\r\noperation. +Status of the operation can be fetched using GetPolicyOperationResult API. + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Filter +OData filter options. + +```yaml +Type: System.String +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PolicyName +Backup policy information to be fetched. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group where the recovery services vault is present. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The subscription Id. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VaultName +The name of the recovery services vault. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicyResource + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesPolicyTemplate.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesPolicyTemplate.md new file mode 100644 index 000000000000..2527d6bae87a --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesPolicyTemplate.md @@ -0,0 +1,77 @@ +--- +external help file: +Module Name: Az.RecoveryServices +online version: https://docs.microsoft.com/powershell/module/az.recoveryservices/get-azrecoveryservicespolicytemplate +schema: 2.0.0 +--- + +# Get-AzRecoveryServicesPolicyTemplate + +## SYNOPSIS +Gets default policy template for a selected datasource type. + +## SYNTAX + +``` +Get-AzRecoveryServicesPolicyTemplate -DatasourceType [] +``` + +## DESCRIPTION +Gets default policy template for a selected datasource type. + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -DatasourceType +Datasource Type + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.DatasourceTypes +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.ProtectionPolicy + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/New-AzRecoveryServicesBackupPolicy.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/New-AzRecoveryServicesBackupPolicy.md new file mode 100644 index 000000000000..6699205d629c --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/New-AzRecoveryServicesBackupPolicy.md @@ -0,0 +1,320 @@ +--- +external help file: +Module Name: Az.RecoveryServices +online version: https://docs.microsoft.com/powershell/module/az.recoveryservices/new-azrecoveryservicesbackuppolicy +schema: 2.0.0 +--- + +# New-AzRecoveryServicesBackupPolicy + +## SYNOPSIS +Creates a new backup policy in a given recovery services vault + +## SYNTAX + +``` +New-AzRecoveryServicesBackupPolicy -Policy -PolicyName + -ResourceGroupName -VaultName [-DefaultProfile ] [-MoveToArchiveTier ] + [-SnapshotRetentionDurationInDays ] [-SubscriptionId ] [-TierAfterDuration ] + [-TierAfterDurationType ] [-TieringMode ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates a new backup policy in a given recovery services vault + +## EXAMPLES + +### Example 1: Enable TierRecommended for AzureVM +```powershell +$pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM +New-AzRecoveryServicesBackupPolicy -ResourceGroupName arohijain-rg -VaultName arohijain-vault -Policy $pol1 -PolicyName tiertest4 -MoveToArchiveTier $true -TieringMode TierRecommended +$pol1.TieringPolicy.AdditionalProperties.ArchivedRP | fl +``` + +```output + +Duration : 0 +DurationType : Invalid +TieringMode : TierRecommended +``` + +The first command gets the default policy template for a given DatasourceType. +The second command modifies the tiering policy and creates a new policy. +The third command is to display modified tiering policy. + +### Example 2: Enable TierAfter for AzureVM +```powershell +$pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM +New-AzRecoveryServicesBackupPolicy -ResourceGroupName arohijain-rg -VaultName arohijain-vault -Policy $pol1 -PolicyName tiertest5 -MoveToArchiveTier $true -TierAfterDuration 54 -TieringMode TierAfter -TierAfterDurationType Months +$pol1.TieringPolicy.AdditionalProperties.ArchivedRP | fl +``` + +```output + +Duration : 54 +DurationType : Months +TieringMode : TierAfter +``` + +The first command gets the default policy template for a given DatasourceType. +The second command modifies the tiering policy and creates a new policy. +The third command is to display modified tiering policy. + +### Example 3: Enable TierAfter for SAPHANA +```powershell +$pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA +New-AzRecoveryServicesBackupPolicy -ResourceGroupName arohijain-rg -VaultName arohijain-vault -Policy $pol1 -PolicyName tiertest6 -MoveToArchiveTier $true -TierAfterDuration 64 -TieringMode TierAfter -TierAfterDurationType Days +$pol1.SubProtectionPolicy[0].TieringPolicy.AdditionalProperties.ArchivedRP | fl +``` + +```output + +Duration : 64 +DurationType : Days +TieringMode : TierAfter +``` + +The first command gets the default policy template for a given DatasourceType. +The second command modifies the tiering policy and creates a new policy. +The third command is to display modified tiering policy. + +### Example 4: Disable Tiering Policy +```powershell +New-AzRecoveryServicesBackupPolicy -ResourceGroupName arohijain-rg -VaultName arohijain-vault -Policy $pol1 -PolicyName tiertest5 -MoveToArchiveTier $false +$pol1.TieringPolicy.AdditionalProperties.ArchivedRP | fl +``` + +```output + +Duration : +DurationType : +TieringMode : DoNotTier +``` + +The first command disables the tiering policy and creates a new policy. +The second command is to display modified tiering policy. + +## PARAMETERS + +### -DefaultProfile + + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MoveToArchiveTier + + +```yaml +Type: System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Policy +Workload specific Backup policy object. +To construct, see NOTES section for POLICY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicy +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PolicyName +Policy Name for the policy to be created + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group where the recovery services vault is present. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SnapshotRetentionDurationInDays + + +```yaml +Type: System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription Id + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TierAfterDuration + + +```yaml +Type: System.Nullable`1[[System.Int32, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TierAfterDurationType + + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TieringMode + + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VaultName +The name of the recovery services vault. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicyResource + +## NOTES + +ALIASES + +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + + +`POLICY `: Workload specific Backup policy object. + - `BackupManagementType `: This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + - `[ProtectedItemsCount ]`: Number of items associated with this policy. + - `[ResourceGuardOperationRequest ]`: ResourceGuard Operation Requests + +## RELATED LINKS + diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/README.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/README.md new file mode 100644 index 000000000000..a4b15f3557e7 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/README.md @@ -0,0 +1,11 @@ +# Docs +This directory contains the documentation of the cmdlets for the `Az.RecoveryServices` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overridden on regeneration*. To update documentation examples, please use the `..\examples` folder. + +## Info +- Modifiable: no +- Generated: all +- Committed: yes +- Packaged: yes + +## Details +The process of documentation generation loads `Az.RecoveryServices` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `..\exports` folder. Additionally, when writing custom cmdlets in the `..\custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `..\examples` folder. \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Remove-AzRecoveryServicesBackupPolicy.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Remove-AzRecoveryServicesBackupPolicy.md new file mode 100644 index 000000000000..c1bb7bee40ee --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Remove-AzRecoveryServicesBackupPolicy.md @@ -0,0 +1,220 @@ +--- +external help file: +Module Name: Az.RecoveryServices +online version: https://docs.microsoft.com/powershell/module/az.recoveryservices/remove-azrecoveryservicesbackuppolicy +schema: 2.0.0 +--- + +# Remove-AzRecoveryServicesBackupPolicy + +## SYNOPSIS +Deletes specified backup policy from your Recovery Services Vault. +This is an asynchronous operation. +Status of the\r\noperation can be fetched using GetProtectionPolicyOperationResult API. + +## SYNTAX + +``` +Remove-AzRecoveryServicesBackupPolicy -PolicyName -ResourceGroupName -VaultName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Deletes specified backup policy from your Recovery Services Vault. +This is an asynchronous operation. +Status of the\r\noperation can be fetched using GetProtectionPolicyOperationResult API. + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PolicyName +Backup policy to be deleted. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group where the recovery services vault is present. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The subscription Id. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VaultName +The name of the recovery services vault. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### System.Boolean + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.md new file mode 100644 index 000000000000..19113fbf965e --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.md @@ -0,0 +1,157 @@ +### Example 1: Editing AzureVM backup schedule policy to standard daily full backup +```powershell +$pol = Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM +$editedPolicy = Edit-AzRecoveryServicesBackupSchedulePolicyClientObject -Policy $pol -PolicySubType "Standard" -BackupFrequency "Daily" -ScheduleTime "1:30 PM" -TimeZone "Tokyo Standard Time" +$editedPolicy.SchedulePolicy | fl +``` + +```output +HourlySchedule : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.HourlySchedule +ScheduleRunDay : +ScheduleRunFrequency : Daily +ScheduleRunTime : {6/19/2023 1:30:00 PM} +ScheduleWeeklyFrequency : 0 +Type : SimpleSchedulePolicy +``` + +This creates a standard daily full backup schedule for AzureVM + +### Example 2: Editing AzureVM backup schedule policy to enhanced weekly full backup +```powershell +$pol = Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM +$editedPolicy = Edit-AzRecoveryServicesBackupSchedulePolicyClientObject -Policy $pol -PolicySubType "Enhanced" -BackupFrequency "Weekly" -ScheduleRunDay @("Monday", "Thursday") -ScheduleTime "1:30 PM" -TimeZone "Tokyo Standard Time" +$editedPolicy.SchedulePolicy | fl +``` + +```output +DailyScheduleRunTime : +HourlySchedule : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.HourlySchedule +ScheduleRunFrequency : Weekly +Type : SimpleSchedulePolicyV2 +WeeklyScheduleRunDay : {Monday, Thursday} +WeeklyScheduleRunTime : {6/19/2023 1:30:00 PM} +``` + +This creates an enhanced weekly full backup schedule for AzureVM + +### Example 3: Editing AzureVM backup schedule policy to enhanced hourly full backup +```powershell +$pol = Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM +$editedPolicy = Edit-AzRecoveryServicesBackupSchedulePolicyClientObject -Policy $pol -PolicySubType "Enhanced" -BackupFrequency "Hourly" -HourlyInterval 4 -HourlyScheduleWindowDuration 24 -ScheduleTime "1:30 PM" -TimeZone "Tokyo Standard Time" +$editedPolicy.SchedulePolicy | fl +$editedPolicy.SchedulePolicy.HourlySchedule | fl +``` + +```output +DailyScheduleRunTime : +HourlySchedule : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.HourlySchedule +ScheduleRunFrequency : Hourly +Type : SimpleSchedulePolicyV2 +WeeklyScheduleRunDay : +WeeklyScheduleRunTime : + +Interval : 4 +ScheduleWindowDuration : 24 +ScheduleWindowStartTime : 6/19/2023 1:30:00 PM +``` + +This creates an enhanced hourly full backup schedule for AzureVM + +### Example 4: Editing SAPHANA backup schedule policy to daily or weekly full backup +```powershell +$pol = Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA +$editedPolicy = Edit-AzRecoveryServicesBackupSchedulePolicyClientObject -Policy $pol -BackupFrequency "Daily" -ScheduleTime "1:30 PM" -TimeZone "Tokyo Standard Time" +$FullBackupPolicy = $editedPolicy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Full" } +$FullBackupPolicy.SchedulePolicy | fl + +$pol = Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA +$editedPolicy = Edit-AzRecoveryServicesBackupSchedulePolicyClientObject -Policy $pol -BackupFrequency "Weekly" -ScheduleRunDay @("Monday", "Thursday") -ScheduleTime "1:30 PM" -TimeZone "Tokyo Standard Time" +$FullBackupPolicy = $editedPolicy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Full" } +$FullBackupPolicy.SchedulePolicy | fl +``` + +```output +HourlySchedule : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.HourlySchedule +ScheduleRunDay : +ScheduleRunFrequency : Daily +ScheduleRunTime : {6/19/2023 1:30:00 PM} +ScheduleWeeklyFrequency : 0 +Type : SimpleSchedulePolicy + +HourlySchedule : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.HourlySchedule +ScheduleRunDay : {Monday, Thursday} +ScheduleRunFrequency : Weekly +ScheduleRunTime : {6/19/2023 1:30:00 PM} +ScheduleWeeklyFrequency : 0 +Type : SimpleSchedulePolicy +``` + +This creates daily and weekly full backup schedules respectively for SAPHANA + +### Example 5: Editing SAPHANA backup schedule policy to differential or incremental backup +```powershell +$pol = Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA +$editedPolicy = Edit-AzRecoveryServicesBackupSchedulePolicyClientObject -Policy $pol -BackupFrequency "Weekly" -ScheduleRunDay @("Monday", "Thursday") -EnableDifferentialBackup 1 -DifferentialRunDay @("Tuesday", "Friday") -DifferentialScheduleTime "2:00 AM" -ScheduleTime "1:30 PM" -TimeZone "Tokyo Standard Time" +$FullBackupPolicy = $editedPolicy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Full" } +$FullBackupPolicy.SchedulePolicy | fl +$DifferentialPolicy = $editedPolicy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Differential" } +$DifferentialPolicy.SchedulePolicy | fl + +$pol = Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA +$editedPolicy = Edit-AzRecoveryServicesBackupSchedulePolicyClientObject -Policy $pol -BackupFrequency "Weekly" -ScheduleRunDay @("Monday", "Thursday") -EnableIncrementalBackup 1 -IncrementalRunDay @("Tuesday", "Friday") -IncrementalScheduleTime "2:00 AM" -ScheduleTime "1:30 PM" -TimeZone "Tokyo Standard Time" +$FullBackupPolicy = $editedPolicy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Full" } +$FullBackupPolicy.SchedulePolicy | fl +$IncrementalPolicy = $editedPolicy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Incremental" } +$IncrementalPolicy.SchedulePolicy | fl +``` + +```output +Differential + +HourlySchedule : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.HourlySchedule +ScheduleRunDay : {Monday, Thursday} +ScheduleRunFrequency : Weekly +ScheduleRunTime : {6/20/2023 1:30:00 PM} +ScheduleWeeklyFrequency : 0 +Type : SimpleSchedulePolicySAPHanaDatabase + +HourlySchedule : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.HourlySchedule +ScheduleRunDay : {Tuesday, Friday} +ScheduleRunFrequency : Weekly +ScheduleRunTime : {6/20/2023 2:00:00 AM} +ScheduleWeeklyFrequency : 0 +Type : SimpleSchedulePolicy + +Incremental + +HourlySchedule : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.HourlySchedule +ScheduleRunDay : {Monday, Thursday} +ScheduleRunFrequency : Weekly +ScheduleRunTime : {6/20/2023 1:30:00 PM} +ScheduleWeeklyFrequency : 0 +Type : SimpleSchedulePolicy + +HourlySchedule : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.HourlySchedule +ScheduleRunDay : {Tuesday, Friday} +ScheduleRunFrequency : Weekly +ScheduleRunTime : {6/20/2023 2:00:00 AM} +ScheduleWeeklyFrequency : 0 +Type : SimpleSchedulePolicy +``` + +This creates differential and incremental backup schedules respectively for SAPHANA + +### Example 6: Editing SAPHANA backup schedule policy Log Backup +```powershell +$pol = Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA +$editedPolicy = Edit-AzRecoveryServicesBackupSchedulePolicyClientObject -Policy $pol -EnableLogBackup 1 -LogBackupFrequencyInMin 120 +$LogBackupPolicy = $editedPolicy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Log" } +$LogBackupPolicy.SchedulePolicy | fl +``` + +```output +ScheduleFrequencyInMin : 120 +Type : LogSchedulePolicy +``` + +This edits the Log backup frequency to 120 minutes for SAPHANA backup schedule policy diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.md new file mode 100644 index 000000000000..01a27fd1d633 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.md @@ -0,0 +1,680 @@ +# AzureVM Policies + +### Example 1: Edit the daily retention +```powershell +$pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableDailyRetention $true -DailyRetentionDurationInDays 56 +$pol1.RetentionPolicy.DailySchedule.RetentionDuration | fl +``` + +```output + +Count : 56 +DurationType : Days +``` + +The first command gets the default policy template for a given DatasourceType. The second command modifies daily retention parameter in the obtained policy. The third command is to display the modified policy. + +### Example 2: Disable the daily retention +```powershell +$pol1.SchedulePolicy.ScheduleRunFrequency="Weekly" +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableDailyRetention $false +$pol1.RetentionPolicy.DailySchedule.RetentionDuration | fl +``` + +```output + +Count : +DurationType : +``` + +The first command sets the Schedule run frequency to Weekly. The second command disables the daily retention. The third command is to display the modified policy. + +### Example 3: Edit the weekly retention +```powershell +$pol1.SchedulePolicy.ScheduleRunDay="Monday", "Tuesday", "Wednesday" +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableWeeklyRetention $true -WeeklyRetentionDurationInWeeks 34 -WeeklyRetentionDaysOfTheWeek Sunday,Monday +$pol1.RetentionPolicy.WeeklySchedule.RetentionDuration | fl +$pol1.RetentionPolicy.WeeklySchedule | fl +``` + +```output + +Count : 34 +DurationType : Weeks + + + +DaysOfTheWeek : {Monday, Tuesday, Wednesday} +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDura + tion +RetentionTime : {5/22/2023 2:00:00 PM} +``` + +The first command sets the schedule run days. The second command is used to modify the weekly retention fields in the policy. Note that WeeklyRetentionDaysOfTheWeek can't modify days of the week for weekly schedule but parameter needs to be passed. The 3-4 command is to display the modified policy. + +### Example 4: Disable the weekly retention +```powershell +$pol1.SchedulePolicy.ScheduleRunFrequency="Daily" +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableWeeklyRetention $false +$pol1.RetentionPolicy.WeeklySchedule.RetentionDuration | fl +$pol1.RetentionPolicy.WeeklySchedule | fl +``` + +```output +Count : +DurationType : + + + +DaysOfTheWeek : +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDura + tion +RetentionTime : +``` + +The first command sets the schedule run frequency to daily. The second command disables the weekly retention. The 3-4 command is to display the modified policy. + +### Example 5: Edit the week based monthly retention when schedule run frequency is weekly +```powershell +$pol1.SchedulePolicy.ScheduleRunDay +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 34 -MonthlyRetentionDaysOfTheWeek "Monday","Tuesday" -MonthlyRetentionWeeksOfTheMonth Second, Fourth +$pol1.RetentionPolicy.MonthlySchedule | fl +$pol1.RetentionPolicy.MonthlySchedule.RetentionDuration | fl +$pol1.RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly | fl +``` + +```output + +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : Weekly +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : {5/22/2023 2:00:00 PM} + + + +Count : 34 +DurationType : Months + + + +DaysOfTheWeek : {Monday, Tuesday} +WeeksOfTheMonth : {Second, Fourth} +``` + +The first command fetches the schedule run days for assigning values to days of week. The second command edits the week based monthly retention policy. The 3-5 command is to display the modified policy. + +### Example 6: Edit the week based monthly retention when schedule run frequency is daily +```powershell +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 34 -MonthlyRetentionDaysOfTheWeek "Monday","Saturday" -MonthlyRetentionWeeksOfTheMonth Second, Fourth +$pol1.RetentionPolicy.MonthlySchedule | fl +$pol1.RetentionPolicy.MonthlySchedule.RetentionDuration | fl +$pol1.RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly | fl +``` + +```output + +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : Weekly +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : {5/22/2023 2:00:00 PM} + + + +Count : 34 +DurationType : Months + + + +DaysOfTheWeek : {Monday, Saturday} +WeeksOfTheMonth : {Second, Fourth} +``` + +This command edits the week based monthly retention policy. The 2-4 command is to display the modified policy. + +### Example 7: Edit the day based monthly retention +```powershell +$pol1.SchedulePolicy.ScheduleRunFrequency="Daily" +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Daily -MonthlyRetentionDurationInMonths 45 -MonthlyRetentionDaysOfTheMonth 1,6,28 +$pol1.RetentionPolicy.MonthlySchedule | fl +$pol1.RetentionPolicy.MonthlySchedule.RetentionDuration | fl +$pol1.RetentionPolicy.MonthlySchedule.RetentionScheduleDaily.DaysOfTheMonth | fl +``` + +```output + +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : Daily +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : {5/22/2023 2:00:00 PM} + + + +Count : 45 +DurationType : Months + + + +Date : 1 +IsLast : + +Date : 6 +IsLast : + +Date : 28 +IsLast : +``` + +The first command changes the schedule run frequency to daily. The second command edits the day based monthly retention policy. The 3-5 command is to display the modified policy. + +### Example 8: Disable the monthly retention +```powershell +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $false +$pol1.RetentionPolicy.MonthlySchedule | fl +$pol1.RetentionPolicy.MonthlySchedule.RetentionDuration | fl +``` + +```output + +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : + + + +Count : +DurationType : +``` + +This command disables the monthly retention. The 2-3 command is to display the modified policy. + +### Example 9: Edit the week based yearly retention when schedule run frequency is weekly +```powershell +$pol1.SchedulePolicy.ScheduleRunDay +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableYearlyRetention $true -YearlyRetentionScheduleType Weekly -YearlyRetentionDurationInYears 34 -YearlyRetentionMonthsOfTheYear @("May", "June") -YearlyRetentionDaysOfTheWeek Monday, Tuesday -YearlyRetentionWeeksOfTheMonth First, Third +$pol1.RetentionPolicy.YearlySchedule | fl +$pol1.RetentionPolicy.YearlySchedule.RetentionDuration | fl +$pol1.RetentionPolicy.YearlySchedule.RetentionScheduleWeekly | fl +``` + +```output + +MonthsOfYear : {May, June} +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : Weekly +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : {5/22/2023 2:00:00 PM} + + + +Count : 34 +DurationType : Years + + + +DaysOfTheWeek : {Monday, Tuesday} +WeeksOfTheMonth : {First, Third} +``` + +The first command fetches the schedule run days for assigning values to days of week. The second command edits the week based yearly retention policy when schedule run frequency is weekly. The 3-5 command is to display the modified policy. + +### Example 10: Edit the week based yearly retention when schedule run frequency is daily +```powershell +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableYearlyRetention $true -YearlyRetentionScheduleType Weekly -YearlyRetentionDurationInYears 67 -YearlyRetentionMonthsOfTheYear @("May", "June") -YearlyRetentionDaysOfTheWeek Monday, Saturday -YearlyRetentionWeeksOfTheMonth First, Third +$pol1.RetentionPolicy.YearlySchedule | fl +$pol1.RetentionPolicy.YearlySchedule.RetentionDuration | fl +$pol1.RetentionPolicy.YearlySchedule.RetentionScheduleWeekly | fl +``` + +```output + +MonthsOfYear : {May, June} +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : Weekly +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : {5/22/2023 2:00:00 PM} + + + +Count : 67 +DurationType : Years + + + +DaysOfTheWeek : {Monday, Saturday} +WeeksOfTheMonth : {First, Third} +``` + +This command edits the week based yearly retention policy when schedule run frequency is daily. The 2-4 command is to display the modified policy. + +### Example 11: Edit the day based yearly retention +```powershell +$pol1.SchedulePolicy.ScheduleRunFrequency="Daily" +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableYearlyRetention $true -YearlyRetentionScheduleType Daily -YearlyRetentionMonthsOfTheYear May,April -YearlyRetentionDaysOfTheMonth 1,2,3 -YearlyRetentionDurationInYears 43 +$pol1.RetentionPolicy.YearlySchedule | fl +$pol1.RetentionPolicy.YearlySchedule.RetentionDuration | fl +$pol1.RetentionPolicy.YearlySchedule.RetentionScheduleDaily.DaysOfTheMonth | fl +``` + +```output + +MonthsOfYear : {May, April} +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : Daily +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : {5/22/2023 2:00:00 PM} + + + +Count : 43 +DurationType : Years + + + +Date : 1 +IsLast : + +Date : 2 +IsLast : + +Date : 3 +IsLast : +``` + +The first command changes the schedule run frequency to daily. The second command edits the day based yearly retention policy. The 3-5 command is to display the modified policy. + +### Example 12: Disable the yearly retention +```powershell +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableYearlyRetention $false +$pol1.RetentionPolicy.YearlySchedule | fl +$pol1.RetentionPolicy.YearlySchedule.RetentionDuration | fl +``` + +```output + +MonthsOfYear : +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : + + + +Count : +DurationType : +``` + +This command disables the yearly retention. The 2-3 command is to display the modified policy. + + +# SAPHANA Policies + +### Example 1: Edit the Full Backup daily retention +```powershell +$pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableDailyRetention $true -DailyRetentionDurationInDays 32 +$pol1.SubProtectionPolicy[0].RetentionPolicy.DailySchedule.RetentionDuration | fl +``` + +```output + +Count : 32 +DurationType : Days +``` + +The first command gets the default policy template for a given DatasourceType. The second command modifies the full backup daily retention parameter in the obtained policy. The third command is to display the modified policy. + +### Example 2: Disable the full backup daily retention +```powershell +$pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunFrequency="Weekly" +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableDailyRetention $false +$pol1.SubProtectionPolicy[0].RetentionPolicy.DailySchedule.RetentionDuration | fl +``` + +```output + +Count : +DurationType : +``` + +The first command sets the Schedule run frequency to Weekly. The second command disables the daily retention for full backup. The third command is to display the modified policy. + +### Example 3: Edit the full backup weekly retention +```powershell +$pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunDay="Monday","Tuesday","Wednesday" +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableWeeklyRetention $true -WeeklyRetentionDurationInWeeks 11 -WeeklyRetentionDaysOfTheWeek Sunday +$pol1.SubProtectionPolicy[0].RetentionPolicy.WeeklySchedule.RetentionDuration | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.WeeklySchedule | fl +``` + +```output + +DaysOfTheWeek : {Monday, Tuesday, Wednesday} +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionTime : {9/30/2020 7:30:00 PM} + + + +Count : 11 +DurationType : Weeks +``` + +This command is used to modify the full backup weekly retention fields in the policy. Note that WeeklyRetentionDaysOfTheWeek can't modify days of week for weekly schedule but parameter needs to be passed. The 3-4 command is to display the modified policy. + +### Example 4: Disable the weekly retention +```powershell +$pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunFrequency="Daily" +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableWeeklyRetention $false +$pol1.SubProtectionPolicy[0].RetentionPolicy.WeeklySchedule.RetentionDuration | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.WeeklySchedule | fl +``` + +```output + +Count : +DurationType : + + + +DaysOfTheWeek : +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionTime : +``` + +This command disables the full backup weekly retention. The 3-4 command is to display the modified policy. + +### Example 5: Edit the week based monthly retention when schedule run frequency is weekly +```powershell +$pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunDay +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 34 -MonthlyRetentionDaysOfTheWeek Monday -MonthlyRetentionWeeksOfTheMonth First, Last +$pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule.RetentionDuration | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly | fl +``` + +```output + +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : Weekly +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : {9/30/2020 7:30:00 PM} + + + +Count : 34 +DurationType : Months + + + +DaysOfTheWeek : {Monday} +WeeksOfTheMonth : {First, Last} +``` + +The first command fetches the schedule run days for assigning values to days of week. The second command edits the full backup week based monthly retention policy. The 3-5 command is to display the modified policy. + +### Example 6: Edit the week based monthly retention when schedule run frequency is daily +```powershell +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 34 -MonthlyRetentionDaysOfTheWeek Monday,Sunday +$pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule.RetentionDuration | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly | fl +``` + +```output + +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : Weekly +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : {9/30/2020 7:30:00 PM} + + + +Count : 34 +DurationType : Months + + + +DaysOfTheWeek : {Monday, Sunday} +WeeksOfTheMonth : {First, Last} +``` + +This command edits the full backup week based monthly retention policy. The 2-4 command is to display the modified policy. + +### Example 7: Edit the day based monthly retention +```powershell +$pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunFrequency="Daily" +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Daily -MonthlyRetentionDaysOfTheMonth 1,2,3 -MonthlyRetentionDurationInMonths 67 +$pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule.RetentionDuration | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule.RetentionScheduleDaily.DaysOfTheMonth | fl +``` + +```output + +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : Daily +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : {9/30/2020 7:30:00 PM} + + + +Count : 67 +DurationType : Months + + + +Date : 1 +IsLast : + +Date : 2 +IsLast : + +Date : 3 +IsLast : +``` + +The first command changes the full backup schedule run frequency to daily. The second command edits the day based monthly retention policy. The 3-5 command is to display the modified policy. + +### Example 8: Disable the full backup monthly retention +```powershell +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableMonthlyRetention $false +$pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule.RetentionDuration | fl +``` + +```output + +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : + + + +Count : +DurationType : +``` + +This command disables the full backup monthly retention. The 2-3 command is to display the modified policy. + +### Example 9: Edit the full backup week based yearly retention when schedule run frequency is weekly +```powershell +$pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunDay +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableYearlyRetention $true -YearlyRetentionScheduleType Weekly -YearlyRetentionDurationInYears 47 -YearlyRetentionMonthsOfTheYear May,June -YearlyRetentionDaysOfTheWeek Monday -YearlyRetentionWeeksOfTheMonth Last,First +$pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule.RetentionDuration | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule.RetentionScheduleWeekly | fl +``` + +```output + +MonthsOfYear : {May, June} +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : Weekly +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : {9/30/2020 7:30:00 PM} + + + +Count : 47 +DurationType : Years + + + +DaysOfTheWeek : {Monday} +WeeksOfTheMonth : {Last, First} +``` + +The first command fetches the schedule run days for assigning values to days of week. The second command edits the full backup week based yearly retention policy when schedule run frequency is weekly. The 3-5 command is to display the modified policy. + +### Example 10: Edit the full backup week based yearly retention when schedule run frequency is daily +```powershell +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableYearlyRetention $true -YearlyRetentionScheduleType Weekly -YearlyRetentionDurationInYears 47 -YearlyRetentionMonthsOfTheYear May,June -YearlyRetentionDaysOfTheWeek Monday -YearlyRetentionWeeksOfTheMonth Last,First +$pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule.RetentionDuration | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule.RetentionScheduleWeekly | fl +``` + +```output + +MonthsOfYear : {May, June} +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : Weekly +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : {9/30/2020 7:30:00 PM} + + + +Count : 47 +DurationType : Years + + + +DaysOfTheWeek : {Monday} +WeeksOfTheMonth : {Last, First} +``` + +This command edits the full backup week based yearly retention policy when schedule run frequency is daily. The 2-4 command is to display the modified policy. + +### Example 11: Edit the full backup day based yearly retention +```powershell +$pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunFrequency="Daily" +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableYearlyRetention $true -YearlyRetentionScheduleType Daily -YearlyRetentionDurationInYears 76 -YearlyRetentionMonthsOfTheYear May,July -YearlyRetentionDaysOfTheMonth 7,17,27 +$pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule.RetentionDuration | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule.RetentionScheduleDaily.DaysOfTheMonth | fl +``` + +```output + +MonthsOfYear : {May, July} +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : Daily +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : {9/30/2020 7:30:00 PM} + + + +Count : 76 +DurationType : Years + + + +Date : 7 +IsLast : + +Date : 17 +IsLast : + +Date : 27 +IsLast : +``` + +The first command changes the full backup schedule run frequency to daily. The second command edits the day based yearly retention policy. The 3-5 command is to display the modified policy. + +### Example 12: Disable the yearly retention +```powershell +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableYearlyRetention $false +$pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule | fl +$pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule.RetentionDuration | fl +``` + +```output + +MonthsOfYear : +RetentionDuration : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.RetentionDuration +RetentionScheduleDaily : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.DailyRetentionFormat +RetentionScheduleFormatType : +RetentionScheduleWeekly : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.WeeklyRetentionFormat +RetentionTime : + + + +Count : +DurationType : +``` + +This command disables the full backup yearly retention. The 2-3 command is to display the modified policy. + +### Example 13: Modify Differential backup retention policy +```powershell +$pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunFrequency="Weekly" +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyDifferentialBackup -DifferentialRetentionPeriodInDays 23 +$pol1.SubProtectionPolicy[2].RetentionPolicy | fl +``` + +```output + +RetentionDurationCount : 23 +RetentionDurationType : Days +Type : SimpleRetentionPolicy +``` + +This command modifies the differential backup retention policy. The third command is to display the modified policy. + +### Example 14: Modify Incremental backup retention policy +```powershell +$pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunFrequency="Weekly" +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -IncrementalRetentionPeriodInDays 64 -ModifyIncrementalBackup +$pol1.SubProtectionPolicy[2].RetentionPolicy | fl +``` + +```output + +RetentionDurationCount : 23 +RetentionDurationType : Days +Type : SimpleRetentionPolicy +``` + +This command modifies the incremental backup retention policy. The third command is to display the modified policy. + +### Example 15: Modify Log backup retention policy +```powershell +Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -LogRetentionPeriodInDays 23 -ModifyLogBackup +$pol1.SubProtectionPolicy[1].RetentionPolicy | fl +``` + +```output + +RetentionDurationCount : 23 +RetentionDurationType : Days +Type : SimpleRetentionPolicy +``` + +This command modifies the log backup retention policy. The third command is to display the modified policy. \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupPolicy.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupPolicy.md new file mode 100644 index 000000000000..017b0e0314c1 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupPolicy.md @@ -0,0 +1,35 @@ +### Example 1: Get all backup policies in a recovery services vault +```powershell +$pol = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName "myresourcegroup" -VaultName "myvault" +$pol +``` + + +```output +ETag Id Location Name Type +---- -- -------- ---- ---- + /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.RecoveryServices/vaults/myvault/backupPolicies/policy1 policy1 Microsoft.RecoveryServices/vaults/backupPolicies + /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.RecoveryServices/vaults/myvault/backupPolicies/HourlyLogBackup HourlyLogBackup Microsoft.RecoveryServices/vaults/backupPolicies + /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.RecoveryServices/vaults/myvault/backupPolicies/DefaultPolicy DefaultPolicy Microsoft.RecoveryServices/vaults/backupPolicies + /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.RecoveryServices/vaults/myvault/backupPolicies/policy2 policy2 Microsoft.RecoveryServices/vaults/backupPolicies + /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.RecoveryServices/vaults/myvault/backupPolicies/testPolicy testPolicy Microsoft.RecoveryServices/vaults/backupPolicies + /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.RecoveryServices/vaults/myvault/backupPolicies/EnhancedPolicy EnhancedPolicy Microsoft.RecoveryServices/vaults/backupPolicies +``` + + +Gets all the backup policies in the specified vault in the specified resource group. + +### Example 2: Get info for a specific backup policy +```powershell +$pol = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName "myresourcegroup" -VaultName "myvault" -Name "DefaultPolicy" +$pol +``` + +```output +ETag Id Location Name Type +---- -- -------- ---- ---- + /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.RecoveryServices/vaults/myvault/backupPolicies/testPolicy testPolicy Microsoft.RecoveryServices/vaults/backupPolicies + +``` + +Gets info for a specific backup policy by its name in the specified vault in the specified resource group. \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesPolicyTemplate.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesPolicyTemplate.md new file mode 100644 index 000000000000..0ad34004b314 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesPolicyTemplate.md @@ -0,0 +1,21 @@ +### Example 1: Get the default policy client object for creating AzureVM policy +```powershell +$vmPol= Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM +``` + +This command is used to get default values for a VM policy. This object can further be used for editing any attributes in the policy client object either manually or using the Edit-AzRecoveryServicesBackupSchedulePolicyClientObject, Edit-AzRecoveryServicesBackupRetentionPolicyClientObject cmdlets. After changing the values as per need, $vmPol object can further be used to create policy using New-AzRecoveryServicesBackupPolicy command. + +### Example 2: Get the default policy client object for creating MSSQL policy +```powershell +$sqlPol= Get-AzRecoveryServicesPolicyTemplate -DatasourceType MSSQL +``` + +This command is used to get default policy client object for datasourcetype MSSQL. + +### Example 3: Get the default policy client object for creating SAPHANA policy +```powershell +$sqlPol= Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA +``` + +This command is used to get default policy client object for datasourcetype SAPHANA. + diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/New-AzRecoveryServicesBackupPolicy.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/New-AzRecoveryServicesBackupPolicy.md new file mode 100644 index 000000000000..471f7a767254 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/New-AzRecoveryServicesBackupPolicy.md @@ -0,0 +1,64 @@ +### Example 1: Enable TierRecommended for AzureVM +```powershell +$pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM +New-AzRecoveryServicesBackupPolicy -ResourceGroupName arohijain-rg -VaultName arohijain-vault -Policy $pol1 -PolicyName tiertest4 -MoveToArchiveTier $true -TieringMode TierRecommended +$pol1.TieringPolicy.AdditionalProperties.ArchivedRP | fl +``` + +```output + +Duration : 0 +DurationType : Invalid +TieringMode : TierRecommended +``` + +The first command gets the default policy template for a given DatasourceType. The second command modifies the tiering policy and creates a new policy. The third command is to display modified tiering policy. + +### Example 2: Enable TierAfter for AzureVM +```powershell +$pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM +New-AzRecoveryServicesBackupPolicy -ResourceGroupName arohijain-rg -VaultName arohijain-vault -Policy $pol1 -PolicyName tiertest5 -MoveToArchiveTier $true -TierAfterDuration 54 -TieringMode TierAfter -TierAfterDurationType Months +$pol1.TieringPolicy.AdditionalProperties.ArchivedRP | fl +``` + +```output + +Duration : 54 +DurationType : Months +TieringMode : TierAfter +``` + +The first command gets the default policy template for a given DatasourceType. The second command modifies the tiering policy and creates a new policy. The third command is to display modified tiering policy. + +### Example 3: Enable TierAfter for SAPHANA +```powershell +$pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA +New-AzRecoveryServicesBackupPolicy -ResourceGroupName arohijain-rg -VaultName arohijain-vault -Policy $pol1 -PolicyName tiertest6 -MoveToArchiveTier $true -TierAfterDuration 64 -TieringMode TierAfter -TierAfterDurationType Days +$pol1.SubProtectionPolicy[0].TieringPolicy.AdditionalProperties.ArchivedRP | fl +``` + +```output + +Duration : 64 +DurationType : Days +TieringMode : TierAfter +``` + +The first command gets the default policy template for a given DatasourceType. The second command modifies the tiering policy and creates a new policy. The third command is to display modified tiering policy. + +### Example 4: Disable Tiering Policy +```powershell +New-AzRecoveryServicesBackupPolicy -ResourceGroupName arohijain-rg -VaultName arohijain-vault -Policy $pol1 -PolicyName tiertest5 -MoveToArchiveTier $false +$pol1.TieringPolicy.AdditionalProperties.ArchivedRP | fl +``` + +```output + +Duration : +DurationType : +TieringMode : DoNotTier +``` + +The first command disables the tiering policy and creates a new policy. The second command is to display modified tiering policy. + + diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Remove-AzRecoveryServicesBackupPolicy.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Remove-AzRecoveryServicesBackupPolicy.md new file mode 100644 index 000000000000..f6ea75eb32a9 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Remove-AzRecoveryServicesBackupPolicy.md @@ -0,0 +1,6 @@ +### Example 1: Remove a policy with its name +```powershell + Remove-AzRecoveryServicesBackupPolicy -PolicyName "MyPolicy" -ResourceGroupName "MyResourceGroup" -VaultName "MyVault" +``` + +This command deletes the specified backup policy. diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/how-to.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/how-to.md new file mode 100644 index 000000000000..b1e56ff5f59f --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/how-to.md @@ -0,0 +1,58 @@ +# How-To +This document describes how to develop for `Az.RecoveryServices`. + +## Building `Az.RecoveryServices` +To build, run the `build-module.ps1` at the root of the module directory. This will generate the proxy script cmdlets that are the cmdlets being exported by this module. After the build completes, the proxy script cmdlets will be output to the `exports` folder. To read more about the proxy script cmdlets, look at the [README.md](exports/README.md) in the `exports` folder. + +## Creating custom cmdlets +To add cmdlets that were not generated by the REST specification, use the `custom` folder. This folder allows you to add handwritten `.ps1` and `.cs` files. Currently, we support using `.ps1` scripts as new cmdlets or as additional low-level variants (via `ParameterSet`), and `.cs` files as low-level (variants) cmdlets that the exported script cmdlets call. We do not support exporting any `.cs` (dll) cmdlets directly. To read more about custom cmdlets, look at the [README.md](custom/README.md) in the `custom` folder. + +## Generating documentation +To generate documentation, the process is now integrated into the `build-module.ps1` script. If you don't want to run this process as part of `build-module.ps1`, you can provide the `-NoDocs` switch. If you want to run documentation generation after the build process, you may still run the `generate-help.ps1` script. Overall, the process will look at the documentation comments in the generated and custom cmdlets and types, and create `.md` files into the `docs` folder. Additionally, this pulls in any examples from the `examples` folder and adds them to the generated help markdown documents. To read more about examples, look at the [README.md](examples/README.md) in the `examples` folder. To read more about documentation, look at the [README.md](docs/README.md) in the `docs` folder. + +## Testing `Az.RecoveryServices` +To test the cmdlets, we use [Pester](https://github.com/pester/Pester). Tests scripts (`.ps1`) should be added to the `test` folder. To execute the Pester tests, run the `test-module.ps1` script. This will run all tests in `playback` mode within the `test` folder. To read more about testing cmdlets, look at the [README.md](examples/README.md) in the `examples` folder. + +## Packing `Az.RecoveryServices` +To pack `Az.RecoveryServices` for distribution, run the `pack-module.ps1` script. This will take the contents of multiple directories and certain root-folder files to create a `.nupkg`. The structure of the `.nupkg` is created so it can be loaded part of a [PSRepository](https://learn.microsoft.com/powershell/module/powershellget/register-psrepository). Additionally, this package is in a format for distribution to the [PSGallery](https://www.powershellgallery.com/). For signing an Azure module, please contact the [Azure PowerShell](https://github.com/Azure/azure-powershell) team. + +## Module Script Details +There are multiple scripts created for performing different actions for developing `Az.RecoveryServices`. +- `build-module.ps1` + - Builds the module DLL (`./bin/Az.RecoveryServices.private.dll`), creates the exported cmdlets and documentation, generates custom cmdlet test stubs and exported cmdlet example stubs, and updates `./Az.RecoveryServices.psd1` with Azure profile information. + - **Parameters**: [`Switch` parameters] + - `-Run`: After building, creates an isolated PowerShell session and loads `Az.RecoveryServices`. + - `-Test`: After building, runs the `Pester` tests defined in the `test` folder. + - `-Docs`: After building, generates the Markdown documents for the modules into the `docs` folder. + - `-Pack`: After building, packages the module into a `.nupkg`. + - `-Code`: After building, opens a VSCode window with the module's directory and runs (see `-Run`) the module. + - `-Release`: Builds the module in `Release` configuration (as opposed to `Debug` configuration). + - `-NoDocs`: Supresses writing the documentation markdown files as part of the cmdlet exporting process. + - `-Debugger`: Used when attaching the debugger in Visual Studio to the PowerShell session, and running the build process without recompiling the DLL. This suppresses running the script as an isolated process. +- `run-module.ps1` + - Creates an isolated PowerShell session and loads `Az.RecoveryServices` into the session. + - Same as `-Run` in `build-module.ps1`. + - **Parameters**: [`Switch` parameters] + - `-Code`: Opens a VSCode window with the module's directory. + - Same as `-Code` in `build-module.ps1`. +- `generate-help.ps1` + - Generates the Markdown documents for the modules into the `docs` folder. + - Same as `-Docs` in `build-module.ps1`. +- `test-module.ps1` + - Runs the `Pester` tests defined in the `test` folder. + - Same as `-Test` in `build-module.ps1`. +- `pack-module.ps1` + - Packages the module into a `.nupkg` for distribution. + - Same as `-Pack` in `build-module.ps1`. +- `generate-help.ps1` + - Generates the Markdown documents for the modules into the `docs` folder. + - Same as `-Docs` in `build-module.ps1`. + - This process is now integrated into `build-module.ps1` automatically. To disable, use `-NoDocs` when running `build-module.ps1`. +- `export-surface.ps1` + - Generates Markdown documents for both the cmdlet surface and the model (class) surface of the module. + - These files are placed into the `resources` folder. + - Used for investigating the surface of your module. These are *not* documentation for distribution. +- `check-dependencies.ps1` + - Used in `run-module.ps1` and `test-module.ps1` to verify dependent modules are available to run those tasks. + - It will download local (within the module's directory structure) versions of those modules as needed. + - This script *does not* need to be ran by-hand. \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/license.txt b/src/RecoveryServices/RecoveryServices.Backup.Autorest/license.txt new file mode 100644 index 000000000000..b9f3180fb9af --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/license.txt @@ -0,0 +1,227 @@ +MICROSOFT SOFTWARE LICENSE TERMS + +MICROSOFT AZURE POWERSHELL + +These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. + +BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE. + + +-----------------START OF LICENSE-------------------------- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +-------------------END OF LICENSE------------------------------------------ + + +----------------START OF THIRD PARTY NOTICE-------------------------------- + + +The software includes the AutoMapper library ("AutoMapper"). The MIT License set out below is provided for informational purposes only. It is not the license that governs any part of the software. + +Provided for Informational Purposes Only + +AutoMapper + +The MIT License (MIT) +Copyright (c) 2010 Jimmy Bogard + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + + + + +*************** + +The software includes Newtonsoft.Json. The MIT License set out below is provided for informational purposes only. It is not the license that governs any part of the software. + +Newtonsoft.Json + +The MIT License (MIT) +Copyright (c) 2007 James Newton-King +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-------------END OF THIRD PARTY NOTICE---------------------------------------- + diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/resources/README.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/resources/README.md new file mode 100644 index 000000000000..937f07f8fec2 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/resources/README.md @@ -0,0 +1,11 @@ +# Resources +This directory can contain any additional resources for module that are not required at runtime. This directory **does not** get packaged with the module. If you have assets for custom implementation, place them into the `..\custom` folder. + +## Info +- Modifiable: yes +- Generated: no +- Committed: yes +- Packaged: no + +## Purpose +Use this folder to put anything you want to keep around as part of the repository for the module, but is not something that is required for the module. For example, development files, packaged builds, or additional information. This is only intended to be used in repositories where the module's output directory is cleaned, but tangential resources for the module want to remain intact. \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Disable-AzRecoveryServicesConfigureBackup.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Disable-AzRecoveryServicesConfigureBackup.Tests.ps1 new file mode 100644 index 000000000000..575b0dad8128 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Disable-AzRecoveryServicesConfigureBackup.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Disable-AzRecoveryServicesConfigureBackup')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Disable-AzRecoveryServicesConfigureBackup.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Disable-AzRecoveryServicesConfigureBackup' { + It '__AllParameterSets' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Recording.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Recording.json new file mode 100644 index 000000000000..abc1ed08d948 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Recording.json @@ -0,0 +1,814 @@ +{ + "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+AzureVMStandardDaily+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", + "Content": "{\r\n \"properties\": {\r\n \"protectedItemsCount\": 0,\r\n \"backupManagementType\": \"AzureIaasVM\",\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Daily\",\r\n \"scheduleRunTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 180,\r\n \"durationType\": \"Days\"\r\n }\r\n }\r\n },\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n },\r\n \"instantRpRetentionRangeInDays\": 2,\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"policyType\": \"V1\"\r\n }\r\n}", + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "884" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "75532e68-f1e0-460c-beff-65bc37b4c264" ], + "x-ms-client-request-id": [ "25b36367-b1b8-4b15-b730-02a20038c2dd", "25b36367-b1b8-4b15-b730-02a20038c2dd" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1193" ], + "x-ms-correlation-request-id": [ "75532e68-f1e0-460c-beff-65bc37b4c264" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160404Z:75532e68-f1e0-460c-beff-65bc37b4c264" ], + "Date": [ "Mon, 26 Jun 2023 16:04:03 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "898" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-06-26T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}" + } + }, + "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+AzureVMStandardDaily+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "20" ], + "x-ms-client-request-id": [ "a0ad8b32-3c7d-4a73-bf30-bc5a9623523c" ], + "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "63069326-1a09-456b-a1ee-99b7ed7451d8" ], + "x-ms-client-request-id": [ "a0ad8b32-3c7d-4a73-bf30-bc5a9623523c", "a0ad8b32-3c7d-4a73-bf30-bc5a9623523c" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "293" ], + "x-ms-correlation-request-id": [ "63069326-1a09-456b-a1ee-99b7ed7451d8" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160404Z:63069326-1a09-456b-a1ee-99b7ed7451d8" ], + "Date": [ "Mon, 26 Jun 2023 16:04:04 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "898" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-06-26T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}" + } + }, + "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+AzureVMStandardDaily+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+3": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "21" ], + "x-ms-client-request-id": [ "00c09d8f-660c-4229-9e2c-c008accb9f6b" ], + "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "0fce0fe1-0346-4d05-9315-db2e09e50dd2" ], + "x-ms-client-request-id": [ "00c09d8f-660c-4229-9e2c-c008accb9f6b", "00c09d8f-660c-4229-9e2c-c008accb9f6b" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14993" ], + "x-ms-correlation-request-id": [ "0fce0fe1-0346-4d05-9315-db2e09e50dd2" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160406Z:0fce0fe1-0346-4d05-9315-db2e09e50dd2" ], + "Date": [ "Mon, 26 Jun 2023 16:04:05 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null + } + }, + "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+AzureVMEnhancedWeekly+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", + "Content": "{\r\n \"properties\": {\r\n \"protectedItemsCount\": 0,\r\n \"backupManagementType\": \"AzureIaasVM\",\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicyV2\",\r\n \"weeklySchedule\": {\r\n \"scheduleRunDays\": [ \"Monday\", \"Thursday\" ],\r\n \"scheduleRunTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ]\r\n },\r\n \"scheduleRunFrequency\": \"Weekly\"\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Thursday\" ],\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 12,\r\n \"durationType\": \"Weeks\"\r\n }\r\n }\r\n },\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n },\r\n \"instantRpRetentionRangeInDays\": 5,\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"policyType\": \"V2\"\r\n }\r\n}", + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "995" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "57d64c41-dad9-4d60-b380-b4304fc6d9c9" ], + "x-ms-client-request-id": [ "416ca5ee-7d01-4157-b65f-23b86bc39a36", "416ca5ee-7d01-4157-b65f-23b86bc39a36" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1192" ], + "x-ms-correlation-request-id": [ "57d64c41-dad9-4d60-b380-b4304fc6d9c9" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160408Z:57d64c41-dad9-4d60-b380-b4304fc6d9c9" ], + "Date": [ "Mon, 26 Jun 2023 16:04:07 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "971" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V2\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicyV2\",\"scheduleRunFrequency\":\"Weekly\",\"weeklySchedule\":{\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-06-26T13:30:00Z\"]}},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":12,\"durationType\":\"Weeks\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":5,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}" + } + }, + "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+AzureVMEnhancedWeekly+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "23" ], + "x-ms-client-request-id": [ "642be1cb-eef3-48b4-9ed2-53ab0d634113" ], + "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "e101963b-96c2-4ca1-a073-0e217b5101ce" ], + "x-ms-client-request-id": [ "642be1cb-eef3-48b4-9ed2-53ab0d634113", "642be1cb-eef3-48b4-9ed2-53ab0d634113" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "292" ], + "x-ms-correlation-request-id": [ "e101963b-96c2-4ca1-a073-0e217b5101ce" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160409Z:e101963b-96c2-4ca1-a073-0e217b5101ce" ], + "Date": [ "Mon, 26 Jun 2023 16:04:08 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "971" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V2\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicyV2\",\"scheduleRunFrequency\":\"Weekly\",\"weeklySchedule\":{\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-06-26T13:30:00Z\"]}},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":12,\"durationType\":\"Weeks\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":5,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}" + } + }, + "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+AzureVMEnhancedWeekly+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+3": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "24" ], + "x-ms-client-request-id": [ "c8374d5e-b8d8-416c-a9c6-4b51ac10cc43" ], + "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "5edd9644-511c-495f-a601-1eade03de67a" ], + "x-ms-client-request-id": [ "c8374d5e-b8d8-416c-a9c6-4b51ac10cc43", "c8374d5e-b8d8-416c-a9c6-4b51ac10cc43" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14992" ], + "x-ms-correlation-request-id": [ "5edd9644-511c-495f-a601-1eade03de67a" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160410Z:5edd9644-511c-495f-a601-1eade03de67a" ], + "Date": [ "Mon, 26 Jun 2023 16:04:09 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null + } + }, + "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+AzureVMEnhancedHourly+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", + "Content": "{\r\n \"properties\": {\r\n \"protectedItemsCount\": 0,\r\n \"backupManagementType\": \"AzureIaasVM\",\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicyV2\",\r\n \"scheduleRunFrequency\": \"Hourly\",\r\n \"hourlySchedule\": {\r\n \"interval\": 4,\r\n \"scheduleWindowStartTime\": \"2023-06-26T13:30:00.0000000Z\",\r\n \"scheduleWindowDuration\": 24\r\n }\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 180,\r\n \"durationType\": \"Days\"\r\n }\r\n }\r\n },\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n },\r\n \"instantRpRetentionRangeInDays\": 7,\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"policyType\": \"V2\"\r\n }\r\n}", + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "954" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "e5b1058c-5bb7-4d79-844e-b5bff16dc32a" ], + "x-ms-client-request-id": [ "21bb53c4-7f6e-4216-9bed-c984256a39bd", "21bb53c4-7f6e-4216-9bed-c984256a39bd" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1191" ], + "x-ms-correlation-request-id": [ "e5b1058c-5bb7-4d79-844e-b5bff16dc32a" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160411Z:e5b1058c-5bb7-4d79-844e-b5bff16dc32a" ], + "Date": [ "Mon, 26 Jun 2023 16:04:10 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "938" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V2\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicyV2\",\"scheduleRunFrequency\":\"Hourly\",\"hourlySchedule\":{\"interval\":4,\"scheduleWindowStartTime\":\"2023-06-26T13:30:00Z\",\"scheduleWindowDuration\":24}},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":7,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}" + } + }, + "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+AzureVMEnhancedHourly+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "26" ], + "x-ms-client-request-id": [ "345bc641-a8f9-4820-936c-62ffe273ae8e" ], + "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "d2917739-3ffc-4b11-ad46-be82bb789118" ], + "x-ms-client-request-id": [ "345bc641-a8f9-4820-936c-62ffe273ae8e", "345bc641-a8f9-4820-936c-62ffe273ae8e" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "291" ], + "x-ms-correlation-request-id": [ "d2917739-3ffc-4b11-ad46-be82bb789118" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160412Z:d2917739-3ffc-4b11-ad46-be82bb789118" ], + "Date": [ "Mon, 26 Jun 2023 16:04:11 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "938" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V2\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicyV2\",\"scheduleRunFrequency\":\"Hourly\",\"hourlySchedule\":{\"interval\":4,\"scheduleWindowStartTime\":\"2023-06-26T13:30:00Z\",\"scheduleWindowDuration\":24}},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":7,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}" + } + }, + "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+AzureVMEnhancedHourly+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+3": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "27" ], + "x-ms-client-request-id": [ "a34ca890-05f8-4d85-ba65-275eaba33875" ], + "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "b400b9c9-b83d-45bc-86dc-585d84564e37" ], + "x-ms-client-request-id": [ "a34ca890-05f8-4d85-ba65-275eaba33875", "a34ca890-05f8-4d85-ba65-275eaba33875" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14991" ], + "x-ms-correlation-request-id": [ "b400b9c9-b83d-45bc-86dc-585d84564e37" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160413Z:b400b9c9-b83d-45bc-86dc-585d84564e37" ], + "Date": [ "Mon, 26 Jun 2023 16:04:12 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null + } + }, + "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+SAPHANADailyFull+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", + "Content": "{\r\n \"properties\": {\r\n \"backupManagementType\": \"AzureWorkload\",\r\n \"workLoadType\": \"SAPHanaDatabase\",\r\n \"settings\": {\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"issqlcompression\": false,\r\n \"isCompression\": false\r\n },\r\n \"subProtectionPolicy\": [\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Daily\",\r\n \"scheduleRunTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 180,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 104,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 60,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"January\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 10,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"policyType\": \"Full\",\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n }\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"LogSchedulePolicy\",\r\n \"scheduleFrequencyInMins\": 120\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 15,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Log\"\r\n }\r\n ]\r\n }\r\n}", + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "2684" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "7613100d-2c72-4f40-8777-5220ba5a013e" ], + "x-ms-client-request-id": [ "02844323-6d19-432d-9656-85fd0afbae80", "02844323-6d19-432d-9656-85fd0afbae80" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1190" ], + "x-ms-correlation-request-id": [ "7613100d-2c72-4f40-8777-5220ba5a013e" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160414Z:7613100d-2c72-4f40-8777-5220ba5a013e" ], + "Date": [ "Mon, 26 Jun 2023 16:04:13 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1849" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-06-26T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}" + } + }, + "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+SAPHANADailyFull+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "29" ], + "x-ms-client-request-id": [ "8d0835de-56b1-4a65-ab56-3851ffdcf958" ], + "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "da3628df-5507-45cc-9623-14c243145ee2" ], + "x-ms-client-request-id": [ "8d0835de-56b1-4a65-ab56-3851ffdcf958", "8d0835de-56b1-4a65-ab56-3851ffdcf958" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "290" ], + "x-ms-correlation-request-id": [ "da3628df-5507-45cc-9623-14c243145ee2" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160415Z:da3628df-5507-45cc-9623-14c243145ee2" ], + "Date": [ "Mon, 26 Jun 2023 16:04:14 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1849" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-06-26T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}" + } + }, + "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+SAPHANADailyFull+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+3": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "30" ], + "x-ms-client-request-id": [ "5239b47b-beee-4087-b506-30408e322a36" ], + "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "ab794c31-6627-4a0f-a430-a50eacd60408" ], + "x-ms-client-request-id": [ "5239b47b-beee-4087-b506-30408e322a36", "5239b47b-beee-4087-b506-30408e322a36" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14990" ], + "x-ms-correlation-request-id": [ "ab794c31-6627-4a0f-a430-a50eacd60408" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160416Z:ab794c31-6627-4a0f-a430-a50eacd60408" ], + "Date": [ "Mon, 26 Jun 2023 16:04:15 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null + } + }, + "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+SAPHANAWeeklyDifferential+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", + "Content": "{\r\n \"properties\": {\r\n \"backupManagementType\": \"AzureWorkload\",\r\n \"workLoadType\": \"SAPHanaDatabase\",\r\n \"settings\": {\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"issqlcompression\": false,\r\n \"isCompression\": false\r\n },\r\n \"subProtectionPolicy\": [\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Monday\", \"Thursday\" ],\r\n \"scheduleRunTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Thursday\" ],\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 104,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 60,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"January\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 10,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"policyType\": \"Full\",\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n }\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"LogSchedulePolicy\",\r\n \"scheduleFrequencyInMins\": 120\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 15,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Log\"\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Tuesday\", \"Friday\" ],\r\n \"scheduleRunTimes\": [ \"2023-06-26T02:00:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 30,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Differential\"\r\n }\r\n ]\r\n }\r\n}", + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "3096" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "9ef08c04-2e32-4448-b844-dea0ceb18a2a" ], + "x-ms-client-request-id": [ "c29f606e-70fa-4452-b8b4-a0e0da92edf0", "c29f606e-70fa-4452-b8b4-a0e0da92edf0" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1189" ], + "x-ms-correlation-request-id": [ "9ef08c04-2e32-4448-b844-dea0ceb18a2a" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160417Z:9ef08c04-2e32-4448-b844-dea0ceb18a2a" ], + "Date": [ "Mon, 26 Jun 2023 16:04:16 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2142" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-06-26T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Differential\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Tuesday\",\"Friday\"],\"scheduleRunTimes\":[\"2023-06-26T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}" + } + }, + "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+SAPHANAWeeklyDifferential+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "32" ], + "x-ms-client-request-id": [ "71da2006-90e1-4428-a29e-1034f2f823ac" ], + "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "96737f25-d4e7-4b8b-a52f-88b5d55f4807" ], + "x-ms-client-request-id": [ "71da2006-90e1-4428-a29e-1034f2f823ac", "71da2006-90e1-4428-a29e-1034f2f823ac" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "289" ], + "x-ms-correlation-request-id": [ "96737f25-d4e7-4b8b-a52f-88b5d55f4807" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160418Z:96737f25-d4e7-4b8b-a52f-88b5d55f4807" ], + "Date": [ "Mon, 26 Jun 2023 16:04:17 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2142" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-06-26T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Differential\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Tuesday\",\"Friday\"],\"scheduleRunTimes\":[\"2023-06-26T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}" + } + }, + "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+SAPHANAWeeklyDifferential+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+3": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "33" ], + "x-ms-client-request-id": [ "0cc09140-7a54-4a44-9c5d-97e80a3d036f" ], + "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "e882ba46-0ab7-4d87-8ff8-f74a5e6805da" ], + "x-ms-client-request-id": [ "0cc09140-7a54-4a44-9c5d-97e80a3d036f", "0cc09140-7a54-4a44-9c5d-97e80a3d036f" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14989" ], + "x-ms-correlation-request-id": [ "e882ba46-0ab7-4d87-8ff8-f74a5e6805da" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160419Z:e882ba46-0ab7-4d87-8ff8-f74a5e6805da" ], + "Date": [ "Mon, 26 Jun 2023 16:04:19 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null + } + }, + "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+SAPHANWeeklyIncremental+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", + "Content": "{\r\n \"properties\": {\r\n \"backupManagementType\": \"AzureWorkload\",\r\n \"workLoadType\": \"SAPHanaDatabase\",\r\n \"settings\": {\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"issqlcompression\": false,\r\n \"isCompression\": false\r\n },\r\n \"subProtectionPolicy\": [\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Monday\", \"Thursday\" ],\r\n \"scheduleRunTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Thursday\" ],\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 104,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 60,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"January\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 10,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"policyType\": \"Full\",\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n }\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"LogSchedulePolicy\",\r\n \"scheduleFrequencyInMins\": 120\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 15,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Log\"\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Tuesday\", \"Friday\" ],\r\n \"scheduleRunTimes\": [ \"2023-06-26T02:00:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 30,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Incremental\"\r\n }\r\n ]\r\n }\r\n}", + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "3095" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "b2d6e946-6ce7-4804-9a9d-802e016f4132" ], + "x-ms-client-request-id": [ "8dc64b63-0b86-4e17-8a99-9cffc515bb42", "8dc64b63-0b86-4e17-8a99-9cffc515bb42" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1188" ], + "x-ms-correlation-request-id": [ "b2d6e946-6ce7-4804-9a9d-802e016f4132" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160420Z:b2d6e946-6ce7-4804-9a9d-802e016f4132" ], + "Date": [ "Mon, 26 Jun 2023 16:04:20 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2141" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-06-26T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Incremental\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Tuesday\",\"Friday\"],\"scheduleRunTimes\":[\"2023-06-26T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}" + } + }, + "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+SAPHANWeeklyIncremental+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "35" ], + "x-ms-client-request-id": [ "091539ff-2879-402c-a95a-df1da939db56" ], + "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "d8381c97-40db-4391-b21e-f574ba52fa6d" ], + "x-ms-client-request-id": [ "091539ff-2879-402c-a95a-df1da939db56", "091539ff-2879-402c-a95a-df1da939db56" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "288" ], + "x-ms-correlation-request-id": [ "d8381c97-40db-4391-b21e-f574ba52fa6d" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160421Z:d8381c97-40db-4391-b21e-f574ba52fa6d" ], + "Date": [ "Mon, 26 Jun 2023 16:04:21 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2141" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-06-26T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Incremental\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Tuesday\",\"Friday\"],\"scheduleRunTimes\":[\"2023-06-26T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}" + } + }, + "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+SAPHANWeeklyIncremental+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+3": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "36" ], + "x-ms-client-request-id": [ "6943e13a-22e0-4554-b536-82a05bd20374" ], + "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "bc92081f-0dfd-4af4-8242-a6d8ae924c84" ], + "x-ms-client-request-id": [ "6943e13a-22e0-4554-b536-82a05bd20374", "6943e13a-22e0-4554-b536-82a05bd20374" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14988" ], + "x-ms-correlation-request-id": [ "bc92081f-0dfd-4af4-8242-a6d8ae924c84" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160422Z:bc92081f-0dfd-4af4-8242-a6d8ae924c84" ], + "Date": [ "Mon, 26 Jun 2023 16:04:22 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null + } + }, + "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+SAPHANALog+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", + "Content": "{\r\n \"properties\": {\r\n \"backupManagementType\": \"AzureWorkload\",\r\n \"workLoadType\": \"SAPHanaDatabase\",\r\n \"settings\": {\r\n \"timeZone\": \"UTC\",\r\n \"issqlcompression\": false,\r\n \"isCompression\": false\r\n },\r\n \"subProtectionPolicy\": [\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Daily\",\r\n \"scheduleRunTimes\": [ \"2023-06-26T19:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2023-06-26T19:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 180,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"retentionTimes\": [ \"2023-06-26T19:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 104,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-06-26T19:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 60,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"January\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-06-26T19:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 10,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"policyType\": \"Full\",\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n }\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"LogSchedulePolicy\",\r\n \"scheduleFrequencyInMins\": 120\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 15,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Log\"\r\n }\r\n ]\r\n }\r\n}", + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "2668" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "b169ebba-57b2-47da-b7a8-713e67f4d00f" ], + "x-ms-client-request-id": [ "a9527b0d-2767-4696-9784-c643347a2b6a", "a9527b0d-2767-4696-9784-c643347a2b6a" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1187" ], + "x-ms-correlation-request-id": [ "b169ebba-57b2-47da-b7a8-713e67f4d00f" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160423Z:b169ebba-57b2-47da-b7a8-713e67f4d00f" ], + "Date": [ "Mon, 26 Jun 2023 16:04:23 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1833" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-06-26T19:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-06-26T19:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-06-26T19:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T19:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T19:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}" + } + }, + "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+SAPHANALog+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "38" ], + "x-ms-client-request-id": [ "7b95b574-9b82-4ac2-8f3c-cac656e6b2d8" ], + "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "f4e9828e-f527-40a0-9529-16efd280cf3d" ], + "x-ms-client-request-id": [ "7b95b574-9b82-4ac2-8f3c-cac656e6b2d8", "7b95b574-9b82-4ac2-8f3c-cac656e6b2d8" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "287" ], + "x-ms-correlation-request-id": [ "f4e9828e-f527-40a0-9529-16efd280cf3d" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160424Z:f4e9828e-f527-40a0-9529-16efd280cf3d" ], + "Date": [ "Mon, 26 Jun 2023 16:04:24 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1833" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-06-26T19:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-06-26T19:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-06-26T19:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T19:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T19:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}" + } + }, + "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+SAPHANALog+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+3": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "39" ], + "x-ms-client-request-id": [ "cedb565e-548f-4efc-9382-9622d0487407" ], + "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "0a92e0ad-b7ff-4f95-aba0-5368186b6259" ], + "x-ms-client-request-id": [ "cedb565e-548f-4efc-9382-9622d0487407", "cedb565e-548f-4efc-9382-9622d0487407" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14987" ], + "x-ms-correlation-request-id": [ "0a92e0ad-b7ff-4f95-aba0-5368186b6259" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160425Z:0a92e0ad-b7ff-4f95-aba0-5368186b6259" ], + "Date": [ "Mon, 26 Jun 2023 16:04:25 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null + } + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Tests.ps1 new file mode 100644 index 000000000000..ca8128781379 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Tests.ps1 @@ -0,0 +1,293 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Edit-AzRecoveryServicesBackupSchedulePolicyClientObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Edit-AzRecoveryServicesBackupSchedulePolicyClientObject' { + + It 'AzureVMStandardDaily' { + $sub = $env.TestBackupSchedulePolicy.SubscriptionId + $rgName = $env.TestBackupSchedulePolicy.ResourceGroupName + $vaultName = $env.TestBackupSchedulePolicy.VaultName + $newPolicyName = $env.TestBackupSchedulePolicy.NewPolicyName + + $DebugPreference = "Continue" + Write-Debug -Message $sub + Write-Debug -Message $rgName + Write-Debug -Message $vaultName + Write-Debug -Message $newPolicyName + $DebugPreference = "SilentlyContinue" + + $pol = Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM + $testPolicy = Edit-AzRecoveryServicesBackupSchedulePolicyClientObject -Policy $pol -PolicySubType "Standard" -BackupFrequency "Daily" -ScheduleTime "1:30 PM" -TimeZone "Tokyo Standard Time" + + # Default values for testing + $testPolicy.RetentionPolicy.WeeklySchedule = $null + $testPolicy.RetentionPolicy.MonthlySchedule = $null + $testPolicy.RetentionPolicy.YearlySchedule = $null + + $testPolicy.SchedulePolicy.ScheduleRunFrequency | Should be "Daily" + $testPolicy.SchedulePolicy.ScheduleRunTime[0].ToString("HH:mm:ss") | Should be "13:30:00" + $testPolicy.TimeZone | Should be "Tokyo Standard Time" + + New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $testPolicy -PolicyName $newPolicyName + + # this Policy should be there - then delete it and then this policy shouldn't be there + $policy = Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName $newPolicyName + $policy.Name | Should be $newPolicyName + + Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName + } + + It 'AzureVMEnhancedWeekly' { + $sub = $env.TestBackupSchedulePolicy.SubscriptionId + $rgName = $env.TestBackupSchedulePolicy.ResourceGroupName + $vaultName = $env.TestBackupSchedulePolicy.VaultName + $newPolicyName = $env.TestBackupSchedulePolicy.NewPolicyName + + $DebugPreference = "Continue" + Write-Debug -Message $sub + Write-Debug -Message $rgName + Write-Debug -Message $vaultName + Write-Debug -Message $newPolicyName + $DebugPreference = "SilentlyContinue" + + $pol = Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM + $testPolicy = Edit-AzRecoveryServicesBackupSchedulePolicyClientObject -Policy $pol -PolicySubType "Enhanced" -BackupFrequency "Weekly" -ScheduleRunDay @("Monday", "Thursday") -ScheduleTime "1:30 PM" -TimeZone "Tokyo Standard Time" + + # Default values for testing + $testPolicy.RetentionPolicy.DailySchedule = $null + $testPolicy.RetentionPolicy.MonthlySchedule = $null + $testPolicy.RetentionPolicy.YearlySchedule = $null + + $testPolicy.SchedulePolicy.WeeklyScheduleRunDay | Should be @("Monday", "Thursday") + $testPolicy.SchedulePolicy.WeeklyScheduleRunTime[0].ToString("HH:mm:ss") | Should be "13:30:00" + $testPolicy.SchedulePolicy.Type | Should be "SimpleSchedulePolicyV2" + $testPolicy.TimeZone | Should be "Tokyo Standard Time" + + New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $testPolicy -PolicyName $newPolicyName + + # this Policy should be there - then delete it and then this policy shouldn't be there + $policy = Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName $newPolicyName + $policy.Name | Should be $newPolicyName + + Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName + } + + It 'AzureVMEnhancedHourly' { + $sub = $env.TestBackupSchedulePolicy.SubscriptionId + $rgName = $env.TestBackupSchedulePolicy.ResourceGroupName + $vaultName = $env.TestBackupSchedulePolicy.VaultName + $newPolicyName = $env.TestBackupSchedulePolicy.NewPolicyName + + $DebugPreference = "Continue" + Write-Debug -Message $sub + Write-Debug -Message $rgName + Write-Debug -Message $vaultName + Write-Debug -Message $newPolicyName + $DebugPreference = "SilentlyContinue" + + $pol = Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM + $testPolicy = Edit-AzRecoveryServicesBackupSchedulePolicyClientObject -Policy $pol -PolicySubType "Enhanced" -BackupFrequency "Hourly" -HourlyInterval 4 -HourlyScheduleWindowDuration 24 -ScheduleTime "1:30 PM" -TimeZone "Tokyo Standard Time" + + # Default values for testing + $testPolicy.InstantRpRetentionRangeInDay = 7 + $testPolicy.RetentionPolicy.WeeklySchedule = $null + $testPolicy.RetentionPolicy.MonthlySchedule = $null + $testPolicy.RetentionPolicy.YearlySchedule = $null + + $testPolicy.SchedulePolicy.ScheduleRunFrequency | Should be "Hourly" + $testPolicy.SchedulePolicy.HourlySchedule.Interval | Should be 4 + $testPolicy.SchedulePolicy.HourlySchedule.ScheduleWindowDuration | Should be 24 + $testPolicy.SchedulePolicy.HourlySchedule.ScheduleWindowStartTime.ToString("HH:mm:ss") | Should be "13:30:00" + $testPolicy.SchedulePolicy.Type | Should be "SimpleSchedulePolicyV2" + $testPolicy.TimeZone | Should be "Tokyo Standard Time" + + New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $testPolicy -PolicyName $newPolicyName + + # this Policy should be there - then delete it and then this policy shouldn't be there + $policy = Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName $newPolicyName + $policy.Name | Should be $newPolicyName + + Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName + } + + It 'SAPHANADailyFull' { + $sub = $env.TestBackupSchedulePolicy.SubscriptionId + $rgName = $env.TestBackupSchedulePolicy.ResourceGroupName + $vaultName = $env.TestBackupSchedulePolicy.VaultName + $newPolicyName = $env.TestBackupSchedulePolicy.NewPolicyName + + $DebugPreference = "Continue" + Write-Debug -Message $sub + Write-Debug -Message $rgName + Write-Debug -Message $vaultName + Write-Debug -Message $newPolicyName + $DebugPreference = "SilentlyContinue" + + $pol = Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA + $testPolicy = Edit-AzRecoveryServicesBackupSchedulePolicyClientObject -Policy $pol -BackupFrequency "Daily" -ScheduleTime "1:30 PM" -TimeZone "Tokyo Standard Time" + + $FullBackupPolicy = $testPolicy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Full" } + $FullBackupPolicy.SchedulePolicy.ScheduleRunFrequency | Should be "Daily" + $FullBackupPolicy.SchedulePolicy.ScheduleRunTime[0].ToString("HH:mm:ss") | Should be "13:30:00" + $testPolicy.Setting.TimeZone | Should be "Tokyo Standard Time" + + New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $testPolicy -PolicyName $newPolicyName + + # this Policy should be there - then delete it and then this policy shouldn't be there + $policy = Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName $newPolicyName + $policy.Name | Should be $newPolicyName + + Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName + } + + It 'SAPHANAWeeklyDifferential' { + $sub = $env.TestBackupSchedulePolicy.SubscriptionId + $rgName = $env.TestBackupSchedulePolicy.ResourceGroupName + $vaultName = $env.TestBackupSchedulePolicy.VaultName + $newPolicyName = $env.TestBackupSchedulePolicy.NewPolicyName + + $DebugPreference = "Continue" + Write-Debug -Message $sub + Write-Debug -Message $rgName + Write-Debug -Message $vaultName + Write-Debug -Message $newPolicyName + $DebugPreference = "SilentlyContinue" + + $pol = Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA + $ScheduleRunDay = @("Monday", "Thursday") + $DifferentialRunDay = @("Tuesday", "Friday") + $testPolicy = Edit-AzRecoveryServicesBackupSchedulePolicyClientObject -Policy $pol -BackupFrequency "Weekly" -ScheduleRunDay $ScheduleRunDay -EnableDifferentialBackup 1 -DifferentialRunDay $DifferentialRunDay -DifferentialScheduleTime "2:00 AM" -ScheduleTime "1:30 PM" -TimeZone "Tokyo Standard Time" + + $FullBackupPolicy = $testPolicy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Full" } + + # Default values for testing + $FullBackupPolicy.RetentionPolicy.DailySchedule = $null + $FullBackupPolicy.RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly.DaysOfTheWeek[0] = $ScheduleRunDay[0] + $FullBackupPolicy.RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.DaysOfTheWeek[0] = $ScheduleRunDay[0] + + $FullBackupPolicy.SchedulePolicy.ScheduleRunFrequency | Should be "Weekly" + $FullBackupPolicy.SchedulePolicy.ScheduleRunDay | Should be $ScheduleRunDay + $FullBackupPolicy.SchedulePolicy.ScheduleRunTime[0].ToString("HH:mm:ss") | Should be "13:30:00" + $testPolicy.Setting.TimeZone | Should be "Tokyo Standard Time" + + $DifferentialPolicy = $testPolicy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Differential" } + + # Default values for testing + $DifferentialPolicy.RetentionPolicy = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.SimpleRetentionPolicy]::new() + $DifferentialPolicy.RetentionPolicy.Type = "SimpleRetentionPolicy" + $DifferentialPolicy.RetentionPolicy.RetentionDurationCount = 30 + $DifferentialPolicy.RetentionPolicy.RetentionDurationType = "Days" + + $DifferentialPolicy.PolicyType | Should be "Differential" + $DifferentialPolicy.SchedulePolicy.Type | Should be "SimpleSchedulePolicy" + $DifferentialPolicy.SchedulePolicy.ScheduleRunFrequency | Should be "Weekly" + $DifferentialPolicy.SchedulePolicy.ScheduleRunDay | Should be $DifferentialRunDay + $DifferentialPolicy.SchedulePolicy.ScheduleRunTime[0].ToString("HH:mm:ss") | Should be "02:00:00" + $DifferentialPolicy.SchedulePolicy.ScheduleWeeklyFrequency | Should be 0 + + New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $testPolicy -PolicyName $newPolicyName + + # this Policy should be there - then delete it and then this policy shouldn't be there + $policy = Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName $newPolicyName + $policy.Name | Should be $newPolicyName + + Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName + } + + It 'SAPHANWeeklyIncremental' { + $sub = $env.TestBackupSchedulePolicy.SubscriptionId + $rgName = $env.TestBackupSchedulePolicy.ResourceGroupName + $vaultName = $env.TestBackupSchedulePolicy.VaultName + $newPolicyName = $env.TestBackupSchedulePolicy.NewPolicyName + + $DebugPreference = "Continue" + Write-Debug -Message $sub + Write-Debug -Message $rgName + Write-Debug -Message $vaultName + Write-Debug -Message $newPolicyName + $DebugPreference = "SilentlyContinue" + + $pol = Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA + $ScheduleRunDay = @("Monday", "Thursday") + $IncrementalRunDay = @("Tuesday", "Friday") + $testPolicy = Edit-AzRecoveryServicesBackupSchedulePolicyClientObject -Policy $pol -BackupFrequency "Weekly" -ScheduleRunDay $ScheduleRunDay -EnableIncrementalBackup 1 -IncrementalRunDay $IncrementalRunDay -IncrementalScheduleTime "2:00 AM" -ScheduleTime "1:30 PM" -TimeZone "Tokyo Standard Time" + + $FullBackupPolicy = $testPolicy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Full" } + + # Default values for testing + $FullBackupPolicy.RetentionPolicy.DailySchedule = $null + $FullBackupPolicy.RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly.DaysOfTheWeek[0] = $ScheduleRunDay[0] + $FullBackupPolicy.RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.DaysOfTheWeek[0] = $ScheduleRunDay[0] + + $FullBackupPolicy.SchedulePolicy.ScheduleRunFrequency | Should be "Weekly" + $FullBackupPolicy.SchedulePolicy.ScheduleRunDay | Should be $ScheduleRunDay + $FullBackupPolicy.SchedulePolicy.ScheduleRunTime[0].ToString("HH:mm:ss") | Should be "13:30:00" + $testPolicy.Setting.TimeZone | Should be "Tokyo Standard Time" + + $IncrementalPolicy = $testPolicy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Incremental" } + + # Default values for testing + $IncrementalPolicy.RetentionPolicy = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.SimpleRetentionPolicy]::new() + $IncrementalPolicy.RetentionPolicy.Type = "SimpleRetentionPolicy" + $IncrementalPolicy.RetentionPolicy.RetentionDurationCount = 30 + $IncrementalPolicy.RetentionPolicy.RetentionDurationType = "Days" + + $IncrementalPolicy.PolicyType | Should be "Incremental" + $IncrementalPolicy.SchedulePolicy.Type | Should be "SimpleSchedulePolicy" + $IncrementalPolicy.SchedulePolicy.ScheduleRunFrequency | Should be "Weekly" + $IncrementalPolicy.SchedulePolicy.ScheduleRunDay | Should be $IncrementalRunDay + $IncrementalPolicy.SchedulePolicy.ScheduleRunTime[0].ToString("HH:mm:ss") | Should be "02:00:00" + $IncrementalPolicy.SchedulePolicy.ScheduleWeeklyFrequency | Should be 0 + + New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $testPolicy -PolicyName $newPolicyName + + # this Policy should be there - then delete it and then this policy shouldn't be there + $policy = Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName $newPolicyName + $policy.Name | Should be $newPolicyName + + Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName + } + + It 'SAPHANALog' { + $sub = $env.TestBackupSchedulePolicy.SubscriptionId + $rgName = $env.TestBackupSchedulePolicy.ResourceGroupName + $vaultName = $env.TestBackupSchedulePolicy.VaultName + $newPolicyName = $env.TestBackupSchedulePolicy.NewPolicyName + + $DebugPreference = "Continue" + Write-Debug -Message $sub + Write-Debug -Message $rgName + Write-Debug -Message $vaultName + Write-Debug -Message $newPolicyName + $DebugPreference = "SilentlyContinue" + + $pol = Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA + $testPolicy = Edit-AzRecoveryServicesBackupSchedulePolicyClientObject -Policy $pol -EnableLogBackup 1 -LogBackupFrequencyInMin 120 + + $LogBackupPolicy = $testPolicy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Log" } + $LogBackupPolicy.PolicyType | Should be "Log" + $LogBackupPolicy.SchedulePolicy.ScheduleFrequencyInMin | Should be 120 + + New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $testPolicy -PolicyName $newPolicyName + + # this Policy should be there - then delete it and then this policy shouldn't be there + $policy = Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName $newPolicyName + $policy.Name | Should be $newPolicyName + + Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName + } + +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.Recording.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.Recording.json new file mode 100644 index 000000000000..2b09f772d24c --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.Recording.json @@ -0,0 +1,698 @@ +{ + "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+CommonCommandToUpdateAllRetentions+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", + "Content": "{\r\n \"properties\": {\r\n \"protectedItemsCount\": 0,\r\n \"backupManagementType\": \"AzureIaasVM\",\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Daily\",\r\n \"scheduleRunTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 56,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 34,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Daily\",\r\n \"retentionScheduleDaily\": {\r\n \"daysOfTheMonth\": [\r\n {\r\n \"date\": 1\r\n },\r\n {\r\n \"date\": 2\r\n },\r\n {\r\n \"date\": 3\r\n }\r\n ]\r\n },\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 54,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Daily\",\r\n \"monthsOfYear\": [ \"March\", \"April\" ],\r\n \"retentionScheduleDaily\": {\r\n \"daysOfTheMonth\": [\r\n {\r\n \"date\": 2\r\n },\r\n {\r\n \"date\": 4\r\n },\r\n {\r\n \"date\": 5\r\n }\r\n ]\r\n },\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 47,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n },\r\n \"instantRpRetentionRangeInDays\": 2,\r\n \"timeZone\": \"UTC\",\r\n \"policyType\": \"V1\"\r\n }\r\n}", + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "2448" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "20e38c32-7740-4795-b830-a949b7e6e264" ], + "x-ms-client-request-id": [ "e38dc23c-5e65-4e5c-b195-e202244c9160", "e38dc23c-5e65-4e5c-b195-e202244c9160" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-correlation-request-id": [ "20e38c32-7740-4795-b830-a949b7e6e264" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160342Z:20e38c32-7740-4795-b830-a949b7e6e264" ], + "Date": [ "Mon, 26 Jun 2023 16:03:42 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1774" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":56,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":1,\"isLast\":false},{\"date\":2,\"isLast\":false},{\"date\":3,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":54,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"monthsOfYear\":[\"March\",\"April\"],\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":2,\"isLast\":false},{\"date\":4,\"isLast\":false},{\"date\":5,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":47,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}" + } + }, + "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+CommonCommandToUpdateAllRetentions+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "95e7dc6c-a10f-41ae-8b9c-073513eafade" ], + "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "3da9064d-c755-46ab-86ce-652fbab9ad70" ], + "x-ms-client-request-id": [ "95e7dc6c-a10f-41ae-8b9c-073513eafade", "95e7dc6c-a10f-41ae-8b9c-073513eafade" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "299" ], + "x-ms-correlation-request-id": [ "3da9064d-c755-46ab-86ce-652fbab9ad70" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160344Z:3da9064d-c755-46ab-86ce-652fbab9ad70" ], + "Date": [ "Mon, 26 Jun 2023 16:03:44 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1774" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":56,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":1,\"isLast\":false},{\"date\":2,\"isLast\":false},{\"date\":3,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":54,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"monthsOfYear\":[\"March\",\"April\"],\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":2,\"isLast\":false},{\"date\":4,\"isLast\":false},{\"date\":5,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":47,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}" + } + }, + "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+CommonCommandToUpdateAllRetentions+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+3": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "649da149-cb04-4f9d-b5ba-cdcc1b69488c" ], + "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "4f38041c-fca9-4da7-ab24-94e53ed1927d" ], + "x-ms-client-request-id": [ "649da149-cb04-4f9d-b5ba-cdcc1b69488c", "649da149-cb04-4f9d-b5ba-cdcc1b69488c" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-correlation-request-id": [ "4f38041c-fca9-4da7-ab24-94e53ed1927d" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160345Z:4f38041c-fca9-4da7-ab24-94e53ed1927d" ], + "Date": [ "Mon, 26 Jun 2023 16:03:45 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null + } + }, + "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+DailyScheduleWithWeeklyRetention-AzureVM+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", + "Content": "{\r\n \"properties\": {\r\n \"protectedItemsCount\": 0,\r\n \"backupManagementType\": \"AzureIaasVM\",\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Daily\",\r\n \"scheduleRunTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 56,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Sunday\", \"Monday\" ],\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 34,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Tuesday\" ],\r\n \"weeksOfTheMonth\": [ \"Second\", \"Fourth\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 36,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"May\", \"June\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Tuesday\" ],\r\n \"weeksOfTheMonth\": [ \"First\", \"Third\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 67,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n },\r\n \"instantRpRetentionRangeInDays\": 2,\r\n \"timeZone\": \"UTC\",\r\n \"policyType\": \"V1\"\r\n }\r\n}", + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "1979" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "6364d40e-c8d7-447c-af2e-6892f3c68654" ], + "x-ms-client-request-id": [ "1fbd5353-c6c3-4e50-9e79-b19767a8bbf9", "1fbd5353-c6c3-4e50-9e79-b19767a8bbf9" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-correlation-request-id": [ "6364d40e-c8d7-447c-af2e-6892f3c68654" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160347Z:6364d40e-c8d7-447c-af2e-6892f3c68654" ], + "Date": [ "Mon, 26 Jun 2023 16:03:46 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1572" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":56,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\",\"Monday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"Second\",\"Fourth\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":36,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"May\",\"June\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"First\",\"Third\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":67,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}" + } + }, + "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+DailyScheduleWithWeeklyRetention-AzureVM+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "f7b57465-4490-4cdc-900e-13c14424ae4c" ], + "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "74a4b758-229a-4c74-a2de-15ff46b0c080" ], + "x-ms-client-request-id": [ "f7b57465-4490-4cdc-900e-13c14424ae4c", "f7b57465-4490-4cdc-900e-13c14424ae4c" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "298" ], + "x-ms-correlation-request-id": [ "74a4b758-229a-4c74-a2de-15ff46b0c080" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160348Z:74a4b758-229a-4c74-a2de-15ff46b0c080" ], + "Date": [ "Mon, 26 Jun 2023 16:03:47 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1572" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":56,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\",\"Monday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"Second\",\"Fourth\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":36,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"May\",\"June\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"First\",\"Third\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":67,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}" + } + }, + "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+DailyScheduleWithWeeklyRetention-AzureVM+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+3": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "5fae2d46-8e0b-43b8-bac4-839a6afd9524" ], + "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "84d49a7b-c854-4514-8da1-8d60ab6635e0" ], + "x-ms-client-request-id": [ "5fae2d46-8e0b-43b8-bac4-839a6afd9524", "5fae2d46-8e0b-43b8-bac4-839a6afd9524" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], + "x-ms-correlation-request-id": [ "84d49a7b-c854-4514-8da1-8d60ab6635e0" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160349Z:84d49a7b-c854-4514-8da1-8d60ab6635e0" ], + "Date": [ "Mon, 26 Jun 2023 16:03:48 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null + } + }, + "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+DailyScheduleWithDailyRetention-AzureVM+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", + "Content": "{\r\n \"properties\": {\r\n \"protectedItemsCount\": 0,\r\n \"backupManagementType\": \"AzureIaasVM\",\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Daily\",\r\n \"scheduleRunDays\": [ \"Monday\", \"Tuesday\", \"Wednesday\" ],\r\n \"scheduleRunTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 56,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Sunday\", \"Monday\" ],\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 34,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Daily\",\r\n \"retentionScheduleDaily\": {\r\n \"daysOfTheMonth\": [\r\n {\r\n \"date\": 1\r\n },\r\n {\r\n \"date\": 6\r\n },\r\n {\r\n \"date\": 28\r\n }\r\n ]\r\n },\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 45,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Daily\",\r\n \"monthsOfYear\": [ \"May\", \"April\" ],\r\n \"retentionScheduleDaily\": {\r\n \"daysOfTheMonth\": [\r\n {\r\n \"date\": 1\r\n },\r\n {\r\n \"date\": 2\r\n },\r\n {\r\n \"date\": 3\r\n }\r\n ]\r\n },\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 43,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n },\r\n \"instantRpRetentionRangeInDays\": 2,\r\n \"timeZone\": \"UTC\",\r\n \"policyType\": \"V1\"\r\n }\r\n}", + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "2521" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "e90e7eff-2138-40c1-81d9-6afc50f947c2" ], + "x-ms-client-request-id": [ "5786ce66-a6d9-4bca-8e0c-9dfb39d8dc3a", "5786ce66-a6d9-4bca-8e0c-9dfb39d8dc3a" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], + "x-ms-correlation-request-id": [ "e90e7eff-2138-40c1-81d9-6afc50f947c2" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160350Z:e90e7eff-2138-40c1-81d9-6afc50f947c2" ], + "Date": [ "Mon, 26 Jun 2023 16:03:50 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1833" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunDays\":[\"Monday\",\"Tuesday\",\"Wednesday\"],\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":56,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\",\"Monday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":1,\"isLast\":false},{\"date\":6,\"isLast\":false},{\"date\":28,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":45,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"monthsOfYear\":[\"May\",\"April\"],\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":1,\"isLast\":false},{\"date\":2,\"isLast\":false},{\"date\":3,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":43,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}" + } + }, + "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+DailyScheduleWithDailyRetention-AzureVM+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "8" ], + "x-ms-client-request-id": [ "78e2cf4a-9592-4644-8c7b-3b54034b8346" ], + "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "7124b081-157d-4872-b128-241a2a434ad1" ], + "x-ms-client-request-id": [ "78e2cf4a-9592-4644-8c7b-3b54034b8346", "78e2cf4a-9592-4644-8c7b-3b54034b8346" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "297" ], + "x-ms-correlation-request-id": [ "7124b081-157d-4872-b128-241a2a434ad1" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160351Z:7124b081-157d-4872-b128-241a2a434ad1" ], + "Date": [ "Mon, 26 Jun 2023 16:03:51 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1833" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunDays\":[\"Monday\",\"Tuesday\",\"Wednesday\"],\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":56,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\",\"Monday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":1,\"isLast\":false},{\"date\":6,\"isLast\":false},{\"date\":28,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":45,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"monthsOfYear\":[\"May\",\"April\"],\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":1,\"isLast\":false},{\"date\":2,\"isLast\":false},{\"date\":3,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":43,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}" + } + }, + "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+DailyScheduleWithDailyRetention-AzureVM+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+3": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "9" ], + "x-ms-client-request-id": [ "222ad7d1-53b2-488d-b8a3-191c4d05c4db" ], + "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "f092c146-1635-4efc-9953-d07bd93cc201" ], + "x-ms-client-request-id": [ "222ad7d1-53b2-488d-b8a3-191c4d05c4db", "222ad7d1-53b2-488d-b8a3-191c4d05c4db" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14997" ], + "x-ms-correlation-request-id": [ "f092c146-1635-4efc-9953-d07bd93cc201" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160352Z:f092c146-1635-4efc-9953-d07bd93cc201" ], + "Date": [ "Mon, 26 Jun 2023 16:03:52 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null + } + }, + "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+WeeklyScheduleWithWeeklyRetention-SAPHANA+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", + "Content": "{\r\n \"properties\": {\r\n \"backupManagementType\": \"AzureWorkload\",\r\n \"workLoadType\": \"SAPHanaDatabase\",\r\n \"settings\": {\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"issqlcompression\": false,\r\n \"isCompression\": false\r\n },\r\n \"subProtectionPolicy\": [\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Monday\", \"Tuesday\" ],\r\n \"scheduleRunTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Tuesday\" ],\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 11,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Tuesday\" ],\r\n \"weeksOfTheMonth\": [ \"First\", \"Last\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 34,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"May\", \"June\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Tuesday\" ],\r\n \"weeksOfTheMonth\": [ \"Last\", \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 47,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"policyType\": \"Full\",\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n }\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"LogSchedulePolicy\",\r\n \"scheduleFrequencyInMins\": 120\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 23,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Log\"\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Sunday\" ],\r\n \"scheduleRunTimes\": [ \"2023-06-26T02:00:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 64,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Incremental\"\r\n }\r\n ]\r\n }\r\n}", + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "3123" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "31e6108b-f6e3-44ba-b43e-29b3cd136f24" ], + "x-ms-client-request-id": [ "c42f9f4a-ecdf-4749-830a-4c8ab22a20a9", "c42f9f4a-ecdf-4749-830a-4c8ab22a20a9" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], + "x-ms-correlation-request-id": [ "31e6108b-f6e3-44ba-b43e-29b3cd136f24" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160354Z:31e6108b-f6e3-44ba-b43e-29b3cd136f24" ], + "Date": [ "Mon, 26 Jun 2023 16:03:53 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2155" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Tuesday\"],\"scheduleRunTimes\":[\"2023-06-26T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":11,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"First\",\"Last\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"May\",\"June\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"Last\",\"First\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":47,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Incremental\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Sunday\"],\"scheduleRunTimes\":[\"2023-06-26T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":64,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":23,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}" + } + }, + "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+WeeklyScheduleWithWeeklyRetention-SAPHANA+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "11" ], + "x-ms-client-request-id": [ "c10d9e75-1d32-4d7f-9858-0082787eef36" ], + "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "20359bfa-935b-48cd-952a-1b04a87a83c5" ], + "x-ms-client-request-id": [ "c10d9e75-1d32-4d7f-9858-0082787eef36", "c10d9e75-1d32-4d7f-9858-0082787eef36" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "296" ], + "x-ms-correlation-request-id": [ "20359bfa-935b-48cd-952a-1b04a87a83c5" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160354Z:20359bfa-935b-48cd-952a-1b04a87a83c5" ], + "Date": [ "Mon, 26 Jun 2023 16:03:54 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2155" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Tuesday\"],\"scheduleRunTimes\":[\"2023-06-26T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":11,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"First\",\"Last\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"May\",\"June\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"Last\",\"First\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":47,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Incremental\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Sunday\"],\"scheduleRunTimes\":[\"2023-06-26T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":64,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":23,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}" + } + }, + "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+WeeklyScheduleWithWeeklyRetention-SAPHANA+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+3": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "12" ], + "x-ms-client-request-id": [ "b09da6fc-86d7-468f-bc5f-5381bafb2b99" ], + "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "bc9a964a-75c5-4bdd-94db-0044b97b324f" ], + "x-ms-client-request-id": [ "b09da6fc-86d7-468f-bc5f-5381bafb2b99", "b09da6fc-86d7-468f-bc5f-5381bafb2b99" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14996" ], + "x-ms-correlation-request-id": [ "bc9a964a-75c5-4bdd-94db-0044b97b324f" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160355Z:bc9a964a-75c5-4bdd-94db-0044b97b324f" ], + "Date": [ "Mon, 26 Jun 2023 16:03:55 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null + } + }, + "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+TierAfter-SAPHANA+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", + "Content": "{\r\n \"properties\": {\r\n \"backupManagementType\": \"AzureWorkload\",\r\n \"workLoadType\": \"SAPHanaDatabase\",\r\n \"settings\": {\r\n \"timeZone\": \"UTC\",\r\n \"issqlcompression\": false,\r\n \"isCompression\": false\r\n },\r\n \"subProtectionPolicy\": [\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Daily\",\r\n \"scheduleRunTimes\": [ \"2020-09-30T19:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2020-09-30T19:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 180,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"retentionTimes\": [ \"2020-09-30T19:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 104,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2020-09-30T19:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 60,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"January\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2020-09-30T19:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 10,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"policyType\": \"Full\",\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"TierAfter\",\r\n \"duration\": 54,\r\n \"durationType\": \"Days\"\r\n }\r\n }\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"LogSchedulePolicy\",\r\n \"scheduleFrequencyInMins\": 120\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 15,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Log\"\r\n }\r\n ]\r\n }\r\n}", + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "2666" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "5d0e1227-6f2d-46c4-9868-910992bb5550" ], + "x-ms-client-request-id": [ "a0285ce4-72df-4acc-b49c-77963f06641b", "a0285ce4-72df-4acc-b49c-77963f06641b" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1195" ], + "x-ms-correlation-request-id": [ "5d0e1227-6f2d-46c4-9868-910992bb5550" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160357Z:5d0e1227-6f2d-46c4-9868-910992bb5550" ], + "Date": [ "Mon, 26 Jun 2023 16:03:56 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1821" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2020-09-30T19:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"TierAfter\",\"duration\":54,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}" + } + }, + "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+TierAfter-SAPHANA+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "14" ], + "x-ms-client-request-id": [ "1712fd82-6161-4c93-8a38-849ee9ee6f67" ], + "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "9610037d-023b-49d2-9c69-b78fa7b1b538" ], + "x-ms-client-request-id": [ "1712fd82-6161-4c93-8a38-849ee9ee6f67", "1712fd82-6161-4c93-8a38-849ee9ee6f67" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "295" ], + "x-ms-correlation-request-id": [ "9610037d-023b-49d2-9c69-b78fa7b1b538" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160358Z:9610037d-023b-49d2-9c69-b78fa7b1b538" ], + "Date": [ "Mon, 26 Jun 2023 16:03:57 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1821" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2020-09-30T19:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"TierAfter\",\"duration\":54,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}" + } + }, + "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+TierAfter-SAPHANA+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+3": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "15" ], + "x-ms-client-request-id": [ "6265981d-bc10-459b-ac14-7617d7893221" ], + "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "b36cf375-432b-4f7b-a71c-5dd70a1592fa" ], + "x-ms-client-request-id": [ "6265981d-bc10-459b-ac14-7617d7893221", "6265981d-bc10-459b-ac14-7617d7893221" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14995" ], + "x-ms-correlation-request-id": [ "b36cf375-432b-4f7b-a71c-5dd70a1592fa" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160359Z:b36cf375-432b-4f7b-a71c-5dd70a1592fa" ], + "Date": [ "Mon, 26 Jun 2023 16:03:58 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null + } + }, + "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+TierRecommended-AzureVM+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", + "Content": "{\r\n \"properties\": {\r\n \"protectedItemsCount\": 0,\r\n \"backupManagementType\": \"AzureIaasVM\",\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Daily\",\r\n \"scheduleRunTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 180,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 12,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 60,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"January\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 10,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"TierRecommended\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n },\r\n \"instantRpRetentionRangeInDays\": 2,\r\n \"timeZone\": \"UTC\",\r\n \"policyType\": \"V1\"\r\n }\r\n}", + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "1930" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "eb698e32-fe54-44e4-a73b-ba6cf92a3c39" ], + "x-ms-client-request-id": [ "89cd4f07-2bc1-449a-9133-ad7cdbb53ccc", "89cd4f07-2bc1-449a-9133-ad7cdbb53ccc" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1194" ], + "x-ms-correlation-request-id": [ "eb698e32-fe54-44e4-a73b-ba6cf92a3c39" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160400Z:eb698e32-fe54-44e4-a73b-ba6cf92a3c39" ], + "Date": [ "Mon, 26 Jun 2023 16:03:59 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1529" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":12,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"TierRecommended\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}" + } + }, + "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+TierRecommended-AzureVM+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "17" ], + "x-ms-client-request-id": [ "95a153bc-242f-441a-a440-a2bd7419b836" ], + "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "0b666200-5e76-4fe9-bc72-56666f9647d0" ], + "x-ms-client-request-id": [ "95a153bc-242f-441a-a440-a2bd7419b836", "95a153bc-242f-441a-a440-a2bd7419b836" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Microsoft-IIS/10.0" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "294" ], + "x-ms-correlation-request-id": [ "0b666200-5e76-4fe9-bc72-56666f9647d0" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160401Z:0b666200-5e76-4fe9-bc72-56666f9647d0" ], + "Date": [ "Mon, 26 Jun 2023 16:04:00 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1529" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":12,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"TierRecommended\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}" + } + }, + "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+TierRecommended-AzureVM+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+3": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", + "Content": null, + "Headers": { + "x-ms-unique-id": [ "18" ], + "x-ms-client-request-id": [ "bcddca30-cdab-47d2-a32f-6fe120231ffa" ], + "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "822fd8d8-223f-49ec-9e97-ac6dff9dbbbe" ], + "x-ms-client-request-id": [ "bcddca30-cdab-47d2-a32f-6fe120231ffa", "bcddca30-cdab-47d2-a32f-6fe120231ffa" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14994" ], + "x-ms-correlation-request-id": [ "822fd8d8-223f-49ec-9e97-ac6dff9dbbbe" ], + "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160402Z:822fd8d8-223f-49ec-9e97-ac6dff9dbbbe" ], + "Date": [ "Mon, 26 Jun 2023 16:04:02 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null + } + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.Tests.ps1 new file mode 100644 index 000000000000..d3ef59f0ab34 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.Tests.ps1 @@ -0,0 +1,258 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Edit-AzrecoveryServicesBackupRetentionPolicyClientObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Edit-AzrecoveryServicesBackupRetentionPolicyClientObject' { + + It 'CommonCommandToUpdateAllRetentions' { + $sub = $env.TestBackupPolicy.SubscriptionId + $rgName = $env.TestBackupPolicy.ResourceGroupName + $vaultName = $env.TestBackupPolicy.VaultName + $newPolicyName = $env.TestBackupPolicy.NewPolicyName + + $DebugPreference = "Continue" + Write-Debug -Message $sub + Write-Debug -Message $rgName + Write-Debug -Message $vaultName + Write-Debug -Message $newPolicyName + $DebugPreference = "SilentlyContinue" + + $pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM + Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableDailyRetention 1 -DailyRetentionDurationInDays 56 -EnableWeeklyRetention 1 -WeeklyRetentionDurationInWeeks 34 -WeeklyRetentionDaysOfTheWeek Sunday -EnableMonthlyRetention 1 -MonthlyRetentionScheduleType Daily -MonthlyRetentionDurationInMonths 54 -MonthlyRetentionDaysOfTheMonth 1,2,3 -EnableYearlyRetention 1 -YearlyRetentionScheduleType Daily -YearlyRetentionDurationInYears 47 -YearlyRetentionMonthsOfTheYear March, April -YearlyRetentionDaysOfTheMonth 2,4,5 + New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $pol1 -PolicyName $newPolicyName + + # this Policy should be there - then delete it and then this policy shouldn't be there + $policy=Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName $newPolicyName + $policy.Name | Should be $newPolicyName + + Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName + #$pol = Get-AzRecoveryServicesBackupPolicy -VaultName $vaultName -ResourceGroupName $rgName -PolicyName $newPolicyName + #$pol | Should -Be "NotFound" + } + + It 'DailyScheduleWithWeeklyRetention-AzureVM' { + #When chedule run frequency is daily and monthly or yearly retention is weekly + $sub = $env.TestBackupPolicy.SubscriptionId + $rgName = $env.TestBackupPolicy.ResourceGroupName + $vaultName = $env.TestBackupPolicy.VaultName + $newPolicyName = $env.TestBackupPolicy.NewPolicyName + + $pol1 = Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM + + # update daily retention + Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableDailyRetention $true -DailyRetentionDurationInDays 56 + + # update weekly retention + Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableWeeklyRetention $true -WeeklyRetentionDurationInWeeks 34 -WeeklyRetentionDaysOfTheWeek Sunday,Monday + + # update monthly retention + Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 36 -MonthlyRetentionDaysOfTheWeek "Monday","Tuesday" -MonthlyRetentionWeeksOfTheMonth Second, Fourth + + # update yearly retention + Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableYearlyRetention $true -YearlyRetentionScheduleType Weekly -YearlyRetentionDurationInYears 67 -YearlyRetentionMonthsOfTheYear May, June -YearlyRetentionDaysOfTheWeek Monday, Tuesday -YearlyRetentionWeeksOfTheMonth First, Third + + # create new policy with modified retention policy + New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $pol1 -PolicyName $newPolicyName + + # this Policy should be there - then delete it and then this policy shouldn't be there + $policy=Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName $newPolicyName + + # verify policy modifications + $policy.Name | Should be $newPolicyName + $policy.Property.RetentionPolicy.DailySchedule.RetentionDuration.Count | Should be "56" + $policy.Property.RetentionPolicy.WeeklySchedule.RetentionDuration.Count | Should be "34" + $policy.Property.RetentionPolicy.WeeklySchedule.DaysOfTheWeek | Should be "Sunday","Monday" + $policy.Property.RetentionPolicy.MonthlySchedule.RetentionDuration.Count | Should be "36" + $policy.Property.RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType | Should be "Weekly" + $policy.Property.RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly[0].DaysOfTheWeek | Should be "Monday","Tuesday" + $policy.Property.RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly[0].WeeksOfTheMonth | Should be "Second","Fourth" + $policy.Property.RetentionPolicy.YearlySchedule.RetentionDuration.Count | Should be "67" + $policy.Property.RetentionPolicy.YearlySchedule.RetentionScheduleFormatType | Should be "Weekly" + $policy.Property.RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.DaysOfTheWeek | Should be "Monday","Tuesday" + $policy.Property.RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.WeeksOfTheMonth | Should be "First","Third" + $policy.Property.RetentionPolicy.YearlySchedule.MonthsOfYear | Should be "May","June" + + # remove policy + Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName + #$pol = Get-AzRecoveryServicesBackupPolicy -VaultName $vaultName -ResourceGroupName $rgName -PolicyName $newPolicyName + #$pol | Should -Be "NotFound" + } + + It 'DailyScheduleWithDailyRetention-AzureVM' { + #When schedule run frequency is daily and monthly or yearly retention is daily + $sub = $env.TestBackupPolicy.SubscriptionId + $rgName = $env.TestBackupPolicy.ResourceGroupName + $vaultName = $env.TestBackupPolicy.VaultName + $newPolicyName = $env.TestBackupPolicy.NewPolicyName + + $pol1 = Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM + + # update daily retention + Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableDailyRetention $true -DailyRetentionDurationInDays 56 + + # fetch or set the schedule run days using Edit-AzrecoveryServicesBackupSchedulePolicyClientObject command + $pol1.SchedulePolicy.ScheduleRunDay="Monday", "Tuesday", "Wednesday" + + # update weekly retention + Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableWeeklyRetention $true -WeeklyRetentionDurationInWeeks 34 -WeeklyRetentionDaysOfTheWeek Sunday,Monday + + # set the schedule run days using Edit-AzrecoveryServicesBackupSchedulePolicyClientObject command + $pol1.SchedulePolicy.ScheduleRunFrequency="Daily" + + # update monthly retention + Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Daily -MonthlyRetentionDurationInMonths 45 -MonthlyRetentionDaysOfTheMonth 1,6,28 + + # update yearly retention + Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableYearlyRetention $true -YearlyRetentionScheduleType Daily -YearlyRetentionMonthsOfTheYear May,April -YearlyRetentionDaysOfTheMonth @("1","2","3") -YearlyRetentionDurationInYears 43 + + # create new policy with modified retention policy + New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $pol1 -PolicyName $newPolicyName + + # this Policy should be there - then delete it and then this policy shouldn't be there + $policy=Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName $newPolicyName + + # verify policy modifications + $policy.Name | Should be $newPolicyName + $policy.Property.RetentionPolicy.DailySchedule.RetentionDuration.Count | Should be "56" + $policy.Property.RetentionPolicy.WeeklySchedule.RetentionDuration.Count | Should be "34" + $policy.Property.RetentionPolicy.WeeklySchedule.DaysOfTheWeek | Should be "Sunday","Monday" + $policy.Property.RetentionPolicy.MonthlySchedule.RetentionDuration.Count | Should be "45" + $policy.Property.RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType | Should be "Daily" + $policy.Property.RetentionPolicy.YearlySchedule.RetentionDuration.Count | Should be "43" + $policy.Property.RetentionPolicy.YearlySchedule.RetentionScheduleFormatType | Should be "Daily" + $policy.Property.RetentionPolicy.YearlySchedule.MonthsOfYear | Should be "May","April" + $policy.Property.RetentionPolicy.YearlySchedule.RetentionScheduleDaily.DaysOfTheMonth[-1].Date | Should be 3 + + # remove policy + Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName + #$pol = Get-AzRecoveryServicesBackupPolicy -VaultName $vaultName -ResourceGroupName $rgName -PolicyName $newPolicyName + #$pol | Should -Be "NotFound" + } + + + It 'WeeklyScheduleWithWeeklyRetention-SAPHANA' { + #When schedule run frequency is weekly and monthly or yearly retention is weekly + $sub = $env.TestBackupPolicy.SubscriptionId + $rgName = $env.TestBackupPolicy.ResourceGroupName + $vaultName = $env.TestBackupPolicy.VaultName + $newPolicyName = $env.TestBackupPolicy.NewPolicyName + + $pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA + + # Mandatory Full backup schedule ,Incremental schedule and log schedule conditions for testing + Edit-AzRecoveryServicesBackupSchedulePolicyClientObject -Policy $pol1 -BackupFrequency "Weekly" -ScheduleRunDay @("Monday","Tuesday") -ScheduleTime "1:30 PM" -EnableIncrementalBackup 1 -IncrementalRunDay @("Sunday") -IncrementalScheduleTime "2:00 AM" -TimeZone "Tokyo Standard Time" -EnableLogBackup 1 -LogBackupFrequency 120 + + # update weekly retention + Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableWeeklyRetention $true -WeeklyRetentionDurationInWeeks 11 -WeeklyRetentionDaysOfTheWeek Sunday + + # update monthly retention + Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 34 -MonthlyRetentionDaysOfTheWeek Monday,Tuesday -MonthlyRetentionWeeksOfTheMonth First, Last + + # update yearly retention + Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableYearlyRetention $true -YearlyRetentionScheduleType Weekly -YearlyRetentionDurationInYears 47 -YearlyRetentionMonthsOfTheYear May,June -YearlyRetentionDaysOfTheWeek Monday,Tuesday -YearlyRetentionWeeksOfTheMonth Last,First + + # update incremental/differential backup retention + Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyIncrementalBackup -IncrementalRetentionPeriodInDays 64 + + # update log backup retention + Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyLogBackup -LogRetentionPeriodInDays 23 + + # create new policy with modified retention policy + New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $pol1 -PolicyName $newPolicyName + + # this Policy should be there - then delete it and then this policy shouldn't be there + $policy=Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName $newPolicyName + + # verify policy modifications + $policy.Name | Should be $newPolicyName + $FullBackupPolicy = $policy.Property.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Full" } + $FullBackupPolicy.RetentionPolicy.DailySchedule.RetentionDuration.Count | Should be $null + $FullBackupPolicy.RetentionPolicy.WeeklySchedule.RetentionDuration.Count | Should be "11" + $FullBackupPolicy.RetentionPolicy.WeeklySchedule.DaysOfTheWeek | Should be "Monday","Tuesday" + $FullBackupPolicy.RetentionPolicy.MonthlySchedule.RetentionDuration.Count | Should be "34" + $FullBackupPolicy.RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType | Should be "Weekly" + $FullBackupPolicy.RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly[0].DaysOfTheWeek | Should be "Monday","Tuesday" + $FullBackupPolicy.RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly[0].WeeksOfTheMonth | Should be "First","Last" + $FullBackupPolicy.RetentionPolicy.YearlySchedule.RetentionDuration.Count | Should be "47" + $FullBackupPolicy.RetentionPolicy.YearlySchedule.RetentionScheduleFormatType | Should be "Weekly" + $FullBackupPolicy.RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.DaysOfTheWeek | Should be "Monday","Tuesday" + $FullBackupPolicy.RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.WeeksOfTheMonth | Should be "Last","First" + $FullBackupPolicy.RetentionPolicy.YearlySchedule.MonthsOfYear | Should be "May","June" + + $IncrementalBackupPolicy = $policy.Property.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Incremental" } + $IncrementalBackupPolicy.RetentionPolicy.RetentionDurationCount | Should be "64" + + $LogBackupPolicy = $policy.Property.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Log" } + $LogBackupPolicy.RetentionPolicy.RetentionDurationCount | Should be "23" + + # remove policy + Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName + #$pol = Get-AzRecoveryServicesBackupPolicy -VaultName $vaultName -ResourceGroupName $rgName -PolicyName $newPolicyName + #$pol | Should -Be "NotFound" + } + + It 'TierAfter-SAPHANA' { + #Tiering SAPHANA TierAfter + $sub = $env.TestBackupPolicy.SubscriptionId + $rgName = $env.TestBackupPolicy.ResourceGroupName + $vaultName = $env.TestBackupPolicy.VaultName + $newPolicyName = $env.TestBackupPolicy.NewPolicyName + + $pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA + + #create a new policy with enable tiering + New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $pol1 -PolicyName $newPolicyName -MoveToArchiveTier $true -TierAfterDuration 54 -TieringMode TierAfter -TierAfterDurationType Days + + $policy=Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName $newPolicyName + + # verify policy modifications + $policy.Name | Should be $newPolicyName + $policy.Property.SubProtectionPolicy[0].TieringPolicy.AdditionalProperties.ArchivedRP.duration | Should be "54" + $policy.Property.SubProtectionPolicy[0].TieringPolicy.AdditionalProperties.ArchivedRP.durationType | Should be "Days" + $policy.Property.SubProtectionPolicy[0].TieringPolicy.AdditionalProperties.ArchivedRP.TieringMode | Should be "TierAfter" + + # remove policy + Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName + #$pol = Get-AzRecoveryServicesBackupPolicy -VaultName $vaultName -ResourceGroupName $rgName -PolicyName $newPolicyName + #$pol | Should -Be "NotFound" + } + + It 'TierRecommended-AzureVM' { + #Tiering AzureVM TierRecommended + $sub = $env.TestBackupPolicy.SubscriptionId + $rgName = $env.TestBackupPolicy.ResourceGroupName + $vaultName = $env.TestBackupPolicy.VaultName + $newPolicyName = $env.TestBackupPolicy.NewPolicyName + + $pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM + + #create a new policy with enable tiering + New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $pol1 -PolicyName $newPolicyName -MoveToArchiveTier $true -TieringMode TierRecommended + + $policy=Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName $newPolicyName + + # verify policy modifications + $policy.Name | Should be $newPolicyName + $policy.Property.TieringPolicy.AdditionalProperties.ArchivedRP.duration | Should be "0" + $policy.Property.TieringPolicy.AdditionalProperties.ArchivedRP.durationType | Should be "Invalid" + $policy.Property.TieringPolicy.AdditionalProperties.ArchivedRP.TieringMode | Should be "TierRecommended" + + # remove policy + Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName + #$pol = Get-AzRecoveryServicesBackupPolicy -VaultName $vaultName -ResourceGroupName $rgName -PolicyName $newPolicyName + #$pol | Should -Be "NotFound" + } + +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Export-AzRecoveryServicesJob.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Export-AzRecoveryServicesJob.Tests.ps1 new file mode 100644 index 000000000000..3e647970bc35 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Export-AzRecoveryServicesJob.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Export-AzRecoveryServicesJob')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Export-AzRecoveryServicesJob.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Export-AzRecoveryServicesJob' { + It 'Export' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ExportViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupEngine.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupEngine.Tests.ps1 new file mode 100644 index 000000000000..56fb9973c5b5 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupEngine.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupEngine')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupEngine.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupEngine' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupJob.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupJob.Tests.ps1 new file mode 100644 index 000000000000..cc4f1303b7e9 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupJob.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupJob')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupJob.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupJob' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationResult.Tests.ps1 new file mode 100644 index 000000000000..a01f16df7ec6 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationResult.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupOperationResult')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupOperationResult.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupOperationResult' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationStatuses.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationStatuses.Tests.ps1 new file mode 100644 index 000000000000..f4419a086dd8 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationStatuses.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupOperationStatuses')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupOperationStatuses.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupOperationStatuses' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupPolicy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupPolicy.Tests.ps1 new file mode 100644 index 000000000000..b17e9269c29f --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupPolicy.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupPolicy')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupPolicy.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupPolicy' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectableItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectableItem.Tests.ps1 new file mode 100644 index 000000000000..cc93a66d0c6f --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectableItem.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupProtectableItem')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupProtectableItem.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupProtectableItem' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectedItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectedItem.Tests.ps1 new file mode 100644 index 000000000000..4338554bed0b --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectedItem.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupProtectedItem')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupProtectedItem.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupProtectedItem' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionContainer.Tests.ps1 new file mode 100644 index 000000000000..3e0f920f1660 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionContainer.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupProtectionContainer')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupProtectionContainer.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupProtectionContainer' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionIntent.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionIntent.Tests.ps1 new file mode 100644 index 000000000000..295c4d3f26e2 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionIntent.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupProtectionIntent')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupProtectionIntent.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupProtectionIntent' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 new file mode 100644 index 000000000000..f9133a30b379 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupResourceEncryptionConfig')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupResourceEncryptionConfig.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupResourceEncryptionConfig' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 new file mode 100644 index 000000000000..93a53cf7eb40 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupResourceStorageConfigsNonCrr')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupResourceStorageConfigsNonCrr' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 new file mode 100644 index 000000000000..47a619ac7a8f --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupResourceVaultConfig')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupResourceVaultConfig.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupResourceVaultConfig' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupStatus.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupStatus.Tests.ps1 new file mode 100644 index 000000000000..1ec2996214da --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupStatus.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupStatus')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupStatus.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupStatus' { + It 'GetExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupUsageSummary.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupUsageSummary.Tests.ps1 new file mode 100644 index 000000000000..2e357373fea1 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupUsageSummary.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupUsageSummary')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupUsageSummary.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupUsageSummary' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupWorkloadItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupWorkloadItem.Tests.ps1 new file mode 100644 index 000000000000..d0b41bb0f525 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupWorkloadItem.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupWorkloadItem')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupWorkloadItem.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupWorkloadItem' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBmsPrepareDataMoveOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBmsPrepareDataMoveOperationResult.Tests.ps1 new file mode 100644 index 000000000000..663938db20a3 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBmsPrepareDataMoveOperationResult.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBmsPrepareDataMoveOperationResult')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBmsPrepareDataMoveOperationResult.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBmsPrepareDataMoveOperationResult' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesDeletedProtectionContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesDeletedProtectionContainer.Tests.ps1 new file mode 100644 index 000000000000..16fd005d7c19 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesDeletedProtectionContainer.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesDeletedProtectionContainer')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesDeletedProtectionContainer.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesDeletedProtectionContainer' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesExportJobsOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesExportJobsOperationResult.Tests.ps1 new file mode 100644 index 000000000000..4e092b06c6b2 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesExportJobsOperationResult.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesExportJobsOperationResult')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesExportJobsOperationResult.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesExportJobsOperationResult' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobDetail.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobDetail.Tests.ps1 new file mode 100644 index 000000000000..8c743816da76 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobDetail.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesJobDetail')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesJobDetail.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesJobDetail' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobOperationResult.Tests.ps1 new file mode 100644 index 000000000000..8016c52e4ab4 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobOperationResult.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesJobOperationResult')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesJobOperationResult.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesJobOperationResult' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesOperationStatus.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesOperationStatus.Tests.ps1 new file mode 100644 index 000000000000..3ce4cc1f02a6 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesOperationStatus.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesOperationStatus')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesOperationStatus.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesOperationStatus' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPolicyTemplate.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPolicyTemplate.Tests.ps1 new file mode 100644 index 000000000000..d93f16a51eac --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPolicyTemplate.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesPolicyTemplate')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesPolicyTemplate.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesPolicyTemplate' { + It '__AllParameterSets' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 new file mode 100644 index 000000000000..bd9ef5c79619 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesPrivateEndpointConnection')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesPrivateEndpointConnection.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesPrivateEndpointConnection' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointOperationStatus.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointOperationStatus.Tests.ps1 new file mode 100644 index 000000000000..9023679c7434 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointOperationStatus.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesPrivateEndpointOperationStatus')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesPrivateEndpointOperationStatus.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesPrivateEndpointOperationStatus' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectableContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectableContainer.Tests.ps1 new file mode 100644 index 000000000000..60afb1127d3c --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectableContainer.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectableContainer')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectableContainer.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesProtectableContainer' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItem.Tests.ps1 new file mode 100644 index 000000000000..14659a14c23d --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItem.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectedItem')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectedItem.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesProtectedItem' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationResult.Tests.ps1 new file mode 100644 index 000000000000..9de89a47424c --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationResult.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectedItemOperationResult')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectedItemOperationResult.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesProtectedItemOperationResult' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationStatuses.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationStatuses.Tests.ps1 new file mode 100644 index 000000000000..63de8b0a8544 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationStatuses.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectedItemOperationStatuses')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectedItemOperationStatuses.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesProtectedItemOperationStatuses' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainer.Tests.ps1 new file mode 100644 index 000000000000..bb9c9cfbcce2 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainer.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectionContainer')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectionContainer.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesProtectionContainer' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerOperationResult.Tests.ps1 new file mode 100644 index 000000000000..7cff73ddce39 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerOperationResult.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectionContainerOperationResult')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectionContainerOperationResult.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesProtectionContainerOperationResult' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerRefreshOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerRefreshOperationResult.Tests.ps1 new file mode 100644 index 000000000000..9c7b3c7b9efe --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerRefreshOperationResult.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectionContainerRefreshOperationResult')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectionContainerRefreshOperationResult.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesProtectionContainerRefreshOperationResult' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionIntent.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionIntent.Tests.ps1 new file mode 100644 index 000000000000..5c59bb6f87f1 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionIntent.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectionIntent')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectionIntent.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesProtectionIntent' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicy.Tests.ps1 new file mode 100644 index 000000000000..49a3bb0810fd --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicy.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectionPolicy')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectionPolicy.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesProtectionPolicy' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationResult.Tests.ps1 new file mode 100644 index 000000000000..7bee802c72ed --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationResult.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectionPolicyOperationResult')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectionPolicyOperationResult.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesProtectionPolicyOperationResult' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationStatuses.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationStatuses.Tests.ps1 new file mode 100644 index 000000000000..ceaacbe6a994 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationStatuses.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectionPolicyOperationStatuses')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectionPolicyOperationStatuses.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesProtectionPolicyOperationStatuses' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPoint.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPoint.Tests.ps1 new file mode 100644 index 000000000000..bbaa479012c6 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPoint.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesRecoveryPoint')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesRecoveryPoint.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesRecoveryPoint' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPointsRecommendedForMove.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPointsRecommendedForMove.Tests.ps1 new file mode 100644 index 000000000000..cdbf447452ce --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPointsRecommendedForMove.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesRecoveryPointsRecommendedForMove')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesRecoveryPointsRecommendedForMove.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesRecoveryPointsRecommendedForMove' { + It 'ListExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesResourceGuardProxy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesResourceGuardProxy.Tests.ps1 new file mode 100644 index 000000000000..520bf5e9928e --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesResourceGuardProxy.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesResourceGuardProxy')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesResourceGuardProxy.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesResourceGuardProxy' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get1' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity1' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesSecurityPiN.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesSecurityPiN.Tests.ps1 new file mode 100644 index 000000000000..c9d7505dc024 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesSecurityPiN.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesSecurityPiN')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesSecurityPiN.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesSecurityPiN' { + It 'GetExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationResult.Tests.ps1 new file mode 100644 index 000000000000..53defd3b7bb8 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationResult.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesValidateOperationResult')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesValidateOperationResult.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesValidateOperationResult' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationStatuses.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationStatuses.Tests.ps1 new file mode 100644 index 000000000000..e0cd7fee9448 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationStatuses.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesValidateOperationStatuses')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesValidateOperationStatuses.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesValidateOperationStatuses' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesInquireProtectionContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesInquireProtectionContainer.Tests.ps1 new file mode 100644 index 000000000000..c5da9cd79923 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesInquireProtectionContainer.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzRecoveryServicesInquireProtectionContainer')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzRecoveryServicesInquireProtectionContainer.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Invoke-AzRecoveryServicesInquireProtectionContainer' { + It 'Inquire' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'InquireViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesPrepare.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesPrepare.Tests.ps1 new file mode 100644 index 000000000000..ebbbbd9686e8 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesPrepare.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzRecoveryServicesPrepare')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzRecoveryServicesPrepare.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Invoke-AzRecoveryServicesPrepare' { + It 'PrepareExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Prepare' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'PrepareViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'PrepareViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Move-AzRecoveryServicesRecoveryPoint.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Move-AzRecoveryServicesRecoveryPoint.Tests.ps1 new file mode 100644 index 000000000000..36efa8d10d03 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Move-AzRecoveryServicesRecoveryPoint.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Move-AzRecoveryServicesRecoveryPoint')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Move-AzRecoveryServicesRecoveryPoint.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Move-AzRecoveryServicesRecoveryPoint' { + It 'MoveExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Move' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'MoveViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'MoveViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesBackupPolicy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesBackupPolicy.Tests.ps1 new file mode 100644 index 000000000000..f2f19e0d5fe5 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesBackupPolicy.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzRecoveryServicesBackupPolicy')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzRecoveryServicesBackupPolicy.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzRecoveryServicesBackupPolicy' { + It '__AllParameterSets' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 new file mode 100644 index 000000000000..901e92ae0a5e --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzRecoveryServicesItemLevelRecoveryConnection')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzRecoveryServicesItemLevelRecoveryConnection.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzRecoveryServicesItemLevelRecoveryConnection' { + It 'ProvisionExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Provision' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ProvisionViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ProvisionViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectedItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectedItem.Tests.ps1 new file mode 100644 index 000000000000..6ac679180a99 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectedItem.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzRecoveryServicesProtectedItem')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzRecoveryServicesProtectedItem.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzRecoveryServicesProtectedItem' { + It 'CreateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Create' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectionIntent.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectionIntent.Tests.ps1 new file mode 100644 index 000000000000..8409d04b21f1 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectionIntent.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzRecoveryServicesProtectionIntent')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzRecoveryServicesProtectionIntent.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzRecoveryServicesProtectionIntent' { + It 'CreateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Create' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectionPolicy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectionPolicy.Tests.ps1 new file mode 100644 index 000000000000..d8ea9e9fc78d --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectionPolicy.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzRecoveryServicesProtectionPolicy')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzRecoveryServicesProtectionPolicy.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzRecoveryServicesProtectionPolicy' { + It 'CreateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Create' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/README.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/README.md new file mode 100644 index 000000000000..7c752b4c8c43 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/README.md @@ -0,0 +1,17 @@ +# Test +This directory contains the [Pester](https://www.powershellgallery.com/packages/Pester) tests to run for the module. We use Pester as it is the unofficial standard for PowerShell unit testing. Test stubs for custom cmdlets (created in `..\custom`) will be generated into this folder when `build-module.ps1` is ran. These test stubs will fail automatically, to indicate that tests should be written for custom cmdlets. + +## Info +- Modifiable: yes +- Generated: partial +- Committed: yes +- Packaged: no + +## Details +We allow three testing modes: *live*, *record*, and *playback*. These can be selected using the `-Live`, `-Record`, and `-Playback` switches respectively on the `test-module.ps1` script. This script will run through any `.Tests.ps1` scripts in the `test` folder. If you choose the *record* mode, it will create a `.Recording.json` file of the REST calls between the client and server. Then, when you choose *playback* mode, it will use the `.Recording.json` file to mock the communication between server and client. The *live* mode runs the same as the *record* mode; however, it doesn't create the `.Recording.json` file. + +## Purpose +Custom cmdlets generally encompass additional functionality not described in the REST specification, or combines functionality generated from the REST spec. To validate this functionality continues to operate as intended, creating tests that can be ran and re-ran against custom cmdlets is part of the framework. + +## Usage +To execute tests, run the `test-module.ps1`. To write tests, [this example](https://github.com/pester/Pester/blob/8b9cf4248315e44f1ac6673be149f7e0d7f10466/Examples/Planets/Get-Planet.Tests.ps1#L1) from the Pester repository is very useful for getting started. \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesProtectionContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesProtectionContainer.Tests.ps1 new file mode 100644 index 000000000000..9fcdda764d2a --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesProtectionContainer.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Register-AzRecoveryServicesProtectionContainer')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Register-AzRecoveryServicesProtectionContainer.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Register-AzRecoveryServicesProtectionContainer' { + It 'RegisterExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Register' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'RegisterViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'RegisterViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesBackupPolicy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesBackupPolicy.Tests.ps1 new file mode 100644 index 000000000000..41fef73e9698 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesBackupPolicy.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzRecoveryServicesBackupPolicy')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzRecoveryServicesBackupPolicy.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzRecoveryServicesBackupPolicy' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 new file mode 100644 index 000000000000..c16e55a3b1da --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzRecoveryServicesPrivateEndpointConnection')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzRecoveryServicesPrivateEndpointConnection.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzRecoveryServicesPrivateEndpointConnection' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectedItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectedItem.Tests.ps1 new file mode 100644 index 000000000000..ab5ceb1f5a91 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectedItem.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzRecoveryServicesProtectedItem')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzRecoveryServicesProtectedItem.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzRecoveryServicesProtectedItem' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectionIntent.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectionIntent.Tests.ps1 new file mode 100644 index 000000000000..b3e5f712abfb --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectionIntent.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzRecoveryServicesProtectionIntent')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzRecoveryServicesProtectionIntent.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzRecoveryServicesProtectionIntent' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectionPolicy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectionPolicy.Tests.ps1 new file mode 100644 index 000000000000..ecb6ec6a9b1b --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectionPolicy.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzRecoveryServicesProtectionPolicy')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzRecoveryServicesProtectionPolicy.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzRecoveryServicesProtectionPolicy' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesResourceGuardProxy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesResourceGuardProxy.Tests.ps1 new file mode 100644 index 000000000000..26ddee5aa073 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesResourceGuardProxy.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzRecoveryServicesResourceGuardProxy')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzRecoveryServicesResourceGuardProxy.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzRecoveryServicesResourceGuardProxy' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Revoke-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Revoke-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 new file mode 100644 index 000000000000..c80441c4925d --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Revoke-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Revoke-AzRecoveryServicesItemLevelRecoveryConnection')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Revoke-AzRecoveryServicesItemLevelRecoveryConnection.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Revoke-AzRecoveryServicesItemLevelRecoveryConnection' { + It 'Revoke' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'RevokeViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupPolicy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupPolicy.Tests.ps1 new file mode 100644 index 000000000000..397d218d91c1 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupPolicy.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesBackupPolicy')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesBackupPolicy.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Set-AzRecoveryServicesBackupPolicy' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Update' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 new file mode 100644 index 000000000000..2fbc82ced7ed --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesBackupResourceEncryptionConfig')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesBackupResourceEncryptionConfig.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Set-AzRecoveryServicesBackupResourceEncryptionConfig' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Update' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 new file mode 100644 index 000000000000..46849657debe --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesBackupResourceStorageConfigsNonCrr')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Set-AzRecoveryServicesBackupResourceStorageConfigsNonCrr' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Update' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 new file mode 100644 index 000000000000..8aee2071bf53 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesBackupResourceVaultConfig')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesBackupResourceVaultConfig.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Set-AzRecoveryServicesBackupResourceVaultConfig' { + It 'PutExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Put' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 new file mode 100644 index 000000000000..3a242f36849b --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesPrivateEndpointConnection')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesPrivateEndpointConnection.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Set-AzRecoveryServicesPrivateEndpointConnection' { + It 'PutExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Put' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectedItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectedItem.Tests.ps1 new file mode 100644 index 000000000000..d286f00a801d --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectedItem.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesProtectedItem')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesProtectedItem.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Set-AzRecoveryServicesProtectedItem' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Update' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectionIntent.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectionIntent.Tests.ps1 new file mode 100644 index 000000000000..cc768e442439 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectionIntent.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesProtectionIntent')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesProtectionIntent.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Set-AzRecoveryServicesProtectionIntent' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Update' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectionPolicy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectionPolicy.Tests.ps1 new file mode 100644 index 000000000000..0fc681a0be3e --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectionPolicy.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesProtectionPolicy')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesProtectionPolicy.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Set-AzRecoveryServicesProtectionPolicy' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Update' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesResourceGuardProxy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesResourceGuardProxy.Tests.ps1 new file mode 100644 index 000000000000..657ae5cb8747 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesResourceGuardProxy.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesResourceGuardProxy')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesResourceGuardProxy.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Set-AzRecoveryServicesResourceGuardProxy' { + It 'PutExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Put' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServices.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServices.Tests.ps1 new file mode 100644 index 000000000000..a57dfaf67aa6 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServices.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Start-AzRecoveryServices')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Start-AzRecoveryServices.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Start-AzRecoveryServices' { + It 'TriggerExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Trigger' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'TriggerViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'TriggerViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesBackup.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesBackup.Tests.ps1 new file mode 100644 index 000000000000..0edd1eb00c9a --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesBackup.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Start-AzRecoveryServicesBackup')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Start-AzRecoveryServicesBackup.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Start-AzRecoveryServicesBackup' { + It 'TriggerExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Trigger' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'TriggerViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'TriggerViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesJobCancellation.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesJobCancellation.Tests.ps1 new file mode 100644 index 000000000000..2b4e5ead3b20 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesJobCancellation.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Start-AzRecoveryServicesJobCancellation')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Start-AzRecoveryServicesJobCancellation.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Start-AzRecoveryServicesJobCancellation' { + It 'Trigger' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'TriggerViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesRestore.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesRestore.Tests.ps1 new file mode 100644 index 000000000000..701f6e1e84dc --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesRestore.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Start-AzRecoveryServicesRestore')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Start-AzRecoveryServicesRestore.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Start-AzRecoveryServicesRestore' { + It 'TriggerExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Trigger' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'TriggerViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'TriggerViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesValidateOperation.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesValidateOperation.Tests.ps1 new file mode 100644 index 000000000000..f4fe76b779ab --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesValidateOperation.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Start-AzRecoveryServicesValidateOperation')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Start-AzRecoveryServicesValidateOperation.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Start-AzRecoveryServicesValidateOperation' { + It 'TriggerExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Trigger' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'TriggerViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'TriggerViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesFeatureSupport.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesFeatureSupport.Tests.ps1 new file mode 100644 index 000000000000..7d8fc962aa12 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesFeatureSupport.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Test-AzRecoveryServicesFeatureSupport')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Test-AzRecoveryServicesFeatureSupport.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Test-AzRecoveryServicesFeatureSupport' { + It 'ValidateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Validate' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ValidateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ValidateViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesProtectionIntent.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesProtectionIntent.Tests.ps1 new file mode 100644 index 000000000000..0a53ed57f0a9 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesProtectionIntent.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Test-AzRecoveryServicesProtectionIntent')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Test-AzRecoveryServicesProtectionIntent.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Test-AzRecoveryServicesProtectionIntent' { + It 'ValidateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Validate' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ValidateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ValidateViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unlock-AzRecoveryServicesResourceGuardProxyDelete.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unlock-AzRecoveryServicesResourceGuardProxyDelete.Tests.ps1 new file mode 100644 index 000000000000..b0d96af8758c --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unlock-AzRecoveryServicesResourceGuardProxyDelete.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Unlock-AzRecoveryServicesResourceGuardProxyDelete')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Unlock-AzRecoveryServicesResourceGuardProxyDelete.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Unlock-AzRecoveryServicesResourceGuardProxyDelete' { + It 'UnlockExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Unlock' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UnlockViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UnlockViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unregister-AzRecoveryServicesProtectionContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unregister-AzRecoveryServicesProtectionContainer.Tests.ps1 new file mode 100644 index 000000000000..2fe327622268 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unregister-AzRecoveryServicesProtectionContainer.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Unregister-AzRecoveryServicesProtectionContainer')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Unregister-AzRecoveryServicesProtectionContainer.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Unregister-AzRecoveryServicesProtectionContainer' { + It 'Unregister' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UnregisterViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 new file mode 100644 index 000000000000..0f96c094c9ff --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzRecoveryServicesBackupResourceStorageConfigsNonCrr')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzRecoveryServicesBackupResourceStorageConfigsNonCrr' { + It 'PatchExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Patch' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'PatchViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'PatchViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 new file mode 100644 index 000000000000..dfaaf3cf338a --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzRecoveryServicesBackupResourceVaultConfig')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzRecoveryServicesBackupResourceVaultConfig.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzRecoveryServicesBackupResourceVaultConfig' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Update' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesProtectionContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesProtectionContainer.Tests.ps1 new file mode 100644 index 000000000000..73a0b6f31a6b --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesProtectionContainer.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzRecoveryServicesProtectionContainer')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzRecoveryServicesProtectionContainer.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzRecoveryServicesProtectionContainer' { + It 'Refresh' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'RefreshViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/env.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/env.json new file mode 100644 index 000000000000..ebc376642407 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/env.json @@ -0,0 +1,16 @@ +{ + "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "TestBackupPolicy": { + "VaultName": "arohijain-vault", + "ResourceGroupName": "arohijain-rg", + "NewPolicyName": "arohijain-p-1", + "SubscriptionId": "38304e13-357e-405e-9e9a-220351dcce8c" + }, + "TestBackupSchedulePolicy": { + "VaultName": "anssingh-vault", + "ResourceGroupName": "anssingh-rg", + "NewPolicyName": "anssingh-testPolicy", + "SubscriptionId": "38304e13-357e-405e-9e9a-220351dcce8c" + }, + "SubscriptionId": "38304e13-357e-405e-9e9a-220351dcce8c" +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/loadEnv.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/loadEnv.ps1 new file mode 100644 index 000000000000..0ea394729062 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/loadEnv.ps1 @@ -0,0 +1,21 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- +$envFile = 'env.json' +if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' +} + +if (Test-Path -Path (Join-Path $PSScriptRoot $envFile)) { + $envFilePath = Join-Path $PSScriptRoot $envFile +} else { + $envFilePath = Join-Path $PSScriptRoot '..\$envFile' +} +$env = @{} +if (Test-Path -Path $envFilePath) { + $env = Get-Content (Join-Path $PSScriptRoot $envFile) | ConvertFrom-Json + $PSDefaultParameterValues=@{"*:SubscriptionId"=$env.SubscriptionId; "*:Tenant"=$env.Tenant} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/utils.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/utils.ps1 new file mode 100644 index 000000000000..3d21f3fd7776 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/utils.ps1 @@ -0,0 +1,51 @@ +function RandomString([bool]$allChars, [int32]$len) { + if ($allChars) { + return -join ((33..126) | Get-Random -Count $len | % {[char]$_}) + } else { + return -join ((48..57) + (97..122) | Get-Random -Count $len | % {[char]$_}) + } +} +$env = @{} +if ($UsePreviousConfigForRecord) { + $previousEnv = Get-Content (Join-Path $PSScriptRoot 'env.json') | ConvertFrom-Json + $previousEnv.psobject.properties | Foreach-Object { $env[$_.Name] = $_.Value } +} +# Add script method called AddWithCache to $env, when useCache is set true, it will try to get the value from the $env first. +# example: $val = $env.AddWithCache('key', $val, $true) +$env | Add-Member -Type ScriptMethod -Value { param( [string]$key, [object]$val, [bool]$useCache) if ($this.Contains($key) -and $useCache) { return $this[$key] } else { $this[$key] = $val; return $val } } -Name 'AddWithCache' +function setupEnv() { + # Preload subscriptionId and tenant from context, which will be used in test + # as default. You could change them if needed. + $env.SubscriptionId = (Get-AzContext).Subscription.Id + $env.Tenant = (Get-AzContext).Tenant.Id + # For any resources you created for test, you should add it to $env here. + + $TestBackupSchedulePolicyVariables = @{ + SubscriptionId = "38304e13-357e-405e-9e9a-220351dcce8c" + ResourceGroupName = "anssingh-rg" + VaultName = "anssingh-vault" + NewPolicyName = "anssingh-testPolicy" + } + + $env.add("TestBackupSchedulePolicy", $TestBackupSchedulePolicyVariables) | Out-Null + + $BackupRetentionPolicyTestVariables = @{ + SubscriptionId = "38304e13-357e-405e-9e9a-220351dcce8c" + ResourceGroupName = "arohijain-rg" + VaultName = "arohijain-vault" + NewPolicyName = "arohijain-p-1" # confirm what to keep + } + + $env.add("TestBackupPolicy", $BackupRetentionPolicyTestVariables) | Out-Null + + $envFile = 'env.json' + if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' + } + + set-content -Path (Join-Path $PSScriptRoot $envFile) -Value (ConvertTo-Json $env) +} +function cleanupEnv() { + # Clean resources you create for testing +} + diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/utils/Unprotect-SecureString.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/utils/Unprotect-SecureString.ps1 new file mode 100644 index 000000000000..cb05b51a6220 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/utils/Unprotect-SecureString.ps1 @@ -0,0 +1,16 @@ +#This script converts securestring to plaintext + +param( + [Parameter(Mandatory, ValueFromPipeline)] + [System.Security.SecureString] + ${SecureString} +) + +$ssPtr = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($SecureString) +try { + $plaintext = [System.Runtime.InteropServices.Marshal]::PtrToStringBSTR($ssPtr) +} finally { + [System.Runtime.InteropServices.Marshal]::ZeroFreeBSTR($ssPtr) +} + +return $plaintext \ No newline at end of file diff --git a/src/RecoveryServices/readme.azure.noprofile.md b/src/RecoveryServices/readme.azure.noprofile.md new file mode 100644 index 000000000000..483c37147060 --- /dev/null +++ b/src/RecoveryServices/readme.azure.noprofile.md @@ -0,0 +1,48 @@ +# Azure PowerShell AutoRest Configuration + +> Values +``` yaml +azure: true +powershell: true +help-link-prefix: https://docs.microsoft.com/powershell/module/ +license-header: MICROSOFT_MIT_NO_VERSION +branch: master +repo: https://github.com/Azure/azure-rest-api-specs/blob/$(branch) +metadata: + authors: Microsoft Corporation + owners: Microsoft Corporation + description: 'Microsoft Azure PowerShell: $(service-name) cmdlets' + copyright: Microsoft Corporation. All rights reserved. + tags: Azure ResourceManager ARM PSModule $(service-name) + companyName: Microsoft Corporation + requireLicenseAcceptance: true + licenseUri: https://aka.ms/azps-license + projectUri: https://github.com/Azure/azure-powershell +``` + +> Names +``` yaml +prefix: Az +subject-prefix: $(service-name) +module-name: $(prefix).$(service-name) +namespace: Microsoft.Azure.PowerShell.Cmdlets.$(service-name) +``` + +> Folders +``` yaml +clear-output-folder: true +output-folder: . +``` + +> Directives +``` yaml +directive: + - where: + subject: Operation + hide: true + - where: + parameter-name: SubscriptionId + set: + default: + script: '(Get-AzContext).Subscription.Id' +``` From f1ec3b146f78bf07232f232263a9578204da2885 Mon Sep 17 00:00:00 2001 From: Himanshu Agarwal Date: Thu, 29 Jun 2023 13:50:25 +0530 Subject: [PATCH 2/6] Fixed review comments. --- .../Az.RecoveryServices.psd1 | 2 +- .../Az.RecoveryServices.sln | 25 -- .../README.md | 10 +- ...icesBackupRetentionPolicyClientObject.ps1} | 63 ++- ...rvicesBackupSchedulePolicyClientObject.ps1 | 1 - .../Get-AzRecoveryServicesPolicyTemplate.ps1 | 5 +- .../New-AzRecoveryServicesBackupPolicy.ps1 | 9 +- .../custom/Enums/Enums.cs | 62 --- .../custom/Helpers/PolicyHelpers.ps1 | 74 +--- .../custom/manifests/ManifestLoader.ps1 | 1 - .../docs/Az.RecoveryServices.md | 4 +- ...vicesBackupRetentionPolicyClientObject.md} | 58 +-- ...ervicesBackupSchedulePolicyClientObject.md | 2 +- .../Get-AzRecoveryServicesBackupPolicy.md | 30 +- .../Get-AzRecoveryServicesPolicyTemplate.md | 27 +- .../New-AzRecoveryServicesBackupPolicy.md | 2 +- .../Remove-AzRecoveryServicesBackupPolicy.md | 23 +- ...vicesBackupRetentionPolicyClientObject.md} | 54 +-- ...zRecoveryServicesConfigureBackup.Tests.ps1 | 21 - ...etentionPolicyClientObject.Recording.json} | 338 ++++++++-------- ...ckupRetentionPolicyClientObject.Tests.ps1} | 36 +- ...pSchedulePolicyClientObject.Recording.json | 364 ++++++++++-------- .../Export-AzRecoveryServicesJob.Tests.ps1 | 25 -- ...t-AzRecoveryServicesBackupEngine.Tests.ps1 | 29 -- .../Get-AzRecoveryServicesBackupJob.Tests.ps1 | 21 - ...eryServicesBackupOperationResult.Tests.ps1 | 25 -- ...yServicesBackupOperationStatuses.Tests.ps1 | 25 -- ...t-AzRecoveryServicesBackupPolicy.Tests.ps1 | 2 +- ...eryServicesBackupProtectableItem.Tests.ps1 | 21 - ...overyServicesBackupProtectedItem.Tests.ps1 | 21 - ...ervicesBackupProtectionContainer.Tests.ps1 | 21 - ...ryServicesBackupProtectionIntent.Tests.ps1 | 21 - ...esBackupResourceEncryptionConfig.Tests.ps1 | 25 -- ...ckupResourceStorageConfigsNonCrr.Tests.ps1 | 25 -- ...ervicesBackupResourceVaultConfig.Tests.ps1 | 25 -- ...t-AzRecoveryServicesBackupStatus.Tests.ps1 | 33 -- ...coveryServicesBackupUsageSummary.Tests.ps1 | 21 - ...coveryServicesBackupWorkloadItem.Tests.ps1 | 21 - ...msPrepareDataMoveOperationResult.Tests.ps1 | 25 -- ...rvicesDeletedProtectionContainer.Tests.ps1 | 21 - ...ervicesExportJobsOperationResult.Tests.ps1 | 25 -- .../Get-AzRecoveryServicesJobDetail.Tests.ps1 | 25 -- ...coveryServicesJobOperationResult.Tests.ps1 | 25 -- ...zRecoveryServicesOperationStatus.Tests.ps1 | 25 -- ...AzRecoveryServicesPolicyTemplate.Tests.ps1 | 12 +- ...ervicesPrivateEndpointConnection.Tests.ps1 | 25 -- ...esPrivateEndpointOperationStatus.Tests.ps1 | 25 -- ...veryServicesProtectableContainer.Tests.ps1 | 21 - ...-AzRecoveryServicesProtectedItem.Tests.ps1 | 25 -- ...icesProtectedItemOperationResult.Tests.ps1 | 25 -- ...esProtectedItemOperationStatuses.Tests.ps1 | 25 -- ...overyServicesProtectionContainer.Tests.ps1 | 25 -- ...otectionContainerOperationResult.Tests.ps1 | 25 -- ...nContainerRefreshOperationResult.Tests.ps1 | 25 -- ...RecoveryServicesProtectionIntent.Tests.ps1 | 25 -- ...RecoveryServicesProtectionPolicy.Tests.ps1 | 25 -- ...sProtectionPolicyOperationResult.Tests.ps1 | 25 -- ...rotectionPolicyOperationStatuses.Tests.ps1 | 25 -- ...-AzRecoveryServicesRecoveryPoint.Tests.ps1 | 29 -- ...RecoveryPointsRecommendedForMove.Tests.ps1 | 25 -- ...coveryServicesResourceGuardProxy.Tests.ps1 | 33 -- ...et-AzRecoveryServicesSecurityPiN.Tests.ps1 | 33 -- ...yServicesValidateOperationResult.Tests.ps1 | 25 -- ...ervicesValidateOperationStatuses.Tests.ps1 | 25 -- ...rvicesInquireProtectionContainer.Tests.ps1 | 25 -- ...Invoke-AzRecoveryServicesPrepare.Tests.ps1 | 33 -- ...-AzRecoveryServicesRecoveryPoint.Tests.ps1 | 33 -- ...vicesItemLevelRecoveryConnection.Tests.ps1 | 33 -- ...-AzRecoveryServicesProtectedItem.Tests.ps1 | 33 -- ...RecoveryServicesProtectionIntent.Tests.ps1 | 33 -- ...RecoveryServicesProtectionPolicy.Tests.ps1 | 33 -- ...overyServicesProtectionContainer.Tests.ps1 | 33 -- ...ervicesPrivateEndpointConnection.Tests.ps1 | 25 -- ...-AzRecoveryServicesProtectedItem.Tests.ps1 | 25 -- ...RecoveryServicesProtectionIntent.Tests.ps1 | 25 -- ...RecoveryServicesProtectionPolicy.Tests.ps1 | 25 -- ...coveryServicesResourceGuardProxy.Tests.ps1 | 25 -- ...vicesItemLevelRecoveryConnection.Tests.ps1 | 25 -- ...t-AzRecoveryServicesBackupPolicy.Tests.ps1 | 25 -- ...esBackupResourceEncryptionConfig.Tests.ps1 | 25 -- ...ckupResourceStorageConfigsNonCrr.Tests.ps1 | 25 -- ...ervicesBackupResourceVaultConfig.Tests.ps1 | 25 -- ...ervicesPrivateEndpointConnection.Tests.ps1 | 25 -- ...-AzRecoveryServicesProtectedItem.Tests.ps1 | 25 -- ...RecoveryServicesProtectionIntent.Tests.ps1 | 25 -- ...RecoveryServicesProtectionPolicy.Tests.ps1 | 25 -- ...coveryServicesResourceGuardProxy.Tests.ps1 | 25 -- .../test/Start-AzRecoveryServices.Tests.ps1 | 33 -- .../Start-AzRecoveryServicesBackup.Tests.ps1 | 33 -- ...zRecoveryServicesJobCancellation.Tests.ps1 | 25 -- .../Start-AzRecoveryServicesRestore.Tests.ps1 | 33 -- ...ecoveryServicesValidateOperation.Tests.ps1 | 33 -- ...AzRecoveryServicesFeatureSupport.Tests.ps1 | 33 -- ...RecoveryServicesProtectionIntent.Tests.ps1 | 33 -- ...ServicesResourceGuardProxyDelete.Tests.ps1 | 33 -- ...overyServicesProtectionContainer.Tests.ps1 | 25 -- ...ckupResourceStorageConfigsNonCrr.Tests.ps1 | 33 -- ...ervicesBackupResourceVaultConfig.Tests.ps1 | 33 -- ...overyServicesProtectionContainer.Tests.ps1 | 25 -- .../test/env.json | 22 +- .../test/loadEnv.ps1 | 14 +- .../readme.azure.noprofile.md | 48 --- 102 files changed, 595 insertions(+), 2713 deletions(-) delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/Az.RecoveryServices.sln rename src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/{Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.ps1 => Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.ps1} (97%) rename src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/{Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.md => Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.md} (95%) rename src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/{Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.md => Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.md} (93%) delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Disable-AzRecoveryServicesConfigureBackup.Tests.ps1 rename src/RecoveryServices/RecoveryServices.Backup.Autorest/test/{Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.Recording.json => Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Recording.json} (82%) rename src/RecoveryServices/RecoveryServices.Backup.Autorest/test/{Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.Tests.ps1 => Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Tests.ps1} (93%) delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Export-AzRecoveryServicesJob.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupEngine.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupJob.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationResult.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationStatuses.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectableItem.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectedItem.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionContainer.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionIntent.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupStatus.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupUsageSummary.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupWorkloadItem.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBmsPrepareDataMoveOperationResult.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesDeletedProtectionContainer.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesExportJobsOperationResult.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobDetail.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobOperationResult.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesOperationStatus.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointOperationStatus.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectableContainer.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItem.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationResult.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationStatuses.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainer.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerOperationResult.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerRefreshOperationResult.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionIntent.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicy.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationResult.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationStatuses.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPoint.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPointsRecommendedForMove.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesResourceGuardProxy.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesSecurityPiN.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationResult.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationStatuses.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesInquireProtectionContainer.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesPrepare.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Move-AzRecoveryServicesRecoveryPoint.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectedItem.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectionIntent.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectionPolicy.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesProtectionContainer.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectedItem.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectionIntent.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectionPolicy.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesResourceGuardProxy.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Revoke-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupPolicy.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectedItem.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectionIntent.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectionPolicy.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesResourceGuardProxy.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServices.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesBackup.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesJobCancellation.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesRestore.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesValidateOperation.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesFeatureSupport.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesProtectionIntent.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unlock-AzRecoveryServicesResourceGuardProxyDelete.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unregister-AzRecoveryServicesProtectionContainer.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesProtectionContainer.Tests.ps1 delete mode 100644 src/RecoveryServices/readme.azure.noprofile.md diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/Az.RecoveryServices.psd1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/Az.RecoveryServices.psd1 index 2e388a3e004c..3b584a8d9c6c 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/Az.RecoveryServices.psd1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/Az.RecoveryServices.psd1 @@ -11,7 +11,7 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.RecoveryServices.private.dll' FormatsToProcess = './Az.RecoveryServices.format.ps1xml' - FunctionsToExport = 'Edit-AzrecoveryServicesBackupRetentionPolicyClientObject', 'Edit-AzRecoveryServicesBackupSchedulePolicyClientObject', 'Get-AzRecoveryServicesBackupPolicy', 'Get-AzRecoveryServicesPolicyTemplate', 'New-AzRecoveryServicesBackupPolicy', 'Remove-AzRecoveryServicesBackupPolicy', '*' + FunctionsToExport = 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject', 'Edit-AzRecoveryServicesBackupSchedulePolicyClientObject', 'Get-AzRecoveryServicesBackupPolicy', 'Get-AzRecoveryServicesPolicyTemplate', 'New-AzRecoveryServicesBackupPolicy', 'Remove-AzRecoveryServicesBackupPolicy', '*' AliasesToExport = '*' PrivateData = @{ PSData = @{ diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/Az.RecoveryServices.sln b/src/RecoveryServices/RecoveryServices.Backup.Autorest/Az.RecoveryServices.sln deleted file mode 100644 index bb6d6f5c3989..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/Az.RecoveryServices.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.6.33801.468 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Az.RecoveryServices", "Az.RecoveryServices.csproj", "{5563E5F1-639E-4CBB-B519-B54953845E82}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5563E5F1-639E-4CBB-B519-B54953845E82}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5563E5F1-639E-4CBB-B519-B54953845E82}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5563E5F1-639E-4CBB-B519-B54953845E82}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5563E5F1-639E-4CBB-B519-B54953845E82}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {8B92C282-12D5-4864-A16A-0A324F47C0C3} - EndGlobalSection -EndGlobal diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/README.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/README.md index 9a9d03fc68da..d27d1f0f2fa0 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/README.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/README.md @@ -36,7 +36,7 @@ This file contains the configuration for generating My API from the OpenAPI spec # it's the same options as command line options, just drop the double-dash! branch: c94569d116a82ee11a94c5dfb190650dd675a1bf require: - - $(this-folder)/../readme.azure.noprofile.md + - $(this-folder)/../../readme.azure.noprofile.md input-file: - $(repo)/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/bms.json title: RecoveryServices @@ -99,11 +99,3 @@ directive: where: $ transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.ISchedulePolicy SchedulePolicy', 'public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.ISchedulePolicy SchedulePolicy'); ``` - -## Alternate settings - -This section is only activated if the `--make-it-rain` switch is added to the command line - -``` yaml $(make-it-rain) -namespace: MyCompany.Special.Rest -``` diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.ps1 similarity index 97% rename from src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.ps1 rename to src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.ps1 index 4099d4e69765..ad9c9ae5a81b 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.ps1 @@ -1,6 +1,6 @@ -function Edit-AzrecoveryServicesBackupRetentionPolicyClientObject { +function Edit-AzRecoveryServicesBackupRetentionPolicyClientObject { [OutputType('Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicy')] [CmdletBinding(PositionalBinding=$false)] [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Description('Edits the retention settings for the policy client object')] @@ -141,7 +141,7 @@ function Edit-AzrecoveryServicesBackupRetentionPolicyClientObject { #Validation part begins $parametersToTest = @{} - $commandParameters = (Get-Command Edit-AzrecoveryServicesBackupRetentionPolicyClientObject).Parameters + $commandParameters = (Get-Command Edit-AzRecoveryServicesBackupRetentionPolicyClientObject).Parameters # Retrieve the parameter names and their default values foreach ($parameter in $commandParameters.Values) { $parameterName = $parameter.Name @@ -158,6 +158,27 @@ function Edit-AzrecoveryServicesBackupRetentionPolicyClientObject { # main code begins $policyObject = $Policy + $scheduletime=$null + if($policyObject.PolicyType -eq "V2") + { + if($policyObject.SchedulePolicy.ScheduleRunFrequency -eq "Hourly") + { + $scheduletime=$policyObject.SchedulePolicy.HourlySchedule.ScheduleWindowStartTime + } + elseif($policyObject.SchedulePolicy.ScheduleRunFrequency -eq "Daily") + { + $scheduletime=$policyObject.SchedulePolicy.DailyScheduleRunTime + } + elseif($policyObject.SchedulePolicy.ScheduleRunFrequency -eq "Weekly") + { + $scheduletime=$policyObject.SchedulePolicy.WeeklyScheduleRunTime + } + } + else + { + $scheduletime=$policyObject.SchedulePolicy.ScheduleRunTime + } + if(-not($ModifyFullBackup)) { if($policyObject.SchedulePolicy.ScheduleRunFrequency -eq "Weekly" -and ($policyObject.RetentionPolicy.DailySchedule.RetentionDuration.Count -ne $null) -and ($policyObject.RetentionPolicy.DailySchedule.RetentionDuration.Count -ne 0)) @@ -204,14 +225,7 @@ function Edit-AzrecoveryServicesBackupRetentionPolicyClientObject { } if(($policyObject.RetentionPolicy.DailySchedule.RetentionDuration.Count -ne $null) -and ($policyObject.RetentionPolicy.DailySchedule.RetentionDuration.Count -ne 0)) { - if($policyObject.SchedulePolicy.ScheduleRunFrequency -eq "Hourly") - { - $policyObject.RetentionPolicy.DailySchedule.RetentionTime=$policyObject.SchedulePolicy.HourlySchedule.ScheduleWindowStartTime - } - else - { - $policyObject.RetentionPolicy.DailySchedule.RetentionTime=$policyObject.SchedulePolicy.ScheduleRunTime - } + $policyObject.RetentionPolicy.DailySchedule.RetentionTime=$scheduletime } @@ -267,14 +281,7 @@ function Edit-AzrecoveryServicesBackupRetentionPolicyClientObject { } if (($policyObject.RetentionPolicy.WeeklySchedule.RetentionDuration.Count -ne $null) -and ($policyObject.RetentionPolicy.WeeklySchedule.RetentionDuration.Count -ne 0)) { - if($policyObject.SchedulePolicy.ScheduleRunFrequency -eq "Hourly") - { - $policyObject.RetentionPolicy.WeeklySchedule.RetentionTime=$policyObject.SchedulePolicy.HourlySchedule.ScheduleWindowStartTime - } - else - { - $policyObject.RetentionPolicy.WeeklySchedule.RetentionTime=$policyObject.SchedulePolicy.ScheduleRunTime - } + $policyObject.RetentionPolicy.WeeklySchedule.RetentionTime=$scheduletime } @@ -397,14 +404,7 @@ function Edit-AzrecoveryServicesBackupRetentionPolicyClientObject { } if (($policyObject.RetentionPolicy.MonthlySchedule.RetentionDuration.Count -ne $null) -and ($policyObject.RetentionPolicy.MonthlySchedule.RetentionDuration.Count -ne 0)) { - if($policyObject.SchedulePolicy.ScheduleRunFrequency -eq "Hourly") - { - $policyObject.RetentionPolicy.MonthlySchedule.RetentionTime=$policyObject.SchedulePolicy.HourlySchedule.ScheduleWindowStartTime - } - else - { - $policyObject.RetentionPolicy.MonthlySchedule.RetentionTime=$policyObject.SchedulePolicy.ScheduleRunTime - } + $policyObject.RetentionPolicy.MonthlySchedule.RetentionTime=$scheduletime } @@ -548,14 +548,7 @@ function Edit-AzrecoveryServicesBackupRetentionPolicyClientObject { } if (($policyObject.RetentionPolicy.YearlySchedule.RetentionDuration.Count -ne $null) -and ($policyObject.RetentionPolicy.YearlySchedule.RetentionDuration.Count -ne 0)) { - if($policyObject.SchedulePolicy.ScheduleRunFrequency -eq "Hourly") - { - $policyObject.RetentionPolicy.YearlySchedule.RetentionTime=$policyObject.SchedulePolicy.HourlySchedule.ScheduleWindowStartTime - } - else - { - $policyObject.RetentionPolicy.YearlySchedule.RetentionTime=$policyObject.SchedulePolicy.ScheduleRunTime - } + $policyObject.RetentionPolicy.YearlySchedule.RetentionTime=$scheduletime } } @@ -1048,4 +1041,4 @@ function Edit-AzrecoveryServicesBackupRetentionPolicyClientObject { # Return the modified $policyObject $policyObject } -} \ No newline at end of file +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.ps1 index 3971998304f5..ad26e718509c 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.ps1 @@ -1,7 +1,6 @@ function Edit-AzRecoveryServicesBackupSchedulePolicyClientObject { [OutputType('Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicy')] [CmdletBinding(PositionalBinding=$false)] - # RsvRef: should we call it workload type [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Description('Edits the schedule policy in the specified backup policy object.')] param ( diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Get-AzRecoveryServicesPolicyTemplate.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Get-AzRecoveryServicesPolicyTemplate.ps1 index e8caa2e2f09b..9a3327d56452 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Get-AzRecoveryServicesPolicyTemplate.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Get-AzRecoveryServicesPolicyTemplate.ps1 @@ -2,14 +2,13 @@ function Get-AzRecoveryServicesPolicyTemplate { [OutputType('Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.ProtectionPolicy')] - [CmdletBinding(PositionalBinding=$false)] - # RsvRef: should we call it workload type + [CmdletBinding(PositionalBinding=$false)] [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Description('Gets default policy template for a selected datasource type.')] param( [Parameter(Mandatory, HelpMessage='Datasource Type')] [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.DatasourceTypes] - ${DatasourceType} # RsvRef : should we call it workload type ? + ${DatasourceType} ) process { diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/New-AzRecoveryServicesBackupPolicy.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/New-AzRecoveryServicesBackupPolicy.ps1 index e2a72e36f955..371186bc2220 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/New-AzRecoveryServicesBackupPolicy.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/New-AzRecoveryServicesBackupPolicy.ps1 @@ -182,20 +182,15 @@ $null = $PSBoundParameters.Remove("TierAfterDurationType") - # RsvRef - # public string[] ResourceGuardOperationRequest --- this should be a parameter (check in SDK code) ? If yes, optional parameters ? - - # RsvRef : add policy validation (preferably one entry point) + # RsvRef: public string[] ResourceGuardOperationRequest - this should be a parameter, check in SDK code $policyObject = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.ProtectionPolicyResource]::new() $policyObject.Property = $Policy - $null = $PSBoundParameters.Remove("Policy") $null = $PSBoundParameters.Add("Parameter", $policyObject) - - # RsvRef : change command name while taking a pull or modify the directive + Az.RecoveryServices.Internal\New-AzRecoveryServicesBackupPolicy @PSBoundParameters } } \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Enums/Enums.cs b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Enums/Enums.cs index f7dcef2e2df4..e571dc7c8af5 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Enums/Enums.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Enums/Enums.cs @@ -2,7 +2,6 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support { - // RsvRef: check all the types in this file are used. if not, remove. public enum DatasourceTypes { AzureVM = 0, @@ -19,28 +18,6 @@ public enum StorageSettingType ZoneRedundant } - public enum DataStoreType - { - ArchiveStore = 0, - OperationalStore, - VaultStore - } - - public enum DurationType - { - Days = 0, - Weeks, - Months, - Years - } - - public enum CopyOption - { - CustomCopyOption = 0, - ImmediateCopyOption, - CopyOnExpiryOption - } - public enum BackupFrequency { Daily = 0, @@ -63,23 +40,6 @@ public enum RetentionRuleName Yearly } - public enum TagName - { - Daily = 0, - Weekly, - Monthly, - Yearly - } - - public enum AbsoluteTagCriteria - { - AllBackup = 0, - FirstOfDay, - FirstOfMonth, - FirstOfWeek, - FirstOfYear - } - public enum WeeksOfMonth { First = 0, @@ -128,26 +88,4 @@ public enum RestoreTargetType OriginalLocation, RestoreAsFiles } - - /*public enum ProtectionStatus - { - ConfiguringProtection = 0, - ProtectionConfigured, - ConfiguringProtectionFailed, - ProtectionError - } -*/ - public enum JobOperation - { - OnDemandBackup = 0, - ScheduledBackup, - Restore - } - - /*public enum JobStatus - { - InProgress = 0, - Completed, - Failed - }*/ } \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/PolicyHelpers.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/PolicyHelpers.ps1 index 1f2fd0904e7d..9282a8a58fdb 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/PolicyHelpers.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/PolicyHelpers.ps1 @@ -625,10 +625,6 @@ function ValidateMandatoryFields { $errormsg = "Weeks of the month must not be empty for week based monthly retention." throw $errormsg } - #Write-Host "Monthly retention duration in months: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionDuration.Count)" - #Write-Host "Monthly retention: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType)" - #Write-Host "Monthly retention Days of the week: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly.DaysOfTheWeek)" - #Write-Host "Monthly retention Weeks of the month: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly.weeksOfTheMonth)" } elseif($Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType -eq "Daily") { @@ -637,15 +633,12 @@ function ValidateMandatoryFields { $errormsg = "Days of the month must not be empty for day based monthly retention." throw $errormsg } - #Write-Host "Monthly retention duration in months: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionDuration.Count)" - #Write-Host "Monthly retention: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType)" - #$days = $pol1.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleDaily.DaysOfTheMonth - #Write-Host "Monthly retention Days of the month:" - #foreach ($day in $days) { - # $dayValue = $day.Date - # Write-Host $dayValu$Index - #} } + else + { + $errormsg="RetentionScheduleFormatType cannot be null. Please specify the type: daily/weekly" + throw $errormsg + } } else #AzureVM { @@ -666,10 +659,6 @@ function ValidateMandatoryFields { $errormsg = "Weeks of the month must not be empty for week based monthly retention." throw $errormsg } - #Write-Host "Monthly retention duration in months: $($Policy.RetentionPolicy.MonthlySchedule.RetentionDuration.Count)" - #Write-Host "Monthly retention: $($Policy.RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType)" - #Write-Host "Monthly retention Days of the week: $($Policy.RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly.DaysOfTheWeek)" - #Write-Host "Monthly retention Weeks of the month: $($Policy.RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly.weeksOfTheMonth)" } elseif($Policy.RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType -eq "Daily") { @@ -678,15 +667,12 @@ function ValidateMandatoryFields { $errormsg = "Days of the month must not be empty for day based monthly retention." throw $errormsg } - #Write-Host "Monthly retention duration in months: $($Policy.RetentionPolicy.MonthlySchedule.RetentionDuration.Count)" - #Write-Host "Monthly retention: $($Policy.RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType)" - #$days = $pol1.RetentionPolicy.MonthlySchedule.RetentionScheduleDaily.DaysOfTheMonth - #Write-Host "Monthly retention Days of the month:" - #foreach ($day in $days) { - # $dayValue = $day.Date - # Write-Host $dayValue - #} } + else + { + $errormsg="RetentionScheduleFormatType cannot be null. Please specify the type: daily/weekly" + throw $errormsg + } } } @@ -717,12 +703,7 @@ function ValidateMandatoryFields { { $errormsg = "Months of the year must not be empty for week based Yearly retention." throw $errormsg - } - #Write-Host "Yearly retention duration in years: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionDuration.Count)" - #Write-Host "Yearly retention: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleFormatType)" - #Write-Host "Yearly retention Days of the week: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.DaysOfTheWeek)" - #Write-Host "Yearly retention Weeks of the month: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.weeksOfTheMonth)" - #Write-Host "Yearly retention Months of the year: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.monthsOfYear)" + } } elseif($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleFormatType -eq "Daily") { @@ -736,16 +717,12 @@ function ValidateMandatoryFields { $errormsg = "Days of the month must not be empty for day based Yearly retention." throw $errormsg } - #Write-Host "Yearly retention duration in years: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionDuration.Count)" - #Write-Host "Yearly retention: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleFormatType)" - #Write-Host "Yearly retention Months of the year: $($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.monthsOfYear)" - #$days = $pol1.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleDaily.DaysOfTheMonth - #Write-Host "Yearly retention Days of the month:" - #foreach ($day in $days) { - # $dayValue = $day.Date - # Write-Host $dayValue - #} } + else + { + $errormsg="RetentionScheduleFormatType cannot be null. Please specify the type: daily/weekly" + throw $errormsg + } } else #AzureVM { @@ -771,11 +748,6 @@ function ValidateMandatoryFields { $errormsg = "Months of the year must not be empty for week based Yearly retention." throw $errormsg } - #Write-Host "Yearly retention duration in years: $($Policy.RetentionPolicy.YearlySchedule.RetentionDuration.Count)" - #Write-Host "Yearly retention: $($Policy.RetentionPolicy.YearlySchedule.RetentionScheduleFormatType)" - #Write-Host "Yearly retention Days of the week: $($Policy.RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.DaysOfTheWeek)" - #Write-Host "Yearly retention Weeks of the month: $($Policy.RetentionPolicy.YearlySchedule.RetentionScheduleWeekly.weeksOfTheMonth)" - #Write-Host "Yearly retention Months of the year: $($Policy.RetentionPolicy.YearlySchedule.monthsOfYear)" } elseif($Policy.RetentionPolicy.YearlySchedule.RetentionScheduleFormatType -eq "Daily") { @@ -789,16 +761,12 @@ function ValidateMandatoryFields { $errormsg = "Days of the month must not be empty for day based Yearly retention." throw $errormsg } - #Write-Host "Yearly retention duration in years: $($Policy.RetentionPolicy.YearlySchedule.RetentionDuration.Count)" - #Write-Host "Yearly retention: $($Policy.RetentionPolicy.YearlySchedule.RetentionScheduleFormatType)" - #Write-Host "Yearly retention Months of the year: $($Policy.RetentionPolicy.YearlySchedule.monthsOfYear)" - #$days = $pol1.RetentionPolicy.YearlySchedule.RetentionScheduleDaily.DaysOfTheMonth - #Write-Host "Yearly retention Days of the month:" - #foreach ($day in $days) { - # $dayValue = $day.Date - # Write-Host $dayValue - #} } + else + { + $errormsg="RetentionScheduleFormatType cannot be null. Please specify the type: daily/weekly" + throw $errormsg + } } } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/ManifestLoader.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/ManifestLoader.ps1 index 734afaaa507c..e75eb673a940 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/ManifestLoader.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/ManifestLoader.ps1 @@ -20,7 +20,6 @@ function LoadManifest { } } -# RsvRef : get DSTypes - check this code function GetDatasourceTypes { [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.DoNotExportAttribute()] [OutputType('PSObject')] diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Az.RecoveryServices.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Az.RecoveryServices.md index b1f29e2d0ba3..cdcc28ad50e8 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Az.RecoveryServices.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Az.RecoveryServices.md @@ -1,7 +1,7 @@ --- Module Name: Az.RecoveryServices Module Guid: 37eaf44e-78f7-4a5a-82d1-f6350681704b -Download Help Link: https://docs.microsoft.com/powershell/module/az.recoveryservices +Download Help Link: https://learn.microsoft.com/powershell/module/az.recoveryservices Help Version: 1.0.0.0 Locale: en-US --- @@ -11,7 +11,7 @@ Locale: en-US Microsoft Azure PowerShell: RecoveryServices cmdlets ## Az.RecoveryServices Cmdlets -### [Edit-AzrecoveryServicesBackupRetentionPolicyClientObject](Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.md) +### [Edit-AzRecoveryServicesBackupRetentionPolicyClientObject](Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.md) Edits the retention settings for the policy client object ### [Edit-AzRecoveryServicesBackupSchedulePolicyClientObject](Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.md) diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.md similarity index 95% rename from src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.md rename to src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.md index d06218772942..d1ff3a0a6493 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.md @@ -1,11 +1,11 @@ --- external help file: Module Name: Az.RecoveryServices -online version: https://docs.microsoft.com/powershell/module/az.recoveryservices/edit-azrecoveryservicesbackupretentionpolicyclientobject +online version: https://learn.microsoft.com/powershell/module/az.recoveryservices/edit-azrecoveryservicesbackupretentionpolicyclientobject schema: 2.0.0 --- -# Edit-AzrecoveryServicesBackupRetentionPolicyClientObject +# Edit-AzRecoveryServicesBackupRetentionPolicyClientObject ## SYNOPSIS Edits the retention settings for the policy client object @@ -13,7 +13,7 @@ Edits the retention settings for the policy client object ## SYNTAX ``` -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -DatasourceType +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -DatasourceType -Policy [-DailyRetentionDurationInDays ] [-DifferentialRetentionPeriodInDays ] [-EnableDailyRetention ] [-EnableMonthlyRetention ] [-EnableWeeklyRetention ] [-EnableYearlyRetention ] @@ -36,7 +36,7 @@ Edits the retention settings for the policy client object ### Example 1: Edit the daily retention ```powershell $pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableDailyRetention $true -DailyRetentionDurationInDays 56 +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableDailyRetention $true -DailyRetentionDurationInDays 56 $pol1.RetentionPolicy.DailySchedule.RetentionDuration | fl ``` @@ -53,7 +53,7 @@ The third command is to display the modified policy. ### Example 2: Disable the daily retention ```powershell $pol1.SchedulePolicy.ScheduleRunFrequency="Weekly" -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableDailyRetention $false +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableDailyRetention $false $pol1.RetentionPolicy.DailySchedule.RetentionDuration | fl ``` @@ -70,7 +70,7 @@ The third command is to display the modified policy. ### Example 3: Edit the weekly retention ```powershell $pol1.SchedulePolicy.ScheduleRunDay="Monday", "Tuesday", "Wednesday" -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableWeeklyRetention $true -WeeklyRetentionDurationInWeeks 34 -WeeklyRetentionDaysOfTheWeek Sunday,Monday +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableWeeklyRetention $true -WeeklyRetentionDurationInWeeks 34 -WeeklyRetentionDaysOfTheWeek Sunday,Monday $pol1.RetentionPolicy.WeeklySchedule.RetentionDuration | fl $pol1.RetentionPolicy.WeeklySchedule | fl ``` @@ -96,7 +96,7 @@ The 3-4 command is to display the modified policy. ### Example 4: Disable the weekly retention ```powershell $pol1.SchedulePolicy.ScheduleRunFrequency="Daily" -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableWeeklyRetention $false +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableWeeklyRetention $false $pol1.RetentionPolicy.WeeklySchedule.RetentionDuration | fl $pol1.RetentionPolicy.WeeklySchedule | fl ``` @@ -120,7 +120,7 @@ The 3-4 command is to display the modified policy. ### Example 5: Edit the week based monthly retention when schedule run frequency is weekly ```powershell $pol1.SchedulePolicy.ScheduleRunDay -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 34 -MonthlyRetentionDaysOfTheWeek "Monday","Tuesday" -MonthlyRetentionWeeksOfTheMonth Second, Fourth +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 34 -MonthlyRetentionDaysOfTheWeek "Monday","Tuesday" -MonthlyRetentionWeeksOfTheMonth Second, Fourth $pol1.RetentionPolicy.MonthlySchedule | fl $pol1.RetentionPolicy.MonthlySchedule.RetentionDuration | fl $pol1.RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly | fl @@ -151,7 +151,7 @@ The 3-5 command is to display the modified policy. ### Example 6: Edit the week based monthly retention when schedule run frequency is daily ```powershell -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 34 -MonthlyRetentionDaysOfTheWeek "Monday","Saturday" -MonthlyRetentionWeeksOfTheMonth Second, Fourth +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 34 -MonthlyRetentionDaysOfTheWeek "Monday","Saturday" -MonthlyRetentionWeeksOfTheMonth Second, Fourth $pol1.RetentionPolicy.MonthlySchedule | fl $pol1.RetentionPolicy.MonthlySchedule.RetentionDuration | fl $pol1.RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly | fl @@ -182,7 +182,7 @@ The 2-4 command is to display the modified policy. ### Example 7: Edit the day based monthly retention ```powershell $pol1.SchedulePolicy.ScheduleRunFrequency="Daily" -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Daily -MonthlyRetentionDurationInMonths 45 -MonthlyRetentionDaysOfTheMonth 1,6,28 +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Daily -MonthlyRetentionDurationInMonths 45 -MonthlyRetentionDaysOfTheMonth 1,6,28 $pol1.RetentionPolicy.MonthlySchedule | fl $pol1.RetentionPolicy.MonthlySchedule.RetentionDuration | fl $pol1.RetentionPolicy.MonthlySchedule.RetentionScheduleDaily.DaysOfTheMonth | fl @@ -219,7 +219,7 @@ The 3-5 command is to display the modified policy. ### Example 8: Disable the monthly retention ```powershell -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $false +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $false $pol1.RetentionPolicy.MonthlySchedule | fl $pol1.RetentionPolicy.MonthlySchedule.RetentionDuration | fl ``` @@ -244,7 +244,7 @@ The 2-3 command is to display the modified policy. ### Example 9: Edit the week based yearly retention when schedule run frequency is weekly ```powershell $pol1.SchedulePolicy.ScheduleRunDay -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableYearlyRetention $true -YearlyRetentionScheduleType Weekly -YearlyRetentionDurationInYears 34 -YearlyRetentionMonthsOfTheYear @("May", "June") -YearlyRetentionDaysOfTheWeek Monday, Tuesday -YearlyRetentionWeeksOfTheMonth First, Third +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableYearlyRetention $true -YearlyRetentionScheduleType Weekly -YearlyRetentionDurationInYears 34 -YearlyRetentionMonthsOfTheYear @("May", "June") -YearlyRetentionDaysOfTheWeek Monday, Tuesday -YearlyRetentionWeeksOfTheMonth First, Third $pol1.RetentionPolicy.YearlySchedule | fl $pol1.RetentionPolicy.YearlySchedule.RetentionDuration | fl $pol1.RetentionPolicy.YearlySchedule.RetentionScheduleWeekly | fl @@ -308,7 +308,7 @@ The 2-4 command is to display the modified policy. ### Example 11: Edit the day based yearly retention ```powershell $pol1.SchedulePolicy.ScheduleRunFrequency="Daily" -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableYearlyRetention $true -YearlyRetentionScheduleType Daily -YearlyRetentionMonthsOfTheYear May,April -YearlyRetentionDaysOfTheMonth 1,2,3 -YearlyRetentionDurationInYears 43 +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableYearlyRetention $true -YearlyRetentionScheduleType Daily -YearlyRetentionMonthsOfTheYear May,April -YearlyRetentionDaysOfTheMonth 1,2,3 -YearlyRetentionDurationInYears 43 $pol1.RetentionPolicy.YearlySchedule | fl $pol1.RetentionPolicy.YearlySchedule.RetentionDuration | fl $pol1.RetentionPolicy.YearlySchedule.RetentionScheduleDaily.DaysOfTheMonth | fl @@ -346,7 +346,7 @@ The 3-5 command is to display the modified policy. ### Example 12: Disable the yearly retention ```powershell -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableYearlyRetention $false +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableYearlyRetention $false $pol1.RetentionPolicy.YearlySchedule | fl $pol1.RetentionPolicy.YearlySchedule.RetentionDuration | fl ``` @@ -375,7 +375,7 @@ The 2-3 command is to display the modified policy. ### Example 1: Edit the Full Backup daily retention ```powershell $pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableDailyRetention $true -DailyRetentionDurationInDays 32 +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableDailyRetention $true -DailyRetentionDurationInDays 32 $pol1.SubProtectionPolicy[0].RetentionPolicy.DailySchedule.RetentionDuration | fl ``` @@ -392,7 +392,7 @@ The third command is to display the modified policy. ### Example 2: Disable the full backup daily retention ```powershell $pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunFrequency="Weekly" -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableDailyRetention $false +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableDailyRetention $false $pol1.SubProtectionPolicy[0].RetentionPolicy.DailySchedule.RetentionDuration | fl ``` @@ -409,7 +409,7 @@ The third command is to display the modified policy. ### Example 3: Edit the full backup weekly retention ```powershell $pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunDay="Monday","Tuesday","Wednesday" -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableWeeklyRetention $true -WeeklyRetentionDurationInWeeks 11 -WeeklyRetentionDaysOfTheWeek Sunday +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableWeeklyRetention $true -WeeklyRetentionDurationInWeeks 11 -WeeklyRetentionDaysOfTheWeek Sunday $pol1.SubProtectionPolicy[0].RetentionPolicy.WeeklySchedule.RetentionDuration | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.WeeklySchedule | fl ``` @@ -433,7 +433,7 @@ The 3-4 command is to display the modified policy. ### Example 4: Disable the weekly retention ```powershell $pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunFrequency="Daily" -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableWeeklyRetention $false +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableWeeklyRetention $false $pol1.SubProtectionPolicy[0].RetentionPolicy.WeeklySchedule.RetentionDuration | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.WeeklySchedule | fl ``` @@ -456,7 +456,7 @@ The 3-4 command is to display the modified policy. ### Example 5: Edit the week based monthly retention when schedule run frequency is weekly ```powershell $pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunDay -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 34 -MonthlyRetentionDaysOfTheWeek Monday -MonthlyRetentionWeeksOfTheMonth First, Last +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 34 -MonthlyRetentionDaysOfTheWeek Monday -MonthlyRetentionWeeksOfTheMonth First, Last $pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule.RetentionDuration | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly | fl @@ -487,7 +487,7 @@ The 3-5 command is to display the modified policy. ### Example 6: Edit the week based monthly retention when schedule run frequency is daily ```powershell -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 34 -MonthlyRetentionDaysOfTheWeek Monday,Sunday +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 34 -MonthlyRetentionDaysOfTheWeek Monday,Sunday $pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule.RetentionDuration | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly | fl @@ -518,7 +518,7 @@ The 2-4 command is to display the modified policy. ### Example 7: Edit the day based monthly retention ```powershell $pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunFrequency="Daily" -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Daily -MonthlyRetentionDaysOfTheMonth 1,2,3 -MonthlyRetentionDurationInMonths 67 +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Daily -MonthlyRetentionDaysOfTheMonth 1,2,3 -MonthlyRetentionDurationInMonths 67 $pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule.RetentionDuration | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule.RetentionScheduleDaily.DaysOfTheMonth | fl @@ -555,7 +555,7 @@ The 3-5 command is to display the modified policy. ### Example 8: Disable the full backup monthly retention ```powershell -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableMonthlyRetention $false +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableMonthlyRetention $false $pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule.RetentionDuration | fl ``` @@ -580,7 +580,7 @@ The 2-3 command is to display the modified policy. ### Example 9: Edit the full backup week based yearly retention when schedule run frequency is weekly ```powershell $pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunDay -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableYearlyRetention $true -YearlyRetentionScheduleType Weekly -YearlyRetentionDurationInYears 47 -YearlyRetentionMonthsOfTheYear May,June -YearlyRetentionDaysOfTheWeek Monday -YearlyRetentionWeeksOfTheMonth Last,First +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableYearlyRetention $true -YearlyRetentionScheduleType Weekly -YearlyRetentionDurationInYears 47 -YearlyRetentionMonthsOfTheYear May,June -YearlyRetentionDaysOfTheWeek Monday -YearlyRetentionWeeksOfTheMonth Last,First $pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule.RetentionDuration | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule.RetentionScheduleWeekly | fl @@ -612,7 +612,7 @@ The 3-5 command is to display the modified policy. ### Example 10: Edit the full backup week based yearly retention when schedule run frequency is daily ```powershell -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableYearlyRetention $true -YearlyRetentionScheduleType Weekly -YearlyRetentionDurationInYears 47 -YearlyRetentionMonthsOfTheYear May,June -YearlyRetentionDaysOfTheWeek Monday -YearlyRetentionWeeksOfTheMonth Last,First +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableYearlyRetention $true -YearlyRetentionScheduleType Weekly -YearlyRetentionDurationInYears 47 -YearlyRetentionMonthsOfTheYear May,June -YearlyRetentionDaysOfTheWeek Monday -YearlyRetentionWeeksOfTheMonth Last,First $pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule.RetentionDuration | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule.RetentionScheduleWeekly | fl @@ -644,7 +644,7 @@ The 2-4 command is to display the modified policy. ### Example 11: Edit the full backup day based yearly retention ```powershell $pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunFrequency="Daily" -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableYearlyRetention $true -YearlyRetentionScheduleType Daily -YearlyRetentionDurationInYears 76 -YearlyRetentionMonthsOfTheYear May,July -YearlyRetentionDaysOfTheMonth 7,17,27 +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableYearlyRetention $true -YearlyRetentionScheduleType Daily -YearlyRetentionDurationInYears 76 -YearlyRetentionMonthsOfTheYear May,July -YearlyRetentionDaysOfTheMonth 7,17,27 $pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule.RetentionDuration | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule.RetentionScheduleDaily.DaysOfTheMonth | fl @@ -682,7 +682,7 @@ The 3-5 command is to display the modified policy. ### Example 12: Disable the yearly retention ```powershell -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableYearlyRetention $false +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableYearlyRetention $false $pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule.RetentionDuration | fl ``` @@ -708,7 +708,7 @@ The 2-3 command is to display the modified policy. ### Example 13: Modify Differential backup retention policy ```powershell $pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunFrequency="Weekly" -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyDifferentialBackup -DifferentialRetentionPeriodInDays 23 +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyDifferentialBackup -DifferentialRetentionPeriodInDays 23 $pol1.SubProtectionPolicy[2].RetentionPolicy | fl ``` @@ -725,7 +725,7 @@ The third command is to display the modified policy. ### Example 14: Modify Incremental backup retention policy ```powershell $pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunFrequency="Weekly" -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -IncrementalRetentionPeriodInDays 64 -ModifyIncrementalBackup +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -IncrementalRetentionPeriodInDays 64 -ModifyIncrementalBackup $pol1.SubProtectionPolicy[2].RetentionPolicy | fl ``` @@ -741,7 +741,7 @@ The third command is to display the modified policy. ### Example 15: Modify Log backup retention policy ```powershell -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -LogRetentionPeriodInDays 23 -ModifyLogBackup +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -LogRetentionPeriodInDays 23 -ModifyLogBackup $pol1.SubProtectionPolicy[1].RetentionPolicy | fl ``` diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.md index 040463ae99ab..4528d5e63090 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.md @@ -1,7 +1,7 @@ --- external help file: Module Name: Az.RecoveryServices -online version: https://docs.microsoft.com/powershell/module/az.recoveryservices/edit-azrecoveryservicesbackupschedulepolicyclientobject +online version: https://learn.microsoft.com/powershell/module/az.recoveryservices/edit-azrecoveryservicesbackupschedulepolicyclientobject schema: 2.0.0 --- diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupPolicy.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupPolicy.md index 43eeddda7b51..16d670a044d3 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupPolicy.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupPolicy.md @@ -1,7 +1,7 @@ --- external help file: Module Name: Az.RecoveryServices -online version: https://docs.microsoft.com/powershell/module/az.recoveryservices/get-azrecoveryservicesbackuppolicy +online version: https://learn.microsoft.com/powershell/module/az.recoveryservices/get-azrecoveryservicesbackuppolicy schema: 2.0.0 --- @@ -33,27 +33,39 @@ Status of the operation can be fetched using GetPolicyOperationResult API. ## EXAMPLES -### Example 1: {{ Add title here }} +### Example 1: Get all backup policies in a recovery services vault ```powershell -{{ Add code here }} +$pol = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName "myresourcegroup" -VaultName "myvault" +$pol ``` ```output -{{ Add output here }} +ETag Id Location Name Type +---- -- -------- ---- ---- + /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.RecoveryServices/vaults/myvault/backupPolicies/policy1 policy1 Microsoft.RecoveryServices/vaults/backupPolicies + /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.RecoveryServices/vaults/myvault/backupPolicies/HourlyLogBackup HourlyLogBackup Microsoft.RecoveryServices/vaults/backupPolicies + /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.RecoveryServices/vaults/myvault/backupPolicies/DefaultPolicy DefaultPolicy Microsoft.RecoveryServices/vaults/backupPolicies + /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.RecoveryServices/vaults/myvault/backupPolicies/policy2 policy2 Microsoft.RecoveryServices/vaults/backupPolicies + /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.RecoveryServices/vaults/myvault/backupPolicies/testPolicy testPolicy Microsoft.RecoveryServices/vaults/backupPolicies + /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.RecoveryServices/vaults/myvault/backupPolicies/EnhancedPolicy EnhancedPolicy Microsoft.RecoveryServices/vaults/backupPolicies ``` -{{ Add description here }} +Gets all the backup policies in the specified vault in the specified resource group. -### Example 2: {{ Add title here }} +### Example 2: Get info for a specific backup policy ```powershell -{{ Add code here }} +$pol = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName "myresourcegroup" -VaultName "myvault" -Name "DefaultPolicy" +$pol ``` ```output -{{ Add output here }} +ETag Id Location Name Type +---- -- -------- ---- ---- + /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.RecoveryServices/vaults/myvault/backupPolicies/testPolicy testPolicy Microsoft.RecoveryServices/vaults/backupPolicies + ``` -{{ Add description here }} +Gets info for a specific backup policy by its name in the specified vault in the specified resource group. ## PARAMETERS diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesPolicyTemplate.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesPolicyTemplate.md index 2527d6bae87a..a633ff144a16 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesPolicyTemplate.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesPolicyTemplate.md @@ -1,7 +1,7 @@ --- external help file: Module Name: Az.RecoveryServices -online version: https://docs.microsoft.com/powershell/module/az.recoveryservices/get-azrecoveryservicespolicytemplate +online version: https://learn.microsoft.com/powershell/module/az.recoveryservices/get-azrecoveryservicespolicytemplate schema: 2.0.0 --- @@ -21,27 +21,28 @@ Gets default policy template for a selected datasource type. ## EXAMPLES -### Example 1: {{ Add title here }} +### Example 1: Get the default policy client object for creating AzureVM policy ```powershell -{{ Add code here }} +$vmPol= Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM ``` -```output -{{ Add output here }} -``` - -{{ Add description here }} +This command is used to get default values for a VM policy. +This object can further be used for editing any attributes in the policy client object either manually or using the Edit-AzRecoveryServicesBackupSchedulePolicyClientObject, Edit-AzRecoveryServicesBackupRetentionPolicyClientObject cmdlets. +After changing the values as per need, $vmPol object can further be used to create policy using New-AzRecoveryServicesBackupPolicy command. -### Example 2: {{ Add title here }} +### Example 2: Get the default policy client object for creating MSSQL policy ```powershell -{{ Add code here }} +$sqlPol= Get-AzRecoveryServicesPolicyTemplate -DatasourceType MSSQL ``` -```output -{{ Add output here }} +This command is used to get default policy client object for datasourcetype MSSQL. + +### Example 3: Get the default policy client object for creating SAPHANA policy +```powershell +$sqlPol= Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA ``` -{{ Add description here }} +This command is used to get default policy client object for datasourcetype SAPHANA. ## PARAMETERS diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/New-AzRecoveryServicesBackupPolicy.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/New-AzRecoveryServicesBackupPolicy.md index 6699205d629c..e1495ad50db6 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/New-AzRecoveryServicesBackupPolicy.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/New-AzRecoveryServicesBackupPolicy.md @@ -1,7 +1,7 @@ --- external help file: Module Name: Az.RecoveryServices -online version: https://docs.microsoft.com/powershell/module/az.recoveryservices/new-azrecoveryservicesbackuppolicy +online version: https://learn.microsoft.com/powershell/module/az.recoveryservices/new-azrecoveryservicesbackuppolicy schema: 2.0.0 --- diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Remove-AzRecoveryServicesBackupPolicy.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Remove-AzRecoveryServicesBackupPolicy.md index c1bb7bee40ee..c4b5932addb4 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Remove-AzRecoveryServicesBackupPolicy.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Remove-AzRecoveryServicesBackupPolicy.md @@ -1,7 +1,7 @@ --- external help file: Module Name: Az.RecoveryServices -online version: https://docs.microsoft.com/powershell/module/az.recoveryservices/remove-azrecoveryservicesbackuppolicy +online version: https://learn.microsoft.com/powershell/module/az.recoveryservices/remove-azrecoveryservicesbackuppolicy schema: 2.0.0 --- @@ -27,27 +27,12 @@ Status of the\r\noperation can be fetched using GetProtectionPolicyOperationResu ## EXAMPLES -### Example 1: {{ Add title here }} +### Example 1: Remove a policy with its name ```powershell -{{ Add code here }} + Remove-AzRecoveryServicesBackupPolicy -PolicyName "MyPolicy" -ResourceGroupName "MyResourceGroup" -VaultName "MyVault" ``` -```output -{{ Add output here }} -``` - -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} +This command deletes the specified backup policy. ## PARAMETERS diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.md similarity index 93% rename from src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.md rename to src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.md index 01a27fd1d633..2c6d84f9fba0 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.md @@ -3,7 +3,7 @@ ### Example 1: Edit the daily retention ```powershell $pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableDailyRetention $true -DailyRetentionDurationInDays 56 +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableDailyRetention $true -DailyRetentionDurationInDays 56 $pol1.RetentionPolicy.DailySchedule.RetentionDuration | fl ``` @@ -18,7 +18,7 @@ The first command gets the default policy template for a given DatasourceType. T ### Example 2: Disable the daily retention ```powershell $pol1.SchedulePolicy.ScheduleRunFrequency="Weekly" -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableDailyRetention $false +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableDailyRetention $false $pol1.RetentionPolicy.DailySchedule.RetentionDuration | fl ``` @@ -33,7 +33,7 @@ The first command sets the Schedule run frequency to Weekly. The second command ### Example 3: Edit the weekly retention ```powershell $pol1.SchedulePolicy.ScheduleRunDay="Monday", "Tuesday", "Wednesday" -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableWeeklyRetention $true -WeeklyRetentionDurationInWeeks 34 -WeeklyRetentionDaysOfTheWeek Sunday,Monday +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableWeeklyRetention $true -WeeklyRetentionDurationInWeeks 34 -WeeklyRetentionDaysOfTheWeek Sunday,Monday $pol1.RetentionPolicy.WeeklySchedule.RetentionDuration | fl $pol1.RetentionPolicy.WeeklySchedule | fl ``` @@ -56,7 +56,7 @@ The first command sets the schedule run days. The second command is used to modi ### Example 4: Disable the weekly retention ```powershell $pol1.SchedulePolicy.ScheduleRunFrequency="Daily" -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableWeeklyRetention $false +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableWeeklyRetention $false $pol1.RetentionPolicy.WeeklySchedule.RetentionDuration | fl $pol1.RetentionPolicy.WeeklySchedule | fl ``` @@ -78,7 +78,7 @@ The first command sets the schedule run frequency to daily. The second command d ### Example 5: Edit the week based monthly retention when schedule run frequency is weekly ```powershell $pol1.SchedulePolicy.ScheduleRunDay -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 34 -MonthlyRetentionDaysOfTheWeek "Monday","Tuesday" -MonthlyRetentionWeeksOfTheMonth Second, Fourth +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 34 -MonthlyRetentionDaysOfTheWeek "Monday","Tuesday" -MonthlyRetentionWeeksOfTheMonth Second, Fourth $pol1.RetentionPolicy.MonthlySchedule | fl $pol1.RetentionPolicy.MonthlySchedule.RetentionDuration | fl $pol1.RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly | fl @@ -107,7 +107,7 @@ The first command fetches the schedule run days for assigning values to days of ### Example 6: Edit the week based monthly retention when schedule run frequency is daily ```powershell -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 34 -MonthlyRetentionDaysOfTheWeek "Monday","Saturday" -MonthlyRetentionWeeksOfTheMonth Second, Fourth +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 34 -MonthlyRetentionDaysOfTheWeek "Monday","Saturday" -MonthlyRetentionWeeksOfTheMonth Second, Fourth $pol1.RetentionPolicy.MonthlySchedule | fl $pol1.RetentionPolicy.MonthlySchedule.RetentionDuration | fl $pol1.RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly | fl @@ -137,7 +137,7 @@ This command edits the week based monthly retention policy. The 2-4 command is t ### Example 7: Edit the day based monthly retention ```powershell $pol1.SchedulePolicy.ScheduleRunFrequency="Daily" -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Daily -MonthlyRetentionDurationInMonths 45 -MonthlyRetentionDaysOfTheMonth 1,6,28 +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Daily -MonthlyRetentionDurationInMonths 45 -MonthlyRetentionDaysOfTheMonth 1,6,28 $pol1.RetentionPolicy.MonthlySchedule | fl $pol1.RetentionPolicy.MonthlySchedule.RetentionDuration | fl $pol1.RetentionPolicy.MonthlySchedule.RetentionScheduleDaily.DaysOfTheMonth | fl @@ -172,7 +172,7 @@ The first command changes the schedule run frequency to daily. The second comman ### Example 8: Disable the monthly retention ```powershell -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $false +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $false $pol1.RetentionPolicy.MonthlySchedule | fl $pol1.RetentionPolicy.MonthlySchedule.RetentionDuration | fl ``` @@ -196,7 +196,7 @@ This command disables the monthly retention. The 2-3 command is to display the m ### Example 9: Edit the week based yearly retention when schedule run frequency is weekly ```powershell $pol1.SchedulePolicy.ScheduleRunDay -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableYearlyRetention $true -YearlyRetentionScheduleType Weekly -YearlyRetentionDurationInYears 34 -YearlyRetentionMonthsOfTheYear @("May", "June") -YearlyRetentionDaysOfTheWeek Monday, Tuesday -YearlyRetentionWeeksOfTheMonth First, Third +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableYearlyRetention $true -YearlyRetentionScheduleType Weekly -YearlyRetentionDurationInYears 34 -YearlyRetentionMonthsOfTheYear @("May", "June") -YearlyRetentionDaysOfTheWeek Monday, Tuesday -YearlyRetentionWeeksOfTheMonth First, Third $pol1.RetentionPolicy.YearlySchedule | fl $pol1.RetentionPolicy.YearlySchedule.RetentionDuration | fl $pol1.RetentionPolicy.YearlySchedule.RetentionScheduleWeekly | fl @@ -257,7 +257,7 @@ This command edits the week based yearly retention policy when schedule run freq ### Example 11: Edit the day based yearly retention ```powershell $pol1.SchedulePolicy.ScheduleRunFrequency="Daily" -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableYearlyRetention $true -YearlyRetentionScheduleType Daily -YearlyRetentionMonthsOfTheYear May,April -YearlyRetentionDaysOfTheMonth 1,2,3 -YearlyRetentionDurationInYears 43 +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableYearlyRetention $true -YearlyRetentionScheduleType Daily -YearlyRetentionMonthsOfTheYear May,April -YearlyRetentionDaysOfTheMonth 1,2,3 -YearlyRetentionDurationInYears 43 $pol1.RetentionPolicy.YearlySchedule | fl $pol1.RetentionPolicy.YearlySchedule.RetentionDuration | fl $pol1.RetentionPolicy.YearlySchedule.RetentionScheduleDaily.DaysOfTheMonth | fl @@ -293,7 +293,7 @@ The first command changes the schedule run frequency to daily. The second comman ### Example 12: Disable the yearly retention ```powershell -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableYearlyRetention $false +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableYearlyRetention $false $pol1.RetentionPolicy.YearlySchedule | fl $pol1.RetentionPolicy.YearlySchedule.RetentionDuration | fl ``` @@ -321,7 +321,7 @@ This command disables the yearly retention. The 2-3 command is to display the mo ### Example 1: Edit the Full Backup daily retention ```powershell $pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableDailyRetention $true -DailyRetentionDurationInDays 32 +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableDailyRetention $true -DailyRetentionDurationInDays 32 $pol1.SubProtectionPolicy[0].RetentionPolicy.DailySchedule.RetentionDuration | fl ``` @@ -336,7 +336,7 @@ The first command gets the default policy template for a given DatasourceType. T ### Example 2: Disable the full backup daily retention ```powershell $pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunFrequency="Weekly" -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableDailyRetention $false +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableDailyRetention $false $pol1.SubProtectionPolicy[0].RetentionPolicy.DailySchedule.RetentionDuration | fl ``` @@ -351,7 +351,7 @@ The first command sets the Schedule run frequency to Weekly. The second command ### Example 3: Edit the full backup weekly retention ```powershell $pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunDay="Monday","Tuesday","Wednesday" -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableWeeklyRetention $true -WeeklyRetentionDurationInWeeks 11 -WeeklyRetentionDaysOfTheWeek Sunday +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableWeeklyRetention $true -WeeklyRetentionDurationInWeeks 11 -WeeklyRetentionDaysOfTheWeek Sunday $pol1.SubProtectionPolicy[0].RetentionPolicy.WeeklySchedule.RetentionDuration | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.WeeklySchedule | fl ``` @@ -373,7 +373,7 @@ This command is used to modify the full backup weekly retention fields in the po ### Example 4: Disable the weekly retention ```powershell $pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunFrequency="Daily" -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableWeeklyRetention $false +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableWeeklyRetention $false $pol1.SubProtectionPolicy[0].RetentionPolicy.WeeklySchedule.RetentionDuration | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.WeeklySchedule | fl ``` @@ -395,7 +395,7 @@ This command disables the full backup weekly retention. The 3-4 command is to di ### Example 5: Edit the week based monthly retention when schedule run frequency is weekly ```powershell $pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunDay -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 34 -MonthlyRetentionDaysOfTheWeek Monday -MonthlyRetentionWeeksOfTheMonth First, Last +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 34 -MonthlyRetentionDaysOfTheWeek Monday -MonthlyRetentionWeeksOfTheMonth First, Last $pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule.RetentionDuration | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly | fl @@ -424,7 +424,7 @@ The first command fetches the schedule run days for assigning values to days of ### Example 6: Edit the week based monthly retention when schedule run frequency is daily ```powershell -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 34 -MonthlyRetentionDaysOfTheWeek Monday,Sunday +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 34 -MonthlyRetentionDaysOfTheWeek Monday,Sunday $pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule.RetentionDuration | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule.RetentionScheduleWeekly | fl @@ -454,7 +454,7 @@ This command edits the full backup week based monthly retention policy. The 2-4 ### Example 7: Edit the day based monthly retention ```powershell $pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunFrequency="Daily" -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Daily -MonthlyRetentionDaysOfTheMonth 1,2,3 -MonthlyRetentionDurationInMonths 67 +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Daily -MonthlyRetentionDaysOfTheMonth 1,2,3 -MonthlyRetentionDurationInMonths 67 $pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule.RetentionDuration | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule.RetentionScheduleDaily.DaysOfTheMonth | fl @@ -489,7 +489,7 @@ The first command changes the full backup schedule run frequency to daily. The s ### Example 8: Disable the full backup monthly retention ```powershell -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableMonthlyRetention $false +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableMonthlyRetention $false $pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.MonthlySchedule.RetentionDuration | fl ``` @@ -513,7 +513,7 @@ This command disables the full backup monthly retention. The 2-3 command is to d ### Example 9: Edit the full backup week based yearly retention when schedule run frequency is weekly ```powershell $pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunDay -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableYearlyRetention $true -YearlyRetentionScheduleType Weekly -YearlyRetentionDurationInYears 47 -YearlyRetentionMonthsOfTheYear May,June -YearlyRetentionDaysOfTheWeek Monday -YearlyRetentionWeeksOfTheMonth Last,First +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableYearlyRetention $true -YearlyRetentionScheduleType Weekly -YearlyRetentionDurationInYears 47 -YearlyRetentionMonthsOfTheYear May,June -YearlyRetentionDaysOfTheWeek Monday -YearlyRetentionWeeksOfTheMonth Last,First $pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule.RetentionDuration | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule.RetentionScheduleWeekly | fl @@ -543,7 +543,7 @@ The first command fetches the schedule run days for assigning values to days of ### Example 10: Edit the full backup week based yearly retention when schedule run frequency is daily ```powershell -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableYearlyRetention $true -YearlyRetentionScheduleType Weekly -YearlyRetentionDurationInYears 47 -YearlyRetentionMonthsOfTheYear May,June -YearlyRetentionDaysOfTheWeek Monday -YearlyRetentionWeeksOfTheMonth Last,First +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableYearlyRetention $true -YearlyRetentionScheduleType Weekly -YearlyRetentionDurationInYears 47 -YearlyRetentionMonthsOfTheYear May,June -YearlyRetentionDaysOfTheWeek Monday -YearlyRetentionWeeksOfTheMonth Last,First $pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule.RetentionDuration | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule.RetentionScheduleWeekly | fl @@ -574,7 +574,7 @@ This command edits the full backup week based yearly retention policy when sched ### Example 11: Edit the full backup day based yearly retention ```powershell $pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunFrequency="Daily" -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableYearlyRetention $true -YearlyRetentionScheduleType Daily -YearlyRetentionDurationInYears 76 -YearlyRetentionMonthsOfTheYear May,July -YearlyRetentionDaysOfTheMonth 7,17,27 +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableYearlyRetention $true -YearlyRetentionScheduleType Daily -YearlyRetentionDurationInYears 76 -YearlyRetentionMonthsOfTheYear May,July -YearlyRetentionDaysOfTheMonth 7,17,27 $pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule.RetentionDuration | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule.RetentionScheduleDaily.DaysOfTheMonth | fl @@ -610,7 +610,7 @@ The first command changes the full backup schedule run frequency to daily. The s ### Example 12: Disable the yearly retention ```powershell -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableYearlyRetention $false +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableYearlyRetention $false $pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule | fl $pol1.SubProtectionPolicy[0].RetentionPolicy.YearlySchedule.RetentionDuration | fl ``` @@ -635,7 +635,7 @@ This command disables the full backup yearly retention. The 2-3 command is to di ### Example 13: Modify Differential backup retention policy ```powershell $pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunFrequency="Weekly" -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyDifferentialBackup -DifferentialRetentionPeriodInDays 23 +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyDifferentialBackup -DifferentialRetentionPeriodInDays 23 $pol1.SubProtectionPolicy[2].RetentionPolicy | fl ``` @@ -651,7 +651,7 @@ This command modifies the differential backup retention policy. The third comman ### Example 14: Modify Incremental backup retention policy ```powershell $pol1.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunFrequency="Weekly" -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -IncrementalRetentionPeriodInDays 64 -ModifyIncrementalBackup +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -IncrementalRetentionPeriodInDays 64 -ModifyIncrementalBackup $pol1.SubProtectionPolicy[2].RetentionPolicy | fl ``` @@ -666,7 +666,7 @@ This command modifies the incremental backup retention policy. The third command ### Example 15: Modify Log backup retention policy ```powershell -Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -LogRetentionPeriodInDays 23 -ModifyLogBackup +Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -LogRetentionPeriodInDays 23 -ModifyLogBackup $pol1.SubProtectionPolicy[1].RetentionPolicy | fl ``` @@ -677,4 +677,4 @@ RetentionDurationType : Days Type : SimpleRetentionPolicy ``` -This command modifies the log backup retention policy. The third command is to display the modified policy. \ No newline at end of file +This command modifies the log backup retention policy. The third command is to display the modified policy. diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Disable-AzRecoveryServicesConfigureBackup.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Disable-AzRecoveryServicesConfigureBackup.Tests.ps1 deleted file mode 100644 index 575b0dad8128..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Disable-AzRecoveryServicesConfigureBackup.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Disable-AzRecoveryServicesConfigureBackup')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Disable-AzRecoveryServicesConfigureBackup.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Disable-AzRecoveryServicesConfigureBackup' { - It '__AllParameterSets' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.Recording.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Recording.json similarity index 82% rename from src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.Recording.json rename to src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Recording.json index 2b09f772d24c..240058866d35 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.Recording.json +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Recording.json @@ -1,9 +1,10 @@ { - "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+CommonCommandToUpdateAllRetentions+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+1": { + "Edit-AzRecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+CommonCommandToUpdateAllRetentions+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+1": { "Request": { "Method": "PUT", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", "Content": "{\r\n \"properties\": {\r\n \"protectedItemsCount\": 0,\r\n \"backupManagementType\": \"AzureIaasVM\",\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Daily\",\r\n \"scheduleRunTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 56,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 34,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Daily\",\r\n \"retentionScheduleDaily\": {\r\n \"daysOfTheMonth\": [\r\n {\r\n \"date\": 1\r\n },\r\n {\r\n \"date\": 2\r\n },\r\n {\r\n \"date\": 3\r\n }\r\n ]\r\n },\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 54,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Daily\",\r\n \"monthsOfYear\": [ \"March\", \"April\" ],\r\n \"retentionScheduleDaily\": {\r\n \"daysOfTheMonth\": [\r\n {\r\n \"date\": 2\r\n },\r\n {\r\n \"date\": 4\r\n },\r\n {\r\n \"date\": 5\r\n }\r\n ]\r\n },\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 47,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n },\r\n \"instantRpRetentionRangeInDays\": 2,\r\n \"timeZone\": \"UTC\",\r\n \"policyType\": \"V1\"\r\n }\r\n}", + "isContentBase64": false, "Headers": { }, "ContentHeaders": { @@ -17,36 +18,38 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "20e38c32-7740-4795-b830-a949b7e6e264" ], - "x-ms-client-request-id": [ "e38dc23c-5e65-4e5c-b195-e202244c9160", "e38dc23c-5e65-4e5c-b195-e202244c9160" ], + "x-ms-request-id": [ "4a80c629-5f87-4805-a44e-9e0f509de75f" ], + "x-ms-client-request-id": [ "705ac7c8-d796-4f5c-930a-9f4c48239a89", "705ac7c8-d796-4f5c-930a-9f4c48239a89" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-correlation-request-id": [ "20e38c32-7740-4795-b830-a949b7e6e264" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160342Z:20e38c32-7740-4795-b830-a949b7e6e264" ], - "Date": [ "Mon, 26 Jun 2023 16:03:42 GMT" ] + "x-ms-correlation-request-id": [ "4a80c629-5f87-4805-a44e-9e0f509de75f" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051306Z:4a80c629-5f87-4805-a44e-9e0f509de75f" ], + "Date": [ "Mon, 03 Jul 2023 05:13:06 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1774" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":56,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":1,\"isLast\":false},{\"date\":2,\"isLast\":false},{\"date\":3,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":54,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"monthsOfYear\":[\"March\",\"April\"],\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":2,\"isLast\":false},{\"date\":4,\"isLast\":false},{\"date\":5,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":47,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}" + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":56,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":1,\"isLast\":false},{\"date\":2,\"isLast\":false},{\"date\":3,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":54,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"monthsOfYear\":[\"March\",\"April\"],\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":2,\"isLast\":false},{\"date\":4,\"isLast\":false},{\"date\":5,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":47,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}", + "isContentBase64": false } }, - "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+CommonCommandToUpdateAllRetentions+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+2": { + "Edit-AzRecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+CommonCommandToUpdateAllRetentions+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+2": { "Request": { "Method": "GET", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", "Content": null, + "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "2" ], - "x-ms-client-request-id": [ "95e7dc6c-a10f-41ae-8b9c-073513eafade" ], + "x-ms-client-request-id": [ "d24a0590-92a9-4b85-bdca-814333522517" ], "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -58,36 +61,38 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "3da9064d-c755-46ab-86ce-652fbab9ad70" ], - "x-ms-client-request-id": [ "95e7dc6c-a10f-41ae-8b9c-073513eafade", "95e7dc6c-a10f-41ae-8b9c-073513eafade" ], + "x-ms-request-id": [ "15f6f185-e2b0-4dbd-b533-64ee4724cbd4" ], + "x-ms-client-request-id": [ "d24a0590-92a9-4b85-bdca-814333522517", "d24a0590-92a9-4b85-bdca-814333522517" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "299" ], - "x-ms-correlation-request-id": [ "3da9064d-c755-46ab-86ce-652fbab9ad70" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160344Z:3da9064d-c755-46ab-86ce-652fbab9ad70" ], - "Date": [ "Mon, 26 Jun 2023 16:03:44 GMT" ] + "x-ms-correlation-request-id": [ "15f6f185-e2b0-4dbd-b533-64ee4724cbd4" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051307Z:15f6f185-e2b0-4dbd-b533-64ee4724cbd4" ], + "Date": [ "Mon, 03 Jul 2023 05:13:07 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1774" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":56,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":1,\"isLast\":false},{\"date\":2,\"isLast\":false},{\"date\":3,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":54,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"monthsOfYear\":[\"March\",\"April\"],\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":2,\"isLast\":false},{\"date\":4,\"isLast\":false},{\"date\":5,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":47,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}" + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":56,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":1,\"isLast\":false},{\"date\":2,\"isLast\":false},{\"date\":3,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":54,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"monthsOfYear\":[\"March\",\"April\"],\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":2,\"isLast\":false},{\"date\":4,\"isLast\":false},{\"date\":5,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":47,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}", + "isContentBase64": false } }, - "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+CommonCommandToUpdateAllRetentions+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+3": { + "Edit-AzRecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+CommonCommandToUpdateAllRetentions+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+3": { "Request": { "Method": "DELETE", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", "Content": null, + "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "649da149-cb04-4f9d-b5ba-cdcc1b69488c" ], + "x-ms-client-request-id": [ "598628f6-755e-4eba-8cee-9c54d7af4cb7" ], "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -99,27 +104,29 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "4f38041c-fca9-4da7-ab24-94e53ed1927d" ], - "x-ms-client-request-id": [ "649da149-cb04-4f9d-b5ba-cdcc1b69488c", "649da149-cb04-4f9d-b5ba-cdcc1b69488c" ], + "x-ms-request-id": [ "e44a9da3-0060-4241-b9b4-2fce8d2e49c2" ], + "x-ms-client-request-id": [ "598628f6-755e-4eba-8cee-9c54d7af4cb7", "598628f6-755e-4eba-8cee-9c54d7af4cb7" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], - "x-ms-correlation-request-id": [ "4f38041c-fca9-4da7-ab24-94e53ed1927d" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160345Z:4f38041c-fca9-4da7-ab24-94e53ed1927d" ], - "Date": [ "Mon, 26 Jun 2023 16:03:45 GMT" ] + "x-ms-correlation-request-id": [ "e44a9da3-0060-4241-b9b4-2fce8d2e49c2" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051309Z:e44a9da3-0060-4241-b9b4-2fce8d2e49c2" ], + "Date": [ "Mon, 03 Jul 2023 05:13:08 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], "Content-Length": [ "0" ] }, - "Content": null + "Content": null, + "isContentBase64": false } }, - "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+DailyScheduleWithWeeklyRetention-AzureVM+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+1": { + "Edit-AzRecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+DailyScheduleWithWeeklyRetention-AzureVM+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+1": { "Request": { "Method": "PUT", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", "Content": "{\r\n \"properties\": {\r\n \"protectedItemsCount\": 0,\r\n \"backupManagementType\": \"AzureIaasVM\",\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Daily\",\r\n \"scheduleRunTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 56,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Sunday\", \"Monday\" ],\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 34,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Tuesday\" ],\r\n \"weeksOfTheMonth\": [ \"Second\", \"Fourth\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 36,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"May\", \"June\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Tuesday\" ],\r\n \"weeksOfTheMonth\": [ \"First\", \"Third\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 67,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n },\r\n \"instantRpRetentionRangeInDays\": 2,\r\n \"timeZone\": \"UTC\",\r\n \"policyType\": \"V1\"\r\n }\r\n}", + "isContentBase64": false, "Headers": { }, "ContentHeaders": { @@ -133,36 +140,38 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "6364d40e-c8d7-447c-af2e-6892f3c68654" ], - "x-ms-client-request-id": [ "1fbd5353-c6c3-4e50-9e79-b19767a8bbf9", "1fbd5353-c6c3-4e50-9e79-b19767a8bbf9" ], + "x-ms-request-id": [ "b63d2395-cf79-4167-8fdc-86f8c7bd6489" ], + "x-ms-client-request-id": [ "ad2e880f-0817-467a-9a3a-407831a977f1", "ad2e880f-0817-467a-9a3a-407831a977f1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-correlation-request-id": [ "6364d40e-c8d7-447c-af2e-6892f3c68654" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160347Z:6364d40e-c8d7-447c-af2e-6892f3c68654" ], - "Date": [ "Mon, 26 Jun 2023 16:03:46 GMT" ] + "x-ms-correlation-request-id": [ "b63d2395-cf79-4167-8fdc-86f8c7bd6489" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051310Z:b63d2395-cf79-4167-8fdc-86f8c7bd6489" ], + "Date": [ "Mon, 03 Jul 2023 05:13:10 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1572" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":56,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\",\"Monday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"Second\",\"Fourth\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":36,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"May\",\"June\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"First\",\"Third\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":67,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}" + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":56,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\",\"Monday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"Second\",\"Fourth\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":36,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"May\",\"June\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"First\",\"Third\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":67,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}", + "isContentBase64": false } }, - "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+DailyScheduleWithWeeklyRetention-AzureVM+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+2": { + "Edit-AzRecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+DailyScheduleWithWeeklyRetention-AzureVM+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+2": { "Request": { "Method": "GET", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", "Content": null, + "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "5" ], - "x-ms-client-request-id": [ "f7b57465-4490-4cdc-900e-13c14424ae4c" ], + "x-ms-client-request-id": [ "ee898530-5355-4215-80c9-9430e5889b0e" ], "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -174,36 +183,38 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "74a4b758-229a-4c74-a2de-15ff46b0c080" ], - "x-ms-client-request-id": [ "f7b57465-4490-4cdc-900e-13c14424ae4c", "f7b57465-4490-4cdc-900e-13c14424ae4c" ], + "x-ms-request-id": [ "bf5b04fa-6833-4781-841a-f077630b1b01" ], + "x-ms-client-request-id": [ "ee898530-5355-4215-80c9-9430e5889b0e", "ee898530-5355-4215-80c9-9430e5889b0e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "298" ], - "x-ms-correlation-request-id": [ "74a4b758-229a-4c74-a2de-15ff46b0c080" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160348Z:74a4b758-229a-4c74-a2de-15ff46b0c080" ], - "Date": [ "Mon, 26 Jun 2023 16:03:47 GMT" ] + "x-ms-correlation-request-id": [ "bf5b04fa-6833-4781-841a-f077630b1b01" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051311Z:bf5b04fa-6833-4781-841a-f077630b1b01" ], + "Date": [ "Mon, 03 Jul 2023 05:13:11 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1572" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":56,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\",\"Monday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"Second\",\"Fourth\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":36,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"May\",\"June\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"First\",\"Third\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":67,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}" + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":56,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\",\"Monday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"Second\",\"Fourth\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":36,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"May\",\"June\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"First\",\"Third\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":67,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}", + "isContentBase64": false } }, - "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+DailyScheduleWithWeeklyRetention-AzureVM+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+3": { + "Edit-AzRecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+DailyScheduleWithWeeklyRetention-AzureVM+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+3": { "Request": { "Method": "DELETE", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", "Content": null, + "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "6" ], - "x-ms-client-request-id": [ "5fae2d46-8e0b-43b8-bac4-839a6afd9524" ], + "x-ms-client-request-id": [ "5a7819f0-b993-4a21-ab01-beddc71a09c9" ], "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -215,27 +226,29 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "84d49a7b-c854-4514-8da1-8d60ab6635e0" ], - "x-ms-client-request-id": [ "5fae2d46-8e0b-43b8-bac4-839a6afd9524", "5fae2d46-8e0b-43b8-bac4-839a6afd9524" ], + "x-ms-request-id": [ "d575a8d7-6f1c-4eea-935d-3a5294399281" ], + "x-ms-client-request-id": [ "5a7819f0-b993-4a21-ab01-beddc71a09c9", "5a7819f0-b993-4a21-ab01-beddc71a09c9" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], - "x-ms-correlation-request-id": [ "84d49a7b-c854-4514-8da1-8d60ab6635e0" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160349Z:84d49a7b-c854-4514-8da1-8d60ab6635e0" ], - "Date": [ "Mon, 26 Jun 2023 16:03:48 GMT" ] + "x-ms-correlation-request-id": [ "d575a8d7-6f1c-4eea-935d-3a5294399281" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051312Z:d575a8d7-6f1c-4eea-935d-3a5294399281" ], + "Date": [ "Mon, 03 Jul 2023 05:13:12 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], "Content-Length": [ "0" ] }, - "Content": null + "Content": null, + "isContentBase64": false } }, - "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+DailyScheduleWithDailyRetention-AzureVM+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+1": { + "Edit-AzRecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+DailyScheduleWithDailyRetention-AzureVM+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+1": { "Request": { "Method": "PUT", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", "Content": "{\r\n \"properties\": {\r\n \"protectedItemsCount\": 0,\r\n \"backupManagementType\": \"AzureIaasVM\",\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Daily\",\r\n \"scheduleRunDays\": [ \"Monday\", \"Tuesday\", \"Wednesday\" ],\r\n \"scheduleRunTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 56,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Sunday\", \"Monday\" ],\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 34,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Daily\",\r\n \"retentionScheduleDaily\": {\r\n \"daysOfTheMonth\": [\r\n {\r\n \"date\": 1\r\n },\r\n {\r\n \"date\": 6\r\n },\r\n {\r\n \"date\": 28\r\n }\r\n ]\r\n },\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 45,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Daily\",\r\n \"monthsOfYear\": [ \"May\", \"April\" ],\r\n \"retentionScheduleDaily\": {\r\n \"daysOfTheMonth\": [\r\n {\r\n \"date\": 1\r\n },\r\n {\r\n \"date\": 2\r\n },\r\n {\r\n \"date\": 3\r\n }\r\n ]\r\n },\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 43,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n },\r\n \"instantRpRetentionRangeInDays\": 2,\r\n \"timeZone\": \"UTC\",\r\n \"policyType\": \"V1\"\r\n }\r\n}", + "isContentBase64": false, "Headers": { }, "ContentHeaders": { @@ -249,36 +262,38 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "e90e7eff-2138-40c1-81d9-6afc50f947c2" ], - "x-ms-client-request-id": [ "5786ce66-a6d9-4bca-8e0c-9dfb39d8dc3a", "5786ce66-a6d9-4bca-8e0c-9dfb39d8dc3a" ], + "x-ms-request-id": [ "8ea22ebc-9914-46c0-83e6-6bfc2a2f23b9" ], + "x-ms-client-request-id": [ "9b138bcd-5226-458b-a355-fdcadde7dbab", "9b138bcd-5226-458b-a355-fdcadde7dbab" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], - "x-ms-correlation-request-id": [ "e90e7eff-2138-40c1-81d9-6afc50f947c2" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160350Z:e90e7eff-2138-40c1-81d9-6afc50f947c2" ], - "Date": [ "Mon, 26 Jun 2023 16:03:50 GMT" ] + "x-ms-correlation-request-id": [ "8ea22ebc-9914-46c0-83e6-6bfc2a2f23b9" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051314Z:8ea22ebc-9914-46c0-83e6-6bfc2a2f23b9" ], + "Date": [ "Mon, 03 Jul 2023 05:13:14 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1833" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunDays\":[\"Monday\",\"Tuesday\",\"Wednesday\"],\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":56,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\",\"Monday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":1,\"isLast\":false},{\"date\":6,\"isLast\":false},{\"date\":28,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":45,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"monthsOfYear\":[\"May\",\"April\"],\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":1,\"isLast\":false},{\"date\":2,\"isLast\":false},{\"date\":3,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":43,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}" + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunDays\":[\"Monday\",\"Tuesday\",\"Wednesday\"],\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":56,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\",\"Monday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":1,\"isLast\":false},{\"date\":6,\"isLast\":false},{\"date\":28,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":45,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"monthsOfYear\":[\"May\",\"April\"],\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":1,\"isLast\":false},{\"date\":2,\"isLast\":false},{\"date\":3,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":43,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}", + "isContentBase64": false } }, - "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+DailyScheduleWithDailyRetention-AzureVM+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+2": { + "Edit-AzRecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+DailyScheduleWithDailyRetention-AzureVM+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+2": { "Request": { "Method": "GET", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", "Content": null, + "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "8" ], - "x-ms-client-request-id": [ "78e2cf4a-9592-4644-8c7b-3b54034b8346" ], + "x-ms-client-request-id": [ "e6ec9315-cbb8-4e83-9e8d-a5d3e7095bf6" ], "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -290,36 +305,38 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "7124b081-157d-4872-b128-241a2a434ad1" ], - "x-ms-client-request-id": [ "78e2cf4a-9592-4644-8c7b-3b54034b8346", "78e2cf4a-9592-4644-8c7b-3b54034b8346" ], + "x-ms-request-id": [ "59070183-5cec-452b-a354-bdebd8c913ad" ], + "x-ms-client-request-id": [ "e6ec9315-cbb8-4e83-9e8d-a5d3e7095bf6", "e6ec9315-cbb8-4e83-9e8d-a5d3e7095bf6" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "297" ], - "x-ms-correlation-request-id": [ "7124b081-157d-4872-b128-241a2a434ad1" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160351Z:7124b081-157d-4872-b128-241a2a434ad1" ], - "Date": [ "Mon, 26 Jun 2023 16:03:51 GMT" ] + "x-ms-correlation-request-id": [ "59070183-5cec-452b-a354-bdebd8c913ad" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051315Z:59070183-5cec-452b-a354-bdebd8c913ad" ], + "Date": [ "Mon, 03 Jul 2023 05:13:14 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1833" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunDays\":[\"Monday\",\"Tuesday\",\"Wednesday\"],\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":56,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\",\"Monday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":1,\"isLast\":false},{\"date\":6,\"isLast\":false},{\"date\":28,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":45,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"monthsOfYear\":[\"May\",\"April\"],\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":1,\"isLast\":false},{\"date\":2,\"isLast\":false},{\"date\":3,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":43,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}" + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunDays\":[\"Monday\",\"Tuesday\",\"Wednesday\"],\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":56,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\",\"Monday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":1,\"isLast\":false},{\"date\":6,\"isLast\":false},{\"date\":28,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":45,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"monthsOfYear\":[\"May\",\"April\"],\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":1,\"isLast\":false},{\"date\":2,\"isLast\":false},{\"date\":3,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":43,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}", + "isContentBase64": false } }, - "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+DailyScheduleWithDailyRetention-AzureVM+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+3": { + "Edit-AzRecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+DailyScheduleWithDailyRetention-AzureVM+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+3": { "Request": { "Method": "DELETE", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", "Content": null, + "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "9" ], - "x-ms-client-request-id": [ "222ad7d1-53b2-488d-b8a3-191c4d05c4db" ], + "x-ms-client-request-id": [ "f6b06106-59c1-415a-8d14-417024a6a2e2" ], "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -331,27 +348,29 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "f092c146-1635-4efc-9953-d07bd93cc201" ], - "x-ms-client-request-id": [ "222ad7d1-53b2-488d-b8a3-191c4d05c4db", "222ad7d1-53b2-488d-b8a3-191c4d05c4db" ], + "x-ms-request-id": [ "642ce7f7-374b-47ab-85b7-e5493885d35f" ], + "x-ms-client-request-id": [ "f6b06106-59c1-415a-8d14-417024a6a2e2", "f6b06106-59c1-415a-8d14-417024a6a2e2" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14997" ], - "x-ms-correlation-request-id": [ "f092c146-1635-4efc-9953-d07bd93cc201" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160352Z:f092c146-1635-4efc-9953-d07bd93cc201" ], - "Date": [ "Mon, 26 Jun 2023 16:03:52 GMT" ] + "x-ms-correlation-request-id": [ "642ce7f7-374b-47ab-85b7-e5493885d35f" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051316Z:642ce7f7-374b-47ab-85b7-e5493885d35f" ], + "Date": [ "Mon, 03 Jul 2023 05:13:16 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], "Content-Length": [ "0" ] }, - "Content": null + "Content": null, + "isContentBase64": false } }, - "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+WeeklyScheduleWithWeeklyRetention-SAPHANA+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+1": { + "Edit-AzRecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+WeeklyScheduleWithWeeklyRetention-SAPHANA+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+1": { "Request": { "Method": "PUT", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", - "Content": "{\r\n \"properties\": {\r\n \"backupManagementType\": \"AzureWorkload\",\r\n \"workLoadType\": \"SAPHanaDatabase\",\r\n \"settings\": {\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"issqlcompression\": false,\r\n \"isCompression\": false\r\n },\r\n \"subProtectionPolicy\": [\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Monday\", \"Tuesday\" ],\r\n \"scheduleRunTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Tuesday\" ],\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 11,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Tuesday\" ],\r\n \"weeksOfTheMonth\": [ \"First\", \"Last\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 34,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"May\", \"June\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Tuesday\" ],\r\n \"weeksOfTheMonth\": [ \"Last\", \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 47,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"policyType\": \"Full\",\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n }\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"LogSchedulePolicy\",\r\n \"scheduleFrequencyInMins\": 120\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 23,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Log\"\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Sunday\" ],\r\n \"scheduleRunTimes\": [ \"2023-06-26T02:00:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 64,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Incremental\"\r\n }\r\n ]\r\n }\r\n}", + "Content": "{\r\n \"properties\": {\r\n \"backupManagementType\": \"AzureWorkload\",\r\n \"workLoadType\": \"SAPHanaDatabase\",\r\n \"settings\": {\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"issqlcompression\": false,\r\n \"isCompression\": false\r\n },\r\n \"subProtectionPolicy\": [\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Monday\", \"Tuesday\" ],\r\n \"scheduleRunTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Tuesday\" ],\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 11,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Tuesday\" ],\r\n \"weeksOfTheMonth\": [ \"First\", \"Last\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 34,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"May\", \"June\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Tuesday\" ],\r\n \"weeksOfTheMonth\": [ \"Last\", \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 47,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"policyType\": \"Full\",\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n }\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"LogSchedulePolicy\",\r\n \"scheduleFrequencyInMins\": 120\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 23,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Log\"\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Sunday\" ],\r\n \"scheduleRunTimes\": [ \"2023-07-03T02:00:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 64,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Incremental\"\r\n }\r\n ]\r\n }\r\n}", + "isContentBase64": false, "Headers": { }, "ContentHeaders": { @@ -365,36 +384,38 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "31e6108b-f6e3-44ba-b43e-29b3cd136f24" ], - "x-ms-client-request-id": [ "c42f9f4a-ecdf-4749-830a-4c8ab22a20a9", "c42f9f4a-ecdf-4749-830a-4c8ab22a20a9" ], + "x-ms-request-id": [ "e72faafc-7f3d-4754-9a6f-a1d14307e060" ], + "x-ms-client-request-id": [ "9d0e6dd5-a75e-4467-9d92-afa7baa80171", "9d0e6dd5-a75e-4467-9d92-afa7baa80171" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], - "x-ms-correlation-request-id": [ "31e6108b-f6e3-44ba-b43e-29b3cd136f24" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160354Z:31e6108b-f6e3-44ba-b43e-29b3cd136f24" ], - "Date": [ "Mon, 26 Jun 2023 16:03:53 GMT" ] + "x-ms-correlation-request-id": [ "e72faafc-7f3d-4754-9a6f-a1d14307e060" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051318Z:e72faafc-7f3d-4754-9a6f-a1d14307e060" ], + "Date": [ "Mon, 03 Jul 2023 05:13:18 GMT" ] }, "ContentHeaders": { "Content-Length": [ "2155" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Tuesday\"],\"scheduleRunTimes\":[\"2023-06-26T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":11,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"First\",\"Last\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"May\",\"June\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"Last\",\"First\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":47,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Incremental\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Sunday\"],\"scheduleRunTimes\":[\"2023-06-26T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":64,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":23,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}" + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Tuesday\"],\"scheduleRunTimes\":[\"2023-07-03T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":11,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"First\",\"Last\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"May\",\"June\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"Last\",\"First\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":47,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Incremental\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Sunday\"],\"scheduleRunTimes\":[\"2023-07-03T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":64,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":23,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", + "isContentBase64": false } }, - "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+WeeklyScheduleWithWeeklyRetention-SAPHANA+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+2": { + "Edit-AzRecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+WeeklyScheduleWithWeeklyRetention-SAPHANA+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+2": { "Request": { "Method": "GET", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", "Content": null, + "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "11" ], - "x-ms-client-request-id": [ "c10d9e75-1d32-4d7f-9858-0082787eef36" ], + "x-ms-client-request-id": [ "8b576637-ac17-4eef-b1b1-b9d90e0a6941" ], "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -406,36 +427,38 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "20359bfa-935b-48cd-952a-1b04a87a83c5" ], - "x-ms-client-request-id": [ "c10d9e75-1d32-4d7f-9858-0082787eef36", "c10d9e75-1d32-4d7f-9858-0082787eef36" ], + "x-ms-request-id": [ "a5fe4c3c-e53e-4c23-9f7a-d7eaaa39e8ef" ], + "x-ms-client-request-id": [ "8b576637-ac17-4eef-b1b1-b9d90e0a6941", "8b576637-ac17-4eef-b1b1-b9d90e0a6941" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "296" ], - "x-ms-correlation-request-id": [ "20359bfa-935b-48cd-952a-1b04a87a83c5" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160354Z:20359bfa-935b-48cd-952a-1b04a87a83c5" ], - "Date": [ "Mon, 26 Jun 2023 16:03:54 GMT" ] + "x-ms-correlation-request-id": [ "a5fe4c3c-e53e-4c23-9f7a-d7eaaa39e8ef" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051319Z:a5fe4c3c-e53e-4c23-9f7a-d7eaaa39e8ef" ], + "Date": [ "Mon, 03 Jul 2023 05:13:18 GMT" ] }, "ContentHeaders": { "Content-Length": [ "2155" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Tuesday\"],\"scheduleRunTimes\":[\"2023-06-26T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":11,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"First\",\"Last\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"May\",\"June\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"Last\",\"First\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":47,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Incremental\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Sunday\"],\"scheduleRunTimes\":[\"2023-06-26T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":64,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":23,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}" + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Tuesday\"],\"scheduleRunTimes\":[\"2023-07-03T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":11,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"First\",\"Last\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"May\",\"June\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"Last\",\"First\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":47,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Incremental\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Sunday\"],\"scheduleRunTimes\":[\"2023-07-03T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":64,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":23,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", + "isContentBase64": false } }, - "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+WeeklyScheduleWithWeeklyRetention-SAPHANA+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+3": { + "Edit-AzRecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+WeeklyScheduleWithWeeklyRetention-SAPHANA+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+3": { "Request": { "Method": "DELETE", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", "Content": null, + "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "12" ], - "x-ms-client-request-id": [ "b09da6fc-86d7-468f-bc5f-5381bafb2b99" ], + "x-ms-client-request-id": [ "f49190f4-2625-4d9f-a0c1-ad23830784d1" ], "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -447,27 +470,29 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "bc9a964a-75c5-4bdd-94db-0044b97b324f" ], - "x-ms-client-request-id": [ "b09da6fc-86d7-468f-bc5f-5381bafb2b99", "b09da6fc-86d7-468f-bc5f-5381bafb2b99" ], + "x-ms-request-id": [ "ce215155-74c5-434a-997a-5fef61853d77" ], + "x-ms-client-request-id": [ "f49190f4-2625-4d9f-a0c1-ad23830784d1", "f49190f4-2625-4d9f-a0c1-ad23830784d1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14996" ], - "x-ms-correlation-request-id": [ "bc9a964a-75c5-4bdd-94db-0044b97b324f" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160355Z:bc9a964a-75c5-4bdd-94db-0044b97b324f" ], - "Date": [ "Mon, 26 Jun 2023 16:03:55 GMT" ] + "x-ms-correlation-request-id": [ "ce215155-74c5-434a-997a-5fef61853d77" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051320Z:ce215155-74c5-434a-997a-5fef61853d77" ], + "Date": [ "Mon, 03 Jul 2023 05:13:20 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], "Content-Length": [ "0" ] }, - "Content": null + "Content": null, + "isContentBase64": false } }, - "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+TierAfter-SAPHANA+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+1": { + "Edit-AzRecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+TierAfter-SAPHANA+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+1": { "Request": { "Method": "PUT", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", "Content": "{\r\n \"properties\": {\r\n \"backupManagementType\": \"AzureWorkload\",\r\n \"workLoadType\": \"SAPHanaDatabase\",\r\n \"settings\": {\r\n \"timeZone\": \"UTC\",\r\n \"issqlcompression\": false,\r\n \"isCompression\": false\r\n },\r\n \"subProtectionPolicy\": [\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Daily\",\r\n \"scheduleRunTimes\": [ \"2020-09-30T19:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2020-09-30T19:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 180,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"retentionTimes\": [ \"2020-09-30T19:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 104,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2020-09-30T19:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 60,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"January\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2020-09-30T19:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 10,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"policyType\": \"Full\",\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"TierAfter\",\r\n \"duration\": 54,\r\n \"durationType\": \"Days\"\r\n }\r\n }\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"LogSchedulePolicy\",\r\n \"scheduleFrequencyInMins\": 120\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 15,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Log\"\r\n }\r\n ]\r\n }\r\n}", + "isContentBase64": false, "Headers": { }, "ContentHeaders": { @@ -481,36 +506,38 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "5d0e1227-6f2d-46c4-9868-910992bb5550" ], - "x-ms-client-request-id": [ "a0285ce4-72df-4acc-b49c-77963f06641b", "a0285ce4-72df-4acc-b49c-77963f06641b" ], + "x-ms-request-id": [ "53428a6e-2ce3-40ea-9bb1-191beb62c18e" ], + "x-ms-client-request-id": [ "56537018-0bac-4eb6-98d9-b2ea5f9d0c2f", "56537018-0bac-4eb6-98d9-b2ea5f9d0c2f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1195" ], - "x-ms-correlation-request-id": [ "5d0e1227-6f2d-46c4-9868-910992bb5550" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160357Z:5d0e1227-6f2d-46c4-9868-910992bb5550" ], - "Date": [ "Mon, 26 Jun 2023 16:03:56 GMT" ] + "x-ms-correlation-request-id": [ "53428a6e-2ce3-40ea-9bb1-191beb62c18e" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051322Z:53428a6e-2ce3-40ea-9bb1-191beb62c18e" ], + "Date": [ "Mon, 03 Jul 2023 05:13:21 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1821" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2020-09-30T19:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"TierAfter\",\"duration\":54,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}" + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2020-09-30T19:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"TierAfter\",\"duration\":54,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", + "isContentBase64": false } }, - "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+TierAfter-SAPHANA+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+2": { + "Edit-AzRecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+TierAfter-SAPHANA+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+2": { "Request": { "Method": "GET", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", "Content": null, + "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "14" ], - "x-ms-client-request-id": [ "1712fd82-6161-4c93-8a38-849ee9ee6f67" ], + "x-ms-client-request-id": [ "8aef313e-cd82-41d8-8b35-16074dac6594" ], "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -522,36 +549,38 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "9610037d-023b-49d2-9c69-b78fa7b1b538" ], - "x-ms-client-request-id": [ "1712fd82-6161-4c93-8a38-849ee9ee6f67", "1712fd82-6161-4c93-8a38-849ee9ee6f67" ], + "x-ms-request-id": [ "1325d5b5-bfa2-499c-96f4-fa3782a97cd2" ], + "x-ms-client-request-id": [ "8aef313e-cd82-41d8-8b35-16074dac6594", "8aef313e-cd82-41d8-8b35-16074dac6594" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "295" ], - "x-ms-correlation-request-id": [ "9610037d-023b-49d2-9c69-b78fa7b1b538" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160358Z:9610037d-023b-49d2-9c69-b78fa7b1b538" ], - "Date": [ "Mon, 26 Jun 2023 16:03:57 GMT" ] + "x-ms-correlation-request-id": [ "1325d5b5-bfa2-499c-96f4-fa3782a97cd2" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051322Z:1325d5b5-bfa2-499c-96f4-fa3782a97cd2" ], + "Date": [ "Mon, 03 Jul 2023 05:13:22 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1821" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2020-09-30T19:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"TierAfter\",\"duration\":54,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}" + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2020-09-30T19:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"TierAfter\",\"duration\":54,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", + "isContentBase64": false } }, - "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+TierAfter-SAPHANA+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+3": { + "Edit-AzRecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+TierAfter-SAPHANA+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+3": { "Request": { "Method": "DELETE", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", "Content": null, + "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "15" ], - "x-ms-client-request-id": [ "6265981d-bc10-459b-ac14-7617d7893221" ], + "x-ms-client-request-id": [ "140c38cb-0ee1-48ae-bda7-5e7449e19ebd" ], "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -563,27 +592,29 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "b36cf375-432b-4f7b-a71c-5dd70a1592fa" ], - "x-ms-client-request-id": [ "6265981d-bc10-459b-ac14-7617d7893221", "6265981d-bc10-459b-ac14-7617d7893221" ], + "x-ms-request-id": [ "87cb7e03-fe08-4ae4-92a1-5d8b2ea7be91" ], + "x-ms-client-request-id": [ "140c38cb-0ee1-48ae-bda7-5e7449e19ebd", "140c38cb-0ee1-48ae-bda7-5e7449e19ebd" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14995" ], - "x-ms-correlation-request-id": [ "b36cf375-432b-4f7b-a71c-5dd70a1592fa" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160359Z:b36cf375-432b-4f7b-a71c-5dd70a1592fa" ], - "Date": [ "Mon, 26 Jun 2023 16:03:58 GMT" ] + "x-ms-correlation-request-id": [ "87cb7e03-fe08-4ae4-92a1-5d8b2ea7be91" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051324Z:87cb7e03-fe08-4ae4-92a1-5d8b2ea7be91" ], + "Date": [ "Mon, 03 Jul 2023 05:13:23 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], "Content-Length": [ "0" ] }, - "Content": null + "Content": null, + "isContentBase64": false } }, - "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+TierRecommended-AzureVM+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+1": { + "Edit-AzRecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+TierRecommended-AzureVM+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+1": { "Request": { "Method": "PUT", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", "Content": "{\r\n \"properties\": {\r\n \"protectedItemsCount\": 0,\r\n \"backupManagementType\": \"AzureIaasVM\",\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Daily\",\r\n \"scheduleRunTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 180,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 12,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 60,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"January\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-05-22T14:00:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 10,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"TierRecommended\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n },\r\n \"instantRpRetentionRangeInDays\": 2,\r\n \"timeZone\": \"UTC\",\r\n \"policyType\": \"V1\"\r\n }\r\n}", + "isContentBase64": false, "Headers": { }, "ContentHeaders": { @@ -597,36 +628,38 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "eb698e32-fe54-44e4-a73b-ba6cf92a3c39" ], - "x-ms-client-request-id": [ "89cd4f07-2bc1-449a-9133-ad7cdbb53ccc", "89cd4f07-2bc1-449a-9133-ad7cdbb53ccc" ], + "x-ms-request-id": [ "74e3a309-c39d-4ef6-9f0f-24963c0c51f3" ], + "x-ms-client-request-id": [ "397490de-53b1-49a7-af7e-a012188e5c65", "397490de-53b1-49a7-af7e-a012188e5c65" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1194" ], - "x-ms-correlation-request-id": [ "eb698e32-fe54-44e4-a73b-ba6cf92a3c39" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160400Z:eb698e32-fe54-44e4-a73b-ba6cf92a3c39" ], - "Date": [ "Mon, 26 Jun 2023 16:03:59 GMT" ] + "x-ms-correlation-request-id": [ "74e3a309-c39d-4ef6-9f0f-24963c0c51f3" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051325Z:74e3a309-c39d-4ef6-9f0f-24963c0c51f3" ], + "Date": [ "Mon, 03 Jul 2023 05:13:25 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1529" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":12,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"TierRecommended\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}" + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":12,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"TierRecommended\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}", + "isContentBase64": false } }, - "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+TierRecommended-AzureVM+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+2": { + "Edit-AzRecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+TierRecommended-AzureVM+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+2": { "Request": { "Method": "GET", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", "Content": null, + "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "17" ], - "x-ms-client-request-id": [ "95a153bc-242f-441a-a440-a2bd7419b836" ], + "x-ms-client-request-id": [ "e29e8206-5194-4537-965b-a4dc6374efa2" ], "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -638,36 +671,38 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "0b666200-5e76-4fe9-bc72-56666f9647d0" ], - "x-ms-client-request-id": [ "95a153bc-242f-441a-a440-a2bd7419b836", "95a153bc-242f-441a-a440-a2bd7419b836" ], + "x-ms-request-id": [ "1cad4870-938b-4495-a9e5-5ef81ddd5d7f" ], + "x-ms-client-request-id": [ "e29e8206-5194-4537-965b-a4dc6374efa2", "e29e8206-5194-4537-965b-a4dc6374efa2" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "294" ], - "x-ms-correlation-request-id": [ "0b666200-5e76-4fe9-bc72-56666f9647d0" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160401Z:0b666200-5e76-4fe9-bc72-56666f9647d0" ], - "Date": [ "Mon, 26 Jun 2023 16:04:00 GMT" ] + "x-ms-correlation-request-id": [ "1cad4870-938b-4495-a9e5-5ef81ddd5d7f" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051326Z:1cad4870-938b-4495-a9e5-5ef81ddd5d7f" ], + "Date": [ "Mon, 03 Jul 2023 05:13:26 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1529" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":12,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"TierRecommended\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}" + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":12,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"TierRecommended\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}", + "isContentBase64": false } }, - "Edit-AzrecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+TierRecommended-AzureVM+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+3": { + "Edit-AzRecoveryServicesBackupRetentionPolicyClientObject+[NoContext]+TierRecommended-AzureVM+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01+3": { "Request": { "Method": "DELETE", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", "Content": null, + "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "18" ], - "x-ms-client-request-id": [ "bcddca30-cdab-47d2-a32f-6fe120231ffa" ], + "x-ms-client-request-id": [ "d3781714-3970-414f-afeb-7c139ebccfd8" ], "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -679,20 +714,21 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "822fd8d8-223f-49ec-9e97-ac6dff9dbbbe" ], - "x-ms-client-request-id": [ "bcddca30-cdab-47d2-a32f-6fe120231ffa", "bcddca30-cdab-47d2-a32f-6fe120231ffa" ], + "x-ms-request-id": [ "b0b097d5-2e4d-4a15-a58b-cc17b22bd819" ], + "x-ms-client-request-id": [ "d3781714-3970-414f-afeb-7c139ebccfd8", "d3781714-3970-414f-afeb-7c139ebccfd8" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14994" ], - "x-ms-correlation-request-id": [ "822fd8d8-223f-49ec-9e97-ac6dff9dbbbe" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160402Z:822fd8d8-223f-49ec-9e97-ac6dff9dbbbe" ], - "Date": [ "Mon, 26 Jun 2023 16:04:02 GMT" ] + "x-ms-correlation-request-id": [ "b0b097d5-2e4d-4a15-a58b-cc17b22bd819" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051327Z:b0b097d5-2e4d-4a15-a58b-cc17b22bd819" ], + "Date": [ "Mon, 03 Jul 2023 05:13:27 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], "Content-Length": [ "0" ] }, - "Content": null + "Content": null, + "isContentBase64": false } } } \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Tests.ps1 similarity index 93% rename from src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.Tests.ps1 rename to src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Tests.ps1 index d3ef59f0ab34..b13ec6ef02b7 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.Tests.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Tests.ps1 @@ -1,11 +1,11 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Edit-AzrecoveryServicesBackupRetentionPolicyClientObject')) +if(($null -eq $TestName) -or ($TestName -contains 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject')) { $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' if (-Not (Test-Path -Path $loadEnvPath)) { $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' } . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Edit-AzrecoveryServicesBackupRetentionPolicyClientObject.Recording.json' + $TestRecordingFile = Join-Path $PSScriptRoot 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Recording.json' $currentPath = $PSScriptRoot while(-not $mockingPath) { $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File @@ -14,7 +14,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Edit-AzrecoveryServicesBackup . ($mockingPath | Select-Object -First 1).FullName } -Describe 'Edit-AzrecoveryServicesBackupRetentionPolicyClientObject' { +Describe 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject' { It 'CommonCommandToUpdateAllRetentions' { $sub = $env.TestBackupPolicy.SubscriptionId @@ -30,7 +30,7 @@ Describe 'Edit-AzrecoveryServicesBackupRetentionPolicyClientObject' { $DebugPreference = "SilentlyContinue" $pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM - Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableDailyRetention 1 -DailyRetentionDurationInDays 56 -EnableWeeklyRetention 1 -WeeklyRetentionDurationInWeeks 34 -WeeklyRetentionDaysOfTheWeek Sunday -EnableMonthlyRetention 1 -MonthlyRetentionScheduleType Daily -MonthlyRetentionDurationInMonths 54 -MonthlyRetentionDaysOfTheMonth 1,2,3 -EnableYearlyRetention 1 -YearlyRetentionScheduleType Daily -YearlyRetentionDurationInYears 47 -YearlyRetentionMonthsOfTheYear March, April -YearlyRetentionDaysOfTheMonth 2,4,5 + Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableDailyRetention 1 -DailyRetentionDurationInDays 56 -EnableWeeklyRetention 1 -WeeklyRetentionDurationInWeeks 34 -WeeklyRetentionDaysOfTheWeek Sunday -EnableMonthlyRetention 1 -MonthlyRetentionScheduleType Daily -MonthlyRetentionDurationInMonths 54 -MonthlyRetentionDaysOfTheMonth 1,2,3 -EnableYearlyRetention 1 -YearlyRetentionScheduleType Daily -YearlyRetentionDurationInYears 47 -YearlyRetentionMonthsOfTheYear March, April -YearlyRetentionDaysOfTheMonth 2,4,5 New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $pol1 -PolicyName $newPolicyName # this Policy should be there - then delete it and then this policy shouldn't be there @@ -52,16 +52,16 @@ Describe 'Edit-AzrecoveryServicesBackupRetentionPolicyClientObject' { $pol1 = Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM # update daily retention - Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableDailyRetention $true -DailyRetentionDurationInDays 56 + Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableDailyRetention $true -DailyRetentionDurationInDays 56 # update weekly retention - Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableWeeklyRetention $true -WeeklyRetentionDurationInWeeks 34 -WeeklyRetentionDaysOfTheWeek Sunday,Monday + Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableWeeklyRetention $true -WeeklyRetentionDurationInWeeks 34 -WeeklyRetentionDaysOfTheWeek Sunday,Monday # update monthly retention - Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 36 -MonthlyRetentionDaysOfTheWeek "Monday","Tuesday" -MonthlyRetentionWeeksOfTheMonth Second, Fourth + Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 36 -MonthlyRetentionDaysOfTheWeek "Monday","Tuesday" -MonthlyRetentionWeeksOfTheMonth Second, Fourth # update yearly retention - Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableYearlyRetention $true -YearlyRetentionScheduleType Weekly -YearlyRetentionDurationInYears 67 -YearlyRetentionMonthsOfTheYear May, June -YearlyRetentionDaysOfTheWeek Monday, Tuesday -YearlyRetentionWeeksOfTheMonth First, Third + Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableYearlyRetention $true -YearlyRetentionScheduleType Weekly -YearlyRetentionDurationInYears 67 -YearlyRetentionMonthsOfTheYear May, June -YearlyRetentionDaysOfTheWeek Monday, Tuesday -YearlyRetentionWeeksOfTheMonth First, Third # create new policy with modified retention policy New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $pol1 -PolicyName $newPolicyName @@ -100,22 +100,22 @@ Describe 'Edit-AzrecoveryServicesBackupRetentionPolicyClientObject' { $pol1 = Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM # update daily retention - Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableDailyRetention $true -DailyRetentionDurationInDays 56 + Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableDailyRetention $true -DailyRetentionDurationInDays 56 # fetch or set the schedule run days using Edit-AzrecoveryServicesBackupSchedulePolicyClientObject command $pol1.SchedulePolicy.ScheduleRunDay="Monday", "Tuesday", "Wednesday" # update weekly retention - Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableWeeklyRetention $true -WeeklyRetentionDurationInWeeks 34 -WeeklyRetentionDaysOfTheWeek Sunday,Monday + Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableWeeklyRetention $true -WeeklyRetentionDurationInWeeks 34 -WeeklyRetentionDaysOfTheWeek Sunday,Monday # set the schedule run days using Edit-AzrecoveryServicesBackupSchedulePolicyClientObject command $pol1.SchedulePolicy.ScheduleRunFrequency="Daily" # update monthly retention - Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Daily -MonthlyRetentionDurationInMonths 45 -MonthlyRetentionDaysOfTheMonth 1,6,28 + Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Daily -MonthlyRetentionDurationInMonths 45 -MonthlyRetentionDaysOfTheMonth 1,6,28 # update yearly retention - Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableYearlyRetention $true -YearlyRetentionScheduleType Daily -YearlyRetentionMonthsOfTheYear May,April -YearlyRetentionDaysOfTheMonth @("1","2","3") -YearlyRetentionDurationInYears 43 + Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableYearlyRetention $true -YearlyRetentionScheduleType Daily -YearlyRetentionMonthsOfTheYear May,April -YearlyRetentionDaysOfTheMonth @("1","2","3") -YearlyRetentionDurationInYears 43 # create new policy with modified retention policy New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $pol1 -PolicyName $newPolicyName @@ -155,19 +155,19 @@ Describe 'Edit-AzrecoveryServicesBackupRetentionPolicyClientObject' { Edit-AzRecoveryServicesBackupSchedulePolicyClientObject -Policy $pol1 -BackupFrequency "Weekly" -ScheduleRunDay @("Monday","Tuesday") -ScheduleTime "1:30 PM" -EnableIncrementalBackup 1 -IncrementalRunDay @("Sunday") -IncrementalScheduleTime "2:00 AM" -TimeZone "Tokyo Standard Time" -EnableLogBackup 1 -LogBackupFrequency 120 # update weekly retention - Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableWeeklyRetention $true -WeeklyRetentionDurationInWeeks 11 -WeeklyRetentionDaysOfTheWeek Sunday + Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableWeeklyRetention $true -WeeklyRetentionDurationInWeeks 11 -WeeklyRetentionDaysOfTheWeek Sunday # update monthly retention - Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 34 -MonthlyRetentionDaysOfTheWeek Monday,Tuesday -MonthlyRetentionWeeksOfTheMonth First, Last + Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableMonthlyRetention $true -MonthlyRetentionScheduleType Weekly -MonthlyRetentionDurationInMonths 34 -MonthlyRetentionDaysOfTheWeek Monday,Tuesday -MonthlyRetentionWeeksOfTheMonth First, Last # update yearly retention - Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableYearlyRetention $true -YearlyRetentionScheduleType Weekly -YearlyRetentionDurationInYears 47 -YearlyRetentionMonthsOfTheYear May,June -YearlyRetentionDaysOfTheWeek Monday,Tuesday -YearlyRetentionWeeksOfTheMonth Last,First + Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableYearlyRetention $true -YearlyRetentionScheduleType Weekly -YearlyRetentionDurationInYears 47 -YearlyRetentionMonthsOfTheYear May,June -YearlyRetentionDaysOfTheWeek Monday,Tuesday -YearlyRetentionWeeksOfTheMonth Last,First # update incremental/differential backup retention - Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyIncrementalBackup -IncrementalRetentionPeriodInDays 64 + Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyIncrementalBackup -IncrementalRetentionPeriodInDays 64 # update log backup retention - Edit-AzrecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyLogBackup -LogRetentionPeriodInDays 23 + Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyLogBackup -LogRetentionPeriodInDays 23 # create new policy with modified retention policy New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $pol1 -PolicyName $newPolicyName @@ -255,4 +255,4 @@ Describe 'Edit-AzrecoveryServicesBackupRetentionPolicyClientObject' { #$pol | Should -Be "NotFound" } -} \ No newline at end of file +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Recording.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Recording.json index abc1ed08d948..af13bbf1d7e3 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Recording.json +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Recording.json @@ -3,7 +3,8 @@ "Request": { "Method": "PUT", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", - "Content": "{\r\n \"properties\": {\r\n \"protectedItemsCount\": 0,\r\n \"backupManagementType\": \"AzureIaasVM\",\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Daily\",\r\n \"scheduleRunTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 180,\r\n \"durationType\": \"Days\"\r\n }\r\n }\r\n },\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n },\r\n \"instantRpRetentionRangeInDays\": 2,\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"policyType\": \"V1\"\r\n }\r\n}", + "Content": "{\r\n \"properties\": {\r\n \"protectedItemsCount\": 0,\r\n \"backupManagementType\": \"AzureIaasVM\",\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Daily\",\r\n \"scheduleRunTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 180,\r\n \"durationType\": \"Days\"\r\n }\r\n }\r\n },\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n },\r\n \"instantRpRetentionRangeInDays\": 2,\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"policyType\": \"V1\"\r\n }\r\n}", + "isContentBase64": false, "Headers": { }, "ContentHeaders": { @@ -17,22 +18,23 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "75532e68-f1e0-460c-beff-65bc37b4c264" ], - "x-ms-client-request-id": [ "25b36367-b1b8-4b15-b730-02a20038c2dd", "25b36367-b1b8-4b15-b730-02a20038c2dd" ], + "x-ms-request-id": [ "5e1b353a-7ece-4856-bba8-f562210203f8" ], + "x-ms-client-request-id": [ "3e122081-afc3-4af5-8149-d2af70cf7f26", "3e122081-afc3-4af5-8149-d2af70cf7f26" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1193" ], - "x-ms-correlation-request-id": [ "75532e68-f1e0-460c-beff-65bc37b4c264" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160404Z:75532e68-f1e0-460c-beff-65bc37b4c264" ], - "Date": [ "Mon, 26 Jun 2023 16:04:03 GMT" ] + "x-ms-correlation-request-id": [ "5e1b353a-7ece-4856-bba8-f562210203f8" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051330Z:5e1b353a-7ece-4856-bba8-f562210203f8" ], + "Date": [ "Mon, 03 Jul 2023 05:13:30 GMT" ] }, "ContentHeaders": { "Content-Length": [ "898" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-06-26T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}" + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-07-03T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}", + "isContentBase64": false } }, "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+AzureVMStandardDaily+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+2": { @@ -40,13 +42,14 @@ "Method": "GET", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", "Content": null, + "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "20" ], - "x-ms-client-request-id": [ "a0ad8b32-3c7d-4a73-bf30-bc5a9623523c" ], + "x-ms-client-request-id": [ "cbd83ffd-361b-486c-bb76-69655d2d1128" ], "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -58,22 +61,23 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "63069326-1a09-456b-a1ee-99b7ed7451d8" ], - "x-ms-client-request-id": [ "a0ad8b32-3c7d-4a73-bf30-bc5a9623523c", "a0ad8b32-3c7d-4a73-bf30-bc5a9623523c" ], + "x-ms-request-id": [ "aa136e80-1c65-44b8-8383-a47867ae4629" ], + "x-ms-client-request-id": [ "cbd83ffd-361b-486c-bb76-69655d2d1128", "cbd83ffd-361b-486c-bb76-69655d2d1128" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "293" ], - "x-ms-correlation-request-id": [ "63069326-1a09-456b-a1ee-99b7ed7451d8" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160404Z:63069326-1a09-456b-a1ee-99b7ed7451d8" ], - "Date": [ "Mon, 26 Jun 2023 16:04:04 GMT" ] + "x-ms-correlation-request-id": [ "aa136e80-1c65-44b8-8383-a47867ae4629" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051331Z:aa136e80-1c65-44b8-8383-a47867ae4629" ], + "Date": [ "Mon, 03 Jul 2023 05:13:31 GMT" ] }, "ContentHeaders": { "Content-Length": [ "898" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-06-26T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}" + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-07-03T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}", + "isContentBase64": false } }, "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+AzureVMStandardDaily+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+3": { @@ -81,13 +85,14 @@ "Method": "DELETE", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", "Content": null, + "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "21" ], - "x-ms-client-request-id": [ "00c09d8f-660c-4229-9e2c-c008accb9f6b" ], + "x-ms-client-request-id": [ "2d5065ec-2ebd-44fa-bd27-176c9a282079" ], "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -99,27 +104,29 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "0fce0fe1-0346-4d05-9315-db2e09e50dd2" ], - "x-ms-client-request-id": [ "00c09d8f-660c-4229-9e2c-c008accb9f6b", "00c09d8f-660c-4229-9e2c-c008accb9f6b" ], + "x-ms-request-id": [ "0caf36bc-bff1-4700-a5eb-f07bd96cf51a" ], + "x-ms-client-request-id": [ "2d5065ec-2ebd-44fa-bd27-176c9a282079", "2d5065ec-2ebd-44fa-bd27-176c9a282079" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14993" ], - "x-ms-correlation-request-id": [ "0fce0fe1-0346-4d05-9315-db2e09e50dd2" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160406Z:0fce0fe1-0346-4d05-9315-db2e09e50dd2" ], - "Date": [ "Mon, 26 Jun 2023 16:04:05 GMT" ] + "x-ms-correlation-request-id": [ "0caf36bc-bff1-4700-a5eb-f07bd96cf51a" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051332Z:0caf36bc-bff1-4700-a5eb-f07bd96cf51a" ], + "Date": [ "Mon, 03 Jul 2023 05:13:32 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], "Content-Length": [ "0" ] }, - "Content": null + "Content": null, + "isContentBase64": false } }, "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+AzureVMEnhancedWeekly+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+1": { "Request": { "Method": "PUT", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", - "Content": "{\r\n \"properties\": {\r\n \"protectedItemsCount\": 0,\r\n \"backupManagementType\": \"AzureIaasVM\",\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicyV2\",\r\n \"weeklySchedule\": {\r\n \"scheduleRunDays\": [ \"Monday\", \"Thursday\" ],\r\n \"scheduleRunTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ]\r\n },\r\n \"scheduleRunFrequency\": \"Weekly\"\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Thursday\" ],\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 12,\r\n \"durationType\": \"Weeks\"\r\n }\r\n }\r\n },\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n },\r\n \"instantRpRetentionRangeInDays\": 5,\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"policyType\": \"V2\"\r\n }\r\n}", + "Content": "{\r\n \"properties\": {\r\n \"protectedItemsCount\": 0,\r\n \"backupManagementType\": \"AzureIaasVM\",\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicyV2\",\r\n \"weeklySchedule\": {\r\n \"scheduleRunDays\": [ \"Monday\", \"Thursday\" ],\r\n \"scheduleRunTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ]\r\n },\r\n \"scheduleRunFrequency\": \"Weekly\"\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Thursday\" ],\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 12,\r\n \"durationType\": \"Weeks\"\r\n }\r\n }\r\n },\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n },\r\n \"instantRpRetentionRangeInDays\": 5,\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"policyType\": \"V2\"\r\n }\r\n}", + "isContentBase64": false, "Headers": { }, "ContentHeaders": { @@ -133,22 +140,23 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "57d64c41-dad9-4d60-b380-b4304fc6d9c9" ], - "x-ms-client-request-id": [ "416ca5ee-7d01-4157-b65f-23b86bc39a36", "416ca5ee-7d01-4157-b65f-23b86bc39a36" ], + "x-ms-request-id": [ "85d5fafd-0062-4872-a751-069e96b20daa" ], + "x-ms-client-request-id": [ "4806ad0a-fe4e-4840-afa1-210b59c6b545", "4806ad0a-fe4e-4840-afa1-210b59c6b545" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1192" ], - "x-ms-correlation-request-id": [ "57d64c41-dad9-4d60-b380-b4304fc6d9c9" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160408Z:57d64c41-dad9-4d60-b380-b4304fc6d9c9" ], - "Date": [ "Mon, 26 Jun 2023 16:04:07 GMT" ] + "x-ms-correlation-request-id": [ "85d5fafd-0062-4872-a751-069e96b20daa" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051334Z:85d5fafd-0062-4872-a751-069e96b20daa" ], + "Date": [ "Mon, 03 Jul 2023 05:13:34 GMT" ] }, "ContentHeaders": { "Content-Length": [ "971" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V2\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicyV2\",\"scheduleRunFrequency\":\"Weekly\",\"weeklySchedule\":{\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-06-26T13:30:00Z\"]}},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":12,\"durationType\":\"Weeks\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":5,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}" + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V2\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicyV2\",\"scheduleRunFrequency\":\"Weekly\",\"weeklySchedule\":{\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-07-03T13:30:00Z\"]}},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":12,\"durationType\":\"Weeks\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":5,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}", + "isContentBase64": false } }, "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+AzureVMEnhancedWeekly+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+2": { @@ -156,13 +164,14 @@ "Method": "GET", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", "Content": null, + "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "23" ], - "x-ms-client-request-id": [ "642be1cb-eef3-48b4-9ed2-53ab0d634113" ], + "x-ms-client-request-id": [ "d94f8201-de66-472a-88a0-baf990a4513f" ], "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -174,22 +183,23 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "e101963b-96c2-4ca1-a073-0e217b5101ce" ], - "x-ms-client-request-id": [ "642be1cb-eef3-48b4-9ed2-53ab0d634113", "642be1cb-eef3-48b4-9ed2-53ab0d634113" ], + "x-ms-request-id": [ "bac27b2a-67a3-4aea-959d-fa93d88aefd5" ], + "x-ms-client-request-id": [ "d94f8201-de66-472a-88a0-baf990a4513f", "d94f8201-de66-472a-88a0-baf990a4513f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "292" ], - "x-ms-correlation-request-id": [ "e101963b-96c2-4ca1-a073-0e217b5101ce" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160409Z:e101963b-96c2-4ca1-a073-0e217b5101ce" ], - "Date": [ "Mon, 26 Jun 2023 16:04:08 GMT" ] + "x-ms-correlation-request-id": [ "bac27b2a-67a3-4aea-959d-fa93d88aefd5" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051335Z:bac27b2a-67a3-4aea-959d-fa93d88aefd5" ], + "Date": [ "Mon, 03 Jul 2023 05:13:34 GMT" ] }, "ContentHeaders": { "Content-Length": [ "971" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V2\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicyV2\",\"scheduleRunFrequency\":\"Weekly\",\"weeklySchedule\":{\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-06-26T13:30:00Z\"]}},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":12,\"durationType\":\"Weeks\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":5,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}" + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V2\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicyV2\",\"scheduleRunFrequency\":\"Weekly\",\"weeklySchedule\":{\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-07-03T13:30:00Z\"]}},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":12,\"durationType\":\"Weeks\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":5,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}", + "isContentBase64": false } }, "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+AzureVMEnhancedWeekly+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+3": { @@ -197,13 +207,14 @@ "Method": "DELETE", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", "Content": null, + "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "24" ], - "x-ms-client-request-id": [ "c8374d5e-b8d8-416c-a9c6-4b51ac10cc43" ], + "x-ms-client-request-id": [ "a7273d87-e23e-42e9-bfe1-f07ecf4cd9e7" ], "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -215,27 +226,29 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "5edd9644-511c-495f-a601-1eade03de67a" ], - "x-ms-client-request-id": [ "c8374d5e-b8d8-416c-a9c6-4b51ac10cc43", "c8374d5e-b8d8-416c-a9c6-4b51ac10cc43" ], + "x-ms-request-id": [ "05c48148-5da1-4aae-a460-611aa7eabc0b" ], + "x-ms-client-request-id": [ "a7273d87-e23e-42e9-bfe1-f07ecf4cd9e7", "a7273d87-e23e-42e9-bfe1-f07ecf4cd9e7" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14992" ], - "x-ms-correlation-request-id": [ "5edd9644-511c-495f-a601-1eade03de67a" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160410Z:5edd9644-511c-495f-a601-1eade03de67a" ], - "Date": [ "Mon, 26 Jun 2023 16:04:09 GMT" ] + "x-ms-correlation-request-id": [ "05c48148-5da1-4aae-a460-611aa7eabc0b" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051336Z:05c48148-5da1-4aae-a460-611aa7eabc0b" ], + "Date": [ "Mon, 03 Jul 2023 05:13:36 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], "Content-Length": [ "0" ] }, - "Content": null + "Content": null, + "isContentBase64": false } }, "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+AzureVMEnhancedHourly+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+1": { "Request": { "Method": "PUT", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", - "Content": "{\r\n \"properties\": {\r\n \"protectedItemsCount\": 0,\r\n \"backupManagementType\": \"AzureIaasVM\",\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicyV2\",\r\n \"scheduleRunFrequency\": \"Hourly\",\r\n \"hourlySchedule\": {\r\n \"interval\": 4,\r\n \"scheduleWindowStartTime\": \"2023-06-26T13:30:00.0000000Z\",\r\n \"scheduleWindowDuration\": 24\r\n }\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 180,\r\n \"durationType\": \"Days\"\r\n }\r\n }\r\n },\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n },\r\n \"instantRpRetentionRangeInDays\": 7,\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"policyType\": \"V2\"\r\n }\r\n}", + "Content": "{\r\n \"properties\": {\r\n \"protectedItemsCount\": 0,\r\n \"backupManagementType\": \"AzureIaasVM\",\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicyV2\",\r\n \"scheduleRunFrequency\": \"Hourly\",\r\n \"hourlySchedule\": {\r\n \"interval\": 4,\r\n \"scheduleWindowStartTime\": \"2023-07-03T13:30:00.0000000Z\",\r\n \"scheduleWindowDuration\": 24\r\n }\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 180,\r\n \"durationType\": \"Days\"\r\n }\r\n }\r\n },\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n },\r\n \"instantRpRetentionRangeInDays\": 7,\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"policyType\": \"V2\"\r\n }\r\n}", + "isContentBase64": false, "Headers": { }, "ContentHeaders": { @@ -249,22 +262,23 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "e5b1058c-5bb7-4d79-844e-b5bff16dc32a" ], - "x-ms-client-request-id": [ "21bb53c4-7f6e-4216-9bed-c984256a39bd", "21bb53c4-7f6e-4216-9bed-c984256a39bd" ], + "x-ms-request-id": [ "bf73dfb1-61f0-4251-8186-39691bd77f7c" ], + "x-ms-client-request-id": [ "8b1dba79-1f83-420e-a01f-a1b7f32fa544", "8b1dba79-1f83-420e-a01f-a1b7f32fa544" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1191" ], - "x-ms-correlation-request-id": [ "e5b1058c-5bb7-4d79-844e-b5bff16dc32a" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160411Z:e5b1058c-5bb7-4d79-844e-b5bff16dc32a" ], - "Date": [ "Mon, 26 Jun 2023 16:04:10 GMT" ] + "x-ms-correlation-request-id": [ "bf73dfb1-61f0-4251-8186-39691bd77f7c" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051338Z:bf73dfb1-61f0-4251-8186-39691bd77f7c" ], + "Date": [ "Mon, 03 Jul 2023 05:13:37 GMT" ] }, "ContentHeaders": { "Content-Length": [ "938" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V2\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicyV2\",\"scheduleRunFrequency\":\"Hourly\",\"hourlySchedule\":{\"interval\":4,\"scheduleWindowStartTime\":\"2023-06-26T13:30:00Z\",\"scheduleWindowDuration\":24}},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":7,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}" + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V2\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicyV2\",\"scheduleRunFrequency\":\"Hourly\",\"hourlySchedule\":{\"interval\":4,\"scheduleWindowStartTime\":\"2023-07-03T13:30:00Z\",\"scheduleWindowDuration\":24}},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":7,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}", + "isContentBase64": false } }, "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+AzureVMEnhancedHourly+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+2": { @@ -272,13 +286,14 @@ "Method": "GET", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", "Content": null, + "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "26" ], - "x-ms-client-request-id": [ "345bc641-a8f9-4820-936c-62ffe273ae8e" ], + "x-ms-client-request-id": [ "0d98030c-7c99-4b02-89e9-5d5a16fcd7e7" ], "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -290,22 +305,23 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "d2917739-3ffc-4b11-ad46-be82bb789118" ], - "x-ms-client-request-id": [ "345bc641-a8f9-4820-936c-62ffe273ae8e", "345bc641-a8f9-4820-936c-62ffe273ae8e" ], + "x-ms-request-id": [ "f2bda6ae-eff2-416e-a019-aec86a0c97d4" ], + "x-ms-client-request-id": [ "0d98030c-7c99-4b02-89e9-5d5a16fcd7e7", "0d98030c-7c99-4b02-89e9-5d5a16fcd7e7" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "291" ], - "x-ms-correlation-request-id": [ "d2917739-3ffc-4b11-ad46-be82bb789118" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160412Z:d2917739-3ffc-4b11-ad46-be82bb789118" ], - "Date": [ "Mon, 26 Jun 2023 16:04:11 GMT" ] + "x-ms-correlation-request-id": [ "f2bda6ae-eff2-416e-a019-aec86a0c97d4" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051338Z:f2bda6ae-eff2-416e-a019-aec86a0c97d4" ], + "Date": [ "Mon, 03 Jul 2023 05:13:38 GMT" ] }, "ContentHeaders": { "Content-Length": [ "938" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V2\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicyV2\",\"scheduleRunFrequency\":\"Hourly\",\"hourlySchedule\":{\"interval\":4,\"scheduleWindowStartTime\":\"2023-06-26T13:30:00Z\",\"scheduleWindowDuration\":24}},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":7,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}" + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V2\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicyV2\",\"scheduleRunFrequency\":\"Hourly\",\"hourlySchedule\":{\"interval\":4,\"scheduleWindowStartTime\":\"2023-07-03T13:30:00Z\",\"scheduleWindowDuration\":24}},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":7,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}", + "isContentBase64": false } }, "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+AzureVMEnhancedHourly+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+3": { @@ -313,13 +329,14 @@ "Method": "DELETE", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", "Content": null, + "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "27" ], - "x-ms-client-request-id": [ "a34ca890-05f8-4d85-ba65-275eaba33875" ], + "x-ms-client-request-id": [ "8c412f28-31c9-4f1c-9d9f-59f773b0a9b9" ], "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -331,27 +348,29 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "b400b9c9-b83d-45bc-86dc-585d84564e37" ], - "x-ms-client-request-id": [ "a34ca890-05f8-4d85-ba65-275eaba33875", "a34ca890-05f8-4d85-ba65-275eaba33875" ], + "x-ms-request-id": [ "0c16b536-9325-49a1-97e2-b9fca523c948" ], + "x-ms-client-request-id": [ "8c412f28-31c9-4f1c-9d9f-59f773b0a9b9", "8c412f28-31c9-4f1c-9d9f-59f773b0a9b9" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14991" ], - "x-ms-correlation-request-id": [ "b400b9c9-b83d-45bc-86dc-585d84564e37" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160413Z:b400b9c9-b83d-45bc-86dc-585d84564e37" ], - "Date": [ "Mon, 26 Jun 2023 16:04:12 GMT" ] + "x-ms-correlation-request-id": [ "0c16b536-9325-49a1-97e2-b9fca523c948" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051340Z:0c16b536-9325-49a1-97e2-b9fca523c948" ], + "Date": [ "Mon, 03 Jul 2023 05:13:39 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], "Content-Length": [ "0" ] }, - "Content": null + "Content": null, + "isContentBase64": false } }, "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+SAPHANADailyFull+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+1": { "Request": { "Method": "PUT", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", - "Content": "{\r\n \"properties\": {\r\n \"backupManagementType\": \"AzureWorkload\",\r\n \"workLoadType\": \"SAPHanaDatabase\",\r\n \"settings\": {\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"issqlcompression\": false,\r\n \"isCompression\": false\r\n },\r\n \"subProtectionPolicy\": [\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Daily\",\r\n \"scheduleRunTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 180,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 104,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 60,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"January\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 10,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"policyType\": \"Full\",\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n }\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"LogSchedulePolicy\",\r\n \"scheduleFrequencyInMins\": 120\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 15,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Log\"\r\n }\r\n ]\r\n }\r\n}", + "Content": "{\r\n \"properties\": {\r\n \"backupManagementType\": \"AzureWorkload\",\r\n \"workLoadType\": \"SAPHanaDatabase\",\r\n \"settings\": {\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"issqlcompression\": false,\r\n \"isCompression\": false\r\n },\r\n \"subProtectionPolicy\": [\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Daily\",\r\n \"scheduleRunTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 180,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 104,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 60,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"January\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 10,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"policyType\": \"Full\",\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n }\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"LogSchedulePolicy\",\r\n \"scheduleFrequencyInMins\": 120\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 15,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Log\"\r\n }\r\n ]\r\n }\r\n}", + "isContentBase64": false, "Headers": { }, "ContentHeaders": { @@ -365,22 +384,23 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "7613100d-2c72-4f40-8777-5220ba5a013e" ], - "x-ms-client-request-id": [ "02844323-6d19-432d-9656-85fd0afbae80", "02844323-6d19-432d-9656-85fd0afbae80" ], + "x-ms-request-id": [ "98cdec5b-0043-4bec-9509-d6bfae0f8405" ], + "x-ms-client-request-id": [ "71df748b-11ef-45c3-9003-87955d54bc6f", "71df748b-11ef-45c3-9003-87955d54bc6f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1190" ], - "x-ms-correlation-request-id": [ "7613100d-2c72-4f40-8777-5220ba5a013e" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160414Z:7613100d-2c72-4f40-8777-5220ba5a013e" ], - "Date": [ "Mon, 26 Jun 2023 16:04:13 GMT" ] + "x-ms-correlation-request-id": [ "98cdec5b-0043-4bec-9509-d6bfae0f8405" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051341Z:98cdec5b-0043-4bec-9509-d6bfae0f8405" ], + "Date": [ "Mon, 03 Jul 2023 05:13:40 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1849" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-06-26T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}" + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-07-03T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", + "isContentBase64": false } }, "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+SAPHANADailyFull+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+2": { @@ -388,13 +408,14 @@ "Method": "GET", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", "Content": null, + "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "29" ], - "x-ms-client-request-id": [ "8d0835de-56b1-4a65-ab56-3851ffdcf958" ], + "x-ms-client-request-id": [ "ea944b94-4b9e-4c4d-8d62-65dd276d88a1" ], "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -406,22 +427,23 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "da3628df-5507-45cc-9623-14c243145ee2" ], - "x-ms-client-request-id": [ "8d0835de-56b1-4a65-ab56-3851ffdcf958", "8d0835de-56b1-4a65-ab56-3851ffdcf958" ], + "x-ms-request-id": [ "38a65a51-a25a-4702-bbd1-dff57eb23d7d" ], + "x-ms-client-request-id": [ "ea944b94-4b9e-4c4d-8d62-65dd276d88a1", "ea944b94-4b9e-4c4d-8d62-65dd276d88a1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "290" ], - "x-ms-correlation-request-id": [ "da3628df-5507-45cc-9623-14c243145ee2" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160415Z:da3628df-5507-45cc-9623-14c243145ee2" ], - "Date": [ "Mon, 26 Jun 2023 16:04:14 GMT" ] + "x-ms-correlation-request-id": [ "38a65a51-a25a-4702-bbd1-dff57eb23d7d" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051342Z:38a65a51-a25a-4702-bbd1-dff57eb23d7d" ], + "Date": [ "Mon, 03 Jul 2023 05:13:41 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1849" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-06-26T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}" + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-07-03T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", + "isContentBase64": false } }, "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+SAPHANADailyFull+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+3": { @@ -429,13 +451,14 @@ "Method": "DELETE", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", "Content": null, + "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "30" ], - "x-ms-client-request-id": [ "5239b47b-beee-4087-b506-30408e322a36" ], + "x-ms-client-request-id": [ "fc17cc8b-211d-49e6-8dc2-0876189571c6" ], "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -447,27 +470,29 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "ab794c31-6627-4a0f-a430-a50eacd60408" ], - "x-ms-client-request-id": [ "5239b47b-beee-4087-b506-30408e322a36", "5239b47b-beee-4087-b506-30408e322a36" ], + "x-ms-request-id": [ "606058a4-9f91-4119-8029-5c9f0106a6a5" ], + "x-ms-client-request-id": [ "fc17cc8b-211d-49e6-8dc2-0876189571c6", "fc17cc8b-211d-49e6-8dc2-0876189571c6" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14990" ], - "x-ms-correlation-request-id": [ "ab794c31-6627-4a0f-a430-a50eacd60408" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160416Z:ab794c31-6627-4a0f-a430-a50eacd60408" ], - "Date": [ "Mon, 26 Jun 2023 16:04:15 GMT" ] + "x-ms-correlation-request-id": [ "606058a4-9f91-4119-8029-5c9f0106a6a5" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051343Z:606058a4-9f91-4119-8029-5c9f0106a6a5" ], + "Date": [ "Mon, 03 Jul 2023 05:13:43 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], "Content-Length": [ "0" ] }, - "Content": null + "Content": null, + "isContentBase64": false } }, "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+SAPHANAWeeklyDifferential+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+1": { "Request": { "Method": "PUT", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", - "Content": "{\r\n \"properties\": {\r\n \"backupManagementType\": \"AzureWorkload\",\r\n \"workLoadType\": \"SAPHanaDatabase\",\r\n \"settings\": {\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"issqlcompression\": false,\r\n \"isCompression\": false\r\n },\r\n \"subProtectionPolicy\": [\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Monday\", \"Thursday\" ],\r\n \"scheduleRunTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Thursday\" ],\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 104,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 60,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"January\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 10,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"policyType\": \"Full\",\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n }\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"LogSchedulePolicy\",\r\n \"scheduleFrequencyInMins\": 120\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 15,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Log\"\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Tuesday\", \"Friday\" ],\r\n \"scheduleRunTimes\": [ \"2023-06-26T02:00:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 30,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Differential\"\r\n }\r\n ]\r\n }\r\n}", + "Content": "{\r\n \"properties\": {\r\n \"backupManagementType\": \"AzureWorkload\",\r\n \"workLoadType\": \"SAPHanaDatabase\",\r\n \"settings\": {\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"issqlcompression\": false,\r\n \"isCompression\": false\r\n },\r\n \"subProtectionPolicy\": [\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Monday\", \"Thursday\" ],\r\n \"scheduleRunTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Thursday\" ],\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 104,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 60,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"January\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 10,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"policyType\": \"Full\",\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n }\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"LogSchedulePolicy\",\r\n \"scheduleFrequencyInMins\": 120\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 15,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Log\"\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Tuesday\", \"Friday\" ],\r\n \"scheduleRunTimes\": [ \"2023-07-03T02:00:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 30,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Differential\"\r\n }\r\n ]\r\n }\r\n}", + "isContentBase64": false, "Headers": { }, "ContentHeaders": { @@ -481,22 +506,23 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "9ef08c04-2e32-4448-b844-dea0ceb18a2a" ], - "x-ms-client-request-id": [ "c29f606e-70fa-4452-b8b4-a0e0da92edf0", "c29f606e-70fa-4452-b8b4-a0e0da92edf0" ], + "x-ms-request-id": [ "da056d66-6703-4ac7-bfa6-cd2464deb4ab" ], + "x-ms-client-request-id": [ "ab6b89df-1c00-4aa9-b9f1-8d61638f4f28", "ab6b89df-1c00-4aa9-b9f1-8d61638f4f28" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1189" ], - "x-ms-correlation-request-id": [ "9ef08c04-2e32-4448-b844-dea0ceb18a2a" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160417Z:9ef08c04-2e32-4448-b844-dea0ceb18a2a" ], - "Date": [ "Mon, 26 Jun 2023 16:04:16 GMT" ] + "x-ms-correlation-request-id": [ "da056d66-6703-4ac7-bfa6-cd2464deb4ab" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051345Z:da056d66-6703-4ac7-bfa6-cd2464deb4ab" ], + "Date": [ "Mon, 03 Jul 2023 05:13:44 GMT" ] }, "ContentHeaders": { "Content-Length": [ "2142" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-06-26T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Differential\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Tuesday\",\"Friday\"],\"scheduleRunTimes\":[\"2023-06-26T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}" + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-07-03T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Differential\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Tuesday\",\"Friday\"],\"scheduleRunTimes\":[\"2023-07-03T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", + "isContentBase64": false } }, "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+SAPHANAWeeklyDifferential+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+2": { @@ -504,13 +530,14 @@ "Method": "GET", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", "Content": null, + "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "32" ], - "x-ms-client-request-id": [ "71da2006-90e1-4428-a29e-1034f2f823ac" ], + "x-ms-client-request-id": [ "cc6f75e1-510a-4e9c-835e-d9c53318e08f" ], "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -522,22 +549,23 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "96737f25-d4e7-4b8b-a52f-88b5d55f4807" ], - "x-ms-client-request-id": [ "71da2006-90e1-4428-a29e-1034f2f823ac", "71da2006-90e1-4428-a29e-1034f2f823ac" ], + "x-ms-request-id": [ "f33eca12-4332-4ce7-b853-d48299e0aa6d" ], + "x-ms-client-request-id": [ "cc6f75e1-510a-4e9c-835e-d9c53318e08f", "cc6f75e1-510a-4e9c-835e-d9c53318e08f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "289" ], - "x-ms-correlation-request-id": [ "96737f25-d4e7-4b8b-a52f-88b5d55f4807" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160418Z:96737f25-d4e7-4b8b-a52f-88b5d55f4807" ], - "Date": [ "Mon, 26 Jun 2023 16:04:17 GMT" ] + "x-ms-correlation-request-id": [ "f33eca12-4332-4ce7-b853-d48299e0aa6d" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051346Z:f33eca12-4332-4ce7-b853-d48299e0aa6d" ], + "Date": [ "Mon, 03 Jul 2023 05:13:45 GMT" ] }, "ContentHeaders": { "Content-Length": [ "2142" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-06-26T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Differential\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Tuesday\",\"Friday\"],\"scheduleRunTimes\":[\"2023-06-26T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}" + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-07-03T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Differential\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Tuesday\",\"Friday\"],\"scheduleRunTimes\":[\"2023-07-03T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", + "isContentBase64": false } }, "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+SAPHANAWeeklyDifferential+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+3": { @@ -545,13 +573,14 @@ "Method": "DELETE", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", "Content": null, + "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "33" ], - "x-ms-client-request-id": [ "0cc09140-7a54-4a44-9c5d-97e80a3d036f" ], + "x-ms-client-request-id": [ "dc4cca86-9ef4-461d-b48b-b261f895c3a1" ], "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -563,27 +592,29 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "e882ba46-0ab7-4d87-8ff8-f74a5e6805da" ], - "x-ms-client-request-id": [ "0cc09140-7a54-4a44-9c5d-97e80a3d036f", "0cc09140-7a54-4a44-9c5d-97e80a3d036f" ], + "x-ms-request-id": [ "d2aadfde-74a6-4f35-a43e-908735bc83b1" ], + "x-ms-client-request-id": [ "dc4cca86-9ef4-461d-b48b-b261f895c3a1", "dc4cca86-9ef4-461d-b48b-b261f895c3a1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14989" ], - "x-ms-correlation-request-id": [ "e882ba46-0ab7-4d87-8ff8-f74a5e6805da" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160419Z:e882ba46-0ab7-4d87-8ff8-f74a5e6805da" ], - "Date": [ "Mon, 26 Jun 2023 16:04:19 GMT" ] + "x-ms-correlation-request-id": [ "d2aadfde-74a6-4f35-a43e-908735bc83b1" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051347Z:d2aadfde-74a6-4f35-a43e-908735bc83b1" ], + "Date": [ "Mon, 03 Jul 2023 05:13:46 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], "Content-Length": [ "0" ] }, - "Content": null + "Content": null, + "isContentBase64": false } }, "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+SAPHANWeeklyIncremental+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+1": { "Request": { "Method": "PUT", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", - "Content": "{\r\n \"properties\": {\r\n \"backupManagementType\": \"AzureWorkload\",\r\n \"workLoadType\": \"SAPHanaDatabase\",\r\n \"settings\": {\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"issqlcompression\": false,\r\n \"isCompression\": false\r\n },\r\n \"subProtectionPolicy\": [\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Monday\", \"Thursday\" ],\r\n \"scheduleRunTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Thursday\" ],\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 104,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 60,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"January\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-06-26T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 10,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"policyType\": \"Full\",\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n }\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"LogSchedulePolicy\",\r\n \"scheduleFrequencyInMins\": 120\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 15,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Log\"\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Tuesday\", \"Friday\" ],\r\n \"scheduleRunTimes\": [ \"2023-06-26T02:00:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 30,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Incremental\"\r\n }\r\n ]\r\n }\r\n}", + "Content": "{\r\n \"properties\": {\r\n \"backupManagementType\": \"AzureWorkload\",\r\n \"workLoadType\": \"SAPHanaDatabase\",\r\n \"settings\": {\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"issqlcompression\": false,\r\n \"isCompression\": false\r\n },\r\n \"subProtectionPolicy\": [\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Monday\", \"Thursday\" ],\r\n \"scheduleRunTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Thursday\" ],\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 104,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 60,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"January\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 10,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"policyType\": \"Full\",\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n }\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"LogSchedulePolicy\",\r\n \"scheduleFrequencyInMins\": 120\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 15,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Log\"\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Tuesday\", \"Friday\" ],\r\n \"scheduleRunTimes\": [ \"2023-07-03T02:00:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 30,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Incremental\"\r\n }\r\n ]\r\n }\r\n}", + "isContentBase64": false, "Headers": { }, "ContentHeaders": { @@ -597,22 +628,23 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "b2d6e946-6ce7-4804-9a9d-802e016f4132" ], - "x-ms-client-request-id": [ "8dc64b63-0b86-4e17-8a99-9cffc515bb42", "8dc64b63-0b86-4e17-8a99-9cffc515bb42" ], + "x-ms-request-id": [ "02b76db0-9c36-437c-9d81-39412a1a032c" ], + "x-ms-client-request-id": [ "58bb4599-48cb-4172-95eb-001b1e96bf60", "58bb4599-48cb-4172-95eb-001b1e96bf60" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1188" ], - "x-ms-correlation-request-id": [ "b2d6e946-6ce7-4804-9a9d-802e016f4132" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160420Z:b2d6e946-6ce7-4804-9a9d-802e016f4132" ], - "Date": [ "Mon, 26 Jun 2023 16:04:20 GMT" ] + "x-ms-correlation-request-id": [ "02b76db0-9c36-437c-9d81-39412a1a032c" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051348Z:02b76db0-9c36-437c-9d81-39412a1a032c" ], + "Date": [ "Mon, 03 Jul 2023 05:13:48 GMT" ] }, "ContentHeaders": { "Content-Length": [ "2141" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-06-26T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Incremental\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Tuesday\",\"Friday\"],\"scheduleRunTimes\":[\"2023-06-26T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}" + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-07-03T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Incremental\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Tuesday\",\"Friday\"],\"scheduleRunTimes\":[\"2023-07-03T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", + "isContentBase64": false } }, "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+SAPHANWeeklyIncremental+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+2": { @@ -620,13 +652,14 @@ "Method": "GET", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", "Content": null, + "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "35" ], - "x-ms-client-request-id": [ "091539ff-2879-402c-a95a-df1da939db56" ], + "x-ms-client-request-id": [ "15ffcef3-67a4-46d9-97fc-6975d16710c0" ], "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -638,22 +671,23 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "d8381c97-40db-4391-b21e-f574ba52fa6d" ], - "x-ms-client-request-id": [ "091539ff-2879-402c-a95a-df1da939db56", "091539ff-2879-402c-a95a-df1da939db56" ], + "x-ms-request-id": [ "52c9b3c0-f5a8-436b-b8d7-893b339277eb" ], + "x-ms-client-request-id": [ "15ffcef3-67a4-46d9-97fc-6975d16710c0", "15ffcef3-67a4-46d9-97fc-6975d16710c0" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "288" ], - "x-ms-correlation-request-id": [ "d8381c97-40db-4391-b21e-f574ba52fa6d" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160421Z:d8381c97-40db-4391-b21e-f574ba52fa6d" ], - "Date": [ "Mon, 26 Jun 2023 16:04:21 GMT" ] + "x-ms-correlation-request-id": [ "52c9b3c0-f5a8-436b-b8d7-893b339277eb" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051349Z:52c9b3c0-f5a8-436b-b8d7-893b339277eb" ], + "Date": [ "Mon, 03 Jul 2023 05:13:48 GMT" ] }, "ContentHeaders": { "Content-Length": [ "2141" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-06-26T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Incremental\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Tuesday\",\"Friday\"],\"scheduleRunTimes\":[\"2023-06-26T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}" + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-07-03T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Incremental\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Tuesday\",\"Friday\"],\"scheduleRunTimes\":[\"2023-07-03T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", + "isContentBase64": false } }, "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+SAPHANWeeklyIncremental+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+3": { @@ -661,13 +695,14 @@ "Method": "DELETE", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", "Content": null, + "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "36" ], - "x-ms-client-request-id": [ "6943e13a-22e0-4554-b536-82a05bd20374" ], + "x-ms-client-request-id": [ "c5afc372-8234-4d1a-b9b5-98e7f1b1070c" ], "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -679,27 +714,29 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "bc92081f-0dfd-4af4-8242-a6d8ae924c84" ], - "x-ms-client-request-id": [ "6943e13a-22e0-4554-b536-82a05bd20374", "6943e13a-22e0-4554-b536-82a05bd20374" ], + "x-ms-request-id": [ "ee583189-5a6a-4043-a32e-98848e863124" ], + "x-ms-client-request-id": [ "c5afc372-8234-4d1a-b9b5-98e7f1b1070c", "c5afc372-8234-4d1a-b9b5-98e7f1b1070c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14988" ], - "x-ms-correlation-request-id": [ "bc92081f-0dfd-4af4-8242-a6d8ae924c84" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160422Z:bc92081f-0dfd-4af4-8242-a6d8ae924c84" ], - "Date": [ "Mon, 26 Jun 2023 16:04:22 GMT" ] + "x-ms-correlation-request-id": [ "ee583189-5a6a-4043-a32e-98848e863124" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051351Z:ee583189-5a6a-4043-a32e-98848e863124" ], + "Date": [ "Mon, 03 Jul 2023 05:13:50 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], "Content-Length": [ "0" ] }, - "Content": null + "Content": null, + "isContentBase64": false } }, "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+SAPHANALog+$PUT+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+1": { "Request": { "Method": "PUT", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", - "Content": "{\r\n \"properties\": {\r\n \"backupManagementType\": \"AzureWorkload\",\r\n \"workLoadType\": \"SAPHanaDatabase\",\r\n \"settings\": {\r\n \"timeZone\": \"UTC\",\r\n \"issqlcompression\": false,\r\n \"isCompression\": false\r\n },\r\n \"subProtectionPolicy\": [\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Daily\",\r\n \"scheduleRunTimes\": [ \"2023-06-26T19:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2023-06-26T19:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 180,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"retentionTimes\": [ \"2023-06-26T19:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 104,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-06-26T19:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 60,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"January\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-06-26T19:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 10,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"policyType\": \"Full\",\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n }\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"LogSchedulePolicy\",\r\n \"scheduleFrequencyInMins\": 120\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 15,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Log\"\r\n }\r\n ]\r\n }\r\n}", + "Content": "{\r\n \"properties\": {\r\n \"backupManagementType\": \"AzureWorkload\",\r\n \"workLoadType\": \"SAPHanaDatabase\",\r\n \"settings\": {\r\n \"timeZone\": \"UTC\",\r\n \"issqlcompression\": false,\r\n \"isCompression\": false\r\n },\r\n \"subProtectionPolicy\": [\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Daily\",\r\n \"scheduleRunTimes\": [ \"2023-07-03T19:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2023-07-03T19:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 180,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"retentionTimes\": [ \"2023-07-03T19:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 104,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-07-03T19:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 60,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"January\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-07-03T19:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 10,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"policyType\": \"Full\",\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n }\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"LogSchedulePolicy\",\r\n \"scheduleFrequencyInMins\": 120\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 15,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Log\"\r\n }\r\n ]\r\n }\r\n}", + "isContentBase64": false, "Headers": { }, "ContentHeaders": { @@ -713,22 +750,23 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "b169ebba-57b2-47da-b7a8-713e67f4d00f" ], - "x-ms-client-request-id": [ "a9527b0d-2767-4696-9784-c643347a2b6a", "a9527b0d-2767-4696-9784-c643347a2b6a" ], + "x-ms-request-id": [ "8b0fd482-183d-41d4-98fe-14422bdc63b1" ], + "x-ms-client-request-id": [ "f3892fca-3f7d-4e8c-9d02-aa204470e897", "f3892fca-3f7d-4e8c-9d02-aa204470e897" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1187" ], - "x-ms-correlation-request-id": [ "b169ebba-57b2-47da-b7a8-713e67f4d00f" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160423Z:b169ebba-57b2-47da-b7a8-713e67f4d00f" ], - "Date": [ "Mon, 26 Jun 2023 16:04:23 GMT" ] + "x-ms-correlation-request-id": [ "8b0fd482-183d-41d4-98fe-14422bdc63b1" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051352Z:8b0fd482-183d-41d4-98fe-14422bdc63b1" ], + "Date": [ "Mon, 03 Jul 2023 05:13:51 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1833" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-06-26T19:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-06-26T19:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-06-26T19:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T19:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T19:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}" + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-07-03T19:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-07-03T19:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-07-03T19:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T19:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T19:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", + "isContentBase64": false } }, "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+SAPHANALog+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+2": { @@ -736,13 +774,14 @@ "Method": "GET", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", "Content": null, + "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "38" ], - "x-ms-client-request-id": [ "7b95b574-9b82-4ac2-8f3c-cac656e6b2d8" ], + "x-ms-client-request-id": [ "debfe5e8-de75-4f7f-b980-96f2442056a5" ], "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -754,22 +793,23 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "f4e9828e-f527-40a0-9529-16efd280cf3d" ], - "x-ms-client-request-id": [ "7b95b574-9b82-4ac2-8f3c-cac656e6b2d8", "7b95b574-9b82-4ac2-8f3c-cac656e6b2d8" ], + "x-ms-request-id": [ "08da4969-537e-4d36-a7c7-dcf2b232b9b0" ], + "x-ms-client-request-id": [ "debfe5e8-de75-4f7f-b980-96f2442056a5", "debfe5e8-de75-4f7f-b980-96f2442056a5" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Microsoft-IIS/10.0" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "287" ], - "x-ms-correlation-request-id": [ "f4e9828e-f527-40a0-9529-16efd280cf3d" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160424Z:f4e9828e-f527-40a0-9529-16efd280cf3d" ], - "Date": [ "Mon, 26 Jun 2023 16:04:24 GMT" ] + "x-ms-correlation-request-id": [ "08da4969-537e-4d36-a7c7-dcf2b232b9b0" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051353Z:08da4969-537e-4d36-a7c7-dcf2b232b9b0" ], + "Date": [ "Mon, 03 Jul 2023 05:13:52 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1833" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-06-26T19:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-06-26T19:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-06-26T19:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T19:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-06-26T19:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}" + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-07-03T19:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-07-03T19:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-07-03T19:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T19:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T19:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", + "isContentBase64": false } }, "Edit-AzRecoveryServicesBackupSchedulePolicyClientObject+[NoContext]+SAPHANALog+$DELETE+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01+3": { @@ -777,13 +817,14 @@ "Method": "DELETE", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", "Content": null, + "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "39" ], - "x-ms-client-request-id": [ "cedb565e-548f-4efc-9382-9622d0487407" ], + "x-ms-client-request-id": [ "649dfda1-a4b1-4bc9-b945-3829bccf6caf" ], "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -795,20 +836,21 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "0a92e0ad-b7ff-4f95-aba0-5368186b6259" ], - "x-ms-client-request-id": [ "cedb565e-548f-4efc-9382-9622d0487407", "cedb565e-548f-4efc-9382-9622d0487407" ], + "x-ms-request-id": [ "39ace9e6-9b33-43fd-90b7-e835f52a691e" ], + "x-ms-client-request-id": [ "649dfda1-a4b1-4bc9-b945-3829bccf6caf", "649dfda1-a4b1-4bc9-b945-3829bccf6caf" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14987" ], - "x-ms-correlation-request-id": [ "0a92e0ad-b7ff-4f95-aba0-5368186b6259" ], - "x-ms-routing-request-id": [ "JIOINDIACENTRAL:20230626T160425Z:0a92e0ad-b7ff-4f95-aba0-5368186b6259" ], - "Date": [ "Mon, 26 Jun 2023 16:04:25 GMT" ] + "x-ms-correlation-request-id": [ "39ace9e6-9b33-43fd-90b7-e835f52a691e" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051354Z:39ace9e6-9b33-43fd-90b7-e835f52a691e" ], + "Date": [ "Mon, 03 Jul 2023 05:13:53 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], "Content-Length": [ "0" ] }, - "Content": null + "Content": null, + "isContentBase64": false } } } \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Export-AzRecoveryServicesJob.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Export-AzRecoveryServicesJob.Tests.ps1 deleted file mode 100644 index 3e647970bc35..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Export-AzRecoveryServicesJob.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Export-AzRecoveryServicesJob')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Export-AzRecoveryServicesJob.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Export-AzRecoveryServicesJob' { - It 'Export' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'ExportViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupEngine.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupEngine.Tests.ps1 deleted file mode 100644 index 56fb9973c5b5..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupEngine.Tests.ps1 +++ /dev/null @@ -1,29 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupEngine')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupEngine.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBackupEngine' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupJob.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupJob.Tests.ps1 deleted file mode 100644 index cc4f1303b7e9..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupJob.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupJob')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupJob.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBackupJob' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationResult.Tests.ps1 deleted file mode 100644 index a01f16df7ec6..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationResult.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupOperationResult')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupOperationResult.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBackupOperationResult' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationStatuses.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationStatuses.Tests.ps1 deleted file mode 100644 index f4419a086dd8..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationStatuses.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupOperationStatuses')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupOperationStatuses.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBackupOperationStatuses' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupPolicy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupPolicy.Tests.ps1 index b17e9269c29f..6aa8adfc526a 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupPolicy.Tests.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupPolicy.Tests.ps1 @@ -15,7 +15,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupP } Describe 'Get-AzRecoveryServicesBackupPolicy' { - It 'List' -skip { + It 'List' -skip { { throw [System.NotImplementedException] } | Should -Not -Throw } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectableItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectableItem.Tests.ps1 deleted file mode 100644 index cc93a66d0c6f..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectableItem.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupProtectableItem')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupProtectableItem.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBackupProtectableItem' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectedItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectedItem.Tests.ps1 deleted file mode 100644 index 4338554bed0b..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectedItem.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupProtectedItem')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupProtectedItem.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBackupProtectedItem' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionContainer.Tests.ps1 deleted file mode 100644 index 3e0f920f1660..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionContainer.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupProtectionContainer')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupProtectionContainer.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBackupProtectionContainer' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionIntent.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionIntent.Tests.ps1 deleted file mode 100644 index 295c4d3f26e2..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionIntent.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupProtectionIntent')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupProtectionIntent.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBackupProtectionIntent' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 deleted file mode 100644 index f9133a30b379..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupResourceEncryptionConfig')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupResourceEncryptionConfig.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBackupResourceEncryptionConfig' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 deleted file mode 100644 index 93a53cf7eb40..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupResourceStorageConfigsNonCrr')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBackupResourceStorageConfigsNonCrr' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 deleted file mode 100644 index 47a619ac7a8f..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupResourceVaultConfig')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupResourceVaultConfig.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBackupResourceVaultConfig' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupStatus.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupStatus.Tests.ps1 deleted file mode 100644 index 1ec2996214da..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupStatus.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupStatus')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupStatus.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBackupStatus' { - It 'GetExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupUsageSummary.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupUsageSummary.Tests.ps1 deleted file mode 100644 index 2e357373fea1..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupUsageSummary.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupUsageSummary')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupUsageSummary.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBackupUsageSummary' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupWorkloadItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupWorkloadItem.Tests.ps1 deleted file mode 100644 index d0b41bb0f525..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupWorkloadItem.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupWorkloadItem')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupWorkloadItem.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBackupWorkloadItem' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBmsPrepareDataMoveOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBmsPrepareDataMoveOperationResult.Tests.ps1 deleted file mode 100644 index 663938db20a3..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBmsPrepareDataMoveOperationResult.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBmsPrepareDataMoveOperationResult')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBmsPrepareDataMoveOperationResult.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBmsPrepareDataMoveOperationResult' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesDeletedProtectionContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesDeletedProtectionContainer.Tests.ps1 deleted file mode 100644 index 16fd005d7c19..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesDeletedProtectionContainer.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesDeletedProtectionContainer')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesDeletedProtectionContainer.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesDeletedProtectionContainer' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesExportJobsOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesExportJobsOperationResult.Tests.ps1 deleted file mode 100644 index 4e092b06c6b2..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesExportJobsOperationResult.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesExportJobsOperationResult')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesExportJobsOperationResult.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesExportJobsOperationResult' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobDetail.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobDetail.Tests.ps1 deleted file mode 100644 index 8c743816da76..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobDetail.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesJobDetail')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesJobDetail.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesJobDetail' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobOperationResult.Tests.ps1 deleted file mode 100644 index 8016c52e4ab4..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobOperationResult.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesJobOperationResult')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesJobOperationResult.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesJobOperationResult' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesOperationStatus.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesOperationStatus.Tests.ps1 deleted file mode 100644 index 3ce4cc1f02a6..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesOperationStatus.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesOperationStatus')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesOperationStatus.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesOperationStatus' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPolicyTemplate.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPolicyTemplate.Tests.ps1 index d93f16a51eac..3b9de33e16a9 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPolicyTemplate.Tests.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPolicyTemplate.Tests.ps1 @@ -15,7 +15,15 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesPolicyT } Describe 'Get-AzRecoveryServicesPolicyTemplate' { - It '__AllParameterSets' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw + It '__AllParameterSets' { + + $tempPolicy = Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM + $tempPolicy.SchedulePolicy.ScheduleRunTime[0].ToString() -eq "5/22/2023 2:00:00 PM" | Should be $true + + $tempPolicy = Get-AzRecoveryServicesPolicyTemplate -DatasourceType MSSQL + $tempPolicy.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunTime[0].ToString() -eq "9/30/2020 7:30:00 PM" + + $tempPolicy = Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA + $tempPolicy.SubProtectionPolicy[0].SchedulePolicy.ScheduleRunTime[0].ToString() -eq "9/30/2020 7:30:00 PM" } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 deleted file mode 100644 index bd9ef5c79619..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesPrivateEndpointConnection')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesPrivateEndpointConnection.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesPrivateEndpointConnection' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointOperationStatus.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointOperationStatus.Tests.ps1 deleted file mode 100644 index 9023679c7434..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointOperationStatus.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesPrivateEndpointOperationStatus')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesPrivateEndpointOperationStatus.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesPrivateEndpointOperationStatus' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectableContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectableContainer.Tests.ps1 deleted file mode 100644 index 60afb1127d3c..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectableContainer.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectableContainer')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectableContainer.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesProtectableContainer' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItem.Tests.ps1 deleted file mode 100644 index 14659a14c23d..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItem.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectedItem')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectedItem.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesProtectedItem' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationResult.Tests.ps1 deleted file mode 100644 index 9de89a47424c..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationResult.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectedItemOperationResult')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectedItemOperationResult.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesProtectedItemOperationResult' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationStatuses.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationStatuses.Tests.ps1 deleted file mode 100644 index 63de8b0a8544..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationStatuses.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectedItemOperationStatuses')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectedItemOperationStatuses.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesProtectedItemOperationStatuses' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainer.Tests.ps1 deleted file mode 100644 index bb9c9cfbcce2..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainer.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectionContainer')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectionContainer.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesProtectionContainer' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerOperationResult.Tests.ps1 deleted file mode 100644 index 7cff73ddce39..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerOperationResult.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectionContainerOperationResult')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectionContainerOperationResult.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesProtectionContainerOperationResult' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerRefreshOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerRefreshOperationResult.Tests.ps1 deleted file mode 100644 index 9c7b3c7b9efe..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerRefreshOperationResult.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectionContainerRefreshOperationResult')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectionContainerRefreshOperationResult.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesProtectionContainerRefreshOperationResult' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionIntent.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionIntent.Tests.ps1 deleted file mode 100644 index 5c59bb6f87f1..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionIntent.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectionIntent')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectionIntent.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesProtectionIntent' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicy.Tests.ps1 deleted file mode 100644 index 49a3bb0810fd..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicy.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectionPolicy')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectionPolicy.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesProtectionPolicy' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationResult.Tests.ps1 deleted file mode 100644 index 7bee802c72ed..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationResult.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectionPolicyOperationResult')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectionPolicyOperationResult.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesProtectionPolicyOperationResult' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationStatuses.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationStatuses.Tests.ps1 deleted file mode 100644 index ceaacbe6a994..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationStatuses.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectionPolicyOperationStatuses')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectionPolicyOperationStatuses.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesProtectionPolicyOperationStatuses' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPoint.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPoint.Tests.ps1 deleted file mode 100644 index bbaa479012c6..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPoint.Tests.ps1 +++ /dev/null @@ -1,29 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesRecoveryPoint')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesRecoveryPoint.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesRecoveryPoint' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPointsRecommendedForMove.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPointsRecommendedForMove.Tests.ps1 deleted file mode 100644 index cdbf447452ce..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPointsRecommendedForMove.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesRecoveryPointsRecommendedForMove')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesRecoveryPointsRecommendedForMove.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesRecoveryPointsRecommendedForMove' { - It 'ListExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesResourceGuardProxy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesResourceGuardProxy.Tests.ps1 deleted file mode 100644 index 520bf5e9928e..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesResourceGuardProxy.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesResourceGuardProxy')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesResourceGuardProxy.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesResourceGuardProxy' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Get1' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity1' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesSecurityPiN.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesSecurityPiN.Tests.ps1 deleted file mode 100644 index c9d7505dc024..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesSecurityPiN.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesSecurityPiN')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesSecurityPiN.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesSecurityPiN' { - It 'GetExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationResult.Tests.ps1 deleted file mode 100644 index 53defd3b7bb8..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationResult.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesValidateOperationResult')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesValidateOperationResult.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesValidateOperationResult' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationStatuses.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationStatuses.Tests.ps1 deleted file mode 100644 index e0cd7fee9448..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationStatuses.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesValidateOperationStatuses')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesValidateOperationStatuses.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesValidateOperationStatuses' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesInquireProtectionContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesInquireProtectionContainer.Tests.ps1 deleted file mode 100644 index c5da9cd79923..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesInquireProtectionContainer.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzRecoveryServicesInquireProtectionContainer')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzRecoveryServicesInquireProtectionContainer.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Invoke-AzRecoveryServicesInquireProtectionContainer' { - It 'Inquire' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'InquireViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesPrepare.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesPrepare.Tests.ps1 deleted file mode 100644 index ebbbbd9686e8..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesPrepare.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzRecoveryServicesPrepare')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzRecoveryServicesPrepare.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Invoke-AzRecoveryServicesPrepare' { - It 'PrepareExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Prepare' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'PrepareViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'PrepareViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Move-AzRecoveryServicesRecoveryPoint.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Move-AzRecoveryServicesRecoveryPoint.Tests.ps1 deleted file mode 100644 index 36efa8d10d03..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Move-AzRecoveryServicesRecoveryPoint.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Move-AzRecoveryServicesRecoveryPoint')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Move-AzRecoveryServicesRecoveryPoint.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Move-AzRecoveryServicesRecoveryPoint' { - It 'MoveExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Move' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'MoveViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'MoveViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 deleted file mode 100644 index 901e92ae0a5e..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'New-AzRecoveryServicesItemLevelRecoveryConnection')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzRecoveryServicesItemLevelRecoveryConnection.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'New-AzRecoveryServicesItemLevelRecoveryConnection' { - It 'ProvisionExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Provision' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'ProvisionViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'ProvisionViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectedItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectedItem.Tests.ps1 deleted file mode 100644 index 6ac679180a99..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectedItem.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'New-AzRecoveryServicesProtectedItem')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzRecoveryServicesProtectedItem.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'New-AzRecoveryServicesProtectedItem' { - It 'CreateExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'CreateViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Create' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'CreateViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectionIntent.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectionIntent.Tests.ps1 deleted file mode 100644 index 8409d04b21f1..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectionIntent.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'New-AzRecoveryServicesProtectionIntent')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzRecoveryServicesProtectionIntent.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'New-AzRecoveryServicesProtectionIntent' { - It 'CreateExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Create' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'CreateViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'CreateViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectionPolicy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectionPolicy.Tests.ps1 deleted file mode 100644 index d8ea9e9fc78d..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectionPolicy.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'New-AzRecoveryServicesProtectionPolicy')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzRecoveryServicesProtectionPolicy.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'New-AzRecoveryServicesProtectionPolicy' { - It 'CreateExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Create' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'CreateViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'CreateViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesProtectionContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesProtectionContainer.Tests.ps1 deleted file mode 100644 index 9fcdda764d2a..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesProtectionContainer.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Register-AzRecoveryServicesProtectionContainer')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Register-AzRecoveryServicesProtectionContainer.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Register-AzRecoveryServicesProtectionContainer' { - It 'RegisterExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Register' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'RegisterViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'RegisterViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 deleted file mode 100644 index c16e55a3b1da..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzRecoveryServicesPrivateEndpointConnection')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzRecoveryServicesPrivateEndpointConnection.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Remove-AzRecoveryServicesPrivateEndpointConnection' { - It 'Delete' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'DeleteViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectedItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectedItem.Tests.ps1 deleted file mode 100644 index ab5ceb1f5a91..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectedItem.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzRecoveryServicesProtectedItem')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzRecoveryServicesProtectedItem.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Remove-AzRecoveryServicesProtectedItem' { - It 'Delete' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'DeleteViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectionIntent.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectionIntent.Tests.ps1 deleted file mode 100644 index b3e5f712abfb..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectionIntent.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzRecoveryServicesProtectionIntent')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzRecoveryServicesProtectionIntent.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Remove-AzRecoveryServicesProtectionIntent' { - It 'Delete' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'DeleteViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectionPolicy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectionPolicy.Tests.ps1 deleted file mode 100644 index ecb6ec6a9b1b..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectionPolicy.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzRecoveryServicesProtectionPolicy')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzRecoveryServicesProtectionPolicy.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Remove-AzRecoveryServicesProtectionPolicy' { - It 'Delete' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'DeleteViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesResourceGuardProxy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesResourceGuardProxy.Tests.ps1 deleted file mode 100644 index 26ddee5aa073..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesResourceGuardProxy.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzRecoveryServicesResourceGuardProxy')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzRecoveryServicesResourceGuardProxy.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Remove-AzRecoveryServicesResourceGuardProxy' { - It 'Delete' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'DeleteViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Revoke-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Revoke-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 deleted file mode 100644 index c80441c4925d..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Revoke-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Revoke-AzRecoveryServicesItemLevelRecoveryConnection')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Revoke-AzRecoveryServicesItemLevelRecoveryConnection.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Revoke-AzRecoveryServicesItemLevelRecoveryConnection' { - It 'Revoke' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'RevokeViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupPolicy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupPolicy.Tests.ps1 deleted file mode 100644 index 397d218d91c1..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupPolicy.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesBackupPolicy')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesBackupPolicy.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Set-AzRecoveryServicesBackupPolicy' { - It 'UpdateExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Update' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 deleted file mode 100644 index 2fbc82ced7ed..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesBackupResourceEncryptionConfig')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesBackupResourceEncryptionConfig.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Set-AzRecoveryServicesBackupResourceEncryptionConfig' { - It 'UpdateExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Update' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 deleted file mode 100644 index 46849657debe..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesBackupResourceStorageConfigsNonCrr')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Set-AzRecoveryServicesBackupResourceStorageConfigsNonCrr' { - It 'UpdateExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Update' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 deleted file mode 100644 index 8aee2071bf53..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesBackupResourceVaultConfig')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesBackupResourceVaultConfig.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Set-AzRecoveryServicesBackupResourceVaultConfig' { - It 'PutExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Put' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 deleted file mode 100644 index 3a242f36849b..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesPrivateEndpointConnection')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesPrivateEndpointConnection.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Set-AzRecoveryServicesPrivateEndpointConnection' { - It 'PutExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Put' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectedItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectedItem.Tests.ps1 deleted file mode 100644 index d286f00a801d..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectedItem.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesProtectedItem')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesProtectedItem.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Set-AzRecoveryServicesProtectedItem' { - It 'UpdateExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Update' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectionIntent.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectionIntent.Tests.ps1 deleted file mode 100644 index cc768e442439..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectionIntent.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesProtectionIntent')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesProtectionIntent.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Set-AzRecoveryServicesProtectionIntent' { - It 'UpdateExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Update' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectionPolicy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectionPolicy.Tests.ps1 deleted file mode 100644 index 0fc681a0be3e..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectionPolicy.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesProtectionPolicy')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesProtectionPolicy.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Set-AzRecoveryServicesProtectionPolicy' { - It 'UpdateExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Update' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesResourceGuardProxy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesResourceGuardProxy.Tests.ps1 deleted file mode 100644 index 657ae5cb8747..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesResourceGuardProxy.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesResourceGuardProxy')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesResourceGuardProxy.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Set-AzRecoveryServicesResourceGuardProxy' { - It 'PutExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Put' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServices.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServices.Tests.ps1 deleted file mode 100644 index a57dfaf67aa6..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServices.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Start-AzRecoveryServices')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Start-AzRecoveryServices.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Start-AzRecoveryServices' { - It 'TriggerExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Trigger' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'TriggerViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'TriggerViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesBackup.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesBackup.Tests.ps1 deleted file mode 100644 index 0edd1eb00c9a..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesBackup.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Start-AzRecoveryServicesBackup')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Start-AzRecoveryServicesBackup.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Start-AzRecoveryServicesBackup' { - It 'TriggerExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Trigger' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'TriggerViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'TriggerViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesJobCancellation.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesJobCancellation.Tests.ps1 deleted file mode 100644 index 2b4e5ead3b20..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesJobCancellation.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Start-AzRecoveryServicesJobCancellation')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Start-AzRecoveryServicesJobCancellation.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Start-AzRecoveryServicesJobCancellation' { - It 'Trigger' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'TriggerViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesRestore.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesRestore.Tests.ps1 deleted file mode 100644 index 701f6e1e84dc..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesRestore.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Start-AzRecoveryServicesRestore')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Start-AzRecoveryServicesRestore.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Start-AzRecoveryServicesRestore' { - It 'TriggerExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Trigger' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'TriggerViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'TriggerViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesValidateOperation.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesValidateOperation.Tests.ps1 deleted file mode 100644 index f4fe76b779ab..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesValidateOperation.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Start-AzRecoveryServicesValidateOperation')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Start-AzRecoveryServicesValidateOperation.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Start-AzRecoveryServicesValidateOperation' { - It 'TriggerExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Trigger' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'TriggerViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'TriggerViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesFeatureSupport.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesFeatureSupport.Tests.ps1 deleted file mode 100644 index 7d8fc962aa12..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesFeatureSupport.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Test-AzRecoveryServicesFeatureSupport')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Test-AzRecoveryServicesFeatureSupport.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Test-AzRecoveryServicesFeatureSupport' { - It 'ValidateExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Validate' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'ValidateViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'ValidateViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesProtectionIntent.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesProtectionIntent.Tests.ps1 deleted file mode 100644 index 0a53ed57f0a9..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesProtectionIntent.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Test-AzRecoveryServicesProtectionIntent')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Test-AzRecoveryServicesProtectionIntent.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Test-AzRecoveryServicesProtectionIntent' { - It 'ValidateExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Validate' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'ValidateViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'ValidateViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unlock-AzRecoveryServicesResourceGuardProxyDelete.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unlock-AzRecoveryServicesResourceGuardProxyDelete.Tests.ps1 deleted file mode 100644 index b0d96af8758c..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unlock-AzRecoveryServicesResourceGuardProxyDelete.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Unlock-AzRecoveryServicesResourceGuardProxyDelete')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Unlock-AzRecoveryServicesResourceGuardProxyDelete.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Unlock-AzRecoveryServicesResourceGuardProxyDelete' { - It 'UnlockExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Unlock' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'UnlockViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'UnlockViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unregister-AzRecoveryServicesProtectionContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unregister-AzRecoveryServicesProtectionContainer.Tests.ps1 deleted file mode 100644 index 2fe327622268..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unregister-AzRecoveryServicesProtectionContainer.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Unregister-AzRecoveryServicesProtectionContainer')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Unregister-AzRecoveryServicesProtectionContainer.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Unregister-AzRecoveryServicesProtectionContainer' { - It 'Unregister' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'UnregisterViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 deleted file mode 100644 index 0f96c094c9ff..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Update-AzRecoveryServicesBackupResourceStorageConfigsNonCrr')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Update-AzRecoveryServicesBackupResourceStorageConfigsNonCrr' { - It 'PatchExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Patch' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'PatchViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'PatchViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 deleted file mode 100644 index dfaaf3cf338a..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Update-AzRecoveryServicesBackupResourceVaultConfig')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzRecoveryServicesBackupResourceVaultConfig.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Update-AzRecoveryServicesBackupResourceVaultConfig' { - It 'UpdateExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Update' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'UpdateViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'UpdateViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesProtectionContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesProtectionContainer.Tests.ps1 deleted file mode 100644 index 73a0b6f31a6b..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesProtectionContainer.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Update-AzRecoveryServicesProtectionContainer')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzRecoveryServicesProtectionContainer.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Update-AzRecoveryServicesProtectionContainer' { - It 'Refresh' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'RefreshViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/env.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/env.json index ebc376642407..b2e184ea1b63 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/env.json +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/env.json @@ -1,16 +1,16 @@ { - "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "TestBackupPolicy": { - "VaultName": "arohijain-vault", - "ResourceGroupName": "arohijain-rg", - "NewPolicyName": "arohijain-p-1", - "SubscriptionId": "38304e13-357e-405e-9e9a-220351dcce8c" - }, "TestBackupSchedulePolicy": { - "VaultName": "anssingh-vault", - "ResourceGroupName": "anssingh-rg", "NewPolicyName": "anssingh-testPolicy", - "SubscriptionId": "38304e13-357e-405e-9e9a-220351dcce8c" + "VaultName": "anssingh-vault", + "SubscriptionId": "38304e13-357e-405e-9e9a-220351dcce8c", + "ResourceGroupName": "anssingh-rg" + }, + "SubscriptionId": "38304e13-357e-405e-9e9a-220351dcce8c", + "TestBackupPolicy": { + "NewPolicyName": "arohijain-p-1", + "VaultName": "arohijain-vault", + "SubscriptionId": "38304e13-357e-405e-9e9a-220351dcce8c", + "ResourceGroupName": "arohijain-rg" }, - "SubscriptionId": "38304e13-357e-405e-9e9a-220351dcce8c" + "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47" } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/loadEnv.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/loadEnv.ps1 index 0ea394729062..5f079e89615e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/loadEnv.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/loadEnv.ps1 @@ -1,8 +1,16 @@ # ---------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +# is regenerated. # ---------------------------------------------------------------------------------- $envFile = 'env.json' if ($TestMode -eq 'live') { diff --git a/src/RecoveryServices/readme.azure.noprofile.md b/src/RecoveryServices/readme.azure.noprofile.md deleted file mode 100644 index 483c37147060..000000000000 --- a/src/RecoveryServices/readme.azure.noprofile.md +++ /dev/null @@ -1,48 +0,0 @@ -# Azure PowerShell AutoRest Configuration - -> Values -``` yaml -azure: true -powershell: true -help-link-prefix: https://docs.microsoft.com/powershell/module/ -license-header: MICROSOFT_MIT_NO_VERSION -branch: master -repo: https://github.com/Azure/azure-rest-api-specs/blob/$(branch) -metadata: - authors: Microsoft Corporation - owners: Microsoft Corporation - description: 'Microsoft Azure PowerShell: $(service-name) cmdlets' - copyright: Microsoft Corporation. All rights reserved. - tags: Azure ResourceManager ARM PSModule $(service-name) - companyName: Microsoft Corporation - requireLicenseAcceptance: true - licenseUri: https://aka.ms/azps-license - projectUri: https://github.com/Azure/azure-powershell -``` - -> Names -``` yaml -prefix: Az -subject-prefix: $(service-name) -module-name: $(prefix).$(service-name) -namespace: Microsoft.Azure.PowerShell.Cmdlets.$(service-name) -``` - -> Folders -``` yaml -clear-output-folder: true -output-folder: . -``` - -> Directives -``` yaml -directive: - - where: - subject: Operation - hide: true - - where: - parameter-name: SubscriptionId - set: - default: - script: '(Get-AzContext).Subscription.Id' -``` From c2495d0eafb1cd2913d14eb82290f864db5f6a8b Mon Sep 17 00:00:00 2001 From: Himanshu Agarwal Date: Wed, 17 May 2023 10:28:26 +0530 Subject: [PATCH 3/6] added custom commands for Get-Item, Get-Container, Get-ProtectableItem, Register-Container added examples and test cases --- .../Az.RecoveryServices.psd1 | 2 +- .../README.md | 53 ++- .../Get-AzRecoveryServicesBackupContainer.ps1 | 117 ++++++ ...ster-AzRecoveryServicesBackupContainer.ps1 | 167 ++++++++ .../Item/Get-AzRecoveryServicesBackupItem.ps1 | 187 +++++++++ ...zRecoveryServicesBackupProtectableItem.ps1 | 177 ++++++++ ...vicesBackupRetentionPolicyClientObject.ps1 | 9 +- ...RecoveryServicesBackupProtectionPolicy.ps1 | 141 +++++++ .../New-AzRecoveryServicesBackupPolicy.ps1 | 5 +- .../custom/Enums/Enums.cs | 14 +- .../custom/Helpers/BackupScheduleHelper.ps1 | 377 ++++++++++++++++++ .../custom/Helpers/ContainerHelper.ps1 | 33 ++ .../custom/Helpers/GetFilter.ps1 | 197 +++++++++ .../custom/Helpers/GetFromArmId.ps1 | 47 +++ .../{PolicyHelpers.ps1 => PolicyHelper.ps1} | 17 +- .../custom/Helpers/RestoreHelper.ps1 | 158 ++++++++ .../custom/Helpers/commonhelper.ps1 | 133 +++++- .../Models/WorkloadProtectableItemResource.cs | 13 + .../custom/manifests/AzureFiles.json | 18 + .../custom/manifests/AzureVM.json | 3 + .../custom/manifests/MSSQL.json | 3 + .../custom/manifests/SAPHANA.json | 3 + .../docs/Az.RecoveryServices.md | 20 +- ...rvicesBackupRetentionPolicyClientObject.md | 8 +- .../Get-AzRecoveryServicesBackupContainer.md | 185 +++++++++ .../docs/Get-AzRecoveryServicesBackupItem.md | 307 ++++++++++++++ .../Get-AzRecoveryServicesBackupPolicy.md | 177 -------- ...AzRecoveryServicesBackupProtectableItem.md | 247 ++++++++++++ ...zRecoveryServicesBackupProtectionPolicy.md | 225 +++++++++++ ...ister-AzRecoveryServicesBackupContainer.md | 198 +++++++++ .../Get-AzRecoveryServicesBackupContainer.md | 22 + .../Get-AzRecoveryServicesBackupItem.md | 22 + .../Get-AzRecoveryServicesBackupPolicy.md | 35 -- ...AzRecoveryServicesBackupProtectableItem.md | 22 + ...zRecoveryServicesBackupProtectionPolicy.md | 53 +++ ...ister-AzRecoveryServicesBackupContainer.md | 22 + ...ble-AzRecoveryServicesProtection.Tests.ps1 | 97 +++++ ...RetentionPolicyClientObject.Recording.json | 2 +- ...ackupRetentionPolicyClientObject.Tests.ps1 | 4 +- ...RecoveryServicesBackupProtection.Tests.ps1 | 21 + ...ble-AzRecoveryServicesProtection.Tests.ps1 | 53 +++ .../Export-AzRecoveryServicesJob.Tests.ps1 | 25 ++ ...zRecoveryServicesBackupContainer.Tests.ps1 | 28 ++ ...t-AzRecoveryServicesBackupEngine.Tests.ps1 | 29 ++ ...Get-AzRecoveryServicesBackupItem.Tests.ps1 | 56 +++ .../Get-AzRecoveryServicesBackupJob.Tests.ps1 | 21 + ...eryServicesBackupOperationResult.Tests.ps1 | 25 ++ ...yServicesBackupOperationStatuses.Tests.ps1 | 25 ++ ...t-AzRecoveryServicesBackupPolicy.Tests.ps1 | 2 +- ...eryServicesBackupProtectableItem.Tests.ps1 | 53 +++ ...overyServicesBackupProtectedItem.Tests.ps1 | 21 + ...ervicesBackupProtectionContainer.Tests.ps1 | 21 + ...ryServicesBackupProtectionIntent.Tests.ps1 | 21 + ...ryServicesBackupProtectionPolicy.Tests.ps1 | 58 +++ ...esBackupResourceEncryptionConfig.Tests.ps1 | 25 ++ ...ckupResourceStorageConfigsNonCrr.Tests.ps1 | 25 ++ ...ervicesBackupResourceVaultConfig.Tests.ps1 | 25 ++ ...t-AzRecoveryServicesBackupStatus.Tests.ps1 | 33 ++ ...coveryServicesBackupUsageSummary.Tests.ps1 | 21 + ...coveryServicesBackupWorkloadItem.Tests.ps1 | 21 + ...msPrepareDataMoveOperationResult.Tests.ps1 | 25 ++ ...rvicesDeletedProtectionContainer.Tests.ps1 | 21 + ...ervicesExportJobsOperationResult.Tests.ps1 | 25 ++ .../Get-AzRecoveryServicesJobDetail.Tests.ps1 | 25 ++ ...coveryServicesJobOperationResult.Tests.ps1 | 25 ++ ...zRecoveryServicesOperationStatus.Tests.ps1 | 25 ++ ...ervicesPrivateEndpointConnection.Tests.ps1 | 25 ++ ...esPrivateEndpointOperationStatus.Tests.ps1 | 25 ++ ...veryServicesProtectableContainer.Tests.ps1 | 21 + ...-AzRecoveryServicesProtectedItem.Tests.ps1 | 21 + ...icesProtectedItemOperationResult.Tests.ps1 | 25 ++ ...esProtectedItemOperationStatuses.Tests.ps1 | 25 ++ ...overyServicesProtectionContainer.Tests.ps1 | 25 ++ ...otectionContainerOperationResult.Tests.ps1 | 25 ++ ...nContainerRefreshOperationResult.Tests.ps1 | 25 ++ ...RecoveryServicesProtectionIntent.Tests.ps1 | 25 ++ ...sProtectionPolicyOperationResult.Tests.ps1 | 25 ++ ...rotectionPolicyOperationStatuses.Tests.ps1 | 25 ++ ...-AzRecoveryServicesRecoveryPoint.Tests.ps1 | 29 ++ ...RecoveryPointsRecommendedForMove.Tests.ps1 | 25 ++ ...coveryServicesResourceGuardProxy.Tests.ps1 | 33 ++ ...et-AzRecoveryServicesSecurityPiN.Tests.ps1 | 33 ++ ...yServicesValidateOperationResult.Tests.ps1 | 25 ++ ...ervicesValidateOperationStatuses.Tests.ps1 | 25 ++ .../test/Get-SourceResourceId.Tests.ps1 | 21 + ...AzRecoveryServicesRestoreRequest.Tests.ps1 | 18 + ...rvicesInquireProtectionContainer.Tests.ps1 | 25 ++ ...Invoke-AzRecoveryServicesPrepare.Tests.ps1 | 33 ++ ...-AzRecoveryServicesRecoveryPoint.Tests.ps1 | 33 ++ ...vicesItemLevelRecoveryConnection.Tests.ps1 | 33 ++ ...-AzRecoveryServicesProtectedItem.Tests.ps1 | 33 ++ ...RecoveryServicesProtectionIntent.Tests.ps1 | 33 ++ ...AzRecoveryServicesRestoreRequest.Tests.ps1 | 18 + ...zRecoveryServicesBackupContainer.Tests.ps1 | 71 ++++ ...overyServicesProtectionContainer.Tests.ps1 | 33 ++ ...ervicesPrivateEndpointConnection.Tests.ps1 | 25 ++ ...-AzRecoveryServicesProtectedItem.Tests.ps1 | 25 ++ ...RecoveryServicesProtectionIntent.Tests.ps1 | 25 ++ ...coveryServicesResourceGuardProxy.Tests.ps1 | 25 ++ ...vicesItemLevelRecoveryConnection.Tests.ps1 | 25 ++ ...esBackupResourceEncryptionConfig.Tests.ps1 | 25 ++ ...ckupResourceStorageConfigsNonCrr.Tests.ps1 | 25 ++ ...ervicesBackupResourceVaultConfig.Tests.ps1 | 25 ++ ...ervicesPrivateEndpointConnection.Tests.ps1 | 25 ++ ...-AzRecoveryServicesProtectedItem.Tests.ps1 | 25 ++ ...RecoveryServicesProtectionIntent.Tests.ps1 | 25 ++ ...coveryServicesResourceGuardProxy.Tests.ps1 | 25 ++ .../test/Start-AzRecoveryServices.Tests.ps1 | 33 ++ .../Start-AzRecoveryServicesBackup.Tests.ps1 | 33 ++ ...zRecoveryServicesJobCancellation.Tests.ps1 | 25 ++ .../Start-AzRecoveryServicesRestore.Tests.ps1 | 33 ++ ...ecoveryServicesValidateOperation.Tests.ps1 | 33 ++ ...AzRecoveryServicesFeatureSupport.Tests.ps1 | 33 ++ ...RecoveryServicesProtectionIntent.Tests.ps1 | 33 ++ ...ServicesResourceGuardProxyDelete.Tests.ps1 | 33 ++ ...overyServicesProtectionContainer.Tests.ps1 | 25 ++ ...ckupResourceStorageConfigsNonCrr.Tests.ps1 | 33 ++ ...ervicesBackupResourceVaultConfig.Tests.ps1 | 33 ++ ...overyServicesProtectionContainer.Tests.ps1 | 25 ++ .../test/utils.ps1 | 47 ++- .../readme.azure.noprofile.md | 78 ++++ 121 files changed, 5630 insertions(+), 255 deletions(-) create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Container/Get-AzRecoveryServicesBackupContainer.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Container/Register-AzRecoveryServicesBackupContainer.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Item/Get-AzRecoveryServicesBackupItem.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Item/Get-AzRecoveryServicesBackupProtectableItem.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Get-AzRecoveryServicesBackupProtectionPolicy.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/BackupScheduleHelper.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/ContainerHelper.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/GetFilter.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/GetFromArmId.ps1 rename src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/{PolicyHelpers.ps1 => PolicyHelper.ps1} (98%) create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/RestoreHelper.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Models/WorkloadProtectableItemResource.cs create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/AzureFiles.json create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupContainer.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupItem.md delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupPolicy.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupProtectableItem.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupProtectionPolicy.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Register-AzRecoveryServicesBackupContainer.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupContainer.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupItem.md delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupPolicy.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupProtectableItem.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupProtectionPolicy.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Register-AzRecoveryServicesBackupContainer.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Disable-AzRecoveryServicesProtection.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Enable-AzRecoveryServicesBackupProtection.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Enable-AzRecoveryServicesProtection.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Export-AzRecoveryServicesJob.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupContainer.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupEngine.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupItem.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupJob.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationResult.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationStatuses.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectableItem.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectedItem.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionContainer.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionIntent.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionPolicy.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupStatus.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupUsageSummary.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupWorkloadItem.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBmsPrepareDataMoveOperationResult.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesDeletedProtectionContainer.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesExportJobsOperationResult.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobDetail.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobOperationResult.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesOperationStatus.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointOperationStatus.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectableContainer.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItem.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationResult.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationStatuses.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainer.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerOperationResult.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerRefreshOperationResult.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionIntent.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationResult.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationStatuses.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPoint.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPointsRecommendedForMove.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesResourceGuardProxy.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesSecurityPiN.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationResult.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationStatuses.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-SourceResourceId.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Initialize-AzRecoveryServicesRestoreRequest.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesInquireProtectionContainer.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesPrepare.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Move-AzRecoveryServicesRecoveryPoint.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectedItem.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectionIntent.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesRestoreRequest.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesBackupContainer.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesProtectionContainer.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectedItem.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectionIntent.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesResourceGuardProxy.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Revoke-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectedItem.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectionIntent.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesResourceGuardProxy.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServices.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesBackup.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesJobCancellation.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesRestore.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesValidateOperation.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesFeatureSupport.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesProtectionIntent.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unlock-AzRecoveryServicesResourceGuardProxyDelete.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unregister-AzRecoveryServicesProtectionContainer.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesProtectionContainer.Tests.ps1 create mode 100644 src/RecoveryServices/readme.azure.noprofile.md diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/Az.RecoveryServices.psd1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/Az.RecoveryServices.psd1 index 3b584a8d9c6c..d2a7f94a1449 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/Az.RecoveryServices.psd1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/Az.RecoveryServices.psd1 @@ -11,7 +11,7 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.RecoveryServices.private.dll' FormatsToProcess = './Az.RecoveryServices.format.ps1xml' - FunctionsToExport = 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject', 'Edit-AzRecoveryServicesBackupSchedulePolicyClientObject', 'Get-AzRecoveryServicesBackupPolicy', 'Get-AzRecoveryServicesPolicyTemplate', 'New-AzRecoveryServicesBackupPolicy', 'Remove-AzRecoveryServicesBackupPolicy', '*' + FunctionsToExport = 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject', 'Edit-AzRecoveryServicesBackupSchedulePolicyClientObject', 'Get-AzRecoveryServicesBackupContainer', 'Get-AzRecoveryServicesBackupItem', 'Get-AzRecoveryServicesBackupProtectableItem', 'Get-AzRecoveryServicesBackupProtectionPolicy', 'Get-AzRecoveryServicesPolicyTemplate', 'New-AzRecoveryServicesBackupPolicy', 'Register-AzRecoveryServicesBackupContainer', 'Remove-AzRecoveryServicesBackupPolicy', '*' AliasesToExport = '*' PrivateData = @{ PSData = @{ diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/README.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/README.md index d27d1f0f2fa0..d1842e8fa9cc 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/README.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/README.md @@ -41,6 +41,18 @@ input-file: - $(repo)/specification/recoveryservicesbackup/resource-manager/Microsoft.RecoveryServices/stable/2023-02-01/bms.json title: RecoveryServices directive: + - from: swagger-document + where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}"].put + transform: $["x-ms-long-running-operation"] = true + - from: swagger-document + where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}/protectedItems/{protectedItemName}"].delete + transform: $["x-ms-long-running-operation"] = true + - from: swagger-document + where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/refreshContainers"].post + transform: $["x-ms-long-running-operation"] = true + - from: swagger-document + where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupFabrics/{fabricName}/protectionContainers/{containerName}"].put + transform: $["x-ms-long-running-operation"] = true - where: verb: New subject: ProtectionPolicy @@ -71,7 +83,7 @@ directive: set: subject: BackupPolicy - where: - subject: Job|BackupEngine|OperationResult|OperationStatuses|ProtectableItem|Item|ProtectionContainer|ProtectionIntent|EncryptionConfig|StorageConfigsNonCrr|VaultConfig|BackupStatus|BackupUsageSummary|JobDetail|OperationStatus|PrivateEndpointConnection|RecoveryPoint|RecommendedForMove|ResourceGuardProxy|SecurityPiN|ItemLevelRecoveryConnection|Restore|Cancellation|ValidateOperation|ResourceGuardProxyDelete|ProtectableContainer|Prepare|FeatureSupport + subject: Job|BackupEngine|OperationResult|OperationStatuses|EncryptionConfig|StorageConfigsNonCrr|VaultConfig|BackupStatus|BackupUsageSummary|JobDetail|PrivateEndpointConnection|RecoveryPoint|RecommendedForMove|ResourceGuardProxy|SecurityPiN|ItemLevelRecoveryConnection|Restore|Cancellation|ValidateOperation|ResourceGuardProxyDelete|Prepare|FeatureSupport|WorkloadItem|DeletedProtectionContainer|InquireProtectionContainer|PrivateEndpointOperationStatus|^ProtectionIntent remove: true - where: verb: Start @@ -80,9 +92,33 @@ directive: verb: Set subject: BackupPolicy remove: true + - where: + verb: Get + subject: BackupPolicy + hide: true + - where: + subject: BackupProtectableItem + hide: true + - where: + verb: Unregister + subject: ProtectionContainer + remove: true + - where: + verb: New|Remove|Set + subject: ProtectedItem + remove: true + - where: + subject: ProtectedItem|ProtectionIntent|OperationStatus|ProtectionContainer|ProtectableContainer + hide: true - no-inline: - DailyRetentionSchedule + - DiskExclusionProperty + - DiskLunList + - ExtendedInfo - HourlySchedule + - InquiryInfo + - InstantRpDetail + - IsInclusionList - MonthlyRetentionSchedule - Settings - SubProtectionPolicyTieringPolicy @@ -98,4 +134,19 @@ directive: - from: source-file-csharp where: $ transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.ISchedulePolicy SchedulePolicy', 'public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.ISchedulePolicy SchedulePolicy'); + - from: source-file-csharp + where: $ + transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionContainer Property', 'public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionContainer Property'); + - from: source-file-csharp + where: $ + transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectedItem Property', 'public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectedItem Property'); + - from: source-file-csharp + where: $ + transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IExtendedProperties ExtendedProperty', 'public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IExtendedProperties ExtendedProperty'); + - from: source-file-csharp + where: $ + transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IWorkloadProtectableItem Property', 'public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IWorkloadProtectableItem Property'); + - from: source-file-csharp + where: $ + transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IRecoveryPoint Property', 'public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IRecoveryPoint Property'); ``` diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Container/Get-AzRecoveryServicesBackupContainer.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Container/Get-AzRecoveryServicesBackupContainer.ps1 new file mode 100644 index 000000000000..728ef271f0db --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Container/Get-AzRecoveryServicesBackupContainer.ps1 @@ -0,0 +1,117 @@ +function Get-AzRecoveryServicesBackupContainer +{ + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionContainerResource')] + [CmdletBinding(PositionalBinding=$false)] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Description('Gets list of backup containers registered with a recovery services vault')] + + param( + [Parameter(Mandatory=$false, HelpMessage='Subscription Id')] + [System.String] + ${SubscriptionId}, + + [Parameter(Mandatory, HelpMessage='The name of the resource group where the recovery services vault is present.')] + [System.String] + ${ResourceGroupName}, + + [Parameter(Mandatory, HelpMessage='The name of the recovery services vault.')] + [System.String] + ${VaultName}, + + [Parameter(Mandatory=$false, HelpMessage='Specifies the friendly name of the container to get')] + [System.String] + ${FriendlyName}, + + [Parameter(Mandatory=$false, HelpMessage='Specifies the DatasourceType')] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.DatasourceTypes] + ${DatasourceType}, + + [Parameter(Mandatory=$true, HelpMessage='Specifies the backup container type. The acceptable values for this parameter are: AzureVM, Windows, AzureStorage, AzureVMAppContainer')] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.BackupContainerType] + ${ContainerType}, + + [Parameter(Mandatory=$false, HelpMessage='The ResourceGroup of the resource being managed by the Azure Backup service for example: ResourceGroup name of the VM')] + [System.String] + ${ContainerResourceGroupName}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} + ) + + process + { + $containerResourceGroupName = $ContainerResourceGroupName + + $filter = Get-ContainerFilter -ContainerType $ContainerType -FriendlyName $FriendlyName -DatasourceType $DatasourceType + Write-Debug "Container filter - $filter" + + $inquiryContainerType = $null + if($PSBoundParameters.ContainsKey("DatasourceType")){ + # load manifest and get workload type filter if enabled + $manifest = LoadManifest -DatasourceType $DatasourceType.ToString() + + if($manifest.containerInquiryType -ne $null){ + $inquiryContainerType = $manifest.containerInquiryType + } + } + + $null = $PSBoundParameters.Remove("ContainerType") + $null = $PSBoundParameters.Remove("FriendlyName") + $null = $PSBoundParameters.Remove("DatasourceType") + $null = $PSBoundParameters.Remove("ContainerResourceGroupName") + + if($filter -ne $null){ + $null = $PSBoundParameters.Add("Filter", $filter) + } + + $containersList = Get-AzRecoveryServicesBackupProtectionContainer @PSBoundParameters + + # filter by container resource group + if($containerResourceGroupName -ne ""){ + $containersList = $containersList | Where-Object { $_.Id.Split(';')[-2] -eq $containerResourceGroupName } + } + + # filter by worloadType - MSSQL, SAPHANA + if($inquiryContainerType -ne ""){ + $containersList = $containersList | Where-Object { $_.Property.ExtendedInfo.InquiryInfo.InquiryDetail.Type -match $inquiryContainerType } + } + + $containersList + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Container/Register-AzRecoveryServicesBackupContainer.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Container/Register-AzRecoveryServicesBackupContainer.ps1 new file mode 100644 index 000000000000..5ed71f039cfd --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Container/Register-AzRecoveryServicesBackupContainer.ps1 @@ -0,0 +1,167 @@ +function Register-AzRecoveryServicesBackupContainer +{ + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionContainerResource')] + [CmdletBinding(PositionalBinding=$false)] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Description('The Register-AzRecoveryServicesBackupContainer cmdlet registers an Azure VM for AzureWorkloads with specific DatasourceType.')] + + param( + [Parameter(Mandatory=$false, HelpMessage='Subscription Id')] + [System.String] + ${SubscriptionId}, + + [Parameter(Mandatory, HelpMessage='The name of the resource group where the recovery services vault is present')] + [System.String] + ${ResourceGroupName}, + + [Parameter(Mandatory, HelpMessage='The name of the recovery services vault')] + [System.String] + ${VaultName}, + + [Parameter(Mandatory=$true, Position=1, HelpMessage='Specifies the DatasourceType')] + [ValidateSet("MSSQL", "SAPHANA", ErrorMessage = "Invalid value for DatasourceType. Please provide a valid datasource type. Valid values are 'MSSQL'")] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.DatasourceTypes] + ${DatasourceType}, + + [Parameter(ParameterSetName="ReRegister", Mandatory=$true, Position=0, HelpMessage='Specifies a container object for which this cmdlet triggers the re-registration. To obtain an ProtectionContainerResource, use the Get-AzRecoveryServicesBackupContainer cmdlet', ValueFromPipelineByPropertyName=$true)] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionContainerResource] + ${Container}, + + [Parameter(ParameterSetName="Register", Position=0, Mandatory=$true, HelpMessage='Specifies the ARM ID of an Instance or Availability Group')] + [System.String] + ${ResourceId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} + ) + + process + { + $parameterSetName = $PsCmdlet.ParameterSetName + + $containerName = "" + if($parameterSetName -eq "ReRegister"){ + $containerName = ($Container.Name -split ";")[-1] + } + else{ + $containerName = ($ResourceId -split "/")[-1] + } + + # confirm:$false/ force + #$containerType - workload type + #$backupManagementType + #$container = $Container + + # Refresh containers + $filter = Get-BackupManagementTypeFilter -DatasourceType $DatasourceType + + $refreshOperationResponse = $null + if($SubscriptionId -ne "" -and $SubscriptionId -ne $null){ + $refreshOperationResponse = Az.RecoveryServices.Internal\Update-AzRecoveryServicesProtectionContainer -FabricName "Azure" -ResourceGroupName $ResourceGroupName -SubscriptionId $SubscriptionId -VaultName $VaultName -Filter $filter -NoWait + } + else{ + $refreshOperationResponse = Az.RecoveryServices.Internal\Update-AzRecoveryServicesProtectionContainer -FabricName "Azure" -ResourceGroupName $ResourceGroupName -VaultName $VaultName -Filter $filter -NoWait + } + + $operationStatus = GetOperationStatus -Target $refreshOperationResponse.Target + if($operationStatus -ne "Succeeded"){ + $errormsg= "Refresh container operation failed with operationStatus: $operationStatus" + throw $errormsg + } + + # Get protectable containers (register) / container (re-register) + + $protectableContainers = $null + if($SubscriptionId -ne "" -and $SubscriptionId -ne $null){ + $protectableContainers = Az.RecoveryServices.Internal\Get-AzRecoveryServicesProtectableContainer -FabricName "Azure" -ResourceGroupName $ResourceGroupName -SubscriptionId $SubscriptionId -VaultName $VaultName -Filter $filter | Where-Object { ($_.Name -split ";")[-1] -eq $containerName -or $_.Name -eq $containerName } + } + else{ + $protectableContainers = Az.RecoveryServices.Internal\Get-AzRecoveryServicesProtectableContainer -FabricName "Azure" -ResourceGroupName $ResourceGroupName -VaultName $VaultName -Filter $filter | Where-Object { ($_.Name -split ";")[-1] -eq $containerName -or $_.Name -eq $containerName } + } + + if($protectableContainers -ne $null -or $Container -ne $null){ + $protectionContainerResource = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.ProtectionContainerResource]::new() + + $containerFullName = ($Container -ne $null) ? $Container.Name : $protectableContainers.Name + + $property = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.AzureVMAppContainerProtectionContainer]::new() + + $property.FriendlyName = $containerName + $property.BackupManagementType = GetBackupManagementTypeFromDatasourceType -DatasourceType $DatasourceType + $property.SourceResourceId = ($Container -ne $null) ? $Container.Property.SourceResourceId : $protectableContainers.ContainerId + $property.WorkloadType = GetItemTypeFromDatasourceType -DatasourceType $DatasourceType + $property.OperationType = ($Container -ne $null) ? "Reregister" : "Register" + $property.ContainerType = "VMAppContainer" + + $protectionContainerResource.Property = $property + + # register container + $registerOperationResponse = $null + if($SubscriptionId -ne "" -and $SubscriptionId -ne $null){ + $registerOperationResponse = Az.RecoveryServices.Internal\Register-AzRecoveryServicesProtectionContainer -ContainerName $containerFullName -FabricName "Azure" -ResourceGroupName $ResourceGroupName -SubscriptionId $SubscriptionId -VaultName $VaultName -Parameter $protectionContainerResource -NoWait + } + else{ + $registerOperationResponse = Az.RecoveryServices.Internal\Register-AzRecoveryServicesProtectionContainer -ContainerName $containerFullName -FabricName "Azure" -ResourceGroupName $ResourceGroupName -VaultName $VaultName -Parameter $protectionContainerResource -NoWait + } + + $operationStatus = GetOperationStatus -Target $registerOperationResponse.Target -RefreshAfter 30 + + if($operationStatus -ne "Succeeded"){ + $errormsg= "Register container operation failed with operationStatus: $operationStatus" + throw $errormsg + } + } + else{ + # throw error + $errormsg= "The specified datasource is already registered with the given recovery services vault" + throw $errormsg + } + + # List containers + $registeredContainer = $null + if($SubscriptionId -ne "" -and $SubscriptionId -ne $null){ + $registeredContainer = Get-AzRecoveryServicesBackupContainer -ResourceGroupName $ResourceGroupName -VaultName $VaultName -SubscriptionId $SubscriptionId -ContainerType AzureVMAppContainer -DatasourceType $DatasourceType | Where-Object { $_.Name -eq $containerFullName } + } + else{ + $registeredContainer = Get-AzRecoveryServicesBackupContainer -ResourceGroupName $ResourceGroupName -VaultName $VaultName -ContainerType AzureVMAppContainer -DatasourceType $DatasourceType | Where-Object { $_.Name -eq $containerFullName } + } + + $registeredContainer + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Item/Get-AzRecoveryServicesBackupItem.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Item/Get-AzRecoveryServicesBackupItem.ps1 new file mode 100644 index 000000000000..b4360e7b99be --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Item/Get-AzRecoveryServicesBackupItem.ps1 @@ -0,0 +1,187 @@ +function Get-AzRecoveryServicesBackupItem +{ + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectedItemResource')] + [CmdletBinding(PositionalBinding=$false)] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Description('Gets list of backup items protected with a recovery services vault')] + + param( + [Parameter(Mandatory=$false, HelpMessage='Subscription Id')] + [System.String[]] + ${SubscriptionId}, + + [Parameter(Mandatory, HelpMessage='The name of the resource group where the recovery services vault is present.')] + [System.String] + ${ResourceGroupName}, + + [Parameter(Mandatory, HelpMessage='The name of the recovery services vault.')] + [System.String] + ${VaultName}, + + [Parameter(ParameterSetName="GetItemsForVault", Mandatory=$true, HelpMessage='Specifies the DatasourceType')] + [Parameter(ParameterSetName="GetItemsForContainer", Mandatory=$true, HelpMessage='Specifies the DatasourceType')] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.DatasourceTypes] + ${DatasourceType}, + + [Parameter(ParameterSetName="GetItemsForContainer", Mandatory=$true, HelpMessage='Specifies a container object from which this cmdlet gets backup items. To obtain an ProtectionContainerResource, use the Get-AzRecoveryServicesBackupContainer cmdlet.')] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionContainerResource] + ${Container}, + + [Parameter(ParameterSetName="GetItemsForpolicy", Mandatory=$true, HelpMessage='Protection policy object')] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicyResource] + ${Policy}, + + [Parameter(Mandatory=$false, HelpMessage='FriendlyName of the backed up item')] + [System.String] + ${FriendlyName}, + + [Parameter(Mandatory=$false, HelpMessage='Specifies the name of backup item. For file share, specify the unique ID of protected file share.')] + [System.String] + ${Name}, + + [Parameter(Mandatory=$false, HelpMessage='Specifies the overall protection status of an item in the container. The acceptable values for this parameter are: Healthy, Unhealthy')] + [ValidateSet("Healthy", "Unhealthy", ErrorMessage = "Invalid value for ProtectionStatus. Please provide a valid protection status. Valid values are 'Healthy' and 'Unhealthy'.")] + [System.String] + ${ProtectionStatus}, + + [Parameter(Mandatory=$false, HelpMessage="Specifies the state of protection. The acceptable values for this parameter are: `n IRPending. Initial synchronization has not started and there is no recovery point yet. `n Protected. Protection is ongoing. `n ProtectionError. There is a protection error. `n ProtectionStopped. Protection is disabled.")] + [ValidateSet("IRPending", "Protected", "ProtectionError", "ProtectionStopped", "BackupsSuspended", ErrorMessage = "Invalid value for ProtectionState. Please provide a valid protection state. Valid values are 'IRPending', 'Protected', 'ProtectionError', 'ProtectionStopped', 'BackupsSuspended'.")] + [System.String] + ${ProtectionState}, + + [Parameter(Mandatory=$false, HelpMessage="Specifies the delete state of the item The acceptable values for this parameter are: `n ToBeDeleted `n NotDeleted")] + [System.String] + [ValidateSet("ToBeDeleted", "NotDeleted", ErrorMessage = "Invalid value for DeleteState. Please provide a valid delete state. Valid values are 'ToBeDeleted', 'NotDeleted'.")] + ${DeleteState}, + + # [Parameter(Mandatory=$false, HelpMessage='Specifies the name of backup item')] + # [System.String] + # ${UseSecondaryRegion}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} + ) + + process + { + # get DSType from policy + $parameterSetName = $PsCmdlet.ParameterSetName + if($parameterSetName -eq "GetItemsForpolicy"){ + $DatasourceType = GetDatasourceTypeFromPolicy -Policy $Policy + } + $manifest = LoadManifest -DatasourceType $DatasourceType + + # get backup items filter + $filter = Get-ProtectedItemFilter -DatasourceType $DatasourceType -Container $Container -Policy $Policy + + $itemsList = $null + if($SubscriptionId -ne $null){ + $itemsList = Get-AzRecoveryServicesBackupProtectedItem -ResourceGroupName $ResourceGroupName -VaultName $VaultName -SubscriptionId $SubscriptionId -Filter $filter + } + else{ + $itemsList = Get-AzRecoveryServicesBackupProtectedItem -ResourceGroupName $ResourceGroupName -VaultName $VaultName -Filter $filter + } + + # filter on policy or container + if($parameterSetName -eq "GetItemsForpolicy"){ + $itemsList = $itemsList | Where-Object { $_.PolicyId.ToLower() -match $Policy.Id.ToLower() } + } + elseif($parameterSetName -eq "GetItemsForContainer"){ + $itemsList = $itemsList | Where-Object { $_.ContainerName.ToLower() -match $Container.Name.ToLower() } + } + + # Item Name filter - match with protected item URI + if($Name -ne ""){ + $itemsList = $itemsList | Where-Object { $_.ID.Split("/protectedItems/")[-1].ToLower() -match $Name.ToLower() } + } + + # FriendlyName filter for AzureFiles + if($manisfest.allowFriendlyNameFilterForProtectedItems -eq $true -and $FriendlyName -ne ""){ + $itemsList = $itemsList | Where-Object { $_.ID.Split("/protectedItems/")[-1].ToLower() -match $FriendlyName.ToLower() } + } + elseif($FriendlyName -ne ""){ + $errormsg= "FriendlyName parameter isn't supported for given DatasourceType $DatasourceType" + throw $errormsg + } + + # ProtectionStatus filter + if($ProtectionStatus -ne ""){ + $itemsList = $itemsList | Where-Object { $_.Property.ProtectionStatus -eq $ProtectionStatus } + } + + # ProtectionStatus filter + if($ProtectionState -ne ""){ + $itemsList = $itemsList | Where-Object { $_.Property.ProtectionState -eq $ProtectionState } + } + + # delete state filter - TODO : this might need to be corrected + if($DeleteState -eq "NotDeleted"){ + $itemsList = $itemsList | Where-Object { $_.IsScheduledForDeferredDelete -eq $null } # -or $_.IsScheduledForDeferredDelete -eq $false + } + + if($DeleteState -eq "ToBeDeleted"){ + $itemsList = $itemsList | Where-Object { $_.IsScheduledForDeferredDelete -ne $null } # $_.IsScheduledForDeferredDelete -eq $false + } + + # Extended Info - only to be added when itemName or Friendly name given + if($Name -ne "" -or ($manisfest.allowFriendlyNameFilterForProtectedItems -eq $true -and $FriendlyName -ne "")){ + + foreach($item in $itemsList){ + $containerName = Get-ContainerNameFromArmId -Id $item.Id + + $itemDetails = $null + if($SubscriptionId -ne $null){ + $itemDetails = Get-AzRecoveryServicesProtectedItem -ContainerName $containerName -FabricName "Azure" -Name $item.Name -ResourceGroupName $ResourceGroupName -VaultName $VaultName -SubscriptionId $SubscriptionId -Filter "expand eq 'extendedinfo'" + } + else{ + $itemDetails = Get-AzRecoveryServicesProtectedItem -ContainerName $containerName -FabricName "Azure" -Name $item.Name -ResourceGroupName $ResourceGroupName -VaultName $VaultName -Filter "expand eq 'extendedinfo'" + } + + $item.Property.ExtendedInfo = $itemDetails.Property.ExtendedInfo + } + } + + # get MAB protected items + # filter : BackupManagementType = MAB + # fetch from service + # fetch the container name from ITEM ARM Id and match with the given container name + + $itemsList + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Item/Get-AzRecoveryServicesBackupProtectableItem.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Item/Get-AzRecoveryServicesBackupProtectableItem.ps1 new file mode 100644 index 000000000000..e0a548e660a9 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Item/Get-AzRecoveryServicesBackupProtectableItem.ps1 @@ -0,0 +1,177 @@ +function Get-AzRecoveryServicesBackupProtectableItem +{ + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IWorkloadProtectableItemResource')] + [CmdletBinding(PositionalBinding=$false)] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Description('This command will retrieve all protectable items within a certain container or across all registered containers. It will consist of all the elements of the hierarchy of the application. Returns DBs and their upper tier entities like Instance, AvailabilityGroup etc.')] + + param( + [Parameter(Mandatory=$false, HelpMessage='Subscription Id')] + [System.String[]] + ${SubscriptionId}, + + [Parameter(Mandatory, HelpMessage='The name of the resource group where the recovery services vault is present')] + [System.String] + ${ResourceGroupName}, + + [Parameter(Mandatory, HelpMessage='The name of the recovery services vault')] + [System.String] + ${VaultName}, + + [Parameter(ParameterSetName="FilterParamSet", Mandatory=$true, HelpMessage='Specifies the DatasourceType')] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.DatasourceTypes] + ${DatasourceType}, + + [Parameter(ParameterSetName="FilterParamSet", Mandatory=$false, HelpMessage='Specifies a container object for which this cmdlet gets protectable items. To obtain an ProtectionContainerResource, use the Get-AzRecoveryServicesBackupContainer cmdlet')] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionContainerResource] + ${Container}, + + [Parameter(ParameterSetName="IdParamSet", Mandatory=$true, HelpMessage='Specifies the ARM ID of an Instance or Availability Group')] + [System.String] + ${ParentID}, + + [Parameter(ParameterSetName="FilterParamSet", Mandatory=$false, HelpMessage='Specifies the type of protectable item. Acceptable values: SQLDataBase, SQLInstance, SQLAvailabilityGroup')] + [Parameter(ParameterSetName="IdParamSet", Mandatory=$false, HelpMessage='Specifies the type of protectable item. Acceptable values: SQLDataBase, SQLInstance, SQLAvailabilityGroup')] + [ValidateSet("SQLDataBase", "SQLInstance", "SQLAvailabilityGroup", ErrorMessage = "Invalid value for ItemType. Please provide a valid item type. Valid values are 'SQLDataBase', 'SQLInstance' and 'SQLAvailabilityGroup'")] + [System.String] + ${ItemType}, + + [Parameter(ParameterSetName="FilterParamSet", Mandatory=$false, HelpMessage="Specifies the name of the Database, Instance or AvailabilityGroup")] + [Parameter(ParameterSetName="IdParamSet", Mandatory=$false, HelpMessage="Specifies the name of the Database, Instance or AvailabilityGroup")] + [System.String] + ${Name}, + + [Parameter(ParameterSetName="FilterParamSet", Mandatory=$false, HelpMessage="Specifies the name of the server to which the item belongs")] + [Parameter(ParameterSetName="IdParamSet", Mandatory=$false, HelpMessage="Specifies the name of the server to which the item belongs")] + [System.String] + ${ServerName}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} + ) + + process + { + # get DSType from policy + $parameterSetName = $PsCmdlet.ParameterSetName + + # get protectable items filter + $filter = $null + if($parameterSetName -eq "IdParamSet"){ + $filter = Get-ProtectableItemFilter -ParentID $ParentID + } + else{ + if($Container -ne $null){ + $filter = Get-ProtectableItemFilter -DatasourceType $DatasourceType -Container $Container + } + else { + $filter = Get-ProtectableItemFilter -DatasourceType $DatasourceType + } + } + + $protectableItemsList = $null + if($SubscriptionId -ne $null){ + $protectableItemsList = Az.RecoveryServices.Internal\Get-AzRecoveryServicesBackupProtectableItem -ResourceGroupName $ResourceGroupName -VaultName $VaultName -SubscriptionId $SubscriptionId -Filter $filter + } + else{ + $protectableItemsList = Az.RecoveryServices.Internal\Get-AzRecoveryServicesBackupProtectableItem -ResourceGroupName $ResourceGroupName -VaultName $VaultName -Filter $filter + } + + # Protectable item type filter + # alternate - $protectableItemsList.Property.GetType().Name -match + if($ItemType -ne ""){ + $protectableItemsList = $protectableItemsList | Where-Object { $_.ProtectableItemType -eq $ItemType } + } + + # Name filter + if($Name -ne ""){ + $protectableItemsList = $protectableItemsList | Where-Object { $_.Name -eq $Name } + } + + # ServerName filter + if($ServerName -ne ""){ + $protectableItemsList = $protectableItemsList | Where-Object { $_.Property.ServerName -eq $ServerName } + } + + # FetchNodesListAndAutoProtectionPolicy - TODO - add manifest control, only for SQL currently + foreach($proItem in $protectableItemsList){ + + $protectableItemURI = Get-ProtectableItemNameFromArmId -Id $proItem.Id + + $proItemType = ($protectableItemURI -split ";")[0] + $itemName = ($protectableItemURI -split ";")[1] + + $containerUri = Get-ContainerNameFromArmId -Id $proItem.Id + + if($proItem.ProtectableItemType -ne "SQLDataBase"){ + + $backupManagementType = "AzureWorkload" + $filter = Get-ProtectionIntentFilter -ItemType $proItemType -ItemName $itemName -ParentName $containerUri -BackupManagementType $backupManagementType + + # list protection intent + $intentList = Az.RecoveryServices.Internal\Get-AzRecoveryServicesBackupProtectionIntent -ResourceGroupName $ResourceGroupName -VaultName $VaultName -SubscriptionId $SubscriptionId -Filter $filter + + foreach($intent in $intentList){ + Write-Debug "AutoProtectionPolicy - $($intent.PolicyId)" + + $proItem.AutoProtectionPolicy = $intent.PolicyId + } + } + + if($proItem.ProtectableItemType -eq "SQLAvailabilityGroup"){ + try{ + # get container + $container = Az.RecoveryServices.Internal\Get-AzRecoveryServicesProtectionContainer -ResourceGroupName $ResourceGroupName -VaultName $VaultName -SubscriptionId $SubscriptionId -FabricName "Azure" -ContainerName $containerUri + + if($container -ne $null -and $container.Property.ExtendedInfo -ne $null){ + + Write-Host "NodesList - $($container.Property.ExtendedInfo.NodesList)" + $proItem.NodesList = $container.Property.ExtendedInfo.NodesList + } + } + catch{ + Write-Debug "An error occurred: $($_.Exception.Message)" + # Write-Debug "An error occurred: $($Error[0].Exception.Message)" + } + } + } + + $protectableItemsList + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.ps1 index ad9c9ae5a81b..e81a37bb7fd7 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.ps1 @@ -14,19 +14,19 @@ function Edit-AzRecoveryServicesBackupRetentionPolicyClientObject { [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.DatasourceTypes] ${DatasourceType}, - [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Switch parameter to modify FullBackup retention policy. You can use this parameter for DataSourceType: MSSQL, SAPHANA')] + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Switch parameter to modify FullBackup retention policy. You can use this parameter for DatasourceType: MSSQL, SAPHANA')] [switch] ${ModifyFullBackup}, - [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Switch parameter to modify differential backup retention policy. You can use this parameter for DataSourceType: MSSQL, SAPHANA')] + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Switch parameter to modify differential backup retention policy. You can use this parameter for DatasourceType: MSSQL, SAPHANA')] [switch] ${ModifyDifferentialBackup}, - [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Switch parameter to modify incremental backup retention policy. You can use this parameter for DataSourceType: MSSQL, SAPHANA')] + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Switch parameter to modify incremental backup retention policy. You can use this parameter for DatasourceType: MSSQL, SAPHANA')] [switch] ${ModifyIncrementalBackup}, - [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Switch parameter to modify log backup retention policy. You can use this parameter for DataSourceType: MSSQL, SAPHANA')] + [Parameter(ParameterSetName="ModifyRetentionPolicy", HelpMessage='Switch parameter to modify log backup retention policy. You can use this parameter for DatasourceType: MSSQL, SAPHANA')] [switch] ${ModifyLogBackup}, @@ -284,7 +284,6 @@ function Edit-AzRecoveryServicesBackupRetentionPolicyClientObject { $policyObject.RetentionPolicy.WeeklySchedule.RetentionTime=$scheduletime } - if($EnableMonthlyRetention -eq $false ) { $policyObject.RetentionPolicy.MonthlySchedule = $null diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Get-AzRecoveryServicesBackupProtectionPolicy.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Get-AzRecoveryServicesBackupProtectionPolicy.ps1 new file mode 100644 index 000000000000..4f9c6abe941c --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/Get-AzRecoveryServicesBackupProtectionPolicy.ps1 @@ -0,0 +1,141 @@ +function Get-AzRecoveryServicesBackupProtectionPolicy +{ + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicyResource')] + [CmdletBinding(PositionalBinding=$false)] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Description('Gets backup protection policies for a recovery services vault.')] + + param( + [Parameter(Mandatory=$false, HelpMessage='Subscription Id')] + [System.String] + ${SubscriptionId}, + + [Parameter(Mandatory, HelpMessage='The name of the resource group where the recovery services vault is present.')] + [System.String] + ${ResourceGroupName}, + + [Parameter(Mandatory, HelpMessage='The name of the recovery services vault.')] + [System.String] + ${VaultName}, + + [Parameter(ParameterSetName="GetPolicyByName", Mandatory, HelpMessage='Specifies the name of the policy')] + [System.String] + ${Name}, + + [Parameter(ParameterSetName="ListPolicy", Mandatory=$false, HelpMessage='Specifies the DatasourceType')] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.DatasourceTypes] + ${DatasourceType}, + + [Parameter(Mandatory=$false, HelpMessage='Parameter to list policies for which smart tiering is Enabled/Disabled. Allowed values are $true, $false.')] + [Nullable[System.Boolean]] + ${IsArchiveSmartTieringEnabled}, + + [Parameter(Mandatory=$false, HelpMessage='Type of policy to be fetched: Standard, Enhanced')] + [ValidateSet("", "Standard", "Enhanced", ErrorMessage = "Invalid value for PolicySubType. Valid values are 'Standard', 'Enhanced'")] + [System.String] + ${PolicySubType} = "", + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${DefaultProfile}, + + [Parameter(DontShow)] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} + ) + + process + { + $manifest = $null + $workloadType = $null + $isArchiveSmartTieringEnabled = $IsArchiveSmartTieringEnabled + $policySubType = $PolicySubType + $null = $PSBoundParameters.Remove("IsArchiveSmartTieringEnabled") + $null = $PSBoundParameters.Remove("PolicySubType") + + if($PSBoundParameters.ContainsKey("Name")){ + $null = $PSBoundParameters.Add("PolicyName", $Name) + $null = $PSBoundParameters.Remove("Name") + } + else{ + if($PSBoundParameters.ContainsKey("DatasourceType")){ + # load manifest and get workload type filter if enabled + $manifest = LoadManifest -DatasourceType $DatasourceType.ToString() + + if($manifest.filterPolicyBasedonWorkloadType -eq $true){ + $workloadType = GetItemTypeFromDatasourceType -DatasourceType $DatasourceType + } + + # add filter + $filter = Get-BackupManagementTypeFilter -DatasourceType $DatasourceType + Write-Debug "Policy filter - $filter" + + $null = $PSBoundParameters.Add("Filter", $filter) + $null = $PSBoundParameters.Remove("DatasourceType") + } + } + + $policies = Az.RecoveryServices.Internal\Get-AzRecoveryServicesBackupPolicy @PSBoundParameters + + if($workloadType -ne $null){ + + # filter policy based on Workload Type if enabled + $policies = $policies | Where-Object { $_.Property.WorkloadType -match $workloadType } + } + + # filter based on PolicySubType + if($policySubType -ne ""){ + + if($policySubType.ToLower() -eq "enhanced"){ + $policies = $policies | Where-Object { $_.Property.PolicyType -ne $null -and $_.Property.PolicyType.ToString() -ne $null -and $_.Property.PolicyType.ToString().ToLower() -match "v2" } + } + else{ + $policies = $policies | Where-Object { -not ($_.Property.PolicyType -ne $null -and $_.Property.PolicyType.ToString() -ne $null -and $_.Property.PolicyType.ToString().ToLower() -match "v2") } + } + } + + if($isArchiveSmartTieringEnabled -ne $null){ + Write-Debug "Filter on IsArchiveSmartTieringEnabled $isArchiveSmartTieringEnabled" + + if($isArchiveSmartTieringEnabled){ + $policies = $policies | Where-Object { ($_.Property.TieringPolicy -ne $null -and ($_.Property.TieringPolicy["ArchivedRP"].TieringMode -eq "TierRecommended" -or $_.Property.TieringPolicy["ArchivedRP"].TieringMode -eq "TierAfter")) -or ($_.Property.SubProtectionPolicy -ne $null -and $_.Property.SubProtectionPolicy[$_.PolicyType -eq "Full"].TieringPolicy -ne $null -and ($_.Property.SubProtectionPolicy[$_.PolicyType -eq "Full"].TieringPolicy["ArchivedRP"].TieringMode -eq "TierRecommended" -or $_.Property.SubProtectionPolicy[$_.PolicyType -eq "Full"].TieringPolicy["ArchivedRP"].TieringMode -eq "TierAfter")) } + } + else{ + $policies = $policies | Where-Object { -not (($_.Property.TieringPolicy -ne $null -and ($_.Property.TieringPolicy["ArchivedRP"].TieringMode -eq "TierRecommended" -or $_.Property.TieringPolicy["ArchivedRP"].TieringMode -eq "TierAfter")) -or ($_.Property.SubProtectionPolicy -ne $null -and $_.Property.SubProtectionPolicy[$_.PolicyType -eq "Full"].TieringPolicy -ne $null -and ($_.Property.SubProtectionPolicy[$_.PolicyType -eq "Full"].TieringPolicy["ArchivedRP"].TieringMode -eq "TierRecommended" -or $_.Property.SubProtectionPolicy[$_.PolicyType -eq "Full"].TieringPolicy["ArchivedRP"].TieringMode -eq "TierAfter"))) } + } + } + + $policies + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/New-AzRecoveryServicesBackupPolicy.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/New-AzRecoveryServicesBackupPolicy.ps1 index 371186bc2220..d9def124ed58 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/New-AzRecoveryServicesBackupPolicy.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/New-AzRecoveryServicesBackupPolicy.ps1 @@ -95,7 +95,7 @@ #get datasource type $BackupManagementType = $policy.BackupManagementType $WorkloadType = $policy.WorkLoadType - $DataSourceType = Get-DataSourceType -BackupManagementType $BackupManagementType -WorkloadType $WorkloadType + $DatasourceType = Get-DatasourceType -BackupManagementType $BackupManagementType -WorkloadType $WorkloadType $manifest = LoadManifest -DatasourceType $DatasourceType.ToString() if($SnapshotRetentionDurationInDays -ne $null) @@ -182,12 +182,11 @@ $null = $PSBoundParameters.Remove("TierAfterDurationType") - # RsvRef: public string[] ResourceGuardOperationRequest - this should be a parameter, check in SDK code + # TODO: public string[] ResourceGuardOperationRequest - this should be a parameter, check in SDK code $policyObject = [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.ProtectionPolicyResource]::new() $policyObject.Property = $Policy - $null = $PSBoundParameters.Remove("Policy") $null = $PSBoundParameters.Add("Parameter", $policyObject) diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Enums/Enums.cs b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Enums/Enums.cs index e571dc7c8af5..6e97e8300809 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Enums/Enums.cs +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Enums/Enums.cs @@ -6,9 +6,17 @@ public enum DatasourceTypes { AzureVM = 0, MSSQL, - SAPHANA - /* AzureFiles, - */ + SAPHANA, + AzureFiles /*, + MAB */ + } + + public enum BackupContainerType + { + AzureVM = 0, + Windows, + AzureStorage, + AzureVMAppContainer } public enum StorageSettingType diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/BackupScheduleHelper.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/BackupScheduleHelper.ps1 new file mode 100644 index 000000000000..95527fee7b7d --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/BackupScheduleHelper.ps1 @@ -0,0 +1,377 @@ + + +function ValidateBackupScheduleOptions { + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.DoNotExportAttribute()] + param( + [Parameter(Mandatory)] + [ValidateNotNullOrEmpty()] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicy] + ${Policy}, + + [Parameter(Mandatory)] + [ValidateNotNullOrEmpty()] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.DatasourceTypes] + ${DatasourceType}, + + [Parameter(Mandatory)] + [ref] + ${PolicySubType}, + + [Parameter(Mandatory)] + [ref] + ${HourlyInterval}, + + [Parameter(Mandatory)] + [ref] + ${HourlyScheduleWindowDuration}, + + [Parameter(Mandatory)] + [ref] + ${EnableLogBackup}, + + [Parameter(Mandatory)] + [ref] + ${LogBackupFrequencyInMin}, + + [Parameter(Mandatory)] + [ref] + ${EnableDifferentialBackup}, + + [Parameter(Mandatory)] + [ref] + ${DifferentialRunDay}, + + [Parameter(Mandatory)] + [ref] + ${DifferentialScheduleTime}, + + [Parameter(Mandatory)] + [ref] + ${EnableIncrementalBackup}, + + [Parameter(Mandatory)] + [ref] + ${IncrementalRunDay}, + + [Parameter(Mandatory)] + [ref] + ${IncrementalScheduleTime}, + + [Parameter(Mandatory)] + [ref] + ${BackupFrequency}, + + [Parameter(Mandatory)] + [ref] + ${ScheduleRunDay}, + + [Parameter(Mandatory)] + [ref] + ${ScheduleTime} + ) + + process + { + Write-Debug "Validating Backup Schedule Options" + Write-Debug -Message $DatasourceType + + # Log all the parameters + Write-Debug -Message "Policy: $Policy" + Write-Debug -Message "DatasourceType: $DatasourceType" + Write-Debug -Message "PolicySubType: $PolicySubType.Value" + Write-Debug -Message "HourlyInterval: $HourlyInterval.Value" + Write-Debug -Message "HourlyScheduleWindowDuration: $HourlyScheduleWindowDuration.Value" + Write-Debug -Message "EnableLogBackup: $EnableLogBackup.Value" + Write-Debug -Message "LogBackupFrequencyInMin: $LogBackupFrequencyInMin.Value" + Write-Debug -Message "EnableDifferentialBackup: $EnableDifferentialBackup.Value" + Write-Debug -Message "DifferentialRunDay: $DifferentialRunDay.Value" + Write-Debug -Message "DifferentialScheduleTime: $DifferentialScheduleTime.Value" + Write-Debug -Message "EnableIncrementalBackup: $EnableIncrementalBackup.Value" + Write-Debug -Message "IncrementalRunDay: $IncrementalRunDay.Value" + Write-Debug -Message "IncrementalScheduleTime: $IncrementalScheduleTime.Value" + Write-Debug -Message "BackupFrequency: $BackupFrequency.Value" + Write-Debug -Message "ScheduleRunDay: $ScheduleRunDay.Value" + Write-Debug -Message "ScheduleTime: $ScheduleTime.Value" + + $manifest = LoadManifest -DatasourceType $DatasourceType + + Write-Debug -Message "Manifest: $manifest" + + $FullBackupPolicy = $Policy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Full" } + $LogBackupPolicy = $Policy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Log" } + $DifferentialPolicy = $Policy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Differential" } + $IncrementalPolicy = $Policy.SubProtectionPolicy | Where-Object { $_.PolicyType -match "Incremental" } + + # Validate BackupFrequency + + if(-not $BackupFrequency.Value) { + Write-Debug "BackupFrequency is empty" + if ($manifest.allowedSubProtectionPolicyTypes.Count -gt 2) { + # SAPHANA case + if(-not $FullBackupPolicy.SchedulePolicy.ScheduleRunFrequency) { + $errormsg = "BackupFrequency cannot be empty for FullBackup" + throw $errormsg + } + else { + $BackupFrequency.Value = $FullBackupPolicy.SchedulePolicy.ScheduleRunFrequency + } + } + else { + # AzureVM case + Write-Debug "AzureVM case" + if(-not $Policy.SchedulePolicy.ScheduleRunFrequency) { + $errormsg = "BackupFrequency cannot be empty for FullBackup" + throw $errormsg + } + else { + Write-Debug "assigning BackupFrequency" + $BackupFrequency.Value = $Policy.SchedulePolicy.ScheduleRunFrequency + } + } + } + + Write-Debug -Message $BackupFrequency.Value + + if (-not $manifest.allowedBackupFrequencies.Contains($BackupFrequency.Value)) { + $allowedValues = [System.String]::Join(', ', $manifest.allowedBackupFrequencies) + $errormsg = "Specified BackupFrequency " + $BackupFrequency.Value + " is not supported for DatasourceType " + $DatasourceType + "`nAllowed values are: " + $allowedValues + throw $errormsg + } + + # Validate ScheduleTime + + if(-not $ScheduleTime.Value) { + if ($manifest.allowedSubProtectionPolicyTypes.Count -gt 2) { + # SAPHANA case + Write-Debug "SAPHANA case" + if($FullBackupPolicy.SchedulePolicy.ScheduleRunTime.Count -lt 1) { + $errormsg = "ScheduleTime cannot be empty for FullBackup" + throw $errormsg + } + else { + Write-Debug "$FullBackupPolicy.SchedulePolicy.ScheduleRunTime[0]" + $ScheduleTime.Value = ($FullBackupPolicy.SchedulePolicy.ScheduleRunTime[0]).toString("h:mm tt") + } + } + else { + # AzureVM case + if($Policy.SchedulePolicy.ScheduleRunTime.Count -lt 1) { + $errormsg = "ScheduleTime cannot be empty for FullBackup" + throw $errormsg + } + else { + Write-Debug "$Policy.SchedulePolicy.ScheduleRunTime[0]" + $ScheduleTime.Value = ($Policy.SchedulePolicy.ScheduleRunTime[0]).ToString("h:mm tt") + } + } + } + + # Validate ScheduleRunDay + + if( (-not $ScheduleRunDay.Value) -and ($BackupFrequency.Value -eq "Weekly") ) { + if ($manifest.allowedSubProtectionPolicyTypes.Count -gt 2) { + # SAPHANA case + if(-not $FullBackupPolicy.SchedulePolicy.ScheduleRunDays) { + $errormsg = "ScheduleRunDay cannot be empty for Weekly FullBackup" + throw $errormsg + } + else { + $ScheduleRunDay.Value = $FullBackupPolicy.SchedulePolicy.ScheduleRunDays + } + } + else { + # AzureVM case + if(-not $Policy.SchedulePolicy.ScheduleRunDay) { + $errormsg = "ScheduleRunDay cannot be empty for Weekly FullBackup" + throw $errormsg + } + else { + $ScheduleRunDay.Value = $Policy.SchedulePolicy.ScheduleRunDays + } + } + } + + # Validate PolicySubType + + if($PolicySubType.Value -eq "Enhanced") { + if(-not $manifest.supportsEnhanced) { + $errormsg = "Enhanced backup policies are not supported by " + $DatasourceType + throw $errormsg + } + } + + # Validate Hourly specific parameters + + if ($HourlyInterval.Value -or $HourlyScheduleWindowDuration.Value) { + Write-Debug "Checking Hourly" + Write-Debug -Message "BackupFrequency is $BackupFrequency.Value and PolicySubType is $PolicySubType.Value" + if (-not ( ($BackupFrequency.Value -eq "Hourly") -and ($PolicySubType.Value -eq "Enhanced") )) { + $errormsg = "Hourly parameters can only be set for Enhanced Hourly backups" + throw $errormsg + } + } + + if ($BackupFrequency.Value -eq "Hourly") { + if(-not $HourlyInterval.Value) { + if(-not $Policy.SchedulePolicy.HourlySchedule.Interval) { + $errormsg = "HourlyInterval cannot be empty for Hourly backups" + } + else { + $HourlyInterval.Value = $policyObject.SchedulePolicy.HourlySchedule.Interval + } + } + + if(-not $HourlyScheduleWindowDuration.Value) { + if(-not $Policy.SchedulePolicy.HourlySchedule.ScheduleWindowDuration) { + $errormsg = "HourlyScheduleWindowDuration cannot be empty for Hourly backups" + } + else { + $HourlyScheduleWindowDuration.Value = $policyObject.SchedulePolicy.HourlySchedule.ScheduleWindowDuration + } + } + + if($HourlyScheduleWindowDuration.Value % $HourlyInterval.Value -ne 0) { + $errormsg = "HourlyScheduleWindowDuration must be greater than and a multiple of HourlyInterval" + throw $errormsg + } + + } + + + # Validate Log Backup parameters + + if($EnableLogBackup.Value) { + if (-not $manifest.allowedSubProtectionPolicyTypes.Contains("Log")) { + $errormsg = "LogBackup is not supported for DatasourceType " + $DatasourceType + throw $errormsg + } + + if (-not $LogBackupFrequencyInMin.Value) { + if($LogBackupPolicy.SchedulePolicy.ScheduleFrequencyInMin) { + $LogBackupFrequencyInMin.Value = $LogBackupPolicy.SchedulePolicy.ScheduleFrequencyInMin + } + else { + $errormsg = "LogBackupFrequencyInMin cannot be empty for LogBackup" + throw $errormsg + } + } + } + + # Validate Differential parameters + + if ($EnableDifferentialBackup.Value -or ($DifferentialRunDay.Value) -or ($DifferentialScheduleTime.Value)) { + if(-not $EnableDifferentialBackup.Value) { + $errormsg = "Differential backup parameters cannot be set when EnableDifferentialBackup is not set to True, please pass EnableDifferentialBackup as True to enable it." + throw $errormsg + } + + if( ( -not $manifest.allowedSubProtectionPolicyTypes.Contains("Differential") ) -or ( ($BackupFrequency.Value -ne "Weekly") ) ) { + $errormsg = "Differential backups are not supported for " + $BackupFrequency.Value + " " + $DatasourceType + " backups" + throw $errormsg + } + + if (($IncrementalPolicy -ne $null) -and ($EnableIncrementalBackup.Value -ne "False") ) { + $errormsg = "Differential backup cannot be enabled when Incremental backup is enabled, pass EnableIncrementalBackup as False to disable it" + throw $errormsg + } + } + + if ($EnableDifferentialBackup.Value) { + if (-not $DifferentialRunDay.Value) { + if (-not $DifferentialPolicy.SchedulePolicy.ScheduleRunDay) { + $errormsg = "DifferentialRunDay cannot be empty for Differential backups" + throw $errormsg + } + else { + $DifferentialRunDay.Value = $DifferentialPolicy.SchedulePolicy.ScheduleRunDays + } + } + + $commonDays = Compare-Object -ReferenceObject $ScheduleRunDay.Value -DifferenceObject $DifferentialRunDay.Value -IncludeEqual -ExcludeDifferent + + if ($commonDays.Count -gt 0) { + $errormsg = "Differential backups cannot be scheduled on same days as Full backups." + throw $errormsg + } + + if (-not $DifferentialScheduleTime.Value) { + if (-not $DifferentialPolicy.SchedulePolicy.ScheduleRunTime) { + $errormsg = "DifferentialScheduleTime cannot be empty for Differential backups" + throw $errormsg + } + else { + $DifferentialScheduleTime.Value = $DifferentialPolicy.SchedulePolicy.ScheduleRunTime[0] + } + } + } + + # Validate Incremental parameters + + if ($EnableIncrementalBackup.Value -or ($IncrementalRunDay.Value) -or ($IncrementalScheduleTime.Value)) { + + if (-not $EnableIncrementalBackup.Value) { + $errormsg = "Incremental backup parameters cannot be set when EnableIncrementalBackup is not set to True, please pass EnableIncrementalBackup as True to enable it." + throw $errormsg + } + + if( ( -not $manifest.allowedSubProtectionPolicyTypes.Contains("Incremental") ) -or ( ($BackupFrequency.Value -ne "Weekly") ) ) { + $errormsg = "Incremental backups are not supported for " + $BackupFrequency.Value + " " + $DatasourceType + " backups" + throw $errormsg + } + + if (($DifferentialPolicy -ne $null) -and ($EnableDifferentialBackup.Value -ne "False") ) { + $errormsg = "Incremental backup cannot be enabled when Differential backup is enabled, pass EnableDifferentialBackup as False to disable it" + throw $errormsg + } + } + + if ($EnableIncrementalBackup.Value) { + if (-not $IncrementalRunDay.Value) { + if (-not $IncrementalPolicy.SchedulePolicy.ScheduleRunDay) { + $errormsg = "IncrementalRunDay cannot be empty for Incremental backups" + throw $errormsg + } + else { + $IncrementalRunDay.Value = $IncrementalPolicy.SchedulePolicy.ScheduleRunDays + } + } + + $commonDays = Compare-Object -ReferenceObject $ScheduleRunDay.Value -DifferenceObject $IncrementalRunDay.Value -IncludeEqual -ExcludeDifferent + + if ($commonDays.Count -gt 0) { + $errormsg = "Incremental backups cannot be scheduled on same days as Full backups." + throw $errormsg + } + + if (-not $IncrementalScheduleTime.Value) { + if (-not $IncrementalPolicy.SchedulePolicy.ScheduleRunTime) { + $errormsg = "IncrementalScheduleTime cannot be empty for Incremental backups" + throw $errormsg + } + else { + $IncrementalScheduleTime.Value = $IncrementalPolicy.SchedulePolicy.ScheduleRunTime[0] + } + } + } + + Write-Debug "Validating parameters completed" + + # Print all parameters to be returned + Write-Debug -Message "Policy: $Policy" + Write-Debug -Message "DatasourceType: $DatasourceType" + Write-Debug -Message "PolicySubType: $PolicySubType.Value" + Write-Debug -Message "HourlyInterval: $HourlyInterval.Value" + Write-Debug -Message "HourlyScheduleWindowDuration: $HourlyScheduleWindowDuration.Value" + Write-Debug -Message "EnableLogBackup: $EnableLogBackup.Value" + Write-Debug -Message "LogBackupFrequencyInMin: $LogBackupFrequencyInMin.Value" + Write-Debug -Message "EnableDifferentialBackup: $EnableDifferentialBackup.Value" + Write-Debug -Message "DifferentialRunDay: $DifferentialRunDay.Value" + Write-Debug -Message "DifferentialScheduleTime: $DifferentialScheduleTime.Value" + Write-Debug -Message "EnableIncrementalBackup: $EnableIncrementalBackup.Value" + Write-Debug -Message "IncrementalRunDay: $IncrementalRunDay.Value" + Write-Debug -Message "IncrementalScheduleTime: $IncrementalScheduleTime.Value" + Write-Debug -Message "BackupFrequency: $BackupFrequency.Value" + Write-Debug -Message "ScheduleRunDay: $ScheduleRunDay.Value" + Write-Debug -Message "ScheduleTime: $ScheduleTime.Value" + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/ContainerHelper.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/ContainerHelper.ps1 new file mode 100644 index 000000000000..7a52642f6933 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/ContainerHelper.ps1 @@ -0,0 +1,33 @@ + +# Summary: get BackupManagementType from ContainerType +function GetBackupManagementTypeFromContainerType { + [OutputType('string')] + [CmdletBinding(PositionalBinding=$false)] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.DoNotExportAttribute()] + + param( + [Parameter(Mandatory=$true)] + [System.String] + $ContainerType + ) + + process { + + #AzureVM, Windows, AzureStorage, AzureVMAppContainer + if($ContainerType -eq "AzureVM"){ + return "AzureIaasVM" + } + elseif($ContainerType -eq "AzureVMAppContainer"){ + return "AzureWorkload" + } + elseif($ContainerType -eq "AzureStorage"){ + return "AzureStorage" + } + elseif($ContainerType -eq "Windows"){ + return "MAB" + } + + # Return null if no match found + return $null + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/GetFilter.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/GetFilter.ps1 new file mode 100644 index 000000000000..001a2f008efb --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/GetFilter.ps1 @@ -0,0 +1,197 @@ + +# Summary: takes BackupManagementType, FriendlyName as input & gives filter for get container command +function Get-ContainerFilter { + [OutputType('string')] + [CmdletBinding(PositionalBinding=$false)] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.DoNotExportAttribute()] + + param( + [Parameter(Mandatory=$true)] + [System.String] + $ContainerType, + + [Parameter(Mandatory=$false)] + [System.String] + $FriendlyName, + + [Parameter(Mandatory=$false)] + [System.String] + $DatasourceType + ) + + process { + + $containerBackupManagementType = GetBackupManagementTypeFromContainerType -ContainerType $ContainerType + + $backupManagementType = $null + if($DatasourceType -ne ""){ + $backupManagementType = GetBackupManagementTypeFromDatasourceType -DatasourceType $DatasourceType + } + + if($backupManagementType -ne $null -and $containerBackupManagementType -ne $backupManagementType){ + $errormsg = "DatasourceType $DatasourceType provided for ContainerType $ContainerType is incorrect" + throw $errormsg + } + + $filter = $null + if($FriendlyName -ne ""){ + $filter = "friendlyName eq '$FriendlyName' and backupManagementType eq '$containerBackupManagementType'" + } + else { + $filter = "backupManagementType eq '$containerBackupManagementType'" + } + + # Return null if no match found + return $filter + } +} + +# Summary: takes DatasourceType, Container as input & gives filter for list backup items +function Get-ProtectedItemFilter { + [OutputType('string')] + [CmdletBinding(PositionalBinding=$false)] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.DoNotExportAttribute()] + + param( + [Parameter(Mandatory=$true)] + [System.String] + $DatasourceType, + + [Parameter(Mandatory=$false)] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionContainerResource] + $Container, + + [Parameter(Mandatory=$false)] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicyResource] + $Policy + ) + + process { + + $backupManagementType = GetBackupManagementTypeFromDatasourceType -DatasourceType $DatasourceType + $filter = "backupManagementType eq '$backupManagementType'" + + if($backupManagementType -ne $null -and $Container -ne $null -and $Container.BackupManagementType -ne $backupManagementType ){ + $errormsg = "DatasourceType $DatasourceType is not compatible with the input container" + throw $errormsg + } + + $itemType = GetItemTypeFromDatasourceType -DatasourceType $DatasourceType + if($itemType -ne $null){ + $filter += " and itemType eq '$itemType'" + } + + if($Policy -ne $null){ + $filter += " and policyName eq '$($Policy.Name)'" + } + + # backupManagementType eq 'AzureIaasVM' and itemType eq 'VM' and policyName eq 'DefaultPolicy' + return $filter + } +} + +# Summary: takes $DatasourceType, $Container or $ParentID as input & gives filter for list protectable items +function Get-ProtectableItemFilter { + [OutputType('string')] + [CmdletBinding(PositionalBinding=$false)] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.DoNotExportAttribute()] + + param( + [Parameter(ParameterSetName="DataSourceParamSet", Mandatory=$true)] + [System.String] + $DatasourceType, + + [Parameter(ParameterSetName="DataSourceParamSet", Mandatory=$false)] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionContainerResource] + $Container, + + [Parameter(ParameterSetName="IdParamSet", Mandatory=$true)] + [System.String] + $ParentID + ) + + process { + $backupManagementType = "AzureWorkload" + $workloadType = "" + $filter = "" + + # TODO: try without $ParentID first + if($ParentID -ne ""){ + Write-Debug " .... IdParamSet" + $containerURI = Get-ContainerNameFromArmId -Id $ParentID + $protectableItemURI = Get-ProtectableItemNameFromArmId -Id $ParentID + + if($protectableItemURI.ToLower() -match "sqlinstance" || $protectableItemURI.ToLower() -match "sqlavailabilitygroupcontainer"){ + $workloadType = "SQLDataBase" + } + + $filter = "backupManagementType eq '$backupManagementType' and workloadType eq '$workloadType' and containerName eq '$containerURI'" + } + else{ + Write-Debug " .... DataSourceParamSet" + + $workloadType = GetItemTypeFromDatasourceType -DatasourceType $DatasourceType + + if($Container -ne $null){ + $backupManagementType = $Container.BackupManagementType + $containerName = $Container.Name + + $filter = "backupManagementType eq '$backupManagementType' and workloadType eq '$workloadType' and containerName eq '$containerName'" + } + else { + $filter = "backupManagementType eq '$backupManagementType' and workloadType eq '$workloadType'" + } + } + + return $filter + } +} + +# Summary: takes $ItemType, $ItemName, $ParentName, $BackupManagementType as input & gives filter for list protection intent +function Get-ProtectionIntentFilter { + [OutputType('string')] + [CmdletBinding(PositionalBinding=$false)] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.DoNotExportAttribute()] + + param( + [Parameter(Mandatory=$true)] + [System.String] + $ItemType, + + [Parameter(Mandatory=$true)] + [System.String] + $ItemName, + + [Parameter(Mandatory=$true)] + [System.String] + $ParentName, + + [Parameter(Mandatory=$true)] + [System.String] + $BackupManagementType + ) + + process { + + return "itemType eq '$ItemType' and itemName eq '$ItemName' and parentName eq '$ParentName' and backupManagementType eq '$BackupManagementType'" + } +} + +# Summary: takes backupManagementType as input & gives filter. This works for refresh container APIs. +function Get-BackupManagementTypeFilter { + [OutputType('string')] + [CmdletBinding(PositionalBinding=$false)] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.DoNotExportAttribute()] + + param( + [Parameter(Mandatory=$true)] + [System.String] + $DatasourceType + ) + + process { + $backupManagementType = GetBackupManagementTypeFromDatasourceType -DatasourceType $DatasourceType + return "backupManagementType eq '$backupManagementType'" + } +} + \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/GetFromArmId.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/GetFromArmId.ps1 new file mode 100644 index 000000000000..d2f5c3dfc358 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/GetFromArmId.ps1 @@ -0,0 +1,47 @@ +function Get-ContainerNameFromArmId { + param( + [System.String]$Id + ) + $containerName = (($Id -split "protectionContainers/")[1] -split "/")[0] + return $containerName +} + +function Get-ProtectableItemNameFromArmId { + param( + [System.String]$Id + ) + $ItemName = (($Id -split "protectableItems/")[1] -split "/")[0] + return $ItemName +} + +function Get-ProtectedItemNameFromArmId { + param( + [System.String]$Id + ) + $ItemName = (($Id -split "protectedItems/")[1] -split "/")[0] + return $ItemName +} + +function Get-SbscriptionIdFromArmId { + param( + [System.String]$Id + ) + $subscriptionId = (($Id -split "/subscriptions/")[1] -split "/")[0] + return $subscriptionId +} + +function Get-ResourceGroupNameFromArmId { + param( + [System.String]$Id + ) + $resourceGroupName = (($Id -split "/resourceGroups/")[1] -split "/")[0] + return $resourceGroupName +} + +function Get-VaultNameFromArmId { + param( + [System.String]$Id + ) + $vaultName = (($Id -split "/vaults/")[1] -split "/")[0] + return $vaultName +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/PolicyHelpers.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/PolicyHelper.ps1 similarity index 98% rename from src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/PolicyHelpers.ps1 rename to src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/PolicyHelper.ps1 index 9282a8a58fdb..5e7bb16f6d8e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/PolicyHelpers.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/PolicyHelper.ps1 @@ -247,7 +247,7 @@ function ValidateRetentionParameters { $Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType=$MonthlyRetentionScheduleType } } - if(($MonthlyRetentionScheduleType -eq "Weekly") -or ($DataSourceType -eq "AzureVM" -and $Policy.RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType -eq "Weekly") -or ((($DatasourceType -eq "SAPHANA") -or ($DatasourceType -eq "MSSQL")) -and ($Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType -eq "Weekly"))) + if(($MonthlyRetentionScheduleType -eq "Weekly") -or ($DatasourceType -eq "AzureVM" -and $Policy.RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType -eq "Weekly") -or ((($DatasourceType -eq "SAPHANA") -or ($DatasourceType -eq "MSSQL")) -and ($Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType -eq "Weekly"))) { $parametersEntered = [System.Collections.ArrayList]::new() if ($MonthlyRetentionDaysOfTheMonth) @@ -268,7 +268,7 @@ function ValidateRetentionParameters { throw $errormsg } } - elseif( ($MonthlyRetentionScheduleType -eq "Daily") -or ($DataSourceType -eq "AzureVM" -and $Policy.RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType -eq "Daily") -or ((($DatasourceType -eq "SAPHANA") -or ($DatasourceType -eq "MSSQL")) -and ($Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType -eq "Daily"))) + elseif( ($MonthlyRetentionScheduleType -eq "Daily") -or ($DatasourceType -eq "AzureVM" -and $Policy.RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType -eq "Daily") -or ((($DatasourceType -eq "SAPHANA") -or ($DatasourceType -eq "MSSQL")) -and ($Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionScheduleFormatType -eq "Daily"))) { $parametersEntered = [System.Collections.ArrayList]::new() if ($MonthlyRetentionDaysOfTheWeek) @@ -336,7 +336,7 @@ function ValidateRetentionParameters { } } - if( ($YearlyRetentionScheduleType -eq "Weekly") -or ($DataSourceType -eq "AzureVM" -and $Policy.RetentionPolicy.YearlySchedule.RetentionScheduleFormatType -eq "Weekly" ) -or ((($DatasourceType -eq "SAPHANA") -or ($DatasourceType -eq "MSSQL")) -and ($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleFormatType -eq "Weekly"))) + if( ($YearlyRetentionScheduleType -eq "Weekly") -or ($DatasourceType -eq "AzureVM" -and $Policy.RetentionPolicy.YearlySchedule.RetentionScheduleFormatType -eq "Weekly" ) -or ((($DatasourceType -eq "SAPHANA") -or ($DatasourceType -eq "MSSQL")) -and ($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleFormatType -eq "Weekly"))) { $parametersEntered = [System.Collections.ArrayList]::new() if ($YearlyRetentionDaysOfTheMonth) @@ -357,7 +357,7 @@ function ValidateRetentionParameters { throw $errormsg } } - elseif(($YearlyRetentionScheduleType -eq "Daily") -or ($DataSourceType -eq "AzureVM" -and $Policy.RetentionPolicy.YearlySchedule.RetentionScheduleFormatType -eq "Daily") -or ((($DatasourceType -eq "SAPHANA") -or ($DatasourceType -eq "MSSQL")) -and ($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleFormatType -eq "Daily"))) + elseif(($YearlyRetentionScheduleType -eq "Daily") -or ($DatasourceType -eq "AzureVM" -and $Policy.RetentionPolicy.YearlySchedule.RetentionScheduleFormatType -eq "Daily") -or ((($DatasourceType -eq "SAPHANA") -or ($DatasourceType -eq "MSSQL")) -and ($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleFormatType -eq "Daily"))) { $parametersEntered = [System.Collections.ArrayList]::new() if ($YearlyRetentionDaysOfTheWeek) @@ -563,7 +563,6 @@ function ValidateMandatoryFields { $errormsg = "Daily retention duration in days must not be empty " throw $errormsg } - #Write-Host "Daily retention duration in days: $($policy.RetentionPolicy.DailySchedule.RetentionDuration.Count)" } } @@ -593,19 +592,18 @@ function ValidateMandatoryFields { $errormsg = "Weekly retention days of the week must not be empty" throw $errormsg } - if($Policy.RetentionPolicy.WeeklySchedule.RetentionDuration.Count -eq ($null -or 0)) + if(($Policy.RetentionPolicy.WeeklySchedule.RetentionDuration.Count -eq 0) -or ($Policy.RetentionPolicy.WeeklySchedule.RetentionDuration.Count -eq $null)) { $errormsg = "Weekly retention duration in weeks must not be empty " throw $errormsg } - #Write-Host "Weekly retention duration in weeks: $($Policy.RetentionPolicy.WeeklySchedule.RetentionDuration.Count)" - #Write-Host "Weekly retention days of the week: $($Policy.RetentionPolicy.WeeklySchedule.DaysOfTheWeek)" } } # Validate Monthly Retention Parameters if ($EnableMonthlyRetention -eq $true) { + if($manifest.allowedSubProtectionPolicyTypes.Count -gt 2) #SAPHANA/MSSQL { if(($Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionDuration[0].Count -eq $null) -or ($Policy.SubProtectionPolicy[$Index].RetentionPolicy.MonthlySchedule.RetentionDuration[0].Count -eq 0)) @@ -703,7 +701,7 @@ function ValidateMandatoryFields { { $errormsg = "Months of the year must not be empty for week based Yearly retention." throw $errormsg - } + } } elseif($Policy.SubProtectionPolicy[$Index].RetentionPolicy.YearlySchedule.RetentionScheduleFormatType -eq "Daily") { @@ -723,6 +721,7 @@ function ValidateMandatoryFields { $errormsg="RetentionScheduleFormatType cannot be null. Please specify the type: daily/weekly" throw $errormsg } + } else #AzureVM { diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/RestoreHelper.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/RestoreHelper.ps1 new file mode 100644 index 000000000000..597459a3a97d --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/RestoreHelper.ps1 @@ -0,0 +1,158 @@ +function Get-SourceResourceId { + [OutputType('string')] + [CmdletBinding(PositionalBinding=$false)] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.DoNotExportAttribute()] + + param ( + [Parameter(ParameterSetName='InitializeRestoreRequest', HelpMessage='Specifies the recovery point.')] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IRecoveryPointResource] + ${RecoveryPoint} + ) + + process { + $RecoveryPointId = $RecoveryPoint.Id + + $pattern = '/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft\.RecoveryServices/vaults/(?[^/]+)' + $matches = [regex]::Match($RecoveryPointId, $pattern) + $SourceSubscriptionId = $matches.Groups["subscriptionId"].Value + $SourceResourceGroupName = $matches.Groups["resourceGroupName"].Value + $SourceVaultName = $matches.Groups["vaultName"].Value + + $pattern = "/protectedItems/(?[^/]+)/recoveryPoints" + $matches = [regex]::Match($RecoveryPointId, $pattern) + $ProtectedItemName = $matches.Groups["ProtectedItemName"].Value + + $ProtectedItems = Get-AzRecoveryServicesBackupProtectedItem -ResourceGroupName $SourceResourceGroupName -VaultName $SourceVaultName -SubscriptionId $SourceSubscriptionId + + $SelectedProtectedItem = $ProtectedItems | Where-Object {$_.Name -eq $ProtectedItemName} + + $SelectedProtectedItem.SourceResourceId + } +} + +function ValidateRetentionConfig { + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.DoNotExportAttribute()] + param ( + [Parameter(Mandatory)] + [string] + ${ObjectType}, + + [Parameter(Mandatory)] + [string] + ${TargetContainerId}, + + [Parameter(Mandatory)] + [string] + ${TargetVirtualMachineId}, + + [Parameter(Mandatory)] + [string] + ${TargetDirectory}, + + [Parameter(Mandatory)] + [string] + ${TargetResourceGroupId}, + + [Parameter(Mandatory)] + [string] + ${DatabaseName}, + + [Parameter(Mandatory)] + [string] + ${OverwriteOption}, + + [Parameter(Mandatory)] + [string] + ${SourceResourceId}, + + [Parameter(Mandatory)] + [string] + ${RecoveryType}, + + [Parameter(Mandatory)] + [string] + ${RecoveryMode}, + + # AzureVM specific parameters + + [Parameter(Mandatory)] + [string] + ${RecoveryPointId}, + + [Parameter(Mandatory)] + [string] + ${StorageAccountId}, + + [Parameter(Mandatory)] + [string] + ${VirtualNetworkId}, + + [Parameter(Mandatory)] + [string] + ${SubnetId}, + + [Parameter(Mandatory)] + [string] + ${Region}, + + # SQL specific parameters + + [Parameter(Mandatory)] + [bool] + ${NonRecoverable}, + + [Parameter(Mandatory)] + [string] + ${DataSourceLogicalName}, + + [Parameter(Mandatory)] + [string] + ${DataSourcePath}, + + [Parameter(Mandatory)] + [string] + ${DataTargetPath}, + + [Parameter(Mandatory)] + [string] + ${LogSourceLogicalName}, + + [Parameter(Mandatory)] + [string] + ${LogSourcePath}, + + [Parameter(Mandatory)] + [string] + ${LogTargetPath} + ) + + process { + Write-Debug "Validating retention config" + + # Log all the parameters + Write-Debug -Message "ObjectType: $ObjectType" + Write-Debug -Message "TargetContainerId: $TargetContainerId" + Write-Debug -Message "TargetVirtualMachineId: $TargetVirtualMachineId" + Write-Debug -Message "TargetDirectory: $TargetDirectory" + Write-Debug -Message "TargetResourceGroupId: $TargetResourceGroupId" + Write-Debug -Message "DatabaseName: $DatabaseName" + Write-Debug -Message "OverwriteOption: $OverwriteOption" + Write-Debug -Message "SourceResourceId: $SourceResourceId" + Write-Debug -Message "RecoveryType: $RecoveryType" + Write-Debug -Message "RecoveryMode: $RecoveryMode" + Write-Debug -Message "RecoveryPointId: $RecoveryPointId" + Write-Debug -Message "StorageAccountId: $StorageAccountId" + Write-Debug -Message "VirtualNetworkId: $VirtualNetworkId" + Write-Debug -Message "SubnetId: $SubnetId" + Write-Debug -Message "Region: $Region" + Write-Debug -Message "NonRecoverable: $NonRecoverable" + Write-Debug -Message "DataSourceLogicalName: $DataSourceLogicalName" + Write-Debug -Message "DataSourcePath: $DataSourcePath" + Write-Debug -Message "DataTargetPath: $DataTargetPath" + Write-Debug -Message "LogSourceLogicalName: $LogSourceLogicalName" + Write-Debug -Message "LogSourcePath: $LogSourcePath" + Write-Debug -Message "LogTargetPath: $LogTargetPath" + + # Validate the parameters + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/commonhelper.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/commonhelper.ps1 index ef9a67602ea8..d56247aaea13 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/commonhelper.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Helpers/commonhelper.ps1 @@ -1,5 +1,7 @@ -# takes bacvkupmanagement type and workload type as i/p & gives dataspurce type -function Get-DataSourceType { +# takes backupmanagement type and workload type as i/p & gives dataspurce type +function Get-DatasourceType { + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.DoNotExportAttribute()] + param( [string]$BackupManagementType, [string]$WorkloadType @@ -8,13 +10,136 @@ function Get-DataSourceType { if ($BackupManagementType -eq "AzureWorkload") { if ($WorkloadType -eq "SAPHanaDatabase") { return "SAPHANA" - } elseif ($WorkloadType -eq "SQLDataBase") { + } + elseif ($WorkloadType -eq "SQLDataBase") { return "MSSQL" } - } elseif ($BackupManagementType -eq "AzureIaasVM") { + } + elseif ($BackupManagementType -eq "AzureIaasVM") { return "AzureVM" } + elseif($BackupManagementType -eq "AzureStorage"){ + return "AzureFiles" + } # Return null if no match found return $null +} + +# Summary: get service client backupmanagement type from datasource type +function GetBackupManagementTypeFromDatasourceType { + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.DoNotExportAttribute()] + + param( + [Parameter(Mandatory=$true)] + [System.String] + $DatasourceType + ) + + process { + # TODO: can this be manifest based directly? + if($DatasourceType -eq "AzureVM"){ + return "AzureIaasVM" + } + + elseif ($DatasourceType -eq "MSSQL" -or $DatasourceType -eq "SAPHANA") { + return "AzureWorkload" + } + + elseif($DatasourceType -eq "AzureFiles"){ + return "AzureStorage" + } + + elseif($DatasourceType -eq "MAB"){ + return "MAB" + } + + # Return null if no match found + return $null + } +} + +# Get service client Item type from datasourcetype +# can be used as GetWorkloadTypeFromDatasourceType +function GetItemTypeFromDatasourceType { + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.DoNotExportAttribute()] + + param( + [Parameter(Mandatory=$true)] + [System.String] + $DatasourceType + ) + + process { + + if($DatasourceType -eq "AzureVM"){ + return "VM" + } + + elseif ($DatasourceType -eq "MSSQL") { + return "SQLDataBase" + } + + elseif($DatasourceType -eq "AzureFiles"){ + return "AzureFileShare" + } + + elseif($DatasourceType -eq "SAPHANA"){ + return "SAPHanaDatabase" + } + + return $null + } +} + +# Summary: get datasourcetype from datasource type from policy +function GetDatasourceTypeFromPolicy { + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.DoNotExportAttribute()] + + param( + [Parameter(Mandatory=$true)] + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicyResource] + $Policy + ) + + process { + + $DatasourceType = Get-DatasourceType -BackupManagementType $Policy.BackupManagementType -WorkloadType $Policy.Property.WorkLoadType + return $DatasourceType + } +} + +# Summary: takes OerationRepsonse.Target as input, tracks the operationStatus to Success/Failure +function GetOperationStatus { + [Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.DoNotExportAttribute()] + + param( + [Parameter(Mandatory=$true)] + [System.String] + $Target, + + [Parameter(Mandatory=$false)] + [System.String] + $RefreshAfter = 10 + ) + + process { + + $operationId = $Target.Split("/")[-1].Split("?")[0] + $resourceGroupName = Get-ResourceGroupNameFromArmId -Id $Target + $vaultName = Get-VaultNameFromArmId -Id $Target + $subscriptionId = Get-SbscriptionIdFromArmId -Id $Target + + + # operationStatus + While((Get-AzRecoveryServicesOperationStatus -OperationId $operationId -ResourceGroupName $resourceGroupName -SubscriptionId $subscriptionId -VaultName $vaultName).Status -eq "InProgress"){ + + Write-Debug "Polling after $RefreshAfter seconds" + Start-Sleep -Seconds $RefreshAfter + } + + $operationStatus = (Get-AzRecoveryServicesOperationStatus -OperationId $operationId -ResourceGroupName $resourceGroupName -SubscriptionId $subscriptionId -VaultName $vaultName).Status + + return $operationStatus + } } \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Models/WorkloadProtectableItemResource.cs b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Models/WorkloadProtectableItemResource.cs new file mode 100644 index 000000000000..80439fa052ca --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Models/WorkloadProtectableItemResource.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201 +{ + public partial class WorkloadProtectableItemResource + { + public string AutoProtectionPolicy { get; set; } + public Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IDistributedNodesInfo[] NodesList { get; set; } + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/AzureFiles.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/AzureFiles.json new file mode 100644 index 000000000000..9d429ba375ed --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/AzureFiles.json @@ -0,0 +1,18 @@ +{ + "filterPolicyBasedonWorkloadType": false, + "allowedSubProtectionPolicyTypes": [ "Full", "Differential", "Incremental", "Log" ], + "allowedBackupFrequencies": [ "Daily", "Weekly" ], + "supportsEnhanced": false, + "allowedDifferentialParams": [ "DifferentialRetentionPeriodInDays" ], + "allowedIncrementalParams": [ "IncrementalRetentionPeriodInDays" ], + "allowedLogParams": [ "LogRetentionPeriodInDays" ], + "allowedDaysOfTheWeek": [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], + "allowedMonthsOfTheYear": [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ], + "allowedWeeksOfTheMonth": [ "First", "Second", "Third", "Fourth", "Last" ], + "IsSmartTieringSupported": true, + "containerInquiryType": null, + "protectedItemType": "AzureVMWorkloadSapHanaDatabaseProtectedItem", + "policySettings": { + + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/AzureVM.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/AzureVM.json index 75adbdcf362b..b868bae9671f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/AzureVM.json +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/AzureVM.json @@ -1,4 +1,5 @@ { + "filterPolicyBasedonWorkloadType": false, "allowedSubProtectionPolicyTypes": [ "Full" ], "allowedBackupFrequencies": [ "Daily", "Weekly", "Hourly" ], "supportsEnhanced": true, @@ -9,6 +10,8 @@ "allowedMonthsOfTheYear": [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ], "allowedWeeksOfTheMonth": [ "First", "Second", "Third", "Fourth", "Last" ], "IsSmartTieringSupported": true, + "containerInquiryType": null, + "protectedItemType": "AzureIaaSvmProtectedItem", "policySettings": { "defaultPolicy": { "backupManagementType": "AzureIaasVM", diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/MSSQL.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/MSSQL.json index 03e1c5c6c9ea..c0fff0182a9f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/MSSQL.json +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/MSSQL.json @@ -1,4 +1,5 @@ { + "filterPolicyBasedonWorkloadType": true, "allowedSubProtectionPolicyTypes": [ "Full", "Differential", "Log" ], "allowedBackupFrequencies": [ "Daily", "Weekly" ], "supportsEnhanced": false, @@ -9,6 +10,8 @@ "allowedMonthsOfTheYear": [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ], "allowedWeeksOfTheMonth": [ "First", "Second", "Third", "Fourth", "Last" ], "IsSmartTieringSupported": true, + "containerInquiryType": "SQL", + "protectedItemType": "AzureVMWorkloadSqlDatabaseProtectedItem", "policySettings": { "defaultPolicy": { "backupManagementType": "AzureWorkload", diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/SAPHANA.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/SAPHANA.json index c52323e256ba..664892d89934 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/SAPHANA.json +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/SAPHANA.json @@ -1,4 +1,5 @@ { + "filterPolicyBasedonWorkloadType": true, "allowedSubProtectionPolicyTypes": [ "Full", "Differential", "Incremental", "Log" ], "allowedBackupFrequencies": [ "Daily", "Weekly" ], "supportsEnhanced": false, @@ -9,6 +10,8 @@ "allowedMonthsOfTheYear": [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ], "allowedWeeksOfTheMonth": [ "First", "Second", "Third", "Fourth", "Last" ], "IsSmartTieringSupported": true, + "containerInquiryType": "SAPHana", + "protectedItemType": "AzureVMWorkloadSapHanaDatabaseProtectedItem", "policySettings": { "defaultPolicy": { "backupManagementType": "AzureWorkload", diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Az.RecoveryServices.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Az.RecoveryServices.md index cdcc28ad50e8..ae78563e88db 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Az.RecoveryServices.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Az.RecoveryServices.md @@ -17,10 +17,19 @@ Edits the retention settings for the policy client object ### [Edit-AzRecoveryServicesBackupSchedulePolicyClientObject](Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.md) Edits the schedule policy in the specified backup policy object. -### [Get-AzRecoveryServicesBackupPolicy](Get-AzRecoveryServicesBackupPolicy.md) -Provides the details of the backup policies associated to Recovery Services Vault. -This is an asynchronous\r\noperation. -Status of the operation can be fetched using GetPolicyOperationResult API. +### [Get-AzRecoveryServicesBackupContainer](Get-AzRecoveryServicesBackupContainer.md) +Gets list of backup containers registered with a recovery services vault + +### [Get-AzRecoveryServicesBackupItem](Get-AzRecoveryServicesBackupItem.md) +Gets list of backup items protected with a recovery services vault + +### [Get-AzRecoveryServicesBackupProtectableItem](Get-AzRecoveryServicesBackupProtectableItem.md) +This command will retrieve all protectable items within a certain container or across all registered containers. +It will consist of all the elements of the hierarchy of the application. +Returns DBs and their upper tier entities like Instance, AvailabilityGroup etc. + +### [Get-AzRecoveryServicesBackupProtectionPolicy](Get-AzRecoveryServicesBackupProtectionPolicy.md) +Gets backup protection policies for a recovery services vault. ### [Get-AzRecoveryServicesPolicyTemplate](Get-AzRecoveryServicesPolicyTemplate.md) Gets default policy template for a selected datasource type. @@ -28,6 +37,9 @@ Gets default policy template for a selected datasource type. ### [New-AzRecoveryServicesBackupPolicy](New-AzRecoveryServicesBackupPolicy.md) Creates a new backup policy in a given recovery services vault +### [Register-AzRecoveryServicesBackupContainer](Register-AzRecoveryServicesBackupContainer.md) +The Register-AzRecoveryServicesBackupContainer cmdlet registers an Azure VM for AzureWorkloads with specific DatasourceType. + ### [Remove-AzRecoveryServicesBackupPolicy](Remove-AzRecoveryServicesBackupPolicy.md) Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.md index d1ff3a0a6493..34a712fb92e9 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.md @@ -894,7 +894,7 @@ Accept wildcard characters: False ### -ModifyDifferentialBackup Switch parameter to modify differential backup retention policy. -You can use this parameter for DataSourceType: MSSQL, SAPHANA +You can use this parameter for DatasourceType: MSSQL, SAPHANA ```yaml Type: System.Management.Automation.SwitchParameter @@ -910,7 +910,7 @@ Accept wildcard characters: False ### -ModifyFullBackup Switch parameter to modify FullBackup retention policy. -You can use this parameter for DataSourceType: MSSQL, SAPHANA +You can use this parameter for DatasourceType: MSSQL, SAPHANA ```yaml Type: System.Management.Automation.SwitchParameter @@ -926,7 +926,7 @@ Accept wildcard characters: False ### -ModifyIncrementalBackup Switch parameter to modify incremental backup retention policy. -You can use this parameter for DataSourceType: MSSQL, SAPHANA +You can use this parameter for DatasourceType: MSSQL, SAPHANA ```yaml Type: System.Management.Automation.SwitchParameter @@ -942,7 +942,7 @@ Accept wildcard characters: False ### -ModifyLogBackup Switch parameter to modify log backup retention policy. -You can use this parameter for DataSourceType: MSSQL, SAPHANA +You can use this parameter for DatasourceType: MSSQL, SAPHANA ```yaml Type: System.Management.Automation.SwitchParameter diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupContainer.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupContainer.md new file mode 100644 index 000000000000..580de29d37ce --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupContainer.md @@ -0,0 +1,185 @@ +--- +external help file: +Module Name: Az.RecoveryServices +online version: https://learn.microsoft.com/powershell/module/az.recoveryservices/get-azrecoveryservicesbackupcontainer +schema: 2.0.0 +--- + +# Get-AzRecoveryServicesBackupContainer + +## SYNOPSIS +Gets list of backup containers registered with a recovery services vault + +## SYNTAX + +``` +Get-AzRecoveryServicesBackupContainer -ContainerType -ResourceGroupName + -VaultName [-ContainerResourceGroupName ] [-DatasourceType ] + [-DefaultProfile ] [-FriendlyName ] [-SubscriptionId ] [] +``` + +## DESCRIPTION +Gets list of backup containers registered with a recovery services vault + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -ContainerResourceGroupName +The ResourceGroup of the resource being managed by the Azure Backup service for example: ResourceGroup name of the VM + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ContainerType +Specifies the backup container type. +The acceptable values for this parameter are: AzureVM, Windows, AzureStorage, AzureVMAppContainer + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.BackupContainerType +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatasourceType +Specifies the DatasourceType + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.DatasourceTypes +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile + + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -FriendlyName +Specifies the friendly name of the container to get + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group where the recovery services vault is present. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription Id + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VaultName +The name of the recovery services vault. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionContainerResource + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupItem.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupItem.md new file mode 100644 index 000000000000..f736f7e0e30f --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupItem.md @@ -0,0 +1,307 @@ +--- +external help file: +Module Name: Az.RecoveryServices +online version: https://learn.microsoft.com/powershell/module/az.recoveryservices/get-azrecoveryservicesbackupitem +schema: 2.0.0 +--- + +# Get-AzRecoveryServicesBackupItem + +## SYNOPSIS +Gets list of backup items protected with a recovery services vault + +## SYNTAX + +### GetItemsForVault (Default) +``` +Get-AzRecoveryServicesBackupItem -DatasourceType -ResourceGroupName + -VaultName [-DefaultProfile ] [-DeleteState ] [-FriendlyName ] + [-Name ] [-ProtectionState ] [-ProtectionStatus ] [-SubscriptionId ] + [] +``` + +### GetItemsForContainer +``` +Get-AzRecoveryServicesBackupItem -Container -DatasourceType + -ResourceGroupName -VaultName [-DefaultProfile ] [-DeleteState ] + [-FriendlyName ] [-Name ] [-ProtectionState ] [-ProtectionStatus ] + [-SubscriptionId ] [] +``` + +### GetItemsForpolicy +``` +Get-AzRecoveryServicesBackupItem -Policy -ResourceGroupName + -VaultName [-DefaultProfile ] [-DeleteState ] [-FriendlyName ] + [-Name ] [-ProtectionState ] [-ProtectionStatus ] [-SubscriptionId ] + [] +``` + +## DESCRIPTION +Gets list of backup items protected with a recovery services vault + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -Container +Specifies a container object from which this cmdlet gets backup items. +To obtain an ProtectionContainerResource, use the Get-AzRecoveryServicesBackupContainer cmdlet. +To construct, see NOTES section for CONTAINER properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionContainerResource +Parameter Sets: GetItemsForContainer +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatasourceType +Specifies the DatasourceType + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.DatasourceTypes +Parameter Sets: GetItemsForContainer, GetItemsForVault +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile + + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DeleteState +Specifies the delete state of the item The acceptable values for this parameter are: + ToBeDeleted + NotDeleted + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -FriendlyName +FriendlyName of the backed up item + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Specifies the name of backup item. +For file share, specify the unique ID of protected file share. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Policy +Protection policy object +To construct, see NOTES section for POLICY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicyResource +Parameter Sets: GetItemsForpolicy +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProtectionState +Specifies the state of protection. +The acceptable values for this parameter are: + IRPending. +Initial synchronization has not started and there is no recovery point yet. + + Protected. +Protection is ongoing. + + ProtectionError. +There is a protection error. + + ProtectionStopped. +Protection is disabled. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProtectionStatus +Specifies the overall protection status of an item in the container. +The acceptable values for this parameter are: Healthy, Unhealthy + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group where the recovery services vault is present. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription Id + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VaultName +The name of the recovery services vault. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectedItemResource + +## NOTES + +ALIASES + +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + + +`CONTAINER `: Specifies a container object from which this cmdlet gets backup items. To obtain an ProtectionContainerResource, use the Get-AzRecoveryServicesBackupContainer cmdlet. + - `[ETag ]`: Optional ETag. + - `[Location ]`: Resource location. + - `[Tag ]`: Resource tags. + - `[(Any) ]`: This indicates any property can be added to this object. + - `[BackupManagementType ]`: Type of backup management for the container. + - `[ContainerType ]`: Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload Backup is VMAppContainer + - `[FriendlyName ]`: Friendly name of the container. + - `[HealthStatus ]`: Status of health of the container. + - `[ProtectableObjectType ]`: Type of the protectable object associated with this container + - `[RegistrationStatus ]`: Status of registration of the container with the Recovery Services Vault. + +`POLICY `: Protection policy object + - `[ETag ]`: Optional ETag. + - `[Location ]`: Resource location. + - `[Tag ]`: Resource tags. + - `[(Any) ]`: This indicates any property can be added to this object. + - `[BackupManagementType ]`: This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. + - `[ProtectedItemsCount ]`: Number of items associated with this policy. + - `[ResourceGuardOperationRequest ]`: ResourceGuard Operation Requests + +## RELATED LINKS + diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupPolicy.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupPolicy.md deleted file mode 100644 index 16d670a044d3..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupPolicy.md +++ /dev/null @@ -1,177 +0,0 @@ ---- -external help file: -Module Name: Az.RecoveryServices -online version: https://learn.microsoft.com/powershell/module/az.recoveryservices/get-azrecoveryservicesbackuppolicy -schema: 2.0.0 ---- - -# Get-AzRecoveryServicesBackupPolicy - -## SYNOPSIS -Provides the details of the backup policies associated to Recovery Services Vault. -This is an asynchronous\r\noperation. -Status of the operation can be fetched using GetPolicyOperationResult API. - -## SYNTAX - -### List (Default) -``` -Get-AzRecoveryServicesBackupPolicy -ResourceGroupName -VaultName - [-SubscriptionId ] [-Filter ] [-DefaultProfile ] [] -``` - -### Get -``` -Get-AzRecoveryServicesBackupPolicy -PolicyName -ResourceGroupName -VaultName - [-SubscriptionId ] [-DefaultProfile ] [] -``` - -## DESCRIPTION -Provides the details of the backup policies associated to Recovery Services Vault. -This is an asynchronous\r\noperation. -Status of the operation can be fetched using GetPolicyOperationResult API. - -## EXAMPLES - -### Example 1: Get all backup policies in a recovery services vault -```powershell -$pol = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName "myresourcegroup" -VaultName "myvault" -$pol -``` - -```output -ETag Id Location Name Type ----- -- -------- ---- ---- - /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.RecoveryServices/vaults/myvault/backupPolicies/policy1 policy1 Microsoft.RecoveryServices/vaults/backupPolicies - /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.RecoveryServices/vaults/myvault/backupPolicies/HourlyLogBackup HourlyLogBackup Microsoft.RecoveryServices/vaults/backupPolicies - /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.RecoveryServices/vaults/myvault/backupPolicies/DefaultPolicy DefaultPolicy Microsoft.RecoveryServices/vaults/backupPolicies - /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.RecoveryServices/vaults/myvault/backupPolicies/policy2 policy2 Microsoft.RecoveryServices/vaults/backupPolicies - /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.RecoveryServices/vaults/myvault/backupPolicies/testPolicy testPolicy Microsoft.RecoveryServices/vaults/backupPolicies - /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.RecoveryServices/vaults/myvault/backupPolicies/EnhancedPolicy EnhancedPolicy Microsoft.RecoveryServices/vaults/backupPolicies -``` - -Gets all the backup policies in the specified vault in the specified resource group. - -### Example 2: Get info for a specific backup policy -```powershell -$pol = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName "myresourcegroup" -VaultName "myvault" -Name "DefaultPolicy" -$pol -``` - -```output -ETag Id Location Name Type ----- -- -------- ---- ---- - /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.RecoveryServices/vaults/myvault/backupPolicies/testPolicy testPolicy Microsoft.RecoveryServices/vaults/backupPolicies - -``` - -Gets info for a specific backup policy by its name in the specified vault in the specified resource group. - -## PARAMETERS - -### -DefaultProfile -The DefaultProfile parameter is not functional. -Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. - -```yaml -Type: System.Management.Automation.PSObject -Parameter Sets: (All) -Aliases: AzureRMContext, AzureCredential - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -Filter -OData filter options. - -```yaml -Type: System.String -Parameter Sets: List -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -PolicyName -Backup policy information to be fetched. - -```yaml -Type: System.String -Parameter Sets: Get -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ResourceGroupName -The name of the resource group where the recovery services vault is present. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -SubscriptionId -The subscription Id. - -```yaml -Type: System.String[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: (Get-AzContext).Subscription.Id -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -VaultName -The name of the recovery services vault. - -```yaml -Type: System.String -Parameter Sets: (All) -Aliases: - -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -### Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicyResource - -## NOTES - -ALIASES - -## RELATED LINKS - diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupProtectableItem.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupProtectableItem.md new file mode 100644 index 000000000000..e83d90d802ad --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupProtectableItem.md @@ -0,0 +1,247 @@ +--- +external help file: +Module Name: Az.RecoveryServices +online version: https://learn.microsoft.com/powershell/module/az.recoveryservices/get-azrecoveryservicesbackupprotectableitem +schema: 2.0.0 +--- + +# Get-AzRecoveryServicesBackupProtectableItem + +## SYNOPSIS +This command will retrieve all protectable items within a certain container or across all registered containers. +It will consist of all the elements of the hierarchy of the application. +Returns DBs and their upper tier entities like Instance, AvailabilityGroup etc. + +## SYNTAX + +### FilterParamSet (Default) +``` +Get-AzRecoveryServicesBackupProtectableItem -DatasourceType -ResourceGroupName + -VaultName [-Container ] [-DefaultProfile ] + [-ItemType ] [-Name ] [-ServerName ] [-SubscriptionId ] + [] +``` + +### IdParamSet +``` +Get-AzRecoveryServicesBackupProtectableItem -ParentID -ResourceGroupName -VaultName + [-DefaultProfile ] [-ItemType ] [-Name ] [-ServerName ] + [-SubscriptionId ] [] +``` + +## DESCRIPTION +This command will retrieve all protectable items within a certain container or across all registered containers. +It will consist of all the elements of the hierarchy of the application. +Returns DBs and their upper tier entities like Instance, AvailabilityGroup etc. + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -Container +Specifies a container object for which this cmdlet gets protectable items. +To obtain an ProtectionContainerResource, use the Get-AzRecoveryServicesBackupContainer cmdlet +To construct, see NOTES section for CONTAINER properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionContainerResource +Parameter Sets: FilterParamSet +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatasourceType +Specifies the DatasourceType + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.DatasourceTypes +Parameter Sets: FilterParamSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile + + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ItemType +Specifies the type of protectable item. +Acceptable values: SQLDataBase, SQLInstance, SQLAvailabilityGroup + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Specifies the name of the Database, Instance or AvailabilityGroup + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ParentID +Specifies the ARM ID of an Instance or Availability Group + +```yaml +Type: System.String +Parameter Sets: IdParamSet +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group where the recovery services vault is present + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ServerName +Specifies the name of the server to which the item belongs + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription Id + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VaultName +The name of the recovery services vault + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IWorkloadProtectableItemResource + +## NOTES + +ALIASES + +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + + +`CONTAINER `: Specifies a container object for which this cmdlet gets protectable items. To obtain an ProtectionContainerResource, use the Get-AzRecoveryServicesBackupContainer cmdlet + - `[ETag ]`: Optional ETag. + - `[Location ]`: Resource location. + - `[Tag ]`: Resource tags. + - `[(Any) ]`: This indicates any property can be added to this object. + - `[BackupManagementType ]`: Type of backup management for the container. + - `[ContainerType ]`: Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload Backup is VMAppContainer + - `[FriendlyName ]`: Friendly name of the container. + - `[HealthStatus ]`: Status of health of the container. + - `[ProtectableObjectType ]`: Type of the protectable object associated with this container + - `[RegistrationStatus ]`: Status of registration of the container with the Recovery Services Vault. + +## RELATED LINKS + diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupProtectionPolicy.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupProtectionPolicy.md new file mode 100644 index 000000000000..dcf9efc65968 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupProtectionPolicy.md @@ -0,0 +1,225 @@ +--- +external help file: +Module Name: Az.RecoveryServices +online version: https://learn.microsoft.com/powershell/module/az.recoveryservices/get-azrecoveryservicesbackupprotectionpolicy +schema: 2.0.0 +--- + +# Get-AzRecoveryServicesBackupProtectionPolicy + +## SYNOPSIS +Gets backup protection policies for a recovery services vault. + +## SYNTAX + +### ListPolicy (Default) +``` +Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName -VaultName + [-DatasourceType ] [-DefaultProfile ] [-IsArchiveSmartTieringEnabled ] + [-PolicySubType ] [-SubscriptionId ] [] +``` + +### GetPolicyByName +``` +Get-AzRecoveryServicesBackupProtectionPolicy -Name -ResourceGroupName -VaultName + [-DefaultProfile ] [-IsArchiveSmartTieringEnabled ] [-PolicySubType ] + [-SubscriptionId ] [] +``` + +## DESCRIPTION +Gets backup protection policies for a recovery services vault. + +## EXAMPLES + +### Example 1: Get all backup policies in a recovery services vault +```powershell +$pol = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName "myresourcegroup" -VaultName "myvault" +$pol +``` + +```output +ETag Location Name +---- -------- ---- + HourlyLogBackup + DefaultPolicy + NewSQLPolicy + SAPPolicy + DailyPolicy-l6dtamab + EnhancedPolicy +``` + +Gets all the backup policies in the specified vault in the specified resource group. + +### Example 2: Get a backup policy by Name +```powershell +$pol = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName "myresourcegroup" -VaultName "myvault" -Name "HourlyLogBackup" + $pol | fl +``` + +```output +BackupManagementType : AzureWorkload +ETag : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/HourlyLogBackup +Location : +Name : HourlyLogBackup +Property : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.AzureVMWorkloadProtectionPolicy +ProtectedItemsCount : 3 +ResourceGuardOperationRequest : +Tag : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.ResourceTags +Type : Microsoft.RecoveryServices/vaults/backupPolicies +``` + +Gets info for a specific backup policy by its name in the specified vault in the specified resource group. + +### Example 3: Get all backup policies with given DatasourceType, PolicySubType and enabled Archive smart tiering +```powershell +$pol = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $ResourceGroupName -VaultName $VaultName -PolicySubType "Standard" -IsArchiveSmartTieringEnabled $true -DatasourceType MSSQL + $pol +``` + +```output +ETag Location Name +---- -------- ---- + NewSQLPolicy +``` + +List all backup policies in the recovery services vault with DatasourceType MSSQL, PolicySubType Standard, and smart tiering enabled. + +## PARAMETERS + +### -DatasourceType +Specifies the DatasourceType + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.DatasourceTypes +Parameter Sets: ListPolicy +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile + + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsArchiveSmartTieringEnabled +Parameter to list policies for which smart tiering is Enabled/Disabled. +Allowed values are $true, $false. + +```yaml +Type: System.Nullable`1[[System.Boolean, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Specifies the name of the policy + +```yaml +Type: System.String +Parameter Sets: GetPolicyByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PolicySubType +Type of policy to be fetched: Standard, Enhanced + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group where the recovery services vault is present. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription Id + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VaultName +The name of the recovery services vault. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicyResource + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Register-AzRecoveryServicesBackupContainer.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Register-AzRecoveryServicesBackupContainer.md new file mode 100644 index 000000000000..a1bcf66d0f2d --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Register-AzRecoveryServicesBackupContainer.md @@ -0,0 +1,198 @@ +--- +external help file: +Module Name: Az.RecoveryServices +online version: https://learn.microsoft.com/powershell/module/az.recoveryservices/register-azrecoveryservicesbackupcontainer +schema: 2.0.0 +--- + +# Register-AzRecoveryServicesBackupContainer + +## SYNOPSIS +The Register-AzRecoveryServicesBackupContainer cmdlet registers an Azure VM for AzureWorkloads with specific DatasourceType. + +## SYNTAX + +### Register (Default) +``` +Register-AzRecoveryServicesBackupContainer [-ResourceId] [-DatasourceType] + -ResourceGroupName -VaultName [-DefaultProfile ] [-SubscriptionId ] + [] +``` + +### ReRegister +``` +Register-AzRecoveryServicesBackupContainer [-Container] + [-DatasourceType] -ResourceGroupName -VaultName + [-DefaultProfile ] [-SubscriptionId ] [] +``` + +## DESCRIPTION +The Register-AzRecoveryServicesBackupContainer cmdlet registers an Azure VM for AzureWorkloads with specific DatasourceType. + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -Container +Specifies a container object for which this cmdlet triggers the re-registration. +To obtain an ProtectionContainerResource, use the Get-AzRecoveryServicesBackupContainer cmdlet +To construct, see NOTES section for CONTAINER properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionContainerResource +Parameter Sets: ReRegister +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: True (ByPropertyName) +Accept wildcard characters: False +``` + +### -DatasourceType +Specifies the DatasourceType + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Support.DatasourceTypes +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile + + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group where the recovery services vault is present + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceId +Specifies the ARM ID of an Instance or Availability Group + +```yaml +Type: System.String +Parameter Sets: Register +Aliases: + +Required: True +Position: 0 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +Subscription Id + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VaultName +The name of the recovery services vault + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionContainerResource + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionContainerResource + +## NOTES + +ALIASES + +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + + +`CONTAINER `: Specifies a container object for which this cmdlet triggers the re-registration. To obtain an ProtectionContainerResource, use the Get-AzRecoveryServicesBackupContainer cmdlet + - `[ETag ]`: Optional ETag. + - `[Location ]`: Resource location. + - `[Tag ]`: Resource tags. + - `[(Any) ]`: This indicates any property can be added to this object. + - `[BackupManagementType ]`: Type of backup management for the container. + - `[ContainerType ]`: Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload Backup is VMAppContainer + - `[FriendlyName ]`: Friendly name of the container. + - `[HealthStatus ]`: Status of health of the container. + - `[ProtectableObjectType ]`: Type of the protectable object associated with this container + - `[RegistrationStatus ]`: Status of registration of the container with the Recovery Services Vault. + +## RELATED LINKS + diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupContainer.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupContainer.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupContainer.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupItem.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupItem.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupItem.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupPolicy.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupPolicy.md deleted file mode 100644 index 017b0e0314c1..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupPolicy.md +++ /dev/null @@ -1,35 +0,0 @@ -### Example 1: Get all backup policies in a recovery services vault -```powershell -$pol = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName "myresourcegroup" -VaultName "myvault" -$pol -``` - - -```output -ETag Id Location Name Type ----- -- -------- ---- ---- - /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.RecoveryServices/vaults/myvault/backupPolicies/policy1 policy1 Microsoft.RecoveryServices/vaults/backupPolicies - /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.RecoveryServices/vaults/myvault/backupPolicies/HourlyLogBackup HourlyLogBackup Microsoft.RecoveryServices/vaults/backupPolicies - /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.RecoveryServices/vaults/myvault/backupPolicies/DefaultPolicy DefaultPolicy Microsoft.RecoveryServices/vaults/backupPolicies - /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.RecoveryServices/vaults/myvault/backupPolicies/policy2 policy2 Microsoft.RecoveryServices/vaults/backupPolicies - /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.RecoveryServices/vaults/myvault/backupPolicies/testPolicy testPolicy Microsoft.RecoveryServices/vaults/backupPolicies - /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.RecoveryServices/vaults/myvault/backupPolicies/EnhancedPolicy EnhancedPolicy Microsoft.RecoveryServices/vaults/backupPolicies -``` - - -Gets all the backup policies in the specified vault in the specified resource group. - -### Example 2: Get info for a specific backup policy -```powershell -$pol = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName "myresourcegroup" -VaultName "myvault" -Name "DefaultPolicy" -$pol -``` - -```output -ETag Id Location Name Type ----- -- -------- ---- ---- - /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx/resourceGroups/myresourcegroup/providers/Microsoft.RecoveryServices/vaults/myvault/backupPolicies/testPolicy testPolicy Microsoft.RecoveryServices/vaults/backupPolicies - -``` - -Gets info for a specific backup policy by its name in the specified vault in the specified resource group. \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupProtectableItem.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupProtectableItem.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupProtectableItem.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupProtectionPolicy.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupProtectionPolicy.md new file mode 100644 index 000000000000..0debcd5f36f2 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupProtectionPolicy.md @@ -0,0 +1,53 @@ +### Example 1: Get all backup policies in a recovery services vault +```powershell +$pol = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName "myresourcegroup" -VaultName "myvault" +$pol +``` + +```output +ETag Location Name +---- -------- ---- + HourlyLogBackup + DefaultPolicy + NewSQLPolicy + SAPPolicy + DailyPolicy-l6dtamab + EnhancedPolicy +``` + +Gets all the backup policies in the specified vault in the specified resource group. + +### Example 2: Get a backup policy by Name +```powershell +$pol = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName "myresourcegroup" -VaultName "myvault" -Name "HourlyLogBackup" + $pol | fl +``` + +```output +BackupManagementType : AzureWorkload +ETag : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/HourlyLogBackup +Location : +Name : HourlyLogBackup +Property : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.AzureVMWorkloadProtectionPolicy +ProtectedItemsCount : 3 +ResourceGuardOperationRequest : +Tag : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.ResourceTags +Type : Microsoft.RecoveryServices/vaults/backupPolicies +``` + +Gets info for a specific backup policy by its name in the specified vault in the specified resource group. + +### Example 3: Get all backup policies with given DatasourceType, PolicySubType and enabled Archive smart tiering +```powershell +$pol = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $ResourceGroupName -VaultName $VaultName -PolicySubType "Standard" -IsArchiveSmartTieringEnabled $true -DatasourceType MSSQL + $pol +``` + +```output +ETag Location Name +---- -------- ---- + NewSQLPolicy +``` + +List all backup policies in the recovery services vault with DatasourceType MSSQL, PolicySubType Standard, and smart tiering enabled. diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Register-AzRecoveryServicesBackupContainer.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Register-AzRecoveryServicesBackupContainer.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Register-AzRecoveryServicesBackupContainer.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Disable-AzRecoveryServicesProtection.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Disable-AzRecoveryServicesProtection.Tests.ps1 new file mode 100644 index 000000000000..ec9f59dfcca6 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Disable-AzRecoveryServicesProtection.Tests.ps1 @@ -0,0 +1,97 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Disable-AzRecoveryServicesProtection')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Disable-AzRecoveryServicesProtection.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Disable-AzRecoveryServicesProtection' { + + It 'RetainRecoveryPointsForever' { + $sub = $env.TestBackup.SubscriptionId + $rgName = $env.TestBackup.ResourceGroupName + $vaultName = $env.TestBackup.VaultName + $vmName = $env.TestBackup.VirtualMachineName + + $DebugPreference = "Continue" + Write-Debug -Message $sub + Write-Debug -Message $rgName + Write-Debug -Message $vaultName + Write-Debug -Message $vmName + $DebugPreference = "SilentlyContinue" + + $item=Get-AzRecoveryServicesBackupProtectedItem -ResourceGroupName $rgName -VaultName $vaultName -SubscriptionId $sub -Filter "backupManagementType eq 'AzureIaasVM' and WorkloadType -eq 'AzureVM'" | Where-Object { $_.Property.FriendlyName -match $vmName} + if($item -ne $null) + { + Disable-AzRecoveryServicesProtection -DatasourceType AzureVM -ResourceGroupName $rgName -VaultName $vaultName -Item $item -RetainRecoveryPointsForever + $item=Get-AzRecoveryServicesBackupProtectedItem -ResourceGroupName $rgName -VaultName $vaultName -SubscriptionId $sub -Filter "backupManagementType eq 'AzureIaasVM' and WorkloadType -eq 'AzureVM'" | Where-Object { $_.Property.FriendlyName -match $vmName} + $item.Property.ProtectionState | Should be "ProtectionStopped" + } + else + { + $item | Should be $null + } + + } + + It 'RetainRecoveryPointsAsPerPolicy' { + #first unlock the immutable state + $sub = $env.TestBackup.SubscriptionId + $rgName = $env.TestBackup.ResourceGroupName + $vaultName = $env.TestBackup.VaultName + $vmName = $env.TestBackup.VirtualMachineName + + $DebugPreference = "Continue" + Write-Debug -Message $sub + Write-Debug -Message $rgName + Write-Debug -Message $vaultName + Write-Debug -Message $vmName + $DebugPreference = "SilentlyContinue" + + $item=Get-AzRecoveryServicesBackupProtectedItem -ResourceGroupName $rgName -VaultName $vaultName -SubscriptionId $sub -Filter "backupManagementType eq 'AzureIaasVM' and WorkloadType -eq 'AzureVM'" | Where-Object { $_.Property.FriendlyName -match $vmName} + $pol=Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName EnhancedBackupTesting + if($item -ne $null) + { + Disable-AzRecoveryServicesProtection -DatasourceType AzureVM -ResourceGroupName $rgName -VaultName $vaultName -Item $item -RetainRecoveryPointsAsPerPolicy + $item=Get-AzRecoveryServicesBackupProtectedItem -ResourceGroupName $rgName -VaultName $vaultName -SubscriptionId $sub -Filter "backupManagementType eq 'AzureIaasVM' and WorkloadType -eq 'AzureVM'" | Where-Object { $_.Property.FriendlyName -match $vmName} + $item.Property.ProtectionState | Should be "BackupsSuspended" + } + else + { + $item | Should be $null + } + } + + It 'RemoveRecoveryPoints' { + $sub = $env.TestBackup.SubscriptionId + $rgName = $env.TestBackup.ResourceGroupName + $vaultName = $env.TestBackup.VaultName + $vmName = $env.TestBackup.VirtualMachineName + + $DebugPreference = "Continue" + Write-Debug -Message $sub + Write-Debug -Message $rgName + Write-Debug -Message $vaultName + Write-Debug -Message $vmName + $DebugPreference = "SilentlyContinue" + + $item=Get-AzRecoveryServicesBackupProtectedItem -ResourceGroupName $rgName -VaultName $vaultName -SubscriptionId $sub -Filter "backupManagementType eq 'AzureIaasVM' and WorkloadType -eq 'AzureVM'" | Where-Object { $_.Property.FriendlyName -match $vmName} + if($item -ne $null) + { + Disable-AzRecoveryServicesProtection -DatasourceType AzureVM -ResourceGroupName $rgName -VaultName $vaultName -Item $item -RemoveRecoveryPoints + } + $item=Get-AzRecoveryServicesBackupProtectedItem -ResourceGroupName $rgName -VaultName $vaultName -SubscriptionId $sub -Filter "backupManagementType eq 'AzureIaasVM' and WorkloadType -eq 'AzureVM'" | Where-Object { $_.Property.FriendlyName -match $vmName} + + $item | Should be $null + } + +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Recording.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Recording.json index 240058866d35..9013a3b58a16 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Recording.json +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Recording.json @@ -731,4 +731,4 @@ "isContentBase64": false } } -} \ No newline at end of file +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Tests.ps1 index b13ec6ef02b7..6c5e2b84451c 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Tests.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Tests.ps1 @@ -150,10 +150,10 @@ Describe 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject' { $newPolicyName = $env.TestBackupPolicy.NewPolicyName $pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA - + # Mandatory Full backup schedule ,Incremental schedule and log schedule conditions for testing Edit-AzRecoveryServicesBackupSchedulePolicyClientObject -Policy $pol1 -BackupFrequency "Weekly" -ScheduleRunDay @("Monday","Tuesday") -ScheduleTime "1:30 PM" -EnableIncrementalBackup 1 -IncrementalRunDay @("Sunday") -IncrementalScheduleTime "2:00 AM" -TimeZone "Tokyo Standard Time" -EnableLogBackup 1 -LogBackupFrequency 120 - + # update weekly retention Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyFullBackup -EnableWeeklyRetention $true -WeeklyRetentionDurationInWeeks 11 -WeeklyRetentionDaysOfTheWeek Sunday diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Enable-AzRecoveryServicesBackupProtection.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Enable-AzRecoveryServicesBackupProtection.Tests.ps1 new file mode 100644 index 000000000000..bef0759d6993 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Enable-AzRecoveryServicesBackupProtection.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Enable-AzRecoveryServicesBackupProtection')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Enable-AzRecoveryServicesBackupProtection.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Enable-AzRecoveryServicesBackupProtection' { + It 'ModifyRetentionPolicy' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Enable-AzRecoveryServicesProtection.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Enable-AzRecoveryServicesProtection.Tests.ps1 new file mode 100644 index 000000000000..09f9133a2ebd --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Enable-AzRecoveryServicesProtection.Tests.ps1 @@ -0,0 +1,53 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Enable-AzRecoveryServicesProtection')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Enable-AzRecoveryServicesProtection.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Enable-AzRecoveryServicesProtection' { + It 'EnableProtection' { + $sub = $env.TestBackup.SubscriptionId + $rgName = $env.TestBackup.ResourceGroupName + $vaultName = $env.TestBackup.VaultName + $vmName = $env.TestBackup.VirtualMachineName + + $DebugPreference = "Continue" + Write-Debug -Message $sub + Write-Debug -Message $rgName + Write-Debug -Message $vaultName + Write-Debug -Message $vmName + $DebugPreference = "SilentlyContinue" + + $pol=Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName EnhancedBackupTesting + $item=Get-AzRecoveryServicesBackupProtectedItem -ResourceGroupName $rgName -VaultName $vaultName -SubscriptionId $sub -Filter "backupManagementType eq 'AzureIaasVM' and WorkloadType -eq 'AzureVM'" | Where-Object { $_.Property.FriendlyName -match $vmName} + if($item -ne $null) #modify protection + { + Enable-AzRecoveryServicesProtection -DatasourceType AzureVM -ResourceGroupName $rgName -VaultName $vaultName -Item $item -PolicyId $pol.Id -InclusionDisksList "1","2" + $item=Get-AzRecoveryServicesBackupProtectedItem -ResourceGroupName $rgName -VaultName $vaultName -SubscriptionId $sub -Filter "backupManagementType eq 'AzureIaasVM' and WorkloadType -eq 'AzureVM'" | Where-Object { $_.Property.FriendlyName -match $vmName} + $item.Property.ProtectionState | Should be "IRPending" + $item.Property.PolicyId | Should be $pol.Id + $item.Property.DiskExclusionPropertyDiskLunList | Should be "1","2" + $item.Property.DiskExclusionPropertyIsInclusionList | Should be $true + } + else #configure protection + { + Enable-AzRecoveryServicesProtection -DatasourceType AzureVM -ResourceGroupName $rgName -VaultName $vaultName -VMName $vmName -PolicyId $pol.Id -InclusionDisksList "1","2" + $item=Get-AzRecoveryServicesBackupProtectedItem -ResourceGroupName $rgName -VaultName $vaultName -SubscriptionId $sub -Filter "backupManagementType eq 'AzureIaasVM' and WorkloadType -eq 'AzureVM'" | Where-Object { $_.Property.FriendlyName -match $vmName} + $item.Property.ProtectionState | Should be "IRPending" + $item.Property.PolicyId | Should be $pol.Id + $item.Property.DiskExclusionPropertyDiskLunList | Should be "1","2" + $item.Property.DiskExclusionPropertyIsInclusionList | Should be $true + } + + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Export-AzRecoveryServicesJob.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Export-AzRecoveryServicesJob.Tests.ps1 new file mode 100644 index 000000000000..3e647970bc35 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Export-AzRecoveryServicesJob.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Export-AzRecoveryServicesJob')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Export-AzRecoveryServicesJob.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Export-AzRecoveryServicesJob' { + It 'Export' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ExportViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupContainer.Tests.ps1 new file mode 100644 index 000000000000..92eba6af1131 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupContainer.Tests.ps1 @@ -0,0 +1,28 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupContainer')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupContainer.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupContainer' { + It '__AllParameterSets' -skip { + $subscriptionId = $env.TestCommon.SubscriptionId + $resourceGroupName = $env.TestCommon.ResourceGroupName + $vaultName = $env.TestCommon.VaultName + $containerFriendlyName = $env.TestRegisterContainer.SQLVMName + + $container = Get-AzRecoveryServicesBackupContainer -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -ContainerType AzureVMAppContainer -DatasourceType MSSQL | Where-Object { $_.Name -match $containerFriendlyName } + + $container.FriendlyName -eq $containerFriendlyName | Should -Be $true + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupEngine.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupEngine.Tests.ps1 new file mode 100644 index 000000000000..56fb9973c5b5 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupEngine.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupEngine')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupEngine.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupEngine' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupItem.Tests.ps1 new file mode 100644 index 000000000000..da21ba136ffc --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupItem.Tests.ps1 @@ -0,0 +1,56 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupItem')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupItem.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupItem' { + It 'GetItemsForVault' { + $subscriptionId = $env.TestCommon.SubscriptionId + $resourceGroupName = $env.TestCommon.ResourceGroupName + $vaultName = $env.TestCommon.VaultName + + $items = Get-AzRecoveryServicesBackupItem -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -DatasourceType AzureVM + + $vmItems = $items | Where-Object { $_.BackupManagementType -eq "AzureIaasVM" } + $vmItems.Count -eq $items.Count | Should -Be $true + } + + It 'GetItemsForContainer' { + $subscriptionId = $env.TestCommon.SubscriptionId + $resourceGroupName = $env.TestCommon.ResourceGroupName + $vaultName = $env.TestCommon.VaultName + $containerFriendlyName = "sql-pstest-vm1" # "sql-migration-vm2" + + $container = Get-AzRecoveryServicesBackupContainer -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -ContainerType AzureVMAppContainer -DatasourceType MSSQL | Where-Object { $_.Name -match $containerFriendlyName } + + $items = Get-AzRecoveryServicesBackupItem -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -DatasourceType MSSQL -Container $container + + $sqlItems = $items | Where-Object { $_.WorkloadType -eq "SQLDataBase" -and $_.ContainerName -eq $container.Name } + $sqlItems.Count -eq $items.Count | Should -Be $true + } + + It 'GetItemsForpolicy' { + $subscriptionId = $env.TestCommon.SubscriptionId + $resourceGroupName = $env.TestCommon.ResourceGroupName + $vaultName = $env.TestCommon.VaultName + $policyId = $env.TestBackupItem.PolicyId + + $pol = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $resourceGroupName -VaultName $vaultName -PolicySubType "Standard" -DatasourceType MSSQL | Where-Object { $_.Name -match "HourlyLogBackup" } + + $items = Get-AzRecoveryServicesBackupItem -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -Policy $pol + + $policyItems = $items | Where-Object { $_.PolicyId -eq $policyId } + $policyItems.Count -eq $items.Count | Should -Be $true + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupJob.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupJob.Tests.ps1 new file mode 100644 index 000000000000..cc4f1303b7e9 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupJob.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupJob')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupJob.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupJob' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationResult.Tests.ps1 new file mode 100644 index 000000000000..a01f16df7ec6 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationResult.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupOperationResult')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupOperationResult.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupOperationResult' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationStatuses.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationStatuses.Tests.ps1 new file mode 100644 index 000000000000..f4419a086dd8 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationStatuses.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupOperationStatuses')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupOperationStatuses.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupOperationStatuses' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupPolicy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupPolicy.Tests.ps1 index 6aa8adfc526a..b17e9269c29f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupPolicy.Tests.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupPolicy.Tests.ps1 @@ -15,7 +15,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupP } Describe 'Get-AzRecoveryServicesBackupPolicy' { - It 'List' -skip { + It 'List' -skip { { throw [System.NotImplementedException] } | Should -Not -Throw } } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectableItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectableItem.Tests.ps1 new file mode 100644 index 000000000000..c96381f33850 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectableItem.Tests.ps1 @@ -0,0 +1,53 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupProtectableItem')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupProtectableItem.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupProtectableItem' { + It 'List' -skip { + $subscriptionId = $env.TestCommon.SubscriptionId + $resourceGroupName = $env.TestCommon.ResourceGroupName + $vaultName = $env.TestCommon.VaultName + $location = $env.TestCommon.Location + $vaultId = $env.TestCommon.VaultId + $containerFriendlyName = $env.TestRegisterContainer.SQLVMName + $serverName = $env.TestProtectableItem.ServerName + $protectableItemName = $env.TestProtectableItem.ProtectableItemName + + # list all proItems + $proItems = Get-AzRecoveryServicesBackupProtectableItem -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -DatasourceType "MSSQL" + + # check all types (may be except AG) of items are present + $proItems.ProtectableItemType.Contains("SQLDataBase") | Should -Be $true + $proItems.ProtectableItemType.Contains("SQLInstance") | Should -Be $true + + # check auto-protection policy is present + # check nodes list if present + + # filter based on itemName, server name, name, container + $container = Get-AzRecoveryServicesBackupContainer -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -ContainerType AzureVMAppContainer -DatasourceType MSSQL | Where-Object { $_.Name -match $containerFriendlyName } + + $proItemsFiltered = Get-AzRecoveryServicesBackupProtectableItem -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -DatasourceType MSSQL -ItemType SQLDataBase -ServerName $serverName -Container $container -Name $protectableItemName + + # validate + $proItemsFiltered.ProtectableItemType.Contains("SQLDataBase") | Should -Be $true + $proItemsFiltered.ProtectableItemType.Contains("SQLInstance") | Should -Be $false + + $proItemsFiltered.Property.ServerName.Contains($serverName) | Should -Be $true + + $proItemsFiltered.Name -match $protectableItemName | Should -Be $true + + $proItemsFiltered.Id -match $container.Name.ToLower() | Should -Be $true + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectedItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectedItem.Tests.ps1 new file mode 100644 index 000000000000..4338554bed0b --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectedItem.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupProtectedItem')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupProtectedItem.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupProtectedItem' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionContainer.Tests.ps1 new file mode 100644 index 000000000000..3e0f920f1660 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionContainer.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupProtectionContainer')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupProtectionContainer.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupProtectionContainer' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionIntent.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionIntent.Tests.ps1 new file mode 100644 index 000000000000..295c4d3f26e2 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionIntent.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupProtectionIntent')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupProtectionIntent.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupProtectionIntent' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionPolicy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionPolicy.Tests.ps1 new file mode 100644 index 000000000000..982fe8721fc9 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionPolicy.Tests.ps1 @@ -0,0 +1,58 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupProtectionPolicy')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupProtectionPolicy.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupProtectionPolicy' { + It 'GetPolicyByName' -skip { + # get the variables + $subscriptionId = $env.TestCommon.SubscriptionId + $resourceGroupName = $env.TestCommon.ResourceGroupName + $vaultName = $env.TestCommon.VaultName + + # get all policies + $policyByName = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $resourceGroupName -VaultName $vaultName -Name "HourlyLogBackup" + $policyByName.Name | Should -Be "HourlyLogBackup" + } + + It 'ListPolicy' -skip { + # get the variables + $subscriptionId = $env.TestCommon.SubscriptionId + $resourceGroupName = $env.TestCommon.ResourceGroupName + $vaultName = $env.TestCommon.VaultName + + # get all policies + $allPolicies = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId + + # validate + $allPolicies.Count -ge 7 | Should -Be $true + + $policiesWithFilter = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $ResourceGroupName -VaultName $VaultName -PolicySubType "Standard" -IsArchiveSmartTieringEnabled $true -DatasourceType MSSQL + + foreach($policy in $policiesWithFilter){ + # validate DatasourceType + $policy.Property.WorkloadType | Should -Be "SQLDataBase" + + # validate v1 policy + if($policy.Property.PolicyType -ne $null -and $policy.Property.PolicyType.ToString() -ne $null){ + $policy.Property.PolicyType.ToString().ToLower() -match "v2" | Should -Be $false + } + + # validate smart tiering + if($policy.Property.SubProtectionPolicy -ne $null -and $policy.Property.SubProtectionPolicy[$PolicyType -eq "Full"].TieringPolicy -ne $null){ + $policy.Property.SubProtectionPolicy[$PolicyType -eq "Full"].TieringPolicy["ArchivedRP"].TieringMode -eq "TierRecommended" -or $policy.Property.SubProtectionPolicy[$PolicyType -eq "Full"].TieringPolicy["ArchivedRP"].TieringMode -eq "TierAfter" | Should -Be $true + } + } + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 new file mode 100644 index 000000000000..f9133a30b379 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupResourceEncryptionConfig')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupResourceEncryptionConfig.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupResourceEncryptionConfig' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 new file mode 100644 index 000000000000..93a53cf7eb40 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupResourceStorageConfigsNonCrr')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupResourceStorageConfigsNonCrr' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 new file mode 100644 index 000000000000..47a619ac7a8f --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupResourceVaultConfig')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupResourceVaultConfig.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupResourceVaultConfig' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupStatus.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupStatus.Tests.ps1 new file mode 100644 index 000000000000..1ec2996214da --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupStatus.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupStatus')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupStatus.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupStatus' { + It 'GetExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupUsageSummary.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupUsageSummary.Tests.ps1 new file mode 100644 index 000000000000..2e357373fea1 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupUsageSummary.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupUsageSummary')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupUsageSummary.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupUsageSummary' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupWorkloadItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupWorkloadItem.Tests.ps1 new file mode 100644 index 000000000000..d0b41bb0f525 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupWorkloadItem.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupWorkloadItem')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupWorkloadItem.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBackupWorkloadItem' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBmsPrepareDataMoveOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBmsPrepareDataMoveOperationResult.Tests.ps1 new file mode 100644 index 000000000000..663938db20a3 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBmsPrepareDataMoveOperationResult.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBmsPrepareDataMoveOperationResult')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBmsPrepareDataMoveOperationResult.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesBmsPrepareDataMoveOperationResult' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesDeletedProtectionContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesDeletedProtectionContainer.Tests.ps1 new file mode 100644 index 000000000000..16fd005d7c19 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesDeletedProtectionContainer.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesDeletedProtectionContainer')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesDeletedProtectionContainer.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesDeletedProtectionContainer' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesExportJobsOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesExportJobsOperationResult.Tests.ps1 new file mode 100644 index 000000000000..4e092b06c6b2 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesExportJobsOperationResult.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesExportJobsOperationResult')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesExportJobsOperationResult.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesExportJobsOperationResult' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobDetail.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobDetail.Tests.ps1 new file mode 100644 index 000000000000..8c743816da76 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobDetail.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesJobDetail')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesJobDetail.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesJobDetail' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobOperationResult.Tests.ps1 new file mode 100644 index 000000000000..8016c52e4ab4 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobOperationResult.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesJobOperationResult')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesJobOperationResult.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesJobOperationResult' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesOperationStatus.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesOperationStatus.Tests.ps1 new file mode 100644 index 000000000000..3ce4cc1f02a6 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesOperationStatus.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesOperationStatus')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesOperationStatus.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesOperationStatus' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 new file mode 100644 index 000000000000..bd9ef5c79619 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesPrivateEndpointConnection')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesPrivateEndpointConnection.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesPrivateEndpointConnection' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointOperationStatus.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointOperationStatus.Tests.ps1 new file mode 100644 index 000000000000..9023679c7434 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointOperationStatus.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesPrivateEndpointOperationStatus')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesPrivateEndpointOperationStatus.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesPrivateEndpointOperationStatus' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectableContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectableContainer.Tests.ps1 new file mode 100644 index 000000000000..60afb1127d3c --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectableContainer.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectableContainer')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectableContainer.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesProtectableContainer' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItem.Tests.ps1 new file mode 100644 index 000000000000..465a5666b95f --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItem.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectedItem')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectedItem.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesProtectedItem' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationResult.Tests.ps1 new file mode 100644 index 000000000000..9de89a47424c --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationResult.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectedItemOperationResult')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectedItemOperationResult.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesProtectedItemOperationResult' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationStatuses.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationStatuses.Tests.ps1 new file mode 100644 index 000000000000..63de8b0a8544 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationStatuses.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectedItemOperationStatuses')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectedItemOperationStatuses.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesProtectedItemOperationStatuses' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainer.Tests.ps1 new file mode 100644 index 000000000000..bb9c9cfbcce2 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainer.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectionContainer')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectionContainer.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesProtectionContainer' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerOperationResult.Tests.ps1 new file mode 100644 index 000000000000..7cff73ddce39 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerOperationResult.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectionContainerOperationResult')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectionContainerOperationResult.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesProtectionContainerOperationResult' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerRefreshOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerRefreshOperationResult.Tests.ps1 new file mode 100644 index 000000000000..9c7b3c7b9efe --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerRefreshOperationResult.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectionContainerRefreshOperationResult')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectionContainerRefreshOperationResult.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesProtectionContainerRefreshOperationResult' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionIntent.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionIntent.Tests.ps1 new file mode 100644 index 000000000000..5c59bb6f87f1 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionIntent.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectionIntent')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectionIntent.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesProtectionIntent' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationResult.Tests.ps1 new file mode 100644 index 000000000000..7bee802c72ed --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationResult.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectionPolicyOperationResult')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectionPolicyOperationResult.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesProtectionPolicyOperationResult' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationStatuses.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationStatuses.Tests.ps1 new file mode 100644 index 000000000000..ceaacbe6a994 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationStatuses.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectionPolicyOperationStatuses')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectionPolicyOperationStatuses.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesProtectionPolicyOperationStatuses' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPoint.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPoint.Tests.ps1 new file mode 100644 index 000000000000..bbaa479012c6 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPoint.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesRecoveryPoint')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesRecoveryPoint.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesRecoveryPoint' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPointsRecommendedForMove.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPointsRecommendedForMove.Tests.ps1 new file mode 100644 index 000000000000..cdbf447452ce --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPointsRecommendedForMove.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesRecoveryPointsRecommendedForMove')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesRecoveryPointsRecommendedForMove.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesRecoveryPointsRecommendedForMove' { + It 'ListExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesResourceGuardProxy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesResourceGuardProxy.Tests.ps1 new file mode 100644 index 000000000000..520bf5e9928e --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesResourceGuardProxy.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesResourceGuardProxy')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesResourceGuardProxy.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesResourceGuardProxy' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get1' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity1' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesSecurityPiN.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesSecurityPiN.Tests.ps1 new file mode 100644 index 000000000000..c9d7505dc024 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesSecurityPiN.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesSecurityPiN')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesSecurityPiN.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesSecurityPiN' { + It 'GetExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationResult.Tests.ps1 new file mode 100644 index 000000000000..53defd3b7bb8 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationResult.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesValidateOperationResult')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesValidateOperationResult.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesValidateOperationResult' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationStatuses.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationStatuses.Tests.ps1 new file mode 100644 index 000000000000..e0cd7fee9448 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationStatuses.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesValidateOperationStatuses')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesValidateOperationStatuses.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzRecoveryServicesValidateOperationStatuses' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-SourceResourceId.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-SourceResourceId.Tests.ps1 new file mode 100644 index 000000000000..697cd6425153 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-SourceResourceId.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-SourceResourceId')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-SourceResourceId.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-SourceResourceId' { + It 'InitializeRestoreRequest' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Initialize-AzRecoveryServicesRestoreRequest.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Initialize-AzRecoveryServicesRestoreRequest.Tests.ps1 new file mode 100644 index 000000000000..93edd97658ce --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Initialize-AzRecoveryServicesRestoreRequest.Tests.ps1 @@ -0,0 +1,18 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) +$TestRecordingFile = Join-Path $PSScriptRoot 'Initialize-AzRecoveryServicesRestoreRequest.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'Initialize-AzRecoveryServicesRestoreRequest' { + It '__AllParameterSets' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesInquireProtectionContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesInquireProtectionContainer.Tests.ps1 new file mode 100644 index 000000000000..c5da9cd79923 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesInquireProtectionContainer.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzRecoveryServicesInquireProtectionContainer')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzRecoveryServicesInquireProtectionContainer.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Invoke-AzRecoveryServicesInquireProtectionContainer' { + It 'Inquire' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'InquireViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesPrepare.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesPrepare.Tests.ps1 new file mode 100644 index 000000000000..ebbbbd9686e8 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesPrepare.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzRecoveryServicesPrepare')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzRecoveryServicesPrepare.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Invoke-AzRecoveryServicesPrepare' { + It 'PrepareExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Prepare' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'PrepareViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'PrepareViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Move-AzRecoveryServicesRecoveryPoint.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Move-AzRecoveryServicesRecoveryPoint.Tests.ps1 new file mode 100644 index 000000000000..36efa8d10d03 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Move-AzRecoveryServicesRecoveryPoint.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Move-AzRecoveryServicesRecoveryPoint')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Move-AzRecoveryServicesRecoveryPoint.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Move-AzRecoveryServicesRecoveryPoint' { + It 'MoveExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Move' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'MoveViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'MoveViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 new file mode 100644 index 000000000000..901e92ae0a5e --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzRecoveryServicesItemLevelRecoveryConnection')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzRecoveryServicesItemLevelRecoveryConnection.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzRecoveryServicesItemLevelRecoveryConnection' { + It 'ProvisionExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Provision' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ProvisionViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ProvisionViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectedItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectedItem.Tests.ps1 new file mode 100644 index 000000000000..6ac679180a99 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectedItem.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzRecoveryServicesProtectedItem')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzRecoveryServicesProtectedItem.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzRecoveryServicesProtectedItem' { + It 'CreateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Create' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectionIntent.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectionIntent.Tests.ps1 new file mode 100644 index 000000000000..8409d04b21f1 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectionIntent.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzRecoveryServicesProtectionIntent')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzRecoveryServicesProtectionIntent.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzRecoveryServicesProtectionIntent' { + It 'CreateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Create' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'CreateViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesRestoreRequest.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesRestoreRequest.Tests.ps1 new file mode 100644 index 000000000000..f1e3b45a73a0 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesRestoreRequest.Tests.ps1 @@ -0,0 +1,18 @@ +$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' +if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' +} +. ($loadEnvPath) +$TestRecordingFile = Join-Path $PSScriptRoot 'New-AzRecoveryServicesRestoreRequest.Recording.json' +$currentPath = $PSScriptRoot +while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent +} +. ($mockingPath | Select-Object -First 1).FullName + +Describe 'New-AzRecoveryServicesRestoreRequest' { + It '__AllParameterSets' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesBackupContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesBackupContainer.Tests.ps1 new file mode 100644 index 000000000000..012465c4dfa9 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesBackupContainer.Tests.ps1 @@ -0,0 +1,71 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Register-AzRecoveryServicesBackupContainer')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Register-AzRecoveryServicesBackupContainer.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Register-AzRecoveryServicesBackupContainer' { + It 'Register' -skip { + # { throw [System.NotImplementedException] } | Should -Not -Throw + + $subscriptionId = $env.TestCommon.SubscriptionId + $resourceGroupName = $env.TestCommon.ResourceGroupName + $vaultName = $env.TestCommon.VaultName + $location = $env.TestCommon.Location + $vaultId = $env.TestCommon.VaultId + $resourceId = $env.TestRegisterContainer.ResourceId + $containerFriendlyName = $env.TestRegisterContainer.SQLVMName + + # unregister - TODO + + # register + + ## get container should be null + $container = Get-AzRecoveryServicesBackupContainer -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -ContainerType AzureVMAppContainer -DatasourceType MSSQL | Where-Object { $_.Name -match $containerFriendlyName } + $container | Should -Be $null + + $reg = Register-AzRecoveryServicesBackupContainer -ResourceGroupName $resourceGroupName -VaultName $vaultName -DatasourceType MSSQL -ResourceId $resourceId + $reg.Property.SourceResourceId -match $resourceId | Should -Be $true + } + + It 'ReRegister' -skip { + $subscriptionId = $env.TestCommon.SubscriptionId + $resourceGroupName = $env.TestCommon.ResourceGroupName + $vaultName = $env.TestCommon.VaultName + $location = $env.TestCommon.Location + $vaultId = $env.TestCommon.VaultId + $resourceId = $env.TestRegisterContainer.ResourceId + $containerFriendlyName = $env.TestRegisterContainer.SQLVMName + + # re-register SQL container + $container = Get-AzRecoveryServicesBackupContainer -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -ContainerType AzureVMAppContainer -DatasourceType MSSQL | Where-Object { $_.Name -match $containerFriendlyName } + $container -eq $null | Should -Be $false + + $reg = Register-AzRecoveryServicesBackupContainer -ResourceGroupName $resourceGroupName -VaultName $vaultName -DatasourceType MSSQL -Container $container + + # check container registered + $container = Get-AzRecoveryServicesBackupContainer -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -ContainerType AzureVMAppContainer -DatasourceType MSSQL | Where-Object { $_.Name -match $containerFriendlyName } + + $container.RegistrationStatus -eq "Registered" | Should -Be $true + + # ReRegister SAPHANA workload + $containerSapHana = Get-AzRecoveryServicesBackupContainer -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -ContainerType AzureVMAppContainer -DatasourceType SAPHANA + + $regSapHana = Register-AzRecoveryServicesBackupContainer -ResourceGroupName $resourceGroupName -VaultName $vaultName -DatasourceType SAPHANA -Container $containerSapHana[0] + + # check container registered + $containerSapHana = Get-AzRecoveryServicesBackupContainer -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -ContainerType AzureVMAppContainer -DatasourceType SAPHANA + + $containerSapHana[0].RegistrationStatus -eq "Registered" | Should -Be $true + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesProtectionContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesProtectionContainer.Tests.ps1 new file mode 100644 index 000000000000..9fcdda764d2a --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesProtectionContainer.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Register-AzRecoveryServicesProtectionContainer')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Register-AzRecoveryServicesProtectionContainer.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Register-AzRecoveryServicesProtectionContainer' { + It 'RegisterExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Register' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'RegisterViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'RegisterViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 new file mode 100644 index 000000000000..c16e55a3b1da --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzRecoveryServicesPrivateEndpointConnection')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzRecoveryServicesPrivateEndpointConnection.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzRecoveryServicesPrivateEndpointConnection' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectedItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectedItem.Tests.ps1 new file mode 100644 index 000000000000..ab5ceb1f5a91 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectedItem.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzRecoveryServicesProtectedItem')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzRecoveryServicesProtectedItem.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzRecoveryServicesProtectedItem' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectionIntent.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectionIntent.Tests.ps1 new file mode 100644 index 000000000000..b3e5f712abfb --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectionIntent.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzRecoveryServicesProtectionIntent')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzRecoveryServicesProtectionIntent.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzRecoveryServicesProtectionIntent' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesResourceGuardProxy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesResourceGuardProxy.Tests.ps1 new file mode 100644 index 000000000000..26ddee5aa073 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesResourceGuardProxy.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzRecoveryServicesResourceGuardProxy')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzRecoveryServicesResourceGuardProxy.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzRecoveryServicesResourceGuardProxy' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Revoke-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Revoke-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 new file mode 100644 index 000000000000..c80441c4925d --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Revoke-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Revoke-AzRecoveryServicesItemLevelRecoveryConnection')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Revoke-AzRecoveryServicesItemLevelRecoveryConnection.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Revoke-AzRecoveryServicesItemLevelRecoveryConnection' { + It 'Revoke' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'RevokeViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 new file mode 100644 index 000000000000..2fbc82ced7ed --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesBackupResourceEncryptionConfig')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesBackupResourceEncryptionConfig.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Set-AzRecoveryServicesBackupResourceEncryptionConfig' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Update' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 new file mode 100644 index 000000000000..46849657debe --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesBackupResourceStorageConfigsNonCrr')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Set-AzRecoveryServicesBackupResourceStorageConfigsNonCrr' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Update' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 new file mode 100644 index 000000000000..8aee2071bf53 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesBackupResourceVaultConfig')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesBackupResourceVaultConfig.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Set-AzRecoveryServicesBackupResourceVaultConfig' { + It 'PutExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Put' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 new file mode 100644 index 000000000000..3a242f36849b --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesPrivateEndpointConnection')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesPrivateEndpointConnection.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Set-AzRecoveryServicesPrivateEndpointConnection' { + It 'PutExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Put' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectedItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectedItem.Tests.ps1 new file mode 100644 index 000000000000..d286f00a801d --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectedItem.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesProtectedItem')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesProtectedItem.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Set-AzRecoveryServicesProtectedItem' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Update' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectionIntent.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectionIntent.Tests.ps1 new file mode 100644 index 000000000000..cc768e442439 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectionIntent.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesProtectionIntent')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesProtectionIntent.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Set-AzRecoveryServicesProtectionIntent' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Update' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesResourceGuardProxy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesResourceGuardProxy.Tests.ps1 new file mode 100644 index 000000000000..657ae5cb8747 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesResourceGuardProxy.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesResourceGuardProxy')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesResourceGuardProxy.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Set-AzRecoveryServicesResourceGuardProxy' { + It 'PutExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Put' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServices.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServices.Tests.ps1 new file mode 100644 index 000000000000..a57dfaf67aa6 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServices.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Start-AzRecoveryServices')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Start-AzRecoveryServices.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Start-AzRecoveryServices' { + It 'TriggerExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Trigger' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'TriggerViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'TriggerViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesBackup.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesBackup.Tests.ps1 new file mode 100644 index 000000000000..0edd1eb00c9a --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesBackup.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Start-AzRecoveryServicesBackup')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Start-AzRecoveryServicesBackup.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Start-AzRecoveryServicesBackup' { + It 'TriggerExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Trigger' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'TriggerViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'TriggerViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesJobCancellation.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesJobCancellation.Tests.ps1 new file mode 100644 index 000000000000..2b4e5ead3b20 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesJobCancellation.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Start-AzRecoveryServicesJobCancellation')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Start-AzRecoveryServicesJobCancellation.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Start-AzRecoveryServicesJobCancellation' { + It 'Trigger' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'TriggerViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesRestore.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesRestore.Tests.ps1 new file mode 100644 index 000000000000..701f6e1e84dc --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesRestore.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Start-AzRecoveryServicesRestore')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Start-AzRecoveryServicesRestore.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Start-AzRecoveryServicesRestore' { + It 'TriggerExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Trigger' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'TriggerViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'TriggerViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesValidateOperation.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesValidateOperation.Tests.ps1 new file mode 100644 index 000000000000..f4fe76b779ab --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesValidateOperation.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Start-AzRecoveryServicesValidateOperation')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Start-AzRecoveryServicesValidateOperation.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Start-AzRecoveryServicesValidateOperation' { + It 'TriggerExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Trigger' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'TriggerViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'TriggerViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesFeatureSupport.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesFeatureSupport.Tests.ps1 new file mode 100644 index 000000000000..7d8fc962aa12 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesFeatureSupport.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Test-AzRecoveryServicesFeatureSupport')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Test-AzRecoveryServicesFeatureSupport.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Test-AzRecoveryServicesFeatureSupport' { + It 'ValidateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Validate' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ValidateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ValidateViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesProtectionIntent.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesProtectionIntent.Tests.ps1 new file mode 100644 index 000000000000..0a53ed57f0a9 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesProtectionIntent.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Test-AzRecoveryServicesProtectionIntent')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Test-AzRecoveryServicesProtectionIntent.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Test-AzRecoveryServicesProtectionIntent' { + It 'ValidateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Validate' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ValidateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ValidateViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unlock-AzRecoveryServicesResourceGuardProxyDelete.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unlock-AzRecoveryServicesResourceGuardProxyDelete.Tests.ps1 new file mode 100644 index 000000000000..b0d96af8758c --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unlock-AzRecoveryServicesResourceGuardProxyDelete.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Unlock-AzRecoveryServicesResourceGuardProxyDelete')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Unlock-AzRecoveryServicesResourceGuardProxyDelete.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Unlock-AzRecoveryServicesResourceGuardProxyDelete' { + It 'UnlockExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Unlock' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UnlockViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UnlockViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unregister-AzRecoveryServicesProtectionContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unregister-AzRecoveryServicesProtectionContainer.Tests.ps1 new file mode 100644 index 000000000000..2fe327622268 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unregister-AzRecoveryServicesProtectionContainer.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Unregister-AzRecoveryServicesProtectionContainer')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Unregister-AzRecoveryServicesProtectionContainer.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Unregister-AzRecoveryServicesProtectionContainer' { + It 'Unregister' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UnregisterViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 new file mode 100644 index 000000000000..0f96c094c9ff --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzRecoveryServicesBackupResourceStorageConfigsNonCrr')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzRecoveryServicesBackupResourceStorageConfigsNonCrr' { + It 'PatchExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Patch' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'PatchViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'PatchViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 new file mode 100644 index 000000000000..dfaaf3cf338a --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzRecoveryServicesBackupResourceVaultConfig')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzRecoveryServicesBackupResourceVaultConfig.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzRecoveryServicesBackupResourceVaultConfig' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Update' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesProtectionContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesProtectionContainer.Tests.ps1 new file mode 100644 index 000000000000..73a0b6f31a6b --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesProtectionContainer.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzRecoveryServicesProtectionContainer')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzRecoveryServicesProtectionContainer.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzRecoveryServicesProtectionContainer' { + It 'Refresh' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'RefreshViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/utils.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/utils.ps1 index 3d21f3fd7776..b6f4d13c3c97 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/utils.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/utils.ps1 @@ -27,17 +27,54 @@ function setupEnv() { NewPolicyName = "anssingh-testPolicy" } - $env.add("TestBackupSchedulePolicy", $TestBackupSchedulePolicyVariables) | Out-Null - $BackupRetentionPolicyTestVariables = @{ SubscriptionId = "38304e13-357e-405e-9e9a-220351dcce8c" ResourceGroupName = "arohijain-rg" VaultName = "arohijain-vault" - NewPolicyName = "arohijain-p-1" # confirm what to keep + NewPolicyName = "arohijain-p-1" + # confirm what to keep + } + + $BackupTestVariables = @{ + SubscriptionId = "38304e13-357e-405e-9e9a-220351dcce8c" + ResourceGroupName = "arohijain-rg" + VaultName = "arohijain-backupvault" + VirtualMachineName = "arohijain-vm" + } + + $CommonTestVariables = @{ + SubscriptionId = "38304e13-357e-405e-9e9a-220351dcce8c" + ResourceGroupName = "hiagarg" + VaultName = "hiagaVault" + Location = "centraluseuap" + VaultId = "/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault" } - $env.add("TestBackupPolicy", $BackupRetentionPolicyTestVariables) | Out-Null - + $RegisterContainerVariables = @{ + ResourceId = "/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-migration-vm2" + SQLVMName = "sql-migration-vm2" + } + + $ProtectableItemVariables = @{ + ServerName = "sql-migration-v" + ProtectableItemName = "sqldatabase;mssqlserver;msdb" + } + + $BackupItemVariables = @{ + ContainerFriendlyName = "sql-pstest-vm1" # "sql-migration-vm2" + PolicyId = "/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/HourlyLogBackup" + + # /subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/NewSQLPolicy + } + + $env.add("TestBackupSchedulePolicy", $TestBackupSchedulePolicyVariables) | Out-Null + $env.add("TestBackupPolicy", $BackupRetentionPolicyTestVariables) | Out-Null + $env.add("TestBackup", $BackupTestVariables) | Out-Null + $env.add("TestCommon", $CommonTestVariables) | Out-Null + $env.add("TestRegisterContainer", $RegisterContainerVariables) | Out-Null + $env.add("TestProtectableItem", $ProtectableItemVariables) | Out-Null + $env.add("TestBackupItem", $BackupItemVariables) | Out-Null + $envFile = 'env.json' if ($TestMode -eq 'live') { $envFile = 'localEnv.json' diff --git a/src/RecoveryServices/readme.azure.noprofile.md b/src/RecoveryServices/readme.azure.noprofile.md new file mode 100644 index 000000000000..ded432a57180 --- /dev/null +++ b/src/RecoveryServices/readme.azure.noprofile.md @@ -0,0 +1,78 @@ +# Azure PowerShell AutoRest Configuration + +> Values +``` yaml +azure: true +powershell: true +help-link-prefix: https://learn.microsoft.com/powershell/module/ +license-header: MICROSOFT_MIT_NO_VERSION +pwsh-license-header: MICROSOFT_APACHE_NO_VERSION +branch: main +repo: https://github.com/Azure/azure-rest-api-specs/blob/$(branch) +metadata: + authors: Microsoft Corporation + owners: Microsoft Corporation + description: 'Microsoft Azure PowerShell: $(service-name) cmdlets' + copyright: Microsoft Corporation. All rights reserved. + tags: Azure ResourceManager ARM PSModule $(service-name) + companyName: Microsoft Corporation + requireLicenseAcceptance: true + licenseUri: https://aka.ms/azps-license + projectUri: https://github.com/Azure/azure-powershell +``` + +> Names +``` yaml +prefix: Az +subject-prefix: $(service-name) +module-name: $(prefix).$(service-name) +namespace: Microsoft.Azure.PowerShell.Cmdlets.$(service-name) +``` + +> Folders +``` yaml +clear-output-folder: true +output-folder: . +``` + +> Exclude some properties in table view +``` yaml +# For a specific module, we could override this configuration by setting default-exclude-tableview-properties to false in readme.md of that module. +default-exclude-tableview-properties: true +``` +``` yaml $(default-exclude-tableview-properties) +exclude-tableview-properties: + - Id + - Type +``` + +> Directives +``` yaml +directive: + - from: swagger-document + where: $.paths..responses.202.headers + transform: delete $["Location"] + - from: swagger-document + where: $.paths..responses.202.headers + transform: delete $["Retry-After"] + - from: swagger-document + where: $.paths..responses.202.headers + transform: delete $["Azure-AsyncOperation"] + - from: swagger-document + where: $.paths..responses.201.headers + transform: delete $["Location"] + - from: swagger-document + where: $.paths..responses.201.headers + transform: delete $["Retry-After"] + - from: swagger-document + where: $.paths..responses.201.headers + transform: delete $["Azure-AsyncOperation"] + - where: + subject: Operation + hide: true + - where: + parameter-name: SubscriptionId + set: + default: + script: '(Get-AzContext).Subscription.Id' +``` From 91d058c6f4ed2f6f57246194dfca5b1799c0cbea Mon Sep 17 00:00:00 2001 From: Himanshu Agarwal Date: Wed, 25 Oct 2023 10:49:07 +0530 Subject: [PATCH 4/6] updated examples and re-recorded test cases --- .../Get-AzRecoveryServicesBackupContainer.ps1 | 2 +- .../Item/Get-AzRecoveryServicesBackupItem.ps1 | 8 +- .../Get-AzRecoveryServicesBackupContainer.md | 32 +- .../docs/Get-AzRecoveryServicesBackupItem.md | 64 ++- ...AzRecoveryServicesBackupProtectableItem.md | 35 +- ...ister-AzRecoveryServicesBackupContainer.md | 37 +- .../Remove-AzRecoveryServicesBackupPolicy.md | 2 +- .../Get-AzRecoveryServicesBackupContainer.md | 33 +- .../Get-AzRecoveryServicesBackupItem.md | 63 ++- ...AzRecoveryServicesBackupProtectableItem.md | 36 +- ...ister-AzRecoveryServicesBackupContainer.md | 35 +- .../Remove-AzRecoveryServicesBackupPolicy.md | 2 +- ...ble-AzRecoveryServicesProtection.Tests.ps1 | 8 +- ...RetentionPolicyClientObject.Recording.json | 302 +++++++------- ...ackupRetentionPolicyClientObject.Tests.ps1 | 24 +- ...pSchedulePolicyClientObject.Recording.json | 385 +++++++++--------- ...BackupSchedulePolicyClientObject.Tests.ps1 | 14 +- ...RecoveryServicesBackupProtection.Tests.ps1 | 21 - ...ble-AzRecoveryServicesProtection.Tests.ps1 | 4 +- .../Export-AzRecoveryServicesJob.Tests.ps1 | 25 -- ...veryServicesBackupContainer.Recording.json | 45 ++ ...zRecoveryServicesBackupContainer.Tests.ps1 | 2 +- ...t-AzRecoveryServicesBackupEngine.Tests.ps1 | 29 -- ...zRecoveryServicesBackupItem.Recording.json | 88 ++++ .../Get-AzRecoveryServicesBackupJob.Tests.ps1 | 21 - ...eryServicesBackupOperationResult.Tests.ps1 | 25 -- ...yServicesBackupOperationStatuses.Tests.ps1 | 25 -- ...t-AzRecoveryServicesBackupPolicy.Tests.ps1 | 21 - ...rvicesBackupProtectableItem.Recording.json | 45 ++ ...eryServicesBackupProtectableItem.Tests.ps1 | 2 +- ...overyServicesBackupProtectedItem.Tests.ps1 | 21 - ...ervicesBackupProtectionContainer.Tests.ps1 | 21 - ...ryServicesBackupProtectionIntent.Tests.ps1 | 21 - ...vicesBackupProtectionPolicy.Recording.json | 131 ++++++ ...ryServicesBackupProtectionPolicy.Tests.ps1 | 4 +- ...esBackupResourceEncryptionConfig.Tests.ps1 | 25 -- ...ckupResourceStorageConfigsNonCrr.Tests.ps1 | 25 -- ...ervicesBackupResourceVaultConfig.Tests.ps1 | 25 -- ...t-AzRecoveryServicesBackupStatus.Tests.ps1 | 33 -- ...coveryServicesBackupUsageSummary.Tests.ps1 | 21 - ...coveryServicesBackupWorkloadItem.Tests.ps1 | 21 - ...msPrepareDataMoveOperationResult.Tests.ps1 | 25 -- ...rvicesDeletedProtectionContainer.Tests.ps1 | 21 - ...ervicesExportJobsOperationResult.Tests.ps1 | 25 -- .../Get-AzRecoveryServicesJobDetail.Tests.ps1 | 25 -- ...coveryServicesJobOperationResult.Tests.ps1 | 25 -- ...zRecoveryServicesOperationStatus.Tests.ps1 | 25 -- ...ervicesPrivateEndpointConnection.Tests.ps1 | 25 -- ...esPrivateEndpointOperationStatus.Tests.ps1 | 25 -- ...veryServicesProtectableContainer.Tests.ps1 | 21 - ...-AzRecoveryServicesProtectedItem.Tests.ps1 | 21 - ...icesProtectedItemOperationResult.Tests.ps1 | 25 -- ...esProtectedItemOperationStatuses.Tests.ps1 | 25 -- ...overyServicesProtectionContainer.Tests.ps1 | 25 -- ...otectionContainerOperationResult.Tests.ps1 | 25 -- ...nContainerRefreshOperationResult.Tests.ps1 | 25 -- ...RecoveryServicesProtectionIntent.Tests.ps1 | 25 -- ...sProtectionPolicyOperationResult.Tests.ps1 | 25 -- ...rotectionPolicyOperationStatuses.Tests.ps1 | 25 -- ...-AzRecoveryServicesRecoveryPoint.Tests.ps1 | 29 -- ...RecoveryPointsRecommendedForMove.Tests.ps1 | 25 -- ...coveryServicesResourceGuardProxy.Tests.ps1 | 33 -- ...et-AzRecoveryServicesSecurityPiN.Tests.ps1 | 33 -- ...yServicesValidateOperationResult.Tests.ps1 | 25 -- ...ervicesValidateOperationStatuses.Tests.ps1 | 25 -- .../test/Get-SourceResourceId.Tests.ps1 | 21 - ...AzRecoveryServicesRestoreRequest.Tests.ps1 | 18 - ...rvicesInquireProtectionContainer.Tests.ps1 | 25 -- ...Invoke-AzRecoveryServicesPrepare.Tests.ps1 | 33 -- ...-AzRecoveryServicesRecoveryPoint.Tests.ps1 | 33 -- ...vicesItemLevelRecoveryConnection.Tests.ps1 | 33 -- ...-AzRecoveryServicesProtectedItem.Tests.ps1 | 33 -- ...RecoveryServicesProtectionIntent.Tests.ps1 | 33 -- ...AzRecoveryServicesRestoreRequest.Tests.ps1 | 18 - ...veryServicesBackupContainer.Recording.json | 174 ++++++++ ...zRecoveryServicesBackupContainer.Tests.ps1 | 5 +- ...overyServicesProtectionContainer.Tests.ps1 | 33 -- ...ervicesPrivateEndpointConnection.Tests.ps1 | 25 -- ...-AzRecoveryServicesProtectedItem.Tests.ps1 | 25 -- ...RecoveryServicesProtectionIntent.Tests.ps1 | 25 -- ...coveryServicesResourceGuardProxy.Tests.ps1 | 25 -- ...vicesItemLevelRecoveryConnection.Tests.ps1 | 25 -- ...esBackupResourceEncryptionConfig.Tests.ps1 | 25 -- ...ckupResourceStorageConfigsNonCrr.Tests.ps1 | 25 -- ...ervicesBackupResourceVaultConfig.Tests.ps1 | 25 -- ...ervicesPrivateEndpointConnection.Tests.ps1 | 25 -- ...-AzRecoveryServicesProtectedItem.Tests.ps1 | 25 -- ...RecoveryServicesProtectionIntent.Tests.ps1 | 25 -- ...coveryServicesResourceGuardProxy.Tests.ps1 | 25 -- .../test/Start-AzRecoveryServices.Tests.ps1 | 33 -- .../Start-AzRecoveryServicesBackup.Tests.ps1 | 33 -- ...zRecoveryServicesJobCancellation.Tests.ps1 | 25 -- .../Start-AzRecoveryServicesRestore.Tests.ps1 | 33 -- ...ecoveryServicesValidateOperation.Tests.ps1 | 33 -- ...AzRecoveryServicesFeatureSupport.Tests.ps1 | 33 -- ...RecoveryServicesProtectionIntent.Tests.ps1 | 33 -- ...ServicesResourceGuardProxyDelete.Tests.ps1 | 33 -- ...overyServicesProtectionContainer.Tests.ps1 | 25 -- ...ckupResourceStorageConfigsNonCrr.Tests.ps1 | 33 -- ...ervicesBackupResourceVaultConfig.Tests.ps1 | 33 -- ...overyServicesProtectionContainer.Tests.ps1 | 25 -- .../test/env.json | 39 +- 102 files changed, 1157 insertions(+), 2404 deletions(-) delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Enable-AzRecoveryServicesBackupProtection.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Export-AzRecoveryServicesJob.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupContainer.Recording.json delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupEngine.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupItem.Recording.json delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupJob.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationResult.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationStatuses.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupPolicy.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectableItem.Recording.json delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectedItem.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionContainer.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionIntent.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionPolicy.Recording.json delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupStatus.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupUsageSummary.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupWorkloadItem.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBmsPrepareDataMoveOperationResult.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesDeletedProtectionContainer.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesExportJobsOperationResult.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobDetail.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobOperationResult.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesOperationStatus.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointOperationStatus.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectableContainer.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItem.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationResult.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationStatuses.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainer.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerOperationResult.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerRefreshOperationResult.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionIntent.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationResult.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationStatuses.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPoint.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPointsRecommendedForMove.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesResourceGuardProxy.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesSecurityPiN.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationResult.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationStatuses.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-SourceResourceId.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Initialize-AzRecoveryServicesRestoreRequest.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesInquireProtectionContainer.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesPrepare.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Move-AzRecoveryServicesRecoveryPoint.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectedItem.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectionIntent.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesRestoreRequest.Tests.ps1 create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesBackupContainer.Recording.json delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesProtectionContainer.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectedItem.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectionIntent.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesResourceGuardProxy.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Revoke-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectedItem.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectionIntent.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesResourceGuardProxy.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServices.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesBackup.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesJobCancellation.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesRestore.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesValidateOperation.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesFeatureSupport.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesProtectionIntent.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unlock-AzRecoveryServicesResourceGuardProxyDelete.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unregister-AzRecoveryServicesProtectionContainer.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesProtectionContainer.Tests.ps1 diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Container/Get-AzRecoveryServicesBackupContainer.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Container/Get-AzRecoveryServicesBackupContainer.ps1 index 728ef271f0db..abd7f5cd280d 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Container/Get-AzRecoveryServicesBackupContainer.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Container/Get-AzRecoveryServicesBackupContainer.ps1 @@ -100,7 +100,7 @@ $null = $PSBoundParameters.Add("Filter", $filter) } - $containersList = Get-AzRecoveryServicesBackupProtectionContainer @PSBoundParameters + $containersList = Az.RecoveryServices.Internal\Get-AzRecoveryServicesBackupProtectionContainer @PSBoundParameters # filter by container resource group if($containerResourceGroupName -ne ""){ diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Item/Get-AzRecoveryServicesBackupItem.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Item/Get-AzRecoveryServicesBackupItem.ps1 index b4360e7b99be..7121919ec2c1 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Item/Get-AzRecoveryServicesBackupItem.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Item/Get-AzRecoveryServicesBackupItem.ps1 @@ -112,10 +112,10 @@ $itemsList = $null if($SubscriptionId -ne $null){ - $itemsList = Get-AzRecoveryServicesBackupProtectedItem -ResourceGroupName $ResourceGroupName -VaultName $VaultName -SubscriptionId $SubscriptionId -Filter $filter + $itemsList = Az.RecoveryServices.Internal\Get-AzRecoveryServicesBackupProtectedItem -ResourceGroupName $ResourceGroupName -VaultName $VaultName -SubscriptionId $SubscriptionId -Filter $filter } else{ - $itemsList = Get-AzRecoveryServicesBackupProtectedItem -ResourceGroupName $ResourceGroupName -VaultName $VaultName -Filter $filter + $itemsList = Az.RecoveryServices.Internal\Get-AzRecoveryServicesBackupProtectedItem -ResourceGroupName $ResourceGroupName -VaultName $VaultName -Filter $filter } # filter on policy or container @@ -167,10 +167,10 @@ $itemDetails = $null if($SubscriptionId -ne $null){ - $itemDetails = Get-AzRecoveryServicesProtectedItem -ContainerName $containerName -FabricName "Azure" -Name $item.Name -ResourceGroupName $ResourceGroupName -VaultName $VaultName -SubscriptionId $SubscriptionId -Filter "expand eq 'extendedinfo'" + $itemDetails = Az.RecoveryServices.Internal\Get-AzRecoveryServicesProtectedItem -ContainerName $containerName -FabricName "Azure" -Name $item.Name -ResourceGroupName $ResourceGroupName -VaultName $VaultName -SubscriptionId $SubscriptionId -Filter "expand eq 'extendedinfo'" } else{ - $itemDetails = Get-AzRecoveryServicesProtectedItem -ContainerName $containerName -FabricName "Azure" -Name $item.Name -ResourceGroupName $ResourceGroupName -VaultName $VaultName -Filter "expand eq 'extendedinfo'" + $itemDetails = Az.RecoveryServices.Internal\Get-AzRecoveryServicesProtectedItem -ContainerName $containerName -FabricName "Azure" -Name $item.Name -ResourceGroupName $ResourceGroupName -VaultName $VaultName -Filter "expand eq 'extendedinfo'" } $item.Property.ExtendedInfo = $itemDetails.Property.ExtendedInfo diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupContainer.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupContainer.md index 580de29d37ce..2a3d8104ebb0 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupContainer.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupContainer.md @@ -23,27 +23,29 @@ Gets list of backup containers registered with a recovery services vault ## EXAMPLES -### Example 1: {{ Add title here }} +### Example 1: Get backup containers for DatasourceType MSSQL ```powershell -{{ Add code here }} +$container = Get-AzRecoveryServicesBackupContainer -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -ContainerType AzureVMAppContainer -DatasourceType MSSQL | Where-Object { $_.Name -match $containerFriendlyName } +$container | fl ``` ```output -{{ Add output here }} +BackupManagementType : AzureWorkload +ContainerType : VMAppContainer +ETag : +FriendlyName : sql-vm2 +HealthStatus : Healthy +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-vm2 +Location : +Name : VMAppContainer;Compute;hiagarg;sql-vm2 +Property : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.AzureVMAppContainerProtectionContainer +ProtectableObjectType : VMAppContainer +RegistrationStatus : Registered +Tag : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.ResourceTags +Type : Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers ``` -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} +This command is used to fetch backup containers for DatasourceType MSSQL which are registered with recovery services vault. ## PARAMETERS diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupItem.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupItem.md index f736f7e0e30f..11f3ef18f037 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupItem.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupItem.md @@ -41,27 +41,75 @@ Gets list of backup items protected with a recovery services vault ## EXAMPLES -### Example 1: {{ Add title here }} +### Example 1: Get backup items protected by recovery services vault ```powershell -{{ Add code here }} +$items = Get-AzRecoveryServicesBackupItem -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -DatasourceType AzureVM +$items ``` ```output -{{ Add output here }} +ETag Location Name +---- -------- ---- + VM;iaasvmcontainerv2;hiagarg;hiagavm1 + VM;iaasvmcontainerv2;hiagarg;hiagavm2 + VM;iaasvmcontainerv2;hiagarg;hiagavm ``` -{{ Add description here }} +This command fetches the backup items protected by a recovery services vault for DatasourceType AzureVM. -### Example 2: {{ Add title here }} +### Example 2: Get backup items for a particular container ```powershell -{{ Add code here }} +$container = Get-AzRecoveryServicesBackupContainer -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -ContainerType AzureVMAppContainer -DatasourceType MSSQL | Where-Object { $_.Name -match $containerFriendlyName } +$items = Get-AzRecoveryServicesBackupItem -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -DatasourceType MSSQL -Container $container +$items[0] | fl ``` ```output -{{ Add output here }} +BackupManagementType : AzureWorkload +BackupSetName : +ContainerName : VMAppContainer;Compute;hiagarg;sql-pstest-vm1 +CreateMode : +DeferredDeleteTimeInUtc : +DeferredDeleteTimeRemaining : +ETag : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-pstest-vm1/protectedItems/SQLDataBase;MSSQLSERVER;model +IsArchiveEnabled : False +IsDeferredDeleteScheduleUpcoming : +IsRehydrate : +IsScheduledForDeferredDelete : +LastRecoveryPoint : +Location : +Name : SQLDataBase;MSSQLSERVER;model +PolicyId : +PolicyName : +Property : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.AzureVMWorkloadSqlDatabaseProtectedItem +ProtectedItemType : AzureVmWorkloadSQLDatabase +ResourceGuardOperationRequest : +SoftDeleteRetentionPeriod : 0 +SourceResourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-pstest-vm1 +Tag : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.ResourceTags +Type : Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems +WorkloadType : SQLDataBase ``` -{{ Add description here }} +The first command gets the backup container and second command fetches the backup items protected by a recovery services vault for DatasourceType MSSQL and belong to backup container $container. + +### Example 3: Get backup items protected by a backup policy +```powershell +$policy = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $resourceGroupName -VaultName $vaultName -PolicySubType "Standard" -DatasourceType MSSQL | Where-Object { $_.Name -match "HourlyLogBackup" } +$items = Get-AzRecoveryServicesBackupItem -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -Policy $policy +$items +``` + +```output +ETag Location Name +---- -------- ---- + SQLDataBase;mssqlserver;msdb + SQLDataBase;MSSQLSERVER;mig-db1 + SQLDataBase;mssqlserver;model +``` + +The first command gets the backup policy and second command fetches the backup items protected by a recovery services vault with the policy. ## PARAMETERS diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupProtectableItem.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupProtectableItem.md index e83d90d802ad..9f7484e747cf 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupProtectableItem.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupProtectableItem.md @@ -36,27 +36,46 @@ Returns DBs and their upper tier entities like Instance, AvailabilityGroup etc. ## EXAMPLES -### Example 1: {{ Add title here }} +### Example 1: List protectable items for datasource type MSSQL ```powershell -{{ Add code here }} +$proItems = Get-AzRecoveryServicesBackupProtectableItem -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -DatasourceType "MSSQL" +$proItems ``` ```output -{{ Add output here }} +ETag Location Name AutoProtectionPolicy +---- -------- ---- -------------------- + sqlinstance;mssqlserver + sqldatabase;mssqlserver;master + sqldatabase;mssqlserver;model ``` -{{ Add description here }} +This command is used to fetch protectable items for DatasourceType MSSQL which can be protected by a recovery services vault. -### Example 2: {{ Add title here }} +### Example 2: Filter protectable items based on Container, Name, ServerName, ItemType ```powershell -{{ Add code here }} +$proItems = Get-AzRecoveryServicesBackupProtectableItem -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -DatasourceType MSSQL -ItemType SQLInstance -ServerName $serverName -Container $container -Name $protectableItemName +$proItems[0] | fl ``` ```output -{{ Add output here }} +AutoProtectionPolicy : +NodesList : +BackupManagementType : AzureWorkload +ETag : +FriendlyName : MSSQLSERVER +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/vmappcontainer;compute;hiagarg;sql-vm1/protectableItems/sqlinstance;mssqlserver +Location : +Name : sqlinstance;mssqlserver +Property : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.AzureVMWorkloadSqlInstanceProtectableItem +ProtectableItemType : SQLInstance +ProtectionState : NotProtected +Tag : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.ResourceTags +Type : Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectableItems +WorkloadType : SQL ``` -{{ Add description here }} +The above command shows an example on how to filter protectable items based on Container, Name, ServerName, ItemType. ## PARAMETERS diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Register-AzRecoveryServicesBackupContainer.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Register-AzRecoveryServicesBackupContainer.md index a1bcf66d0f2d..15ff34a2fd20 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Register-AzRecoveryServicesBackupContainer.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Register-AzRecoveryServicesBackupContainer.md @@ -31,27 +31,48 @@ The Register-AzRecoveryServicesBackupContainer cmdlet registers an Azure VM for ## EXAMPLES -### Example 1: {{ Add title here }} +### Example 1: Register a backup container for DatasourceType MSSQL ```powershell -{{ Add code here }} +$resourceId = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-vm2" +$registeredContainer = Register-AzRecoveryServicesBackupContainer -ResourceGroupName $resourceGroupName -VaultName $vaultName -DatasourceType MSSQL -ResourceId $resourceId +$registeredContainer ``` ```output -{{ Add output here }} +ETag Location Name +---- -------- ---- + VMAppContainer;Compute;hiagarg;sql-vm2 ``` -{{ Add description here }} +First we set the SQL virtual machine ArmId for VM which needs to be registered. +Next command is used to register the backup container. -### Example 2: {{ Add title here }} +### Example 2: Re-registering a backup container ```powershell -{{ Add code here }} +$container = Get-AzRecoveryServicesBackupContainer -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -ContainerType AzureVMAppContainer -DatasourceType MSSQL | Where-Object { $_.Name -match $containerFriendlyName } +$reRegisteredContainer = Register-AzRecoveryServicesBackupContainer -ResourceGroupName $resourceGroupName -VaultName $vaultName -DatasourceType MSSQL -Container $container +$reRegisteredContainer | fl ``` ```output -{{ Add output here }} +BackupManagementType : AzureWorkload +ContainerType : VMAppContainer +ETag : +FriendlyName : sql-vm2 +HealthStatus : Healthy +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-vm2 +Location : +Name : VMAppContainer;Compute;hiagarg;sql-vm2 +Property : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.AzureVMAppContainerProtectionContainer +ProtectableObjectType : VMAppContainer +RegistrationStatus : Registered +Tag : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.ResourceTags +Type : Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers ``` -{{ Add description here }} +The first command fetches the backup container for re-registeration. +The next command triggers the re-registeration for the backup container. +This command can be used for Datasourcetype MSSQL, SAPHANA. ## PARAMETERS diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Remove-AzRecoveryServicesBackupPolicy.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Remove-AzRecoveryServicesBackupPolicy.md index c4b5932addb4..4d8124d36311 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Remove-AzRecoveryServicesBackupPolicy.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Remove-AzRecoveryServicesBackupPolicy.md @@ -29,7 +29,7 @@ Status of the\r\noperation can be fetched using GetProtectionPolicyOperationResu ### Example 1: Remove a policy with its name ```powershell - Remove-AzRecoveryServicesBackupPolicy -PolicyName "MyPolicy" -ResourceGroupName "MyResourceGroup" -VaultName "MyVault" + Remove-AzRecoveryServicesBackupPolicy -PolicyName "policyName" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" ``` This command deletes the specified backup policy. diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupContainer.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupContainer.md index 6ee1a83db970..6e268f342949 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupContainer.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupContainer.md @@ -1,22 +1,23 @@ -### Example 1: {{ Add title here }} +### Example 1: Get backup containers for DatasourceType MSSQL ```powershell -{{ Add code here }} +$container = Get-AzRecoveryServicesBackupContainer -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -ContainerType AzureVMAppContainer -DatasourceType MSSQL | Where-Object { $_.Name -match $containerFriendlyName } +$container | fl ``` ```output -{{ Add output here }} +BackupManagementType : AzureWorkload +ContainerType : VMAppContainer +ETag : +FriendlyName : sql-vm2 +HealthStatus : Healthy +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-vm2 +Location : +Name : VMAppContainer;Compute;hiagarg;sql-vm2 +Property : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.AzureVMAppContainerProtectionContainer +ProtectableObjectType : VMAppContainer +RegistrationStatus : Registered +Tag : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.ResourceTags +Type : Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers ``` -{{ Add description here }} - -### Example 2: {{ Add title here }} -```powershell -{{ Add code here }} -``` - -```output -{{ Add output here }} -``` - -{{ Add description here }} - +This command is used to fetch backup containers for DatasourceType MSSQL which are registered with recovery services vault. diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupItem.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupItem.md index 6ee1a83db970..e04a1b5037fc 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupItem.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupItem.md @@ -1,22 +1,69 @@ -### Example 1: {{ Add title here }} +### Example 1: Get backup items protected by recovery services vault ```powershell -{{ Add code here }} +$items = Get-AzRecoveryServicesBackupItem -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -DatasourceType AzureVM +$items ``` ```output -{{ Add output here }} +ETag Location Name +---- -------- ---- + VM;iaasvmcontainerv2;hiagarg;hiagavm1 + VM;iaasvmcontainerv2;hiagarg;hiagavm2 + VM;iaasvmcontainerv2;hiagarg;hiagavm ``` -{{ Add description here }} +This command fetches the backup items protected by a recovery services vault for DatasourceType AzureVM. -### Example 2: {{ Add title here }} +### Example 2: Get backup items for a particular container ```powershell -{{ Add code here }} +$container = Get-AzRecoveryServicesBackupContainer -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -ContainerType AzureVMAppContainer -DatasourceType MSSQL | Where-Object { $_.Name -match $containerFriendlyName } +$items = Get-AzRecoveryServicesBackupItem -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -DatasourceType MSSQL -Container $container +$items[0] | fl ``` ```output -{{ Add output here }} +BackupManagementType : AzureWorkload +BackupSetName : +ContainerName : VMAppContainer;Compute;hiagarg;sql-pstest-vm1 +CreateMode : +DeferredDeleteTimeInUtc : +DeferredDeleteTimeRemaining : +ETag : +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-pstest-vm1/protectedItems/SQLDataBase;MSSQLSERVER;model +IsArchiveEnabled : False +IsDeferredDeleteScheduleUpcoming : +IsRehydrate : +IsScheduledForDeferredDelete : +LastRecoveryPoint : +Location : +Name : SQLDataBase;MSSQLSERVER;model +PolicyId : +PolicyName : +Property : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.AzureVMWorkloadSqlDatabaseProtectedItem +ProtectedItemType : AzureVmWorkloadSQLDatabase +ResourceGuardOperationRequest : +SoftDeleteRetentionPeriod : 0 +SourceResourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-pstest-vm1 +Tag : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.ResourceTags +Type : Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectedItems +WorkloadType : SQLDataBase ``` -{{ Add description here }} +The first command gets the backup container and second command fetches the backup items protected by a recovery services vault for DatasourceType MSSQL and belong to backup container $container. +### Example 3: Get backup items protected by a backup policy +```powershell +$policy = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $resourceGroupName -VaultName $vaultName -PolicySubType "Standard" -DatasourceType MSSQL | Where-Object { $_.Name -match "HourlyLogBackup" } +$items = Get-AzRecoveryServicesBackupItem -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -Policy $policy +$items +``` + +```output +ETag Location Name +---- -------- ---- + SQLDataBase;mssqlserver;msdb + SQLDataBase;MSSQLSERVER;mig-db1 + SQLDataBase;mssqlserver;model +``` + +The first command gets the backup policy and second command fetches the backup items protected by a recovery services vault with the policy. diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupProtectableItem.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupProtectableItem.md index 6ee1a83db970..446029dbf6b5 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupProtectableItem.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesBackupProtectableItem.md @@ -1,22 +1,40 @@ -### Example 1: {{ Add title here }} +### Example 1: List protectable items for datasource type MSSQL ```powershell -{{ Add code here }} +$proItems = Get-AzRecoveryServicesBackupProtectableItem -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -DatasourceType "MSSQL" +$proItems ``` ```output -{{ Add output here }} +ETag Location Name AutoProtectionPolicy +---- -------- ---- -------------------- + sqlinstance;mssqlserver + sqldatabase;mssqlserver;master + sqldatabase;mssqlserver;model ``` -{{ Add description here }} +This command is used to fetch protectable items for DatasourceType MSSQL which can be protected by a recovery services vault. -### Example 2: {{ Add title here }} +### Example 2: Filter protectable items based on Container, Name, ServerName, ItemType ```powershell -{{ Add code here }} +$proItems = Get-AzRecoveryServicesBackupProtectableItem -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -DatasourceType MSSQL -ItemType SQLInstance -ServerName $serverName -Container $container -Name $protectableItemName +$proItems[0] | fl ``` ```output -{{ Add output here }} +AutoProtectionPolicy : +NodesList : +BackupManagementType : AzureWorkload +ETag : +FriendlyName : MSSQLSERVER +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/vmappcontainer;compute;hiagarg;sql-vm1/protectableItems/sqlinstance;mssqlserver +Location : +Name : sqlinstance;mssqlserver +Property : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.AzureVMWorkloadSqlInstanceProtectableItem +ProtectableItemType : SQLInstance +ProtectionState : NotProtected +Tag : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.ResourceTags +Type : Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers/protectableItems +WorkloadType : SQL ``` -{{ Add description here }} - +The above command shows an example on how to filter protectable items based on Container, Name, ServerName, ItemType. diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Register-AzRecoveryServicesBackupContainer.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Register-AzRecoveryServicesBackupContainer.md index 6ee1a83db970..1f59202893e1 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Register-AzRecoveryServicesBackupContainer.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Register-AzRecoveryServicesBackupContainer.md @@ -1,22 +1,39 @@ -### Example 1: {{ Add title here }} +### Example 1: Register a backup container for DatasourceType MSSQL ```powershell -{{ Add code here }} +$resourceId = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-vm2" +$registeredContainer = Register-AzRecoveryServicesBackupContainer -ResourceGroupName $resourceGroupName -VaultName $vaultName -DatasourceType MSSQL -ResourceId $resourceId +$registeredContainer ``` ```output -{{ Add output here }} +ETag Location Name +---- -------- ---- + VMAppContainer;Compute;hiagarg;sql-vm2 ``` -{{ Add description here }} +First we set the SQL virtual machine ArmId for VM which needs to be registered. Next command is used to register the backup container. -### Example 2: {{ Add title here }} +### Example 2: Re-registering a backup container ```powershell -{{ Add code here }} +$container = Get-AzRecoveryServicesBackupContainer -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -ContainerType AzureVMAppContainer -DatasourceType MSSQL | Where-Object { $_.Name -match $containerFriendlyName } +$reRegisteredContainer = Register-AzRecoveryServicesBackupContainer -ResourceGroupName $resourceGroupName -VaultName $vaultName -DatasourceType MSSQL -Container $container +$reRegisteredContainer | fl ``` ```output -{{ Add output here }} +BackupManagementType : AzureWorkload +ContainerType : VMAppContainer +ETag : +FriendlyName : sql-vm2 +HealthStatus : Healthy +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-vm2 +Location : +Name : VMAppContainer;Compute;hiagarg;sql-vm2 +Property : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.AzureVMAppContainerProtectionContainer +ProtectableObjectType : VMAppContainer +RegistrationStatus : Registered +Tag : Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.ResourceTags +Type : Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers ``` -{{ Add description here }} - +The first command fetches the backup container for re-registeration. The next command triggers the re-registeration for the backup container. This command can be used for Datasourcetype MSSQL, SAPHANA. diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Remove-AzRecoveryServicesBackupPolicy.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Remove-AzRecoveryServicesBackupPolicy.md index f6ea75eb32a9..102d7476fd0f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Remove-AzRecoveryServicesBackupPolicy.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Remove-AzRecoveryServicesBackupPolicy.md @@ -1,6 +1,6 @@ ### Example 1: Remove a policy with its name ```powershell - Remove-AzRecoveryServicesBackupPolicy -PolicyName "MyPolicy" -ResourceGroupName "MyResourceGroup" -VaultName "MyVault" + Remove-AzRecoveryServicesBackupPolicy -PolicyName "policyName" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" ``` This command deletes the specified backup policy. diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Disable-AzRecoveryServicesProtection.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Disable-AzRecoveryServicesProtection.Tests.ps1 index ec9f59dfcca6..44b48205084b 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Disable-AzRecoveryServicesProtection.Tests.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Disable-AzRecoveryServicesProtection.Tests.ps1 @@ -16,7 +16,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Disable-AzRecoveryServicesPro Describe 'Disable-AzRecoveryServicesProtection' { - It 'RetainRecoveryPointsForever' { + It 'RetainRecoveryPointsForever' -skip { $sub = $env.TestBackup.SubscriptionId $rgName = $env.TestBackup.ResourceGroupName $vaultName = $env.TestBackup.VaultName @@ -43,7 +43,7 @@ Describe 'Disable-AzRecoveryServicesProtection' { } - It 'RetainRecoveryPointsAsPerPolicy' { + It 'RetainRecoveryPointsAsPerPolicy' -skip { #first unlock the immutable state $sub = $env.TestBackup.SubscriptionId $rgName = $env.TestBackup.ResourceGroupName @@ -58,7 +58,7 @@ Describe 'Disable-AzRecoveryServicesProtection' { $DebugPreference = "SilentlyContinue" $item=Get-AzRecoveryServicesBackupProtectedItem -ResourceGroupName $rgName -VaultName $vaultName -SubscriptionId $sub -Filter "backupManagementType eq 'AzureIaasVM' and WorkloadType -eq 'AzureVM'" | Where-Object { $_.Property.FriendlyName -match $vmName} - $pol=Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName EnhancedBackupTesting + $pol=Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Name EnhancedBackupTesting if($item -ne $null) { Disable-AzRecoveryServicesProtection -DatasourceType AzureVM -ResourceGroupName $rgName -VaultName $vaultName -Item $item -RetainRecoveryPointsAsPerPolicy @@ -71,7 +71,7 @@ Describe 'Disable-AzRecoveryServicesProtection' { } } - It 'RemoveRecoveryPoints' { + It 'RemoveRecoveryPoints' -skip { $sub = $env.TestBackup.SubscriptionId $rgName = $env.TestBackup.ResourceGroupName $vaultName = $env.TestBackup.VaultName diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Recording.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Recording.json index 9013a3b58a16..1a98f123ec6f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Recording.json +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Recording.json @@ -18,19 +18,19 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "4a80c629-5f87-4805-a44e-9e0f509de75f" ], - "x-ms-client-request-id": [ "705ac7c8-d796-4f5c-930a-9f4c48239a89", "705ac7c8-d796-4f5c-930a-9f4c48239a89" ], + "x-ms-request-id": [ "bad8e9d3-6297-46a6-9a0c-c5e8998d6606" ], + "x-ms-client-request-id": [ "87bd5994-3078-4992-bb44-7a941b881a9e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ "Microsoft-IIS/10.0" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "x-ms-correlation-request-id": [ "4a80c629-5f87-4805-a44e-9e0f509de75f" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051306Z:4a80c629-5f87-4805-a44e-9e0f509de75f" ], - "Date": [ "Mon, 03 Jul 2023 05:13:06 GMT" ] + "x-ms-correlation-request-id": [ "bad8e9d3-6297-46a6-9a0c-c5e8998d6606" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093058Z:bad8e9d3-6297-46a6-9a0c-c5e8998d6606" ], + "Date": [ "Wed, 25 Oct 2023 09:30:57 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1774" ], - "Content-Type": [ "application/json" ], + "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":56,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":1,\"isLast\":false},{\"date\":2,\"isLast\":false},{\"date\":3,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":54,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"monthsOfYear\":[\"March\",\"April\"],\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":2,\"isLast\":false},{\"date\":4,\"isLast\":false},{\"date\":5,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":47,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}", @@ -45,11 +45,11 @@ "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "2" ], - "x-ms-client-request-id": [ "d24a0590-92a9-4b85-bdca-814333522517" ], - "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], + "x-ms-client-request-id": [ "f468f784-132f-488a-a40a-0c7163671e25" ], + "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -61,19 +61,19 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "15f6f185-e2b0-4dbd-b533-64ee4724cbd4" ], - "x-ms-client-request-id": [ "d24a0590-92a9-4b85-bdca-814333522517", "d24a0590-92a9-4b85-bdca-814333522517" ], + "x-ms-request-id": [ "8ae8124d-b978-42fd-91de-678b22cf3787" ], + "x-ms-client-request-id": [ "f468f784-132f-488a-a40a-0c7163671e25" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ "Microsoft-IIS/10.0" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "299" ], - "x-ms-correlation-request-id": [ "15f6f185-e2b0-4dbd-b533-64ee4724cbd4" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051307Z:15f6f185-e2b0-4dbd-b533-64ee4724cbd4" ], - "Date": [ "Mon, 03 Jul 2023 05:13:07 GMT" ] + "x-ms-correlation-request-id": [ "8ae8124d-b978-42fd-91de-678b22cf3787" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093058Z:8ae8124d-b978-42fd-91de-678b22cf3787" ], + "Date": [ "Wed, 25 Oct 2023 09:30:58 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1774" ], - "Content-Type": [ "application/json" ], + "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":56,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":1,\"isLast\":false},{\"date\":2,\"isLast\":false},{\"date\":3,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":54,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"monthsOfYear\":[\"March\",\"April\"],\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":2,\"isLast\":false},{\"date\":4,\"isLast\":false},{\"date\":5,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":47,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}", @@ -88,11 +88,11 @@ "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "598628f6-755e-4eba-8cee-9c54d7af4cb7" ], + "x-ms-client-request-id": [ "ab4d513c-af32-4e2a-9d88-e8d9ebd6829e" ], "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -104,14 +104,15 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "e44a9da3-0060-4241-b9b4-2fce8d2e49c2" ], - "x-ms-client-request-id": [ "598628f6-755e-4eba-8cee-9c54d7af4cb7", "598628f6-755e-4eba-8cee-9c54d7af4cb7" ], + "x-ms-request-id": [ "899da968-3dfd-4e25-9331-920d924858c7" ], + "x-ms-client-request-id": [ "ab4d513c-af32-4e2a-9d88-e8d9ebd6829e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], - "x-ms-correlation-request-id": [ "e44a9da3-0060-4241-b9b4-2fce8d2e49c2" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051309Z:e44a9da3-0060-4241-b9b4-2fce8d2e49c2" ], - "Date": [ "Mon, 03 Jul 2023 05:13:08 GMT" ] + "x-ms-correlation-request-id": [ "899da968-3dfd-4e25-9331-920d924858c7" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093059Z:899da968-3dfd-4e25-9331-920d924858c7" ], + "Date": [ "Wed, 25 Oct 2023 09:30:59 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -140,19 +141,19 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "b63d2395-cf79-4167-8fdc-86f8c7bd6489" ], - "x-ms-client-request-id": [ "ad2e880f-0817-467a-9a3a-407831a977f1", "ad2e880f-0817-467a-9a3a-407831a977f1" ], + "x-ms-request-id": [ "6f61a8d2-aa9d-4936-ba25-6532256c4334" ], + "x-ms-client-request-id": [ "c611c50f-72e7-4fe1-b63a-4bb40acda0d1" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ "Microsoft-IIS/10.0" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "x-ms-correlation-request-id": [ "b63d2395-cf79-4167-8fdc-86f8c7bd6489" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051310Z:b63d2395-cf79-4167-8fdc-86f8c7bd6489" ], - "Date": [ "Mon, 03 Jul 2023 05:13:10 GMT" ] + "x-ms-correlation-request-id": [ "6f61a8d2-aa9d-4936-ba25-6532256c4334" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093101Z:6f61a8d2-aa9d-4936-ba25-6532256c4334" ], + "Date": [ "Wed, 25 Oct 2023 09:31:00 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1572" ], - "Content-Type": [ "application/json" ], + "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":56,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\",\"Monday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"Second\",\"Fourth\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":36,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"May\",\"June\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"First\",\"Third\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":67,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}", @@ -167,11 +168,11 @@ "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "5" ], - "x-ms-client-request-id": [ "ee898530-5355-4215-80c9-9430e5889b0e" ], - "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], + "x-ms-client-request-id": [ "cdd12a4b-2de8-4d00-9923-6fb7ebac165d" ], + "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -183,19 +184,19 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "bf5b04fa-6833-4781-841a-f077630b1b01" ], - "x-ms-client-request-id": [ "ee898530-5355-4215-80c9-9430e5889b0e", "ee898530-5355-4215-80c9-9430e5889b0e" ], + "x-ms-request-id": [ "601d4495-2f07-465d-9941-5949a216e75e" ], + "x-ms-client-request-id": [ "cdd12a4b-2de8-4d00-9923-6fb7ebac165d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ "Microsoft-IIS/10.0" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "298" ], - "x-ms-correlation-request-id": [ "bf5b04fa-6833-4781-841a-f077630b1b01" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051311Z:bf5b04fa-6833-4781-841a-f077630b1b01" ], - "Date": [ "Mon, 03 Jul 2023 05:13:11 GMT" ] + "x-ms-correlation-request-id": [ "601d4495-2f07-465d-9941-5949a216e75e" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093102Z:601d4495-2f07-465d-9941-5949a216e75e" ], + "Date": [ "Wed, 25 Oct 2023 09:31:01 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1572" ], - "Content-Type": [ "application/json" ], + "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":56,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\",\"Monday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"Second\",\"Fourth\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":36,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"May\",\"June\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"First\",\"Third\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":67,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}", @@ -210,11 +211,11 @@ "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "6" ], - "x-ms-client-request-id": [ "5a7819f0-b993-4a21-ab01-beddc71a09c9" ], + "x-ms-client-request-id": [ "e5e4ea25-f9b9-4b35-958c-05279ce97fa7" ], "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -226,14 +227,15 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "d575a8d7-6f1c-4eea-935d-3a5294399281" ], - "x-ms-client-request-id": [ "5a7819f0-b993-4a21-ab01-beddc71a09c9", "5a7819f0-b993-4a21-ab01-beddc71a09c9" ], + "x-ms-request-id": [ "2118cc22-6a50-4d02-ba22-a372c7ca893d" ], + "x-ms-client-request-id": [ "e5e4ea25-f9b9-4b35-958c-05279ce97fa7" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], - "x-ms-correlation-request-id": [ "d575a8d7-6f1c-4eea-935d-3a5294399281" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051312Z:d575a8d7-6f1c-4eea-935d-3a5294399281" ], - "Date": [ "Mon, 03 Jul 2023 05:13:12 GMT" ] + "x-ms-correlation-request-id": [ "2118cc22-6a50-4d02-ba22-a372c7ca893d" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093103Z:2118cc22-6a50-4d02-ba22-a372c7ca893d" ], + "Date": [ "Wed, 25 Oct 2023 09:31:02 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -262,19 +264,19 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "8ea22ebc-9914-46c0-83e6-6bfc2a2f23b9" ], - "x-ms-client-request-id": [ "9b138bcd-5226-458b-a355-fdcadde7dbab", "9b138bcd-5226-458b-a355-fdcadde7dbab" ], + "x-ms-request-id": [ "0006aa38-ae87-4268-b8e9-76d944fa1262" ], + "x-ms-client-request-id": [ "0ce44740-1249-4e29-95eb-c1424fe0fb6f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ "Microsoft-IIS/10.0" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], - "x-ms-correlation-request-id": [ "8ea22ebc-9914-46c0-83e6-6bfc2a2f23b9" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051314Z:8ea22ebc-9914-46c0-83e6-6bfc2a2f23b9" ], - "Date": [ "Mon, 03 Jul 2023 05:13:14 GMT" ] + "x-ms-correlation-request-id": [ "0006aa38-ae87-4268-b8e9-76d944fa1262" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093104Z:0006aa38-ae87-4268-b8e9-76d944fa1262" ], + "Date": [ "Wed, 25 Oct 2023 09:31:03 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1833" ], - "Content-Type": [ "application/json" ], + "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunDays\":[\"Monday\",\"Tuesday\",\"Wednesday\"],\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":56,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\",\"Monday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":1,\"isLast\":false},{\"date\":6,\"isLast\":false},{\"date\":28,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":45,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"monthsOfYear\":[\"May\",\"April\"],\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":1,\"isLast\":false},{\"date\":2,\"isLast\":false},{\"date\":3,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":43,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}", @@ -289,11 +291,11 @@ "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "8" ], - "x-ms-client-request-id": [ "e6ec9315-cbb8-4e83-9e8d-a5d3e7095bf6" ], - "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], + "x-ms-client-request-id": [ "c42b84c0-2f95-4d77-8f58-a728e3d626c9" ], + "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -305,19 +307,19 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "59070183-5cec-452b-a354-bdebd8c913ad" ], - "x-ms-client-request-id": [ "e6ec9315-cbb8-4e83-9e8d-a5d3e7095bf6", "e6ec9315-cbb8-4e83-9e8d-a5d3e7095bf6" ], + "x-ms-request-id": [ "7f799f49-dacf-403e-a982-bde06ae1ecee" ], + "x-ms-client-request-id": [ "c42b84c0-2f95-4d77-8f58-a728e3d626c9" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ "Microsoft-IIS/10.0" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "297" ], - "x-ms-correlation-request-id": [ "59070183-5cec-452b-a354-bdebd8c913ad" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051315Z:59070183-5cec-452b-a354-bdebd8c913ad" ], - "Date": [ "Mon, 03 Jul 2023 05:13:14 GMT" ] + "x-ms-correlation-request-id": [ "7f799f49-dacf-403e-a982-bde06ae1ecee" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093104Z:7f799f49-dacf-403e-a982-bde06ae1ecee" ], + "Date": [ "Wed, 25 Oct 2023 09:31:04 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1833" ], - "Content-Type": [ "application/json" ], + "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunDays\":[\"Monday\",\"Tuesday\",\"Wednesday\"],\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":56,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\",\"Monday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":1,\"isLast\":false},{\"date\":6,\"isLast\":false},{\"date\":28,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":45,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Daily\",\"monthsOfYear\":[\"May\",\"April\"],\"retentionScheduleDaily\":{\"daysOfTheMonth\":[{\"date\":1,\"isLast\":false},{\"date\":2,\"isLast\":false},{\"date\":3,\"isLast\":false}]},\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":43,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}", @@ -332,11 +334,11 @@ "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "9" ], - "x-ms-client-request-id": [ "f6b06106-59c1-415a-8d14-417024a6a2e2" ], + "x-ms-client-request-id": [ "b29df603-0e05-454b-b6f1-e13191c9a301" ], "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -348,14 +350,15 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "642ce7f7-374b-47ab-85b7-e5493885d35f" ], - "x-ms-client-request-id": [ "f6b06106-59c1-415a-8d14-417024a6a2e2", "f6b06106-59c1-415a-8d14-417024a6a2e2" ], + "x-ms-request-id": [ "5b1c96d7-e9ed-461f-87c5-602c59fd8590" ], + "x-ms-client-request-id": [ "b29df603-0e05-454b-b6f1-e13191c9a301" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14997" ], - "x-ms-correlation-request-id": [ "642ce7f7-374b-47ab-85b7-e5493885d35f" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051316Z:642ce7f7-374b-47ab-85b7-e5493885d35f" ], - "Date": [ "Mon, 03 Jul 2023 05:13:16 GMT" ] + "x-ms-correlation-request-id": [ "5b1c96d7-e9ed-461f-87c5-602c59fd8590" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093105Z:5b1c96d7-e9ed-461f-87c5-602c59fd8590" ], + "Date": [ "Wed, 25 Oct 2023 09:31:05 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -369,7 +372,7 @@ "Request": { "Method": "PUT", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1?api-version=2023-02-01", - "Content": "{\r\n \"properties\": {\r\n \"backupManagementType\": \"AzureWorkload\",\r\n \"workLoadType\": \"SAPHanaDatabase\",\r\n \"settings\": {\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"issqlcompression\": false,\r\n \"isCompression\": false\r\n },\r\n \"subProtectionPolicy\": [\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Monday\", \"Tuesday\" ],\r\n \"scheduleRunTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Tuesday\" ],\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 11,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Tuesday\" ],\r\n \"weeksOfTheMonth\": [ \"First\", \"Last\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 34,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"May\", \"June\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Tuesday\" ],\r\n \"weeksOfTheMonth\": [ \"Last\", \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 47,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"policyType\": \"Full\",\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n }\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"LogSchedulePolicy\",\r\n \"scheduleFrequencyInMins\": 120\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 23,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Log\"\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Sunday\" ],\r\n \"scheduleRunTimes\": [ \"2023-07-03T02:00:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 64,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Incremental\"\r\n }\r\n ]\r\n }\r\n}", + "Content": "{\r\n \"properties\": {\r\n \"backupManagementType\": \"AzureWorkload\",\r\n \"workLoadType\": \"SAPHanaDatabase\",\r\n \"settings\": {\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"issqlcompression\": false,\r\n \"isCompression\": false\r\n },\r\n \"subProtectionPolicy\": [\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Monday\", \"Tuesday\" ],\r\n \"scheduleRunTimes\": [ \"2023-10-25T13:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Tuesday\" ],\r\n \"retentionTimes\": [ \"2023-10-25T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 11,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Tuesday\" ],\r\n \"weeksOfTheMonth\": [ \"First\", \"Last\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-10-25T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 34,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"May\", \"June\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Tuesday\" ],\r\n \"weeksOfTheMonth\": [ \"Last\", \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-10-25T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 47,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"policyType\": \"Full\",\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n }\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"LogSchedulePolicy\",\r\n \"scheduleFrequencyInMins\": 120\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 23,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Log\"\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Sunday\" ],\r\n \"scheduleRunTimes\": [ \"2023-10-25T02:00:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 64,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Incremental\"\r\n }\r\n ]\r\n }\r\n}", "isContentBase64": false, "Headers": { }, @@ -384,22 +387,22 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "e72faafc-7f3d-4754-9a6f-a1d14307e060" ], - "x-ms-client-request-id": [ "9d0e6dd5-a75e-4467-9d92-afa7baa80171", "9d0e6dd5-a75e-4467-9d92-afa7baa80171" ], + "x-ms-request-id": [ "2ec64d2a-7755-4400-a135-16f9a6642aad" ], + "x-ms-client-request-id": [ "5f998387-cb6c-4495-9d60-65b90309369e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ "Microsoft-IIS/10.0" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1196" ], - "x-ms-correlation-request-id": [ "e72faafc-7f3d-4754-9a6f-a1d14307e060" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051318Z:e72faafc-7f3d-4754-9a6f-a1d14307e060" ], - "Date": [ "Mon, 03 Jul 2023 05:13:18 GMT" ] + "x-ms-correlation-request-id": [ "2ec64d2a-7755-4400-a135-16f9a6642aad" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093107Z:2ec64d2a-7755-4400-a135-16f9a6642aad" ], + "Date": [ "Wed, 25 Oct 2023 09:31:06 GMT" ] }, "ContentHeaders": { "Content-Length": [ "2155" ], - "Content-Type": [ "application/json" ], + "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Tuesday\"],\"scheduleRunTimes\":[\"2023-07-03T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":11,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"First\",\"Last\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"May\",\"June\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"Last\",\"First\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":47,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Incremental\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Sunday\"],\"scheduleRunTimes\":[\"2023-07-03T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":64,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":23,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Tuesday\"],\"scheduleRunTimes\":[\"2023-10-25T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":11,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"First\",\"Last\"]},\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"May\",\"June\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"Last\",\"First\"]},\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":47,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Incremental\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Sunday\"],\"scheduleRunTimes\":[\"2023-10-25T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":64,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":23,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", "isContentBase64": false } }, @@ -411,11 +414,11 @@ "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "11" ], - "x-ms-client-request-id": [ "8b576637-ac17-4eef-b1b1-b9d90e0a6941" ], - "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], + "x-ms-client-request-id": [ "6e2232d6-bea6-4fb4-b612-375b6f54426d" ], + "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -427,22 +430,22 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "a5fe4c3c-e53e-4c23-9f7a-d7eaaa39e8ef" ], - "x-ms-client-request-id": [ "8b576637-ac17-4eef-b1b1-b9d90e0a6941", "8b576637-ac17-4eef-b1b1-b9d90e0a6941" ], + "x-ms-request-id": [ "03e7fb54-96d0-47d8-af15-4523c9384b0e" ], + "x-ms-client-request-id": [ "6e2232d6-bea6-4fb4-b612-375b6f54426d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ "Microsoft-IIS/10.0" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "296" ], - "x-ms-correlation-request-id": [ "a5fe4c3c-e53e-4c23-9f7a-d7eaaa39e8ef" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051319Z:a5fe4c3c-e53e-4c23-9f7a-d7eaaa39e8ef" ], - "Date": [ "Mon, 03 Jul 2023 05:13:18 GMT" ] + "x-ms-correlation-request-id": [ "03e7fb54-96d0-47d8-af15-4523c9384b0e" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093107Z:03e7fb54-96d0-47d8-af15-4523c9384b0e" ], + "Date": [ "Wed, 25 Oct 2023 09:31:07 GMT" ] }, "ContentHeaders": { "Content-Length": [ "2155" ], - "Content-Type": [ "application/json" ], + "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Tuesday\"],\"scheduleRunTimes\":[\"2023-07-03T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":11,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"First\",\"Last\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"May\",\"June\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"Last\",\"First\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":47,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Incremental\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Sunday\"],\"scheduleRunTimes\":[\"2023-07-03T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":64,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":23,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Tuesday\"],\"scheduleRunTimes\":[\"2023-10-25T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":11,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"First\",\"Last\"]},\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":34,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"May\",\"June\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\",\"Tuesday\"],\"weeksOfTheMonth\":[\"Last\",\"First\"]},\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":47,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Incremental\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Sunday\"],\"scheduleRunTimes\":[\"2023-10-25T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":64,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":23,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", "isContentBase64": false } }, @@ -454,11 +457,11 @@ "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "12" ], - "x-ms-client-request-id": [ "f49190f4-2625-4d9f-a0c1-ad23830784d1" ], + "x-ms-client-request-id": [ "591acee0-4c27-4619-9916-ac31228c6d47" ], "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -470,14 +473,15 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "ce215155-74c5-434a-997a-5fef61853d77" ], - "x-ms-client-request-id": [ "f49190f4-2625-4d9f-a0c1-ad23830784d1", "f49190f4-2625-4d9f-a0c1-ad23830784d1" ], + "x-ms-request-id": [ "8e2a964e-ac7f-4c4a-9684-01b4d513415d" ], + "x-ms-client-request-id": [ "591acee0-4c27-4619-9916-ac31228c6d47" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14996" ], - "x-ms-correlation-request-id": [ "ce215155-74c5-434a-997a-5fef61853d77" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051320Z:ce215155-74c5-434a-997a-5fef61853d77" ], - "Date": [ "Mon, 03 Jul 2023 05:13:20 GMT" ] + "x-ms-correlation-request-id": [ "8e2a964e-ac7f-4c4a-9684-01b4d513415d" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093108Z:8e2a964e-ac7f-4c4a-9684-01b4d513415d" ], + "Date": [ "Wed, 25 Oct 2023 09:31:08 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -506,19 +510,19 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "53428a6e-2ce3-40ea-9bb1-191beb62c18e" ], - "x-ms-client-request-id": [ "56537018-0bac-4eb6-98d9-b2ea5f9d0c2f", "56537018-0bac-4eb6-98d9-b2ea5f9d0c2f" ], + "x-ms-request-id": [ "341353cb-5d65-4ba2-99e7-c51a6b1c3078" ], + "x-ms-client-request-id": [ "77fe232d-5f2f-4b7c-b4cc-e4e8d801d29a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ "Microsoft-IIS/10.0" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1195" ], - "x-ms-correlation-request-id": [ "53428a6e-2ce3-40ea-9bb1-191beb62c18e" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051322Z:53428a6e-2ce3-40ea-9bb1-191beb62c18e" ], - "Date": [ "Mon, 03 Jul 2023 05:13:21 GMT" ] + "x-ms-correlation-request-id": [ "341353cb-5d65-4ba2-99e7-c51a6b1c3078" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093109Z:341353cb-5d65-4ba2-99e7-c51a6b1c3078" ], + "Date": [ "Wed, 25 Oct 2023 09:31:09 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1821" ], - "Content-Type": [ "application/json" ], + "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2020-09-30T19:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"TierAfter\",\"duration\":54,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", @@ -533,11 +537,11 @@ "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "14" ], - "x-ms-client-request-id": [ "8aef313e-cd82-41d8-8b35-16074dac6594" ], - "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], + "x-ms-client-request-id": [ "fbe1ede1-606b-49cf-a34f-71f5a97fb1a9" ], + "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -549,19 +553,19 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "1325d5b5-bfa2-499c-96f4-fa3782a97cd2" ], - "x-ms-client-request-id": [ "8aef313e-cd82-41d8-8b35-16074dac6594", "8aef313e-cd82-41d8-8b35-16074dac6594" ], + "x-ms-request-id": [ "15380cfc-74f5-45e5-9241-5818e2f0c1ad" ], + "x-ms-client-request-id": [ "fbe1ede1-606b-49cf-a34f-71f5a97fb1a9" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ "Microsoft-IIS/10.0" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "295" ], - "x-ms-correlation-request-id": [ "1325d5b5-bfa2-499c-96f4-fa3782a97cd2" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051322Z:1325d5b5-bfa2-499c-96f4-fa3782a97cd2" ], - "Date": [ "Mon, 03 Jul 2023 05:13:22 GMT" ] + "x-ms-correlation-request-id": [ "15380cfc-74f5-45e5-9241-5818e2f0c1ad" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093110Z:15380cfc-74f5-45e5-9241-5818e2f0c1ad" ], + "Date": [ "Wed, 25 Oct 2023 09:31:09 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1821" ], - "Content-Type": [ "application/json" ], + "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2020-09-30T19:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"TierAfter\",\"duration\":54,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", @@ -576,11 +580,11 @@ "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "15" ], - "x-ms-client-request-id": [ "140c38cb-0ee1-48ae-bda7-5e7449e19ebd" ], + "x-ms-client-request-id": [ "f54d24c1-882e-4270-8258-ec0066801349" ], "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -592,14 +596,15 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "87cb7e03-fe08-4ae4-92a1-5d8b2ea7be91" ], - "x-ms-client-request-id": [ "140c38cb-0ee1-48ae-bda7-5e7449e19ebd", "140c38cb-0ee1-48ae-bda7-5e7449e19ebd" ], + "x-ms-request-id": [ "e586771e-57d9-4277-b4e5-99557eda9792" ], + "x-ms-client-request-id": [ "f54d24c1-882e-4270-8258-ec0066801349" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14995" ], - "x-ms-correlation-request-id": [ "87cb7e03-fe08-4ae4-92a1-5d8b2ea7be91" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051324Z:87cb7e03-fe08-4ae4-92a1-5d8b2ea7be91" ], - "Date": [ "Mon, 03 Jul 2023 05:13:23 GMT" ] + "x-ms-correlation-request-id": [ "e586771e-57d9-4277-b4e5-99557eda9792" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093111Z:e586771e-57d9-4277-b4e5-99557eda9792" ], + "Date": [ "Wed, 25 Oct 2023 09:31:10 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -628,19 +633,19 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "74e3a309-c39d-4ef6-9f0f-24963c0c51f3" ], - "x-ms-client-request-id": [ "397490de-53b1-49a7-af7e-a012188e5c65", "397490de-53b1-49a7-af7e-a012188e5c65" ], + "x-ms-request-id": [ "fbb47f83-85c1-4852-9b8a-b70a245a61b7" ], + "x-ms-client-request-id": [ "0a73a204-855a-488f-aa4c-b199b3fe14a7" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ "Microsoft-IIS/10.0" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1194" ], - "x-ms-correlation-request-id": [ "74e3a309-c39d-4ef6-9f0f-24963c0c51f3" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051325Z:74e3a309-c39d-4ef6-9f0f-24963c0c51f3" ], - "Date": [ "Mon, 03 Jul 2023 05:13:25 GMT" ] + "x-ms-correlation-request-id": [ "fbb47f83-85c1-4852-9b8a-b70a245a61b7" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093112Z:fbb47f83-85c1-4852-9b8a-b70a245a61b7" ], + "Date": [ "Wed, 25 Oct 2023 09:31:12 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1529" ], - "Content-Type": [ "application/json" ], + "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":12,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"TierRecommended\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}", @@ -655,11 +660,11 @@ "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "17" ], - "x-ms-client-request-id": [ "e29e8206-5194-4537-965b-a4dc6374efa2" ], - "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], + "x-ms-client-request-id": [ "e6e1857a-d982-4566-bbb2-579120502728" ], + "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -671,19 +676,19 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "1cad4870-938b-4495-a9e5-5ef81ddd5d7f" ], - "x-ms-client-request-id": [ "e29e8206-5194-4537-965b-a4dc6374efa2", "e29e8206-5194-4537-965b-a4dc6374efa2" ], + "x-ms-request-id": [ "e2924411-9229-4615-bde1-6f10ed7620a9" ], + "x-ms-client-request-id": [ "e6e1857a-d982-4566-bbb2-579120502728" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ "Microsoft-IIS/10.0" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "294" ], - "x-ms-correlation-request-id": [ "1cad4870-938b-4495-a9e5-5ef81ddd5d7f" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051326Z:1cad4870-938b-4495-a9e5-5ef81ddd5d7f" ], - "Date": [ "Mon, 03 Jul 2023 05:13:26 GMT" ] + "x-ms-correlation-request-id": [ "e2924411-9229-4615-bde1-6f10ed7620a9" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093113Z:e2924411-9229-4615-bde1-6f10ed7620a9" ], + "Date": [ "Wed, 25 Oct 2023 09:31:12 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1529" ], - "Content-Type": [ "application/json" ], + "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/arohijain-rg/providers/Microsoft.RecoveryServices/vaults/arohijain-vault/backupPolicies/arohijain-p-1\",\"name\":\"arohijain-p-1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-05-22T14:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":12,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-22T14:00:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"TierRecommended\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}", @@ -698,11 +703,11 @@ "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "18" ], - "x-ms-client-request-id": [ "d3781714-3970-414f-afeb-7c139ebccfd8" ], + "x-ms-client-request-id": [ "f8e0ba07-1aca-4741-9cf3-434763720c9e" ], "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -714,14 +719,15 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "b0b097d5-2e4d-4a15-a58b-cc17b22bd819" ], - "x-ms-client-request-id": [ "d3781714-3970-414f-afeb-7c139ebccfd8", "d3781714-3970-414f-afeb-7c139ebccfd8" ], + "x-ms-request-id": [ "3c11c652-33ee-4733-bf2f-3ba63ac883be" ], + "x-ms-client-request-id": [ "f8e0ba07-1aca-4741-9cf3-434763720c9e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14994" ], - "x-ms-correlation-request-id": [ "b0b097d5-2e4d-4a15-a58b-cc17b22bd819" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051327Z:b0b097d5-2e4d-4a15-a58b-cc17b22bd819" ], - "Date": [ "Mon, 03 Jul 2023 05:13:27 GMT" ] + "x-ms-correlation-request-id": [ "3c11c652-33ee-4733-bf2f-3ba63ac883be" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093114Z:3c11c652-33ee-4733-bf2f-3ba63ac883be" ], + "Date": [ "Wed, 25 Oct 2023 09:31:13 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -731,4 +737,4 @@ "isContentBase64": false } } -} +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Tests.ps1 index 6c5e2b84451c..503a3ecccaa5 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Tests.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Tests.ps1 @@ -34,11 +34,11 @@ Describe 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject' { New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $pol1 -PolicyName $newPolicyName # this Policy should be there - then delete it and then this policy shouldn't be there - $policy=Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName $newPolicyName + $policy=Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Name $newPolicyName $policy.Name | Should be $newPolicyName Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName - #$pol = Get-AzRecoveryServicesBackupPolicy -VaultName $vaultName -ResourceGroupName $rgName -PolicyName $newPolicyName + #$pol = Get-AzRecoveryServicesBackupProtectionPolicy -VaultName $vaultName -ResourceGroupName $rgName -Name $newPolicyName #$pol | Should -Be "NotFound" } @@ -67,7 +67,7 @@ Describe 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject' { New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $pol1 -PolicyName $newPolicyName # this Policy should be there - then delete it and then this policy shouldn't be there - $policy=Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName $newPolicyName + $policy=Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Name $newPolicyName # verify policy modifications $policy.Name | Should be $newPolicyName @@ -86,7 +86,7 @@ Describe 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject' { # remove policy Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName - #$pol = Get-AzRecoveryServicesBackupPolicy -VaultName $vaultName -ResourceGroupName $rgName -PolicyName $newPolicyName + #$pol = Get-AzRecoveryServicesBackupProtectionPolicy -VaultName $vaultName -ResourceGroupName $rgName -Name $newPolicyName #$pol | Should -Be "NotFound" } @@ -121,7 +121,7 @@ Describe 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject' { New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $pol1 -PolicyName $newPolicyName # this Policy should be there - then delete it and then this policy shouldn't be there - $policy=Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName $newPolicyName + $policy=Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Name $newPolicyName # verify policy modifications $policy.Name | Should be $newPolicyName @@ -137,7 +137,7 @@ Describe 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject' { # remove policy Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName - #$pol = Get-AzRecoveryServicesBackupPolicy -VaultName $vaultName -ResourceGroupName $rgName -PolicyName $newPolicyName + #$pol = Get-AzRecoveryServicesBackupProtectionPolicy -VaultName $vaultName -ResourceGroupName $rgName -Name $newPolicyName #$pol | Should -Be "NotFound" } @@ -173,7 +173,7 @@ Describe 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject' { New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $pol1 -PolicyName $newPolicyName # this Policy should be there - then delete it and then this policy shouldn't be there - $policy=Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName $newPolicyName + $policy=Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Name $newPolicyName # verify policy modifications $policy.Name | Should be $newPolicyName @@ -199,7 +199,7 @@ Describe 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject' { # remove policy Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName - #$pol = Get-AzRecoveryServicesBackupPolicy -VaultName $vaultName -ResourceGroupName $rgName -PolicyName $newPolicyName + #$pol = Get-AzRecoveryServicesBackupProtectionPolicy -VaultName $vaultName -ResourceGroupName $rgName -Name $newPolicyName #$pol | Should -Be "NotFound" } @@ -215,7 +215,7 @@ Describe 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject' { #create a new policy with enable tiering New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $pol1 -PolicyName $newPolicyName -MoveToArchiveTier $true -TierAfterDuration 54 -TieringMode TierAfter -TierAfterDurationType Days - $policy=Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName $newPolicyName + $policy=Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Name $newPolicyName # verify policy modifications $policy.Name | Should be $newPolicyName @@ -225,7 +225,7 @@ Describe 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject' { # remove policy Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName - #$pol = Get-AzRecoveryServicesBackupPolicy -VaultName $vaultName -ResourceGroupName $rgName -PolicyName $newPolicyName + #$pol = Get-AzRecoveryServicesBackupProtectionPolicy -VaultName $vaultName -ResourceGroupName $rgName -Name $newPolicyName #$pol | Should -Be "NotFound" } @@ -241,7 +241,7 @@ Describe 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject' { #create a new policy with enable tiering New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $pol1 -PolicyName $newPolicyName -MoveToArchiveTier $true -TieringMode TierRecommended - $policy=Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName $newPolicyName + $policy=Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Name $newPolicyName # verify policy modifications $policy.Name | Should be $newPolicyName @@ -251,7 +251,7 @@ Describe 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject' { # remove policy Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName - #$pol = Get-AzRecoveryServicesBackupPolicy -VaultName $vaultName -ResourceGroupName $rgName -PolicyName $newPolicyName + #$pol = Get-AzRecoveryServicesBackupProtectionPolicy -VaultName $vaultName -ResourceGroupName $rgName -Name $newPolicyName #$pol | Should -Be "NotFound" } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Recording.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Recording.json index af13bbf1d7e3..241de098e9ea 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Recording.json +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Recording.json @@ -3,7 +3,7 @@ "Request": { "Method": "PUT", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", - "Content": "{\r\n \"properties\": {\r\n \"protectedItemsCount\": 0,\r\n \"backupManagementType\": \"AzureIaasVM\",\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Daily\",\r\n \"scheduleRunTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 180,\r\n \"durationType\": \"Days\"\r\n }\r\n }\r\n },\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n },\r\n \"instantRpRetentionRangeInDays\": 2,\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"policyType\": \"V1\"\r\n }\r\n}", + "Content": "{\r\n \"properties\": {\r\n \"protectedItemsCount\": 0,\r\n \"backupManagementType\": \"AzureIaasVM\",\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Daily\",\r\n \"scheduleRunTimes\": [ \"2023-10-25T13:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2023-10-25T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 180,\r\n \"durationType\": \"Days\"\r\n }\r\n }\r\n },\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n },\r\n \"instantRpRetentionRangeInDays\": 2,\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"policyType\": \"V1\"\r\n }\r\n}", "isContentBase64": false, "Headers": { }, @@ -18,22 +18,22 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "5e1b353a-7ece-4856-bba8-f562210203f8" ], - "x-ms-client-request-id": [ "3e122081-afc3-4af5-8149-d2af70cf7f26", "3e122081-afc3-4af5-8149-d2af70cf7f26" ], + "x-ms-request-id": [ "6c625b7a-0f9f-4cc9-aced-56a78e71a65e" ], + "x-ms-client-request-id": [ "eea00eb3-e7eb-4974-ade5-edda7430d542" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ "Microsoft-IIS/10.0" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1193" ], - "x-ms-correlation-request-id": [ "5e1b353a-7ece-4856-bba8-f562210203f8" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051330Z:5e1b353a-7ece-4856-bba8-f562210203f8" ], - "Date": [ "Mon, 03 Jul 2023 05:13:30 GMT" ] + "x-ms-correlation-request-id": [ "6c625b7a-0f9f-4cc9-aced-56a78e71a65e" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093115Z:6c625b7a-0f9f-4cc9-aced-56a78e71a65e" ], + "Date": [ "Wed, 25 Oct 2023 09:31:14 GMT" ] }, "ContentHeaders": { "Content-Length": [ "898" ], - "Content-Type": [ "application/json" ], + "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-07-03T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-10-25T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}", "isContentBase64": false } }, @@ -45,11 +45,11 @@ "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "20" ], - "x-ms-client-request-id": [ "cbd83ffd-361b-486c-bb76-69655d2d1128" ], - "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], + "x-ms-client-request-id": [ "cbb7d4d5-85c1-48e6-a96d-7aafcd227634" ], + "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -61,22 +61,22 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "aa136e80-1c65-44b8-8383-a47867ae4629" ], - "x-ms-client-request-id": [ "cbd83ffd-361b-486c-bb76-69655d2d1128", "cbd83ffd-361b-486c-bb76-69655d2d1128" ], + "x-ms-request-id": [ "eb92c107-5199-434f-aa54-799d1e302632" ], + "x-ms-client-request-id": [ "cbb7d4d5-85c1-48e6-a96d-7aafcd227634" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ "Microsoft-IIS/10.0" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "293" ], - "x-ms-correlation-request-id": [ "aa136e80-1c65-44b8-8383-a47867ae4629" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051331Z:aa136e80-1c65-44b8-8383-a47867ae4629" ], - "Date": [ "Mon, 03 Jul 2023 05:13:31 GMT" ] + "x-ms-correlation-request-id": [ "eb92c107-5199-434f-aa54-799d1e302632" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093116Z:eb92c107-5199-434f-aa54-799d1e302632" ], + "Date": [ "Wed, 25 Oct 2023 09:31:15 GMT" ] }, "ContentHeaders": { "Content-Length": [ "898" ], - "Content-Type": [ "application/json" ], + "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-07-03T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-10-25T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}", "isContentBase64": false } }, @@ -88,11 +88,11 @@ "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "21" ], - "x-ms-client-request-id": [ "2d5065ec-2ebd-44fa-bd27-176c9a282079" ], + "x-ms-client-request-id": [ "41767e5c-ddbe-4ae6-ab97-d4d20d581bfc" ], "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -104,14 +104,15 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "0caf36bc-bff1-4700-a5eb-f07bd96cf51a" ], - "x-ms-client-request-id": [ "2d5065ec-2ebd-44fa-bd27-176c9a282079", "2d5065ec-2ebd-44fa-bd27-176c9a282079" ], + "x-ms-request-id": [ "14ccc5e6-69f5-4703-9b6c-5becafe793e0" ], + "x-ms-client-request-id": [ "41767e5c-ddbe-4ae6-ab97-d4d20d581bfc" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14993" ], - "x-ms-correlation-request-id": [ "0caf36bc-bff1-4700-a5eb-f07bd96cf51a" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051332Z:0caf36bc-bff1-4700-a5eb-f07bd96cf51a" ], - "Date": [ "Mon, 03 Jul 2023 05:13:32 GMT" ] + "x-ms-correlation-request-id": [ "14ccc5e6-69f5-4703-9b6c-5becafe793e0" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093117Z:14ccc5e6-69f5-4703-9b6c-5becafe793e0" ], + "Date": [ "Wed, 25 Oct 2023 09:31:16 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -125,7 +126,7 @@ "Request": { "Method": "PUT", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", - "Content": "{\r\n \"properties\": {\r\n \"protectedItemsCount\": 0,\r\n \"backupManagementType\": \"AzureIaasVM\",\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicyV2\",\r\n \"weeklySchedule\": {\r\n \"scheduleRunDays\": [ \"Monday\", \"Thursday\" ],\r\n \"scheduleRunTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ]\r\n },\r\n \"scheduleRunFrequency\": \"Weekly\"\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Thursday\" ],\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 12,\r\n \"durationType\": \"Weeks\"\r\n }\r\n }\r\n },\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n },\r\n \"instantRpRetentionRangeInDays\": 5,\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"policyType\": \"V2\"\r\n }\r\n}", + "Content": "{\r\n \"properties\": {\r\n \"protectedItemsCount\": 0,\r\n \"backupManagementType\": \"AzureIaasVM\",\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicyV2\",\r\n \"weeklySchedule\": {\r\n \"scheduleRunDays\": [ \"Monday\", \"Thursday\" ],\r\n \"scheduleRunTimes\": [ \"2023-10-25T13:30:00.0000000Z\" ]\r\n },\r\n \"scheduleRunFrequency\": \"Weekly\"\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Thursday\" ],\r\n \"retentionTimes\": [ \"2023-10-25T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 12,\r\n \"durationType\": \"Weeks\"\r\n }\r\n }\r\n },\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n },\r\n \"instantRpRetentionRangeInDays\": 5,\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"policyType\": \"V2\"\r\n }\r\n}", "isContentBase64": false, "Headers": { }, @@ -140,22 +141,22 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "85d5fafd-0062-4872-a751-069e96b20daa" ], - "x-ms-client-request-id": [ "4806ad0a-fe4e-4840-afa1-210b59c6b545", "4806ad0a-fe4e-4840-afa1-210b59c6b545" ], + "x-ms-request-id": [ "724db185-a54d-4cea-b5d9-885496d56862" ], + "x-ms-client-request-id": [ "df5ca459-05ef-476b-8e14-94e454a90616" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ "Microsoft-IIS/10.0" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1192" ], - "x-ms-correlation-request-id": [ "85d5fafd-0062-4872-a751-069e96b20daa" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051334Z:85d5fafd-0062-4872-a751-069e96b20daa" ], - "Date": [ "Mon, 03 Jul 2023 05:13:34 GMT" ] + "x-ms-correlation-request-id": [ "724db185-a54d-4cea-b5d9-885496d56862" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093118Z:724db185-a54d-4cea-b5d9-885496d56862" ], + "Date": [ "Wed, 25 Oct 2023 09:31:17 GMT" ] }, "ContentHeaders": { "Content-Length": [ "971" ], - "Content-Type": [ "application/json" ], + "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V2\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicyV2\",\"scheduleRunFrequency\":\"Weekly\",\"weeklySchedule\":{\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-07-03T13:30:00Z\"]}},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":12,\"durationType\":\"Weeks\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":5,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V2\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicyV2\",\"scheduleRunFrequency\":\"Weekly\",\"weeklySchedule\":{\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-10-25T13:30:00Z\"]}},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":12,\"durationType\":\"Weeks\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":5,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}", "isContentBase64": false } }, @@ -167,11 +168,11 @@ "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "23" ], - "x-ms-client-request-id": [ "d94f8201-de66-472a-88a0-baf990a4513f" ], - "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], + "x-ms-client-request-id": [ "c31b0f3e-baa6-4dc6-a5db-23f28d74ef47" ], + "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -183,22 +184,22 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "bac27b2a-67a3-4aea-959d-fa93d88aefd5" ], - "x-ms-client-request-id": [ "d94f8201-de66-472a-88a0-baf990a4513f", "d94f8201-de66-472a-88a0-baf990a4513f" ], + "x-ms-request-id": [ "9cd68915-1960-440c-a63e-4dd53b960497" ], + "x-ms-client-request-id": [ "c31b0f3e-baa6-4dc6-a5db-23f28d74ef47" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ "Microsoft-IIS/10.0" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "292" ], - "x-ms-correlation-request-id": [ "bac27b2a-67a3-4aea-959d-fa93d88aefd5" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051335Z:bac27b2a-67a3-4aea-959d-fa93d88aefd5" ], - "Date": [ "Mon, 03 Jul 2023 05:13:34 GMT" ] + "x-ms-correlation-request-id": [ "9cd68915-1960-440c-a63e-4dd53b960497" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093119Z:9cd68915-1960-440c-a63e-4dd53b960497" ], + "Date": [ "Wed, 25 Oct 2023 09:31:18 GMT" ] }, "ContentHeaders": { "Content-Length": [ "971" ], - "Content-Type": [ "application/json" ], + "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V2\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicyV2\",\"scheduleRunFrequency\":\"Weekly\",\"weeklySchedule\":{\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-07-03T13:30:00Z\"]}},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":12,\"durationType\":\"Weeks\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":5,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V2\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicyV2\",\"scheduleRunFrequency\":\"Weekly\",\"weeklySchedule\":{\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-10-25T13:30:00Z\"]}},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":12,\"durationType\":\"Weeks\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":5,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}", "isContentBase64": false } }, @@ -210,11 +211,11 @@ "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "24" ], - "x-ms-client-request-id": [ "a7273d87-e23e-42e9-bfe1-f07ecf4cd9e7" ], + "x-ms-client-request-id": [ "1d2197ef-4a31-43ae-a316-b62627c0f5f8" ], "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -226,14 +227,15 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "05c48148-5da1-4aae-a460-611aa7eabc0b" ], - "x-ms-client-request-id": [ "a7273d87-e23e-42e9-bfe1-f07ecf4cd9e7", "a7273d87-e23e-42e9-bfe1-f07ecf4cd9e7" ], + "x-ms-request-id": [ "45ad2bfb-cc30-4b54-a4a6-5b1b57504468" ], + "x-ms-client-request-id": [ "1d2197ef-4a31-43ae-a316-b62627c0f5f8" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14992" ], - "x-ms-correlation-request-id": [ "05c48148-5da1-4aae-a460-611aa7eabc0b" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051336Z:05c48148-5da1-4aae-a460-611aa7eabc0b" ], - "Date": [ "Mon, 03 Jul 2023 05:13:36 GMT" ] + "x-ms-correlation-request-id": [ "45ad2bfb-cc30-4b54-a4a6-5b1b57504468" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093120Z:45ad2bfb-cc30-4b54-a4a6-5b1b57504468" ], + "Date": [ "Wed, 25 Oct 2023 09:31:19 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -247,7 +249,7 @@ "Request": { "Method": "PUT", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", - "Content": "{\r\n \"properties\": {\r\n \"protectedItemsCount\": 0,\r\n \"backupManagementType\": \"AzureIaasVM\",\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicyV2\",\r\n \"scheduleRunFrequency\": \"Hourly\",\r\n \"hourlySchedule\": {\r\n \"interval\": 4,\r\n \"scheduleWindowStartTime\": \"2023-07-03T13:30:00.0000000Z\",\r\n \"scheduleWindowDuration\": 24\r\n }\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 180,\r\n \"durationType\": \"Days\"\r\n }\r\n }\r\n },\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n },\r\n \"instantRpRetentionRangeInDays\": 7,\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"policyType\": \"V2\"\r\n }\r\n}", + "Content": "{\r\n \"properties\": {\r\n \"protectedItemsCount\": 0,\r\n \"backupManagementType\": \"AzureIaasVM\",\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicyV2\",\r\n \"scheduleRunFrequency\": \"Hourly\",\r\n \"hourlySchedule\": {\r\n \"interval\": 4,\r\n \"scheduleWindowStartTime\": \"2023-10-25T13:30:00.0000000Z\",\r\n \"scheduleWindowDuration\": 24\r\n }\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2023-10-25T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 180,\r\n \"durationType\": \"Days\"\r\n }\r\n }\r\n },\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n },\r\n \"instantRpRetentionRangeInDays\": 7,\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"policyType\": \"V2\"\r\n }\r\n}", "isContentBase64": false, "Headers": { }, @@ -262,22 +264,22 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "bf73dfb1-61f0-4251-8186-39691bd77f7c" ], - "x-ms-client-request-id": [ "8b1dba79-1f83-420e-a01f-a1b7f32fa544", "8b1dba79-1f83-420e-a01f-a1b7f32fa544" ], + "x-ms-request-id": [ "d8b70ff0-564d-4154-a102-341f22e4b140" ], + "x-ms-client-request-id": [ "b4153012-7a2f-430c-aa35-33eafc814922" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ "Microsoft-IIS/10.0" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1191" ], - "x-ms-correlation-request-id": [ "bf73dfb1-61f0-4251-8186-39691bd77f7c" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051338Z:bf73dfb1-61f0-4251-8186-39691bd77f7c" ], - "Date": [ "Mon, 03 Jul 2023 05:13:37 GMT" ] + "x-ms-correlation-request-id": [ "d8b70ff0-564d-4154-a102-341f22e4b140" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093121Z:d8b70ff0-564d-4154-a102-341f22e4b140" ], + "Date": [ "Wed, 25 Oct 2023 09:31:20 GMT" ] }, "ContentHeaders": { "Content-Length": [ "938" ], - "Content-Type": [ "application/json" ], + "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V2\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicyV2\",\"scheduleRunFrequency\":\"Hourly\",\"hourlySchedule\":{\"interval\":4,\"scheduleWindowStartTime\":\"2023-07-03T13:30:00Z\",\"scheduleWindowDuration\":24}},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":7,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V2\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicyV2\",\"scheduleRunFrequency\":\"Hourly\",\"hourlySchedule\":{\"interval\":4,\"scheduleWindowStartTime\":\"2023-10-25T13:30:00Z\",\"scheduleWindowDuration\":24}},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":7,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}", "isContentBase64": false } }, @@ -289,11 +291,11 @@ "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "26" ], - "x-ms-client-request-id": [ "0d98030c-7c99-4b02-89e9-5d5a16fcd7e7" ], - "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], + "x-ms-client-request-id": [ "cb958011-28fd-4dc7-b013-260cf1570771" ], + "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -305,22 +307,22 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "f2bda6ae-eff2-416e-a019-aec86a0c97d4" ], - "x-ms-client-request-id": [ "0d98030c-7c99-4b02-89e9-5d5a16fcd7e7", "0d98030c-7c99-4b02-89e9-5d5a16fcd7e7" ], + "x-ms-request-id": [ "62f45562-abeb-44a2-ae8d-c9c8e7e89f00" ], + "x-ms-client-request-id": [ "cb958011-28fd-4dc7-b013-260cf1570771" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ "Microsoft-IIS/10.0" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "291" ], - "x-ms-correlation-request-id": [ "f2bda6ae-eff2-416e-a019-aec86a0c97d4" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051338Z:f2bda6ae-eff2-416e-a019-aec86a0c97d4" ], - "Date": [ "Mon, 03 Jul 2023 05:13:38 GMT" ] + "x-ms-correlation-request-id": [ "62f45562-abeb-44a2-ae8d-c9c8e7e89f00" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093122Z:62f45562-abeb-44a2-ae8d-c9c8e7e89f00" ], + "Date": [ "Wed, 25 Oct 2023 09:31:21 GMT" ] }, "ContentHeaders": { "Content-Length": [ "938" ], - "Content-Type": [ "application/json" ], + "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V2\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicyV2\",\"scheduleRunFrequency\":\"Hourly\",\"hourlySchedule\":{\"interval\":4,\"scheduleWindowStartTime\":\"2023-07-03T13:30:00Z\",\"scheduleWindowDuration\":24}},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":7,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V2\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicyV2\",\"scheduleRunFrequency\":\"Hourly\",\"hourlySchedule\":{\"interval\":4,\"scheduleWindowStartTime\":\"2023-10-25T13:30:00Z\",\"scheduleWindowDuration\":24}},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":7,\"timeZone\":\"Tokyo Standard Time\",\"protectedItemsCount\":0}}", "isContentBase64": false } }, @@ -332,11 +334,11 @@ "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "27" ], - "x-ms-client-request-id": [ "8c412f28-31c9-4f1c-9d9f-59f773b0a9b9" ], + "x-ms-client-request-id": [ "5b6c8cb8-0103-4893-8d1e-43c11390ceb7" ], "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -348,14 +350,15 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "0c16b536-9325-49a1-97e2-b9fca523c948" ], - "x-ms-client-request-id": [ "8c412f28-31c9-4f1c-9d9f-59f773b0a9b9", "8c412f28-31c9-4f1c-9d9f-59f773b0a9b9" ], + "x-ms-request-id": [ "6b98849a-f33b-4a3e-9ad8-fd85797c8161" ], + "x-ms-client-request-id": [ "5b6c8cb8-0103-4893-8d1e-43c11390ceb7" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14991" ], - "x-ms-correlation-request-id": [ "0c16b536-9325-49a1-97e2-b9fca523c948" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051340Z:0c16b536-9325-49a1-97e2-b9fca523c948" ], - "Date": [ "Mon, 03 Jul 2023 05:13:39 GMT" ] + "x-ms-correlation-request-id": [ "6b98849a-f33b-4a3e-9ad8-fd85797c8161" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093122Z:6b98849a-f33b-4a3e-9ad8-fd85797c8161" ], + "Date": [ "Wed, 25 Oct 2023 09:31:21 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -369,7 +372,7 @@ "Request": { "Method": "PUT", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", - "Content": "{\r\n \"properties\": {\r\n \"backupManagementType\": \"AzureWorkload\",\r\n \"workLoadType\": \"SAPHanaDatabase\",\r\n \"settings\": {\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"issqlcompression\": false,\r\n \"isCompression\": false\r\n },\r\n \"subProtectionPolicy\": [\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Daily\",\r\n \"scheduleRunTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 180,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 104,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 60,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"January\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 10,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"policyType\": \"Full\",\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n }\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"LogSchedulePolicy\",\r\n \"scheduleFrequencyInMins\": 120\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 15,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Log\"\r\n }\r\n ]\r\n }\r\n}", + "Content": "{\r\n \"properties\": {\r\n \"backupManagementType\": \"AzureWorkload\",\r\n \"workLoadType\": \"SAPHanaDatabase\",\r\n \"settings\": {\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"issqlcompression\": false,\r\n \"isCompression\": false\r\n },\r\n \"subProtectionPolicy\": [\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Daily\",\r\n \"scheduleRunTimes\": [ \"2023-10-25T13:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2023-10-25T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 180,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"retentionTimes\": [ \"2023-10-25T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 104,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-10-25T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 60,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"January\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-10-25T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 10,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"policyType\": \"Full\",\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n }\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"LogSchedulePolicy\",\r\n \"scheduleFrequencyInMins\": 120\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 15,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Log\"\r\n }\r\n ]\r\n }\r\n}", "isContentBase64": false, "Headers": { }, @@ -384,22 +387,22 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "98cdec5b-0043-4bec-9509-d6bfae0f8405" ], - "x-ms-client-request-id": [ "71df748b-11ef-45c3-9003-87955d54bc6f", "71df748b-11ef-45c3-9003-87955d54bc6f" ], + "x-ms-request-id": [ "886b4fcb-1550-4801-a4fa-0f95fb5dae6e" ], + "x-ms-client-request-id": [ "2f0adb39-38db-4c00-bc74-71c41ff823a4" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ "Microsoft-IIS/10.0" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1190" ], - "x-ms-correlation-request-id": [ "98cdec5b-0043-4bec-9509-d6bfae0f8405" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051341Z:98cdec5b-0043-4bec-9509-d6bfae0f8405" ], - "Date": [ "Mon, 03 Jul 2023 05:13:40 GMT" ] + "x-ms-correlation-request-id": [ "886b4fcb-1550-4801-a4fa-0f95fb5dae6e" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093124Z:886b4fcb-1550-4801-a4fa-0f95fb5dae6e" ], + "Date": [ "Wed, 25 Oct 2023 09:31:23 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1849" ], - "Content-Type": [ "application/json" ], + "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-07-03T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-10-25T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", "isContentBase64": false } }, @@ -411,11 +414,11 @@ "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "29" ], - "x-ms-client-request-id": [ "ea944b94-4b9e-4c4d-8d62-65dd276d88a1" ], - "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], + "x-ms-client-request-id": [ "51ec919c-0ba2-4427-bc7e-7bcd654bc5e9" ], + "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -427,22 +430,22 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "38a65a51-a25a-4702-bbd1-dff57eb23d7d" ], - "x-ms-client-request-id": [ "ea944b94-4b9e-4c4d-8d62-65dd276d88a1", "ea944b94-4b9e-4c4d-8d62-65dd276d88a1" ], + "x-ms-request-id": [ "a25d7def-b162-49c0-8605-3149ea901645" ], + "x-ms-client-request-id": [ "51ec919c-0ba2-4427-bc7e-7bcd654bc5e9" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ "Microsoft-IIS/10.0" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "290" ], - "x-ms-correlation-request-id": [ "38a65a51-a25a-4702-bbd1-dff57eb23d7d" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051342Z:38a65a51-a25a-4702-bbd1-dff57eb23d7d" ], - "Date": [ "Mon, 03 Jul 2023 05:13:41 GMT" ] + "x-ms-correlation-request-id": [ "a25d7def-b162-49c0-8605-3149ea901645" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093125Z:a25d7def-b162-49c0-8605-3149ea901645" ], + "Date": [ "Wed, 25 Oct 2023 09:31:25 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1849" ], - "Content-Type": [ "application/json" ], + "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-07-03T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-10-25T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", "isContentBase64": false } }, @@ -454,11 +457,11 @@ "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "30" ], - "x-ms-client-request-id": [ "fc17cc8b-211d-49e6-8dc2-0876189571c6" ], + "x-ms-client-request-id": [ "b794630e-34c4-46d0-a870-b897ce5df4a7" ], "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -470,14 +473,15 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "606058a4-9f91-4119-8029-5c9f0106a6a5" ], - "x-ms-client-request-id": [ "fc17cc8b-211d-49e6-8dc2-0876189571c6", "fc17cc8b-211d-49e6-8dc2-0876189571c6" ], + "x-ms-request-id": [ "e80d88fa-fc06-4b15-a586-871d12b8c379" ], + "x-ms-client-request-id": [ "b794630e-34c4-46d0-a870-b897ce5df4a7" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14990" ], - "x-ms-correlation-request-id": [ "606058a4-9f91-4119-8029-5c9f0106a6a5" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051343Z:606058a4-9f91-4119-8029-5c9f0106a6a5" ], - "Date": [ "Mon, 03 Jul 2023 05:13:43 GMT" ] + "x-ms-correlation-request-id": [ "e80d88fa-fc06-4b15-a586-871d12b8c379" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093126Z:e80d88fa-fc06-4b15-a586-871d12b8c379" ], + "Date": [ "Wed, 25 Oct 2023 09:31:26 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -491,7 +495,7 @@ "Request": { "Method": "PUT", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", - "Content": "{\r\n \"properties\": {\r\n \"backupManagementType\": \"AzureWorkload\",\r\n \"workLoadType\": \"SAPHanaDatabase\",\r\n \"settings\": {\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"issqlcompression\": false,\r\n \"isCompression\": false\r\n },\r\n \"subProtectionPolicy\": [\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Monday\", \"Thursday\" ],\r\n \"scheduleRunTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Thursday\" ],\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 104,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 60,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"January\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 10,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"policyType\": \"Full\",\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n }\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"LogSchedulePolicy\",\r\n \"scheduleFrequencyInMins\": 120\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 15,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Log\"\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Tuesday\", \"Friday\" ],\r\n \"scheduleRunTimes\": [ \"2023-07-03T02:00:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 30,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Differential\"\r\n }\r\n ]\r\n }\r\n}", + "Content": "{\r\n \"properties\": {\r\n \"backupManagementType\": \"AzureWorkload\",\r\n \"workLoadType\": \"SAPHanaDatabase\",\r\n \"settings\": {\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"issqlcompression\": false,\r\n \"isCompression\": false\r\n },\r\n \"subProtectionPolicy\": [\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Monday\", \"Thursday\" ],\r\n \"scheduleRunTimes\": [ \"2023-10-25T13:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Thursday\" ],\r\n \"retentionTimes\": [ \"2023-10-25T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 104,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-10-25T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 60,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"January\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-10-25T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 10,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"policyType\": \"Full\",\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n }\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"LogSchedulePolicy\",\r\n \"scheduleFrequencyInMins\": 120\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 15,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Log\"\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Tuesday\", \"Friday\" ],\r\n \"scheduleRunTimes\": [ \"2023-10-25T02:00:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 30,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Differential\"\r\n }\r\n ]\r\n }\r\n}", "isContentBase64": false, "Headers": { }, @@ -506,22 +510,22 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "da056d66-6703-4ac7-bfa6-cd2464deb4ab" ], - "x-ms-client-request-id": [ "ab6b89df-1c00-4aa9-b9f1-8d61638f4f28", "ab6b89df-1c00-4aa9-b9f1-8d61638f4f28" ], + "x-ms-request-id": [ "6e12054a-0cc1-4207-98d7-755c7334124e" ], + "x-ms-client-request-id": [ "27bc215c-ce2f-4900-b2fb-92995382d939" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ "Microsoft-IIS/10.0" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1189" ], - "x-ms-correlation-request-id": [ "da056d66-6703-4ac7-bfa6-cd2464deb4ab" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051345Z:da056d66-6703-4ac7-bfa6-cd2464deb4ab" ], - "Date": [ "Mon, 03 Jul 2023 05:13:44 GMT" ] + "x-ms-correlation-request-id": [ "6e12054a-0cc1-4207-98d7-755c7334124e" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093127Z:6e12054a-0cc1-4207-98d7-755c7334124e" ], + "Date": [ "Wed, 25 Oct 2023 09:31:27 GMT" ] }, "ContentHeaders": { "Content-Length": [ "2142" ], - "Content-Type": [ "application/json" ], + "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-07-03T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Differential\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Tuesday\",\"Friday\"],\"scheduleRunTimes\":[\"2023-07-03T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-10-25T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Differential\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Tuesday\",\"Friday\"],\"scheduleRunTimes\":[\"2023-10-25T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", "isContentBase64": false } }, @@ -533,11 +537,11 @@ "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "32" ], - "x-ms-client-request-id": [ "cc6f75e1-510a-4e9c-835e-d9c53318e08f" ], - "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], + "x-ms-client-request-id": [ "e9d9649a-dfde-4e84-b5be-f91de92c8383" ], + "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -549,22 +553,22 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "f33eca12-4332-4ce7-b853-d48299e0aa6d" ], - "x-ms-client-request-id": [ "cc6f75e1-510a-4e9c-835e-d9c53318e08f", "cc6f75e1-510a-4e9c-835e-d9c53318e08f" ], + "x-ms-request-id": [ "58c24b6a-1068-4323-bd48-9ad0b53d2e4f" ], + "x-ms-client-request-id": [ "e9d9649a-dfde-4e84-b5be-f91de92c8383" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ "Microsoft-IIS/10.0" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "289" ], - "x-ms-correlation-request-id": [ "f33eca12-4332-4ce7-b853-d48299e0aa6d" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051346Z:f33eca12-4332-4ce7-b853-d48299e0aa6d" ], - "Date": [ "Mon, 03 Jul 2023 05:13:45 GMT" ] + "x-ms-correlation-request-id": [ "58c24b6a-1068-4323-bd48-9ad0b53d2e4f" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093127Z:58c24b6a-1068-4323-bd48-9ad0b53d2e4f" ], + "Date": [ "Wed, 25 Oct 2023 09:31:27 GMT" ] }, "ContentHeaders": { "Content-Length": [ "2142" ], - "Content-Type": [ "application/json" ], + "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-07-03T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Differential\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Tuesday\",\"Friday\"],\"scheduleRunTimes\":[\"2023-07-03T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-10-25T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Differential\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Tuesday\",\"Friday\"],\"scheduleRunTimes\":[\"2023-10-25T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", "isContentBase64": false } }, @@ -576,11 +580,11 @@ "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "33" ], - "x-ms-client-request-id": [ "dc4cca86-9ef4-461d-b48b-b261f895c3a1" ], + "x-ms-client-request-id": [ "2496acc4-5a9b-4438-8950-1409217fc39d" ], "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -592,14 +596,15 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "d2aadfde-74a6-4f35-a43e-908735bc83b1" ], - "x-ms-client-request-id": [ "dc4cca86-9ef4-461d-b48b-b261f895c3a1", "dc4cca86-9ef4-461d-b48b-b261f895c3a1" ], + "x-ms-request-id": [ "32098bcc-4116-42fa-b77e-12fd1879fccc" ], + "x-ms-client-request-id": [ "2496acc4-5a9b-4438-8950-1409217fc39d" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14989" ], - "x-ms-correlation-request-id": [ "d2aadfde-74a6-4f35-a43e-908735bc83b1" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051347Z:d2aadfde-74a6-4f35-a43e-908735bc83b1" ], - "Date": [ "Mon, 03 Jul 2023 05:13:46 GMT" ] + "x-ms-correlation-request-id": [ "32098bcc-4116-42fa-b77e-12fd1879fccc" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093128Z:32098bcc-4116-42fa-b77e-12fd1879fccc" ], + "Date": [ "Wed, 25 Oct 2023 09:31:28 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -613,7 +618,7 @@ "Request": { "Method": "PUT", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", - "Content": "{\r\n \"properties\": {\r\n \"backupManagementType\": \"AzureWorkload\",\r\n \"workLoadType\": \"SAPHanaDatabase\",\r\n \"settings\": {\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"issqlcompression\": false,\r\n \"isCompression\": false\r\n },\r\n \"subProtectionPolicy\": [\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Monday\", \"Thursday\" ],\r\n \"scheduleRunTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Thursday\" ],\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 104,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 60,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"January\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-07-03T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 10,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"policyType\": \"Full\",\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n }\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"LogSchedulePolicy\",\r\n \"scheduleFrequencyInMins\": 120\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 15,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Log\"\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Tuesday\", \"Friday\" ],\r\n \"scheduleRunTimes\": [ \"2023-07-03T02:00:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 30,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Incremental\"\r\n }\r\n ]\r\n }\r\n}", + "Content": "{\r\n \"properties\": {\r\n \"backupManagementType\": \"AzureWorkload\",\r\n \"workLoadType\": \"SAPHanaDatabase\",\r\n \"settings\": {\r\n \"timeZone\": \"Tokyo Standard Time\",\r\n \"issqlcompression\": false,\r\n \"isCompression\": false\r\n },\r\n \"subProtectionPolicy\": [\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Monday\", \"Thursday\" ],\r\n \"scheduleRunTimes\": [ \"2023-10-25T13:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Monday\", \"Thursday\" ],\r\n \"retentionTimes\": [ \"2023-10-25T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 104,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-10-25T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 60,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"January\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Monday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-10-25T13:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 10,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"policyType\": \"Full\",\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n }\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"LogSchedulePolicy\",\r\n \"scheduleFrequencyInMins\": 120\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 15,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Log\"\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Weekly\",\r\n \"scheduleRunDays\": [ \"Tuesday\", \"Friday\" ],\r\n \"scheduleRunTimes\": [ \"2023-10-25T02:00:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 30,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Incremental\"\r\n }\r\n ]\r\n }\r\n}", "isContentBase64": false, "Headers": { }, @@ -628,22 +633,22 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "02b76db0-9c36-437c-9d81-39412a1a032c" ], - "x-ms-client-request-id": [ "58bb4599-48cb-4172-95eb-001b1e96bf60", "58bb4599-48cb-4172-95eb-001b1e96bf60" ], + "x-ms-request-id": [ "9d9ccb60-12cc-434f-b379-da42aed6224f" ], + "x-ms-client-request-id": [ "9efd45a5-c4eb-4875-ab49-7e443152fdc7" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ "Microsoft-IIS/10.0" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1188" ], - "x-ms-correlation-request-id": [ "02b76db0-9c36-437c-9d81-39412a1a032c" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051348Z:02b76db0-9c36-437c-9d81-39412a1a032c" ], - "Date": [ "Mon, 03 Jul 2023 05:13:48 GMT" ] + "x-ms-correlation-request-id": [ "9d9ccb60-12cc-434f-b379-da42aed6224f" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093129Z:9d9ccb60-12cc-434f-b379-da42aed6224f" ], + "Date": [ "Wed, 25 Oct 2023 09:31:29 GMT" ] }, "ContentHeaders": { "Content-Length": [ "2141" ], - "Content-Type": [ "application/json" ], + "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-07-03T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Incremental\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Tuesday\",\"Friday\"],\"scheduleRunTimes\":[\"2023-07-03T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-10-25T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Incremental\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Tuesday\",\"Friday\"],\"scheduleRunTimes\":[\"2023-10-25T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", "isContentBase64": false } }, @@ -655,11 +660,11 @@ "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "35" ], - "x-ms-client-request-id": [ "15ffcef3-67a4-46d9-97fc-6975d16710c0" ], - "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], + "x-ms-client-request-id": [ "9adc29b4-b58a-48a8-9a80-d7f8068d1fb0" ], + "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -671,22 +676,22 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "52c9b3c0-f5a8-436b-b8d7-893b339277eb" ], - "x-ms-client-request-id": [ "15ffcef3-67a4-46d9-97fc-6975d16710c0", "15ffcef3-67a4-46d9-97fc-6975d16710c0" ], + "x-ms-request-id": [ "adb5b10c-4dcd-49dd-9497-5292db6ea14a" ], + "x-ms-client-request-id": [ "9adc29b4-b58a-48a8-9a80-d7f8068d1fb0" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ "Microsoft-IIS/10.0" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "288" ], - "x-ms-correlation-request-id": [ "52c9b3c0-f5a8-436b-b8d7-893b339277eb" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051349Z:52c9b3c0-f5a8-436b-b8d7-893b339277eb" ], - "Date": [ "Mon, 03 Jul 2023 05:13:48 GMT" ] + "x-ms-correlation-request-id": [ "adb5b10c-4dcd-49dd-9497-5292db6ea14a" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093130Z:adb5b10c-4dcd-49dd-9497-5292db6ea14a" ], + "Date": [ "Wed, 25 Oct 2023 09:31:30 GMT" ] }, "ContentHeaders": { "Content-Length": [ "2141" ], - "Content-Type": [ "application/json" ], + "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-07-03T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Incremental\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Tuesday\",\"Friday\"],\"scheduleRunTimes\":[\"2023-07-03T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"Tokyo Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Thursday\"],\"scheduleRunTimes\":[\"2023-10-25T13:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Monday\",\"Thursday\"],\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-10-25T13:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Incremental\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Tuesday\",\"Friday\"],\"scheduleRunTimes\":[\"2023-10-25T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", "isContentBase64": false } }, @@ -698,11 +703,11 @@ "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "36" ], - "x-ms-client-request-id": [ "c5afc372-8234-4d1a-b9b5-98e7f1b1070c" ], + "x-ms-client-request-id": [ "5f1e5c47-4ace-4dbd-a8d6-e5260d3f091e" ], "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -714,14 +719,15 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "ee583189-5a6a-4043-a32e-98848e863124" ], - "x-ms-client-request-id": [ "c5afc372-8234-4d1a-b9b5-98e7f1b1070c", "c5afc372-8234-4d1a-b9b5-98e7f1b1070c" ], + "x-ms-request-id": [ "200d16d9-727b-4cb6-a74f-d1cac7e9cd1c" ], + "x-ms-client-request-id": [ "5f1e5c47-4ace-4dbd-a8d6-e5260d3f091e" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14988" ], - "x-ms-correlation-request-id": [ "ee583189-5a6a-4043-a32e-98848e863124" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051351Z:ee583189-5a6a-4043-a32e-98848e863124" ], - "Date": [ "Mon, 03 Jul 2023 05:13:50 GMT" ] + "x-ms-correlation-request-id": [ "200d16d9-727b-4cb6-a74f-d1cac7e9cd1c" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093131Z:200d16d9-727b-4cb6-a74f-d1cac7e9cd1c" ], + "Date": [ "Wed, 25 Oct 2023 09:31:31 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -735,7 +741,7 @@ "Request": { "Method": "PUT", "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy?api-version=2023-02-01", - "Content": "{\r\n \"properties\": {\r\n \"backupManagementType\": \"AzureWorkload\",\r\n \"workLoadType\": \"SAPHanaDatabase\",\r\n \"settings\": {\r\n \"timeZone\": \"UTC\",\r\n \"issqlcompression\": false,\r\n \"isCompression\": false\r\n },\r\n \"subProtectionPolicy\": [\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Daily\",\r\n \"scheduleRunTimes\": [ \"2023-07-03T19:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2023-07-03T19:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 180,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"retentionTimes\": [ \"2023-07-03T19:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 104,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-07-03T19:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 60,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"January\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-07-03T19:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 10,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"policyType\": \"Full\",\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n }\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"LogSchedulePolicy\",\r\n \"scheduleFrequencyInMins\": 120\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 15,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Log\"\r\n }\r\n ]\r\n }\r\n}", + "Content": "{\r\n \"properties\": {\r\n \"backupManagementType\": \"AzureWorkload\",\r\n \"workLoadType\": \"SAPHanaDatabase\",\r\n \"settings\": {\r\n \"timeZone\": \"UTC\",\r\n \"issqlcompression\": false,\r\n \"isCompression\": false\r\n },\r\n \"subProtectionPolicy\": [\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"SimpleSchedulePolicy\",\r\n \"scheduleRunFrequency\": \"Daily\",\r\n \"scheduleRunTimes\": [ \"2023-10-25T19:30:00.0000000Z\" ],\r\n \"scheduleWeeklyFrequency\": 0\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"LongTermRetentionPolicy\",\r\n \"dailySchedule\": {\r\n \"retentionTimes\": [ \"2023-10-25T19:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 180,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"weeklySchedule\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"retentionTimes\": [ \"2023-10-25T19:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 104,\r\n \"durationType\": \"Weeks\"\r\n }\r\n },\r\n \"monthlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-10-25T19:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 60,\r\n \"durationType\": \"Months\"\r\n }\r\n },\r\n \"yearlySchedule\": {\r\n \"retentionScheduleFormatType\": \"Weekly\",\r\n \"monthsOfYear\": [ \"January\" ],\r\n \"retentionScheduleWeekly\": {\r\n \"daysOfTheWeek\": [ \"Sunday\" ],\r\n \"weeksOfTheMonth\": [ \"First\" ]\r\n },\r\n \"retentionTimes\": [ \"2023-10-25T19:30:00.0000000Z\" ],\r\n \"retentionDuration\": {\r\n \"count\": 10,\r\n \"durationType\": \"Years\"\r\n }\r\n }\r\n },\r\n \"policyType\": \"Full\",\r\n \"tieringPolicy\": {\r\n \"ArchivedRP\": {\r\n \"tieringMode\": \"DoNotTier\",\r\n \"duration\": 0,\r\n \"durationType\": \"Invalid\"\r\n }\r\n }\r\n },\r\n {\r\n \"schedulePolicy\": {\r\n \"schedulePolicyType\": \"LogSchedulePolicy\",\r\n \"scheduleFrequencyInMins\": 120\r\n },\r\n \"retentionPolicy\": {\r\n \"retentionPolicyType\": \"SimpleRetentionPolicy\",\r\n \"retentionDuration\": {\r\n \"count\": 15,\r\n \"durationType\": \"Days\"\r\n }\r\n },\r\n \"policyType\": \"Log\"\r\n }\r\n ]\r\n }\r\n}", "isContentBase64": false, "Headers": { }, @@ -750,22 +756,22 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "8b0fd482-183d-41d4-98fe-14422bdc63b1" ], - "x-ms-client-request-id": [ "f3892fca-3f7d-4e8c-9d02-aa204470e897", "f3892fca-3f7d-4e8c-9d02-aa204470e897" ], + "x-ms-request-id": [ "0c8eb380-3ac9-474a-83ec-245803b61b15" ], + "x-ms-client-request-id": [ "7638ee99-2750-4ec0-8c3b-2172e30f83f4" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ "Microsoft-IIS/10.0" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1187" ], - "x-ms-correlation-request-id": [ "8b0fd482-183d-41d4-98fe-14422bdc63b1" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051352Z:8b0fd482-183d-41d4-98fe-14422bdc63b1" ], - "Date": [ "Mon, 03 Jul 2023 05:13:51 GMT" ] + "x-ms-correlation-request-id": [ "0c8eb380-3ac9-474a-83ec-245803b61b15" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093132Z:0c8eb380-3ac9-474a-83ec-245803b61b15" ], + "Date": [ "Wed, 25 Oct 2023 09:31:32 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1833" ], - "Content-Type": [ "application/json" ], + "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-07-03T19:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-07-03T19:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-07-03T19:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T19:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T19:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-10-25T19:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-10-25T19:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-10-25T19:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-10-25T19:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-10-25T19:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", "isContentBase64": false } }, @@ -777,11 +783,11 @@ "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "38" ], - "x-ms-client-request-id": [ "debfe5e8-de75-4f7f-b980-96f2442056a5" ], - "CommandName": [ "Get-AzRecoveryServicesBackupPolicy" ], + "x-ms-client-request-id": [ "d54610e9-7dc1-450f-9a4c-c2d7e90a95d0" ], + "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -793,22 +799,22 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "08da4969-537e-4d36-a7c7-dcf2b232b9b0" ], - "x-ms-client-request-id": [ "debfe5e8-de75-4f7f-b980-96f2442056a5", "debfe5e8-de75-4f7f-b980-96f2442056a5" ], + "x-ms-request-id": [ "22786e0a-0972-40a6-8898-b9ee3ef26f93" ], + "x-ms-client-request-id": [ "d54610e9-7dc1-450f-9a4c-c2d7e90a95d0" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "Server": [ "Microsoft-IIS/10.0" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-resource-requests": [ "287" ], - "x-ms-correlation-request-id": [ "08da4969-537e-4d36-a7c7-dcf2b232b9b0" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051353Z:08da4969-537e-4d36-a7c7-dcf2b232b9b0" ], - "Date": [ "Mon, 03 Jul 2023 05:13:52 GMT" ] + "x-ms-correlation-request-id": [ "22786e0a-0972-40a6-8898-b9ee3ef26f93" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093133Z:22786e0a-0972-40a6-8898-b9ee3ef26f93" ], + "Date": [ "Wed, 25 Oct 2023 09:31:33 GMT" ] }, "ContentHeaders": { "Content-Length": [ "1833" ], - "Content-Type": [ "application/json" ], + "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-07-03T19:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-07-03T19:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-07-03T19:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T19:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-07-03T19:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/anssingh-rg/providers/Microsoft.RecoveryServices/vaults/anssingh-vault/backupPolicies/anssingh-testPolicy\",\"name\":\"anssingh-testPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-10-25T19:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-10-25T19:30:00Z\"],\"retentionDuration\":{\"count\":180,\"durationType\":\"Days\"}},\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-10-25T19:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-10-25T19:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-10-25T19:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}", "isContentBase64": false } }, @@ -820,11 +826,11 @@ "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "39" ], - "x-ms-client-request-id": [ "649dfda1-a4b1-4bc9-b945-3829bccf6caf" ], + "x-ms-client-request-id": [ "817b381d-a041-4bd8-915a-0f37567e0be4" ], "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.4", "Az.RecoveryServices/0.1.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -836,14 +842,15 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "39ace9e6-9b33-43fd-90b7-e835f52a691e" ], - "x-ms-client-request-id": [ "649dfda1-a4b1-4bc9-b945-3829bccf6caf", "649dfda1-a4b1-4bc9-b945-3829bccf6caf" ], + "x-ms-request-id": [ "a3969e8e-edf7-4f1b-a096-4a8f91e17e6a" ], + "x-ms-client-request-id": [ "817b381d-a041-4bd8-915a-0f37567e0be4" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], "x-ms-ratelimit-remaining-subscription-deletes": [ "14987" ], - "x-ms-correlation-request-id": [ "39ace9e6-9b33-43fd-90b7-e835f52a691e" ], - "x-ms-routing-request-id": [ "JIOINDIAWEST:20230703T051354Z:39ace9e6-9b33-43fd-90b7-e835f52a691e" ], - "Date": [ "Mon, 03 Jul 2023 05:13:53 GMT" ] + "x-ms-correlation-request-id": [ "a3969e8e-edf7-4f1b-a096-4a8f91e17e6a" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093134Z:a3969e8e-edf7-4f1b-a096-4a8f91e17e6a" ], + "Date": [ "Wed, 25 Oct 2023 09:31:33 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Tests.ps1 index ca8128781379..f2be63116ca6 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Tests.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Tests.ps1 @@ -44,7 +44,7 @@ Describe 'Edit-AzRecoveryServicesBackupSchedulePolicyClientObject' { New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $testPolicy -PolicyName $newPolicyName # this Policy should be there - then delete it and then this policy shouldn't be there - $policy = Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName $newPolicyName + $policy = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Name $newPolicyName $policy.Name | Should be $newPolicyName Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName @@ -79,7 +79,7 @@ Describe 'Edit-AzRecoveryServicesBackupSchedulePolicyClientObject' { New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $testPolicy -PolicyName $newPolicyName # this Policy should be there - then delete it and then this policy shouldn't be there - $policy = Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName $newPolicyName + $policy = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Name $newPolicyName $policy.Name | Should be $newPolicyName Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName @@ -117,7 +117,7 @@ Describe 'Edit-AzRecoveryServicesBackupSchedulePolicyClientObject' { New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $testPolicy -PolicyName $newPolicyName # this Policy should be there - then delete it and then this policy shouldn't be there - $policy = Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName $newPolicyName + $policy = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Name $newPolicyName $policy.Name | Should be $newPolicyName Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName @@ -147,7 +147,7 @@ Describe 'Edit-AzRecoveryServicesBackupSchedulePolicyClientObject' { New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $testPolicy -PolicyName $newPolicyName # this Policy should be there - then delete it and then this policy shouldn't be there - $policy = Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName $newPolicyName + $policy = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Name $newPolicyName $policy.Name | Should be $newPolicyName Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName @@ -201,7 +201,7 @@ Describe 'Edit-AzRecoveryServicesBackupSchedulePolicyClientObject' { New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $testPolicy -PolicyName $newPolicyName # this Policy should be there - then delete it and then this policy shouldn't be there - $policy = Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName $newPolicyName + $policy = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Name $newPolicyName $policy.Name | Should be $newPolicyName Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName @@ -255,7 +255,7 @@ Describe 'Edit-AzRecoveryServicesBackupSchedulePolicyClientObject' { New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $testPolicy -PolicyName $newPolicyName # this Policy should be there - then delete it and then this policy shouldn't be there - $policy = Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName $newPolicyName + $policy = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Name $newPolicyName $policy.Name | Should be $newPolicyName Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName @@ -284,7 +284,7 @@ Describe 'Edit-AzRecoveryServicesBackupSchedulePolicyClientObject' { New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $testPolicy -PolicyName $newPolicyName # this Policy should be there - then delete it and then this policy shouldn't be there - $policy = Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName $newPolicyName + $policy = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Name $newPolicyName $policy.Name | Should be $newPolicyName Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Enable-AzRecoveryServicesBackupProtection.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Enable-AzRecoveryServicesBackupProtection.Tests.ps1 deleted file mode 100644 index bef0759d6993..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Enable-AzRecoveryServicesBackupProtection.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Enable-AzRecoveryServicesBackupProtection')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Enable-AzRecoveryServicesBackupProtection.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Enable-AzRecoveryServicesBackupProtection' { - It 'ModifyRetentionPolicy' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Enable-AzRecoveryServicesProtection.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Enable-AzRecoveryServicesProtection.Tests.ps1 index 09f9133a2ebd..146b37981948 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Enable-AzRecoveryServicesProtection.Tests.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Enable-AzRecoveryServicesProtection.Tests.ps1 @@ -15,7 +15,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Enable-AzRecoveryServicesProt } Describe 'Enable-AzRecoveryServicesProtection' { - It 'EnableProtection' { + It 'EnableProtection' -skip { $sub = $env.TestBackup.SubscriptionId $rgName = $env.TestBackup.ResourceGroupName $vaultName = $env.TestBackup.VaultName @@ -28,7 +28,7 @@ Describe 'Enable-AzRecoveryServicesProtection' { Write-Debug -Message $vmName $DebugPreference = "SilentlyContinue" - $pol=Get-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -PolicyName EnhancedBackupTesting + $pol=Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Name EnhancedBackupTesting $item=Get-AzRecoveryServicesBackupProtectedItem -ResourceGroupName $rgName -VaultName $vaultName -SubscriptionId $sub -Filter "backupManagementType eq 'AzureIaasVM' and WorkloadType -eq 'AzureVM'" | Where-Object { $_.Property.FriendlyName -match $vmName} if($item -ne $null) #modify protection { diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Export-AzRecoveryServicesJob.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Export-AzRecoveryServicesJob.Tests.ps1 deleted file mode 100644 index 3e647970bc35..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Export-AzRecoveryServicesJob.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Export-AzRecoveryServicesJob')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Export-AzRecoveryServicesJob.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Export-AzRecoveryServicesJob' { - It 'Export' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'ExportViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupContainer.Recording.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupContainer.Recording.json new file mode 100644 index 000000000000..10f4a1db9f15 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupContainer.Recording.json @@ -0,0 +1,45 @@ +{ + "Get-AzRecoveryServicesBackupContainer+[NoContext]+__AllParameterSets+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupProtectionContainers?api-version=2023-02-01\u0026$filter=backupManagementType eq %27AzureWorkload%27+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupProtectionContainers?api-version=2023-02-01\u0026$filter=backupManagementType%20eq%20%27AzureWorkload%27", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "40" ], + "x-ms-client-request-id": [ "3af5f9aa-7212-4cc0-b504-ae6e866c5614" ], + "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupProtectionContainer" ], + "FullCommandName": [ "Get-AzRecoveryServicesBackupProtectionContainer_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "75380de8-0d15-4ad6-88c5-86191860d63d" ], + "x-ms-client-request-id": [ "3af5f9aa-7212-4cc0-b504-ae6e866c5614" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Kestrel" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "299" ], + "x-ms-correlation-request-id": [ "75380de8-0d15-4ad6-88c5-86191860d63d" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093135Z:75380de8-0d15-4ad6-88c5-86191860d63d" ], + "Date": [ "Wed, 25 Oct 2023 09:31:35 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "5084" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-migration-vm1\",\"name\":\"VMAppContainer;Compute;hiagarg;sql-migration-vm1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-migration-vm1\",\"lastUpdatedTime\":\"2023-10-05T13:25:23.9952403Z\",\"extendedInfo\":{\"hostServerName\":\"sql-migration-v\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"inquiryDetails\":[{\"type\":\"SQL\",\"itemCount\":3,\"inquiryValidation\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"additionalDetail\":\"\"}}]}},\"friendlyName\":\"sql-migration-vm1\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-migration-vm2\",\"name\":\"VMAppContainer;Compute;hiagarg;sql-migration-vm2\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-migration-vm2\",\"lastUpdatedTime\":\"2023-10-12T10:19:56.1811718Z\",\"extendedInfo\":{\"hostServerName\":\"sql-migration-v\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"inquiryDetails\":[{\"type\":\"SQL\",\"itemCount\":3,\"inquiryValidation\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"additionalDetail\":\"\"}}]}},\"friendlyName\":\"sql-migration-vm2\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-pstest-vm1\",\"name\":\"VMAppContainer;Compute;hiagarg;sql-pstest-vm1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-pstest-vm1\",\"lastUpdatedTime\":\"2022-06-07T09:36:38.2664137Z\",\"extendedInfo\":{\"hostServerName\":\"sql-pstest-vm1\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"inquiryDetails\":[{\"type\":\"SQL\",\"itemCount\":6,\"inquiryValidation\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"additionalDetail\":\"\"}}]}},\"friendlyName\":\"sql-pstest-vm1\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;saphana-pstest;saphana-ccy-pstest-vm\",\"name\":\"VMAppContainer;Compute;saphana-pstest;saphana-ccy-pstest-vm\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/saphana-pstest/providers/Microsoft.Compute/virtualMachines/saphana-ccy-pstest-vm\",\"lastUpdatedTime\":\"2023-05-29T04:29:27.5165824Z\",\"extendedInfo\":{\"hostServerName\":\"saphana-ccy-pstest-vm\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"UserErrorHANASystemDBNotRunning\",\"message\":\"SYSTEMDB for the SAP HANA instance is not in running state.\",\"recommendations\":[\"Please start the SAP HANA system by running the command \u0027HDB start\u0027 as the sidadm user and retry the operation.\"]},\"inquiryDetails\":[{\"type\":\"SAPHana\",\"itemCount\":0,\"inquiryValidation\":{\"status\":\"Failed\",\"errorDetail\":{\"code\":\"UserErrorHANASystemDBNotRunning\",\"message\":\"SYSTEMDB for the SAP HANA instance is not in running state.\",\"recommendations\":[\"Please start the SAP HANA system by running the command \u0027HDB start\u0027 as the sidadm user and retry the operation.\"]},\"additionalDetail\":\"[HANAPlugin]: SystemDB is not in running state.\",\"protectableItemCount\":{\"SAPHanaSystem\":1,\"SAPHanaDatabase\":0,\"SAPHanaDBInstance\":6}}}]}},\"friendlyName\":\"saphana-ccy-pstest-vm\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupContainer.Tests.ps1 index 92eba6af1131..1cab2bcfffcd 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupContainer.Tests.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupContainer.Tests.ps1 @@ -15,7 +15,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupC } Describe 'Get-AzRecoveryServicesBackupContainer' { - It '__AllParameterSets' -skip { + It '__AllParameterSets' { $subscriptionId = $env.TestCommon.SubscriptionId $resourceGroupName = $env.TestCommon.ResourceGroupName $vaultName = $env.TestCommon.VaultName diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupEngine.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupEngine.Tests.ps1 deleted file mode 100644 index 56fb9973c5b5..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupEngine.Tests.ps1 +++ /dev/null @@ -1,29 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupEngine')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupEngine.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBackupEngine' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupItem.Recording.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupItem.Recording.json new file mode 100644 index 000000000000..e38d2c061204 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupItem.Recording.json @@ -0,0 +1,88 @@ +{ + "Get-AzRecoveryServicesBackupItem+[NoContext]+GetItemsForContainer+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupProtectionContainers?api-version=2023-02-01\u0026$filter=backupManagementType eq %27AzureWorkload%27+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupProtectionContainers?api-version=2023-02-01\u0026$filter=backupManagementType%20eq%20%27AzureWorkload%27", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "42" ], + "x-ms-client-request-id": [ "bdb893c3-2d88-4c43-b2a0-ca87546da4c2" ], + "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupProtectionContainer" ], + "FullCommandName": [ "Get-AzRecoveryServicesBackupProtectionContainer_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "d31493c0-c9b4-415c-b5a7-65920ea5ea6a" ], + "x-ms-client-request-id": [ "bdb893c3-2d88-4c43-b2a0-ca87546da4c2" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Kestrel" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "298" ], + "x-ms-correlation-request-id": [ "d31493c0-c9b4-415c-b5a7-65920ea5ea6a" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093137Z:d31493c0-c9b4-415c-b5a7-65920ea5ea6a" ], + "Date": [ "Wed, 25 Oct 2023 09:31:37 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "5084" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-migration-vm1\",\"name\":\"VMAppContainer;Compute;hiagarg;sql-migration-vm1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-migration-vm1\",\"lastUpdatedTime\":\"2023-10-05T13:25:23.9952403Z\",\"extendedInfo\":{\"hostServerName\":\"sql-migration-v\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"inquiryDetails\":[{\"type\":\"SQL\",\"itemCount\":3,\"inquiryValidation\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"additionalDetail\":\"\"}}]}},\"friendlyName\":\"sql-migration-vm1\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-migration-vm2\",\"name\":\"VMAppContainer;Compute;hiagarg;sql-migration-vm2\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-migration-vm2\",\"lastUpdatedTime\":\"2023-10-12T10:19:56.1811718Z\",\"extendedInfo\":{\"hostServerName\":\"sql-migration-v\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"inquiryDetails\":[{\"type\":\"SQL\",\"itemCount\":3,\"inquiryValidation\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"additionalDetail\":\"\"}}]}},\"friendlyName\":\"sql-migration-vm2\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-pstest-vm1\",\"name\":\"VMAppContainer;Compute;hiagarg;sql-pstest-vm1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-pstest-vm1\",\"lastUpdatedTime\":\"2022-06-07T09:36:38.2664137Z\",\"extendedInfo\":{\"hostServerName\":\"sql-pstest-vm1\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"inquiryDetails\":[{\"type\":\"SQL\",\"itemCount\":6,\"inquiryValidation\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"additionalDetail\":\"\"}}]}},\"friendlyName\":\"sql-pstest-vm1\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;saphana-pstest;saphana-ccy-pstest-vm\",\"name\":\"VMAppContainer;Compute;saphana-pstest;saphana-ccy-pstest-vm\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/saphana-pstest/providers/Microsoft.Compute/virtualMachines/saphana-ccy-pstest-vm\",\"lastUpdatedTime\":\"2023-05-29T04:29:27.5165824Z\",\"extendedInfo\":{\"hostServerName\":\"saphana-ccy-pstest-vm\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"UserErrorHANASystemDBNotRunning\",\"message\":\"SYSTEMDB for the SAP HANA instance is not in running state.\",\"recommendations\":[\"Please start the SAP HANA system by running the command \u0027HDB start\u0027 as the sidadm user and retry the operation.\"]},\"inquiryDetails\":[{\"type\":\"SAPHana\",\"itemCount\":0,\"inquiryValidation\":{\"status\":\"Failed\",\"errorDetail\":{\"code\":\"UserErrorHANASystemDBNotRunning\",\"message\":\"SYSTEMDB for the SAP HANA instance is not in running state.\",\"recommendations\":[\"Please start the SAP HANA system by running the command \u0027HDB start\u0027 as the sidadm user and retry the operation.\"]},\"additionalDetail\":\"[HANAPlugin]: SystemDB is not in running state.\",\"protectableItemCount\":{\"SAPHanaSystem\":1,\"SAPHanaDatabase\":0,\"SAPHanaDBInstance\":6}}}]}},\"friendlyName\":\"saphana-ccy-pstest-vm\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}}]}", + "isContentBase64": false + } + }, + "Get-AzRecoveryServicesBackupItem+[NoContext]+GetItemsForpolicy+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies?api-version=2023-02-01\u0026$filter=backupManagementType eq %27AzureWorkload%27+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies?api-version=2023-02-01\u0026$filter=backupManagementType%20eq%20%27AzureWorkload%27", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "44" ], + "x-ms-client-request-id": [ "ac71f5da-d551-42b9-86b2-f182b7efd922" ], + "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "c0f11f95-3466-4c78-a963-128c82cd21a0" ], + "x-ms-client-request-id": [ "ac71f5da-d551-42b9-86b2-f182b7efd922" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Kestrel" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "286" ], + "x-ms-correlation-request-id": [ "c0f11f95-3466-4c78-a963-128c82cd21a0" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093139Z:c0f11f95-3466-4c78-a963-128c82cd21a0" ], + "Date": [ "Wed, 25 Oct 2023 09:31:38 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "7810" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/HourlyLogBackup\",\"name\":\"HourlyLogBackup\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SQLDataBase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2021-07-20T23:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2021-07-20T23:00:00Z\"],\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":60},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/SAPFullPortal\",\"name\":\"SAPFullPortal\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Sunday\"],\"scheduleRunTimes\":[\"2022-07-09T16:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2022-07-09T16:00:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/NewSQLPolicy\",\"name\":\"NewSQLPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SQLDataBase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Sunday\"],\"scheduleRunTimes\":[\"2019-03-20T01:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2019-03-20T01:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2019-03-20T01:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2019-03-20T01:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Differential\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\"],\"scheduleRunTimes\":[\"2022-06-22T08:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":70,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":15},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/SAPPolicy\",\"name\":\"SAPPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"India Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Sunday\"],\"scheduleRunTimes\":[\"2023-05-29T19:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-05-29T19:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-29T19:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-29T19:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"TierAfter\",\"duration\":45,\"durationType\":\"Days\"}}},{\"policyType\":\"Incremental\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Tuesday\"],\"scheduleRunTimes\":[\"2023-05-29T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/hiagaSQLPolicy\",\"name\":\"hiagaSQLPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SQLDataBase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-10-19T23:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-10-19T23:00:00Z\"],\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-10-19T23:00:00Z\"],\"retentionDuration\":{\"count\":5,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"TierAfter\",\"duration\":60,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":60},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupJob.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupJob.Tests.ps1 deleted file mode 100644 index cc4f1303b7e9..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupJob.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupJob')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupJob.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBackupJob' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationResult.Tests.ps1 deleted file mode 100644 index a01f16df7ec6..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationResult.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupOperationResult')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupOperationResult.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBackupOperationResult' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationStatuses.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationStatuses.Tests.ps1 deleted file mode 100644 index f4419a086dd8..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupOperationStatuses.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupOperationStatuses')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupOperationStatuses.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBackupOperationStatuses' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupPolicy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupPolicy.Tests.ps1 deleted file mode 100644 index b17e9269c29f..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupPolicy.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupPolicy')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupPolicy.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBackupPolicy' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectableItem.Recording.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectableItem.Recording.json new file mode 100644 index 000000000000..24ae8d5bb370 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectableItem.Recording.json @@ -0,0 +1,45 @@ +{ + "Get-AzRecoveryServicesBackupProtectableItem+[NoContext]+List+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupProtectionContainers?api-version=2023-02-01\u0026$filter=backupManagementType eq %27AzureWorkload%27+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupProtectionContainers?api-version=2023-02-01\u0026$filter=backupManagementType%20eq%20%27AzureWorkload%27", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "50" ], + "x-ms-client-request-id": [ "b685fd31-90c3-4624-982a-af38f8eb6af6" ], + "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupProtectionContainer" ], + "FullCommandName": [ "Get-AzRecoveryServicesBackupProtectionContainer_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "ce29d8ad-3c01-4628-b538-d67b9db4b2b4" ], + "x-ms-client-request-id": [ "b685fd31-90c3-4624-982a-af38f8eb6af6" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Kestrel" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "297" ], + "x-ms-correlation-request-id": [ "ce29d8ad-3c01-4628-b538-d67b9db4b2b4" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093144Z:ce29d8ad-3c01-4628-b538-d67b9db4b2b4" ], + "Date": [ "Wed, 25 Oct 2023 09:31:44 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "5084" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-migration-vm1\",\"name\":\"VMAppContainer;Compute;hiagarg;sql-migration-vm1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-migration-vm1\",\"lastUpdatedTime\":\"2023-10-05T13:25:23.9952403Z\",\"extendedInfo\":{\"hostServerName\":\"sql-migration-v\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"inquiryDetails\":[{\"type\":\"SQL\",\"itemCount\":3,\"inquiryValidation\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"additionalDetail\":\"\"}}]}},\"friendlyName\":\"sql-migration-vm1\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-migration-vm2\",\"name\":\"VMAppContainer;Compute;hiagarg;sql-migration-vm2\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-migration-vm2\",\"lastUpdatedTime\":\"2023-10-12T10:19:56.1811718Z\",\"extendedInfo\":{\"hostServerName\":\"sql-migration-v\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"inquiryDetails\":[{\"type\":\"SQL\",\"itemCount\":3,\"inquiryValidation\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"additionalDetail\":\"\"}}]}},\"friendlyName\":\"sql-migration-vm2\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-pstest-vm1\",\"name\":\"VMAppContainer;Compute;hiagarg;sql-pstest-vm1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-pstest-vm1\",\"lastUpdatedTime\":\"2022-06-07T09:36:38.2664137Z\",\"extendedInfo\":{\"hostServerName\":\"sql-pstest-vm1\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"inquiryDetails\":[{\"type\":\"SQL\",\"itemCount\":6,\"inquiryValidation\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"additionalDetail\":\"\"}}]}},\"friendlyName\":\"sql-pstest-vm1\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;saphana-pstest;saphana-ccy-pstest-vm\",\"name\":\"VMAppContainer;Compute;saphana-pstest;saphana-ccy-pstest-vm\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/saphana-pstest/providers/Microsoft.Compute/virtualMachines/saphana-ccy-pstest-vm\",\"lastUpdatedTime\":\"2023-05-29T04:29:27.5165824Z\",\"extendedInfo\":{\"hostServerName\":\"saphana-ccy-pstest-vm\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"UserErrorHANASystemDBNotRunning\",\"message\":\"SYSTEMDB for the SAP HANA instance is not in running state.\",\"recommendations\":[\"Please start the SAP HANA system by running the command \u0027HDB start\u0027 as the sidadm user and retry the operation.\"]},\"inquiryDetails\":[{\"type\":\"SAPHana\",\"itemCount\":0,\"inquiryValidation\":{\"status\":\"Failed\",\"errorDetail\":{\"code\":\"UserErrorHANASystemDBNotRunning\",\"message\":\"SYSTEMDB for the SAP HANA instance is not in running state.\",\"recommendations\":[\"Please start the SAP HANA system by running the command \u0027HDB start\u0027 as the sidadm user and retry the operation.\"]},\"additionalDetail\":\"[HANAPlugin]: SystemDB is not in running state.\",\"protectableItemCount\":{\"SAPHanaSystem\":1,\"SAPHanaDatabase\":0,\"SAPHanaDBInstance\":6}}}]}},\"friendlyName\":\"saphana-ccy-pstest-vm\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectableItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectableItem.Tests.ps1 index c96381f33850..9279432b196f 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectableItem.Tests.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectableItem.Tests.ps1 @@ -15,7 +15,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupP } Describe 'Get-AzRecoveryServicesBackupProtectableItem' { - It 'List' -skip { + It 'List' { $subscriptionId = $env.TestCommon.SubscriptionId $resourceGroupName = $env.TestCommon.ResourceGroupName $vaultName = $env.TestCommon.VaultName diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectedItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectedItem.Tests.ps1 deleted file mode 100644 index 4338554bed0b..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectedItem.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupProtectedItem')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupProtectedItem.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBackupProtectedItem' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionContainer.Tests.ps1 deleted file mode 100644 index 3e0f920f1660..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionContainer.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupProtectionContainer')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupProtectionContainer.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBackupProtectionContainer' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionIntent.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionIntent.Tests.ps1 deleted file mode 100644 index 295c4d3f26e2..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionIntent.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupProtectionIntent')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupProtectionIntent.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBackupProtectionIntent' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionPolicy.Recording.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionPolicy.Recording.json new file mode 100644 index 000000000000..943f568e57a1 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionPolicy.Recording.json @@ -0,0 +1,131 @@ +{ + "Get-AzRecoveryServicesBackupProtectionPolicy+[NoContext]+GetPolicyByName+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/HourlyLogBackup?api-version=2023-02-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/HourlyLogBackup?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "52" ], + "x-ms-client-request-id": [ "0cb6c34a-7980-4d78-a111-789c40dd2af1" ], + "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "ca410fe5-188e-49f4-8fb8-a2518e51deaa" ], + "x-ms-client-request-id": [ "0cb6c34a-7980-4d78-a111-789c40dd2af1" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Kestrel" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "285" ], + "x-ms-correlation-request-id": [ "ca410fe5-188e-49f4-8fb8-a2518e51deaa" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093146Z:ca410fe5-188e-49f4-8fb8-a2518e51deaa" ], + "Date": [ "Wed, 25 Oct 2023 09:31:46 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1062" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/HourlyLogBackup\",\"name\":\"HourlyLogBackup\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SQLDataBase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2021-07-20T23:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2021-07-20T23:00:00Z\"],\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":60},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":3}}", + "isContentBase64": false + } + }, + "Get-AzRecoveryServicesBackupProtectionPolicy+[NoContext]+ListPolicy+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies?api-version=2023-02-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "53" ], + "x-ms-client-request-id": [ "bb5edb11-241a-40ec-8940-86e979d706aa" ], + "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "bfbf7004-bdd1-4255-8a22-602d738198de" ], + "x-ms-client-request-id": [ "bb5edb11-241a-40ec-8940-86e979d706aa" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Kestrel" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "284" ], + "x-ms-correlation-request-id": [ "bfbf7004-bdd1-4255-8a22-602d738198de" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093147Z:bfbf7004-bdd1-4255-8a22-602d738198de" ], + "Date": [ "Wed, 25 Oct 2023 09:31:46 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "11283" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/HourlyLogBackup\",\"name\":\"HourlyLogBackup\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SQLDataBase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2021-07-20T23:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2021-07-20T23:00:00Z\"],\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":60},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/fdgfdh\",\"name\":\"fdgfdh\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V1\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Sunday\",\"Monday\"],\"scheduleRunTimes\":[\"2023-10-19T09:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\",\"Monday\"],\"retentionTimes\":[\"2023-10-19T09:00:00Z\"],\"retentionDuration\":{\"count\":12,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\",\"Monday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-10-19T09:00:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"TierRecommended\",\"duration\":0,\"durationType\":\"Invalid\"}},\"instantRpRetentionRangeInDays\":5,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/DefaultPolicy\",\"name\":\"DefaultPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2021-07-20T23:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2021-07-20T23:00:00Z\"],\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/SAPFullPortal\",\"name\":\"SAPFullPortal\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Sunday\"],\"scheduleRunTimes\":[\"2022-07-09T16:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2022-07-09T16:00:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/NewSQLPolicy\",\"name\":\"NewSQLPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SQLDataBase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Sunday\"],\"scheduleRunTimes\":[\"2019-03-20T01:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2019-03-20T01:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2019-03-20T01:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2019-03-20T01:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Differential\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\"],\"scheduleRunTimes\":[\"2022-06-22T08:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":70,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":15},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/SAPPolicy\",\"name\":\"SAPPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"India Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Sunday\"],\"scheduleRunTimes\":[\"2023-05-29T19:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-05-29T19:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-29T19:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-29T19:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"TierAfter\",\"duration\":45,\"durationType\":\"Days\"}}},{\"policyType\":\"Incremental\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Tuesday\"],\"scheduleRunTimes\":[\"2023-05-29T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/hiagaSQLPolicy\",\"name\":\"hiagaSQLPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SQLDataBase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-10-19T23:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-10-19T23:00:00Z\"],\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-10-19T23:00:00Z\"],\"retentionDuration\":{\"count\":5,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"TierAfter\",\"duration\":60,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":60},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/DailyPolicy-l6dtamab\",\"name\":\"DailyPolicy-l6dtamab\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureStorage\",\"workLoadType\":\"AzureFileShare\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2020-09-30T19:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2020-09-30T19:30:00Z\"],\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}},\"timeZone\":\"UTC\",\"protectedItemsCount\":0}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/EnhancedPolicy\",\"name\":\"EnhancedPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureIaasVM\",\"policyType\":\"V2\",\"instantRPDetails\":{},\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicyV2\",\"scheduleRunFrequency\":\"Hourly\",\"hourlySchedule\":{\"interval\":4,\"scheduleWindowStartTime\":\"2022-07-11T08:00:00Z\",\"scheduleWindowDuration\":12}},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2022-07-11T08:00:00Z\"],\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}},\"instantRpRetentionRangeInDays\":2,\"timeZone\":\"UTC\",\"protectedItemsCount\":0}}]}", + "isContentBase64": false + } + }, + "Get-AzRecoveryServicesBackupProtectionPolicy+[NoContext]+ListPolicy+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies?api-version=2023-02-01\u0026$filter=backupManagementType eq %27AzureWorkload%27+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies?api-version=2023-02-01\u0026$filter=backupManagementType%20eq%20%27AzureWorkload%27", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "54" ], + "x-ms-client-request-id": [ "ab89e5fa-cdff-46e7-8f7c-e79aa468900e" ], + "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupPolicy" ], + "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "c0da9954-2d49-4077-affc-a699765b4e20" ], + "x-ms-client-request-id": [ "ab89e5fa-cdff-46e7-8f7c-e79aa468900e" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Kestrel" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "283" ], + "x-ms-correlation-request-id": [ "c0da9954-2d49-4077-affc-a699765b4e20" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093147Z:c0da9954-2d49-4077-affc-a699765b4e20" ], + "Date": [ "Wed, 25 Oct 2023 09:31:47 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "7810" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/HourlyLogBackup\",\"name\":\"HourlyLogBackup\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SQLDataBase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2021-07-20T23:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2021-07-20T23:00:00Z\"],\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":60},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/SAPFullPortal\",\"name\":\"SAPFullPortal\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Sunday\"],\"scheduleRunTimes\":[\"2022-07-09T16:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2022-07-09T16:00:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/NewSQLPolicy\",\"name\":\"NewSQLPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SQLDataBase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Sunday\"],\"scheduleRunTimes\":[\"2019-03-20T01:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2019-03-20T01:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2019-03-20T01:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2019-03-20T01:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"DoNotTier\",\"duration\":0,\"durationType\":\"Invalid\"}}},{\"policyType\":\"Differential\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\"],\"scheduleRunTimes\":[\"2022-06-22T08:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":70,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":15},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/SAPPolicy\",\"name\":\"SAPPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SAPHanaDatabase\",\"settings\":{\"timeZone\":\"India Standard Time\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Sunday\"],\"scheduleRunTimes\":[\"2023-05-29T19:30:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"weeklySchedule\":{\"daysOfTheWeek\":[\"Sunday\"],\"retentionTimes\":[\"2023-05-29T19:30:00Z\"],\"retentionDuration\":{\"count\":104,\"durationType\":\"Weeks\"}},\"monthlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-29T19:30:00Z\"],\"retentionDuration\":{\"count\":60,\"durationType\":\"Months\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-05-29T19:30:00Z\"],\"retentionDuration\":{\"count\":10,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"TierAfter\",\"duration\":45,\"durationType\":\"Days\"}}},{\"policyType\":\"Incremental\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Weekly\",\"scheduleRunDays\":[\"Tuesday\"],\"scheduleRunTimes\":[\"2023-05-29T02:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":120},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":15,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/hiagaSQLPolicy\",\"name\":\"hiagaSQLPolicy\",\"type\":\"Microsoft.RecoveryServices/vaults/backupPolicies\",\"properties\":{\"backupManagementType\":\"AzureWorkload\",\"workLoadType\":\"SQLDataBase\",\"settings\":{\"timeZone\":\"UTC\",\"issqlcompression\":false,\"isCompression\":false},\"subProtectionPolicy\":[{\"policyType\":\"Full\",\"schedulePolicy\":{\"schedulePolicyType\":\"SimpleSchedulePolicy\",\"scheduleRunFrequency\":\"Daily\",\"scheduleRunTimes\":[\"2023-10-19T23:00:00Z\"],\"scheduleWeeklyFrequency\":0},\"retentionPolicy\":{\"retentionPolicyType\":\"LongTermRetentionPolicy\",\"dailySchedule\":{\"retentionTimes\":[\"2023-10-19T23:00:00Z\"],\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}},\"yearlySchedule\":{\"retentionScheduleFormatType\":\"Weekly\",\"monthsOfYear\":[\"January\"],\"retentionScheduleWeekly\":{\"daysOfTheWeek\":[\"Sunday\"],\"weeksOfTheMonth\":[\"First\"]},\"retentionTimes\":[\"2023-10-19T23:00:00Z\"],\"retentionDuration\":{\"count\":5,\"durationType\":\"Years\"}}},\"tieringPolicy\":{\"ArchivedRP\":{\"tieringMode\":\"TierAfter\",\"duration\":60,\"durationType\":\"Days\"}}},{\"policyType\":\"Log\",\"schedulePolicy\":{\"schedulePolicyType\":\"LogSchedulePolicy\",\"scheduleFrequencyInMins\":60},\"retentionPolicy\":{\"retentionPolicyType\":\"SimpleRetentionPolicy\",\"retentionDuration\":{\"count\":30,\"durationType\":\"Days\"}}}],\"protectedItemsCount\":0}}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionPolicy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionPolicy.Tests.ps1 index 982fe8721fc9..7d434ce71224 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionPolicy.Tests.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectionPolicy.Tests.ps1 @@ -15,7 +15,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupP } Describe 'Get-AzRecoveryServicesBackupProtectionPolicy' { - It 'GetPolicyByName' -skip { + It 'GetPolicyByName' { # get the variables $subscriptionId = $env.TestCommon.SubscriptionId $resourceGroupName = $env.TestCommon.ResourceGroupName @@ -26,7 +26,7 @@ Describe 'Get-AzRecoveryServicesBackupProtectionPolicy' { $policyByName.Name | Should -Be "HourlyLogBackup" } - It 'ListPolicy' -skip { + It 'ListPolicy' { # get the variables $subscriptionId = $env.TestCommon.SubscriptionId $resourceGroupName = $env.TestCommon.ResourceGroupName diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 deleted file mode 100644 index f9133a30b379..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupResourceEncryptionConfig')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupResourceEncryptionConfig.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBackupResourceEncryptionConfig' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 deleted file mode 100644 index 93a53cf7eb40..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupResourceStorageConfigsNonCrr')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBackupResourceStorageConfigsNonCrr' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 deleted file mode 100644 index 47a619ac7a8f..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupResourceVaultConfig')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupResourceVaultConfig.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBackupResourceVaultConfig' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupStatus.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupStatus.Tests.ps1 deleted file mode 100644 index 1ec2996214da..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupStatus.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupStatus')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupStatus.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBackupStatus' { - It 'GetExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupUsageSummary.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupUsageSummary.Tests.ps1 deleted file mode 100644 index 2e357373fea1..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupUsageSummary.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupUsageSummary')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupUsageSummary.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBackupUsageSummary' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupWorkloadItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupWorkloadItem.Tests.ps1 deleted file mode 100644 index d0b41bb0f525..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupWorkloadItem.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBackupWorkloadItem')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBackupWorkloadItem.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBackupWorkloadItem' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBmsPrepareDataMoveOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBmsPrepareDataMoveOperationResult.Tests.ps1 deleted file mode 100644 index 663938db20a3..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBmsPrepareDataMoveOperationResult.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesBmsPrepareDataMoveOperationResult')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesBmsPrepareDataMoveOperationResult.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesBmsPrepareDataMoveOperationResult' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesDeletedProtectionContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesDeletedProtectionContainer.Tests.ps1 deleted file mode 100644 index 16fd005d7c19..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesDeletedProtectionContainer.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesDeletedProtectionContainer')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesDeletedProtectionContainer.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesDeletedProtectionContainer' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesExportJobsOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesExportJobsOperationResult.Tests.ps1 deleted file mode 100644 index 4e092b06c6b2..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesExportJobsOperationResult.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesExportJobsOperationResult')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesExportJobsOperationResult.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesExportJobsOperationResult' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobDetail.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobDetail.Tests.ps1 deleted file mode 100644 index 8c743816da76..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobDetail.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesJobDetail')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesJobDetail.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesJobDetail' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobOperationResult.Tests.ps1 deleted file mode 100644 index 8016c52e4ab4..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesJobOperationResult.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesJobOperationResult')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesJobOperationResult.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesJobOperationResult' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesOperationStatus.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesOperationStatus.Tests.ps1 deleted file mode 100644 index 3ce4cc1f02a6..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesOperationStatus.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesOperationStatus')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesOperationStatus.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesOperationStatus' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 deleted file mode 100644 index bd9ef5c79619..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesPrivateEndpointConnection')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesPrivateEndpointConnection.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesPrivateEndpointConnection' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointOperationStatus.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointOperationStatus.Tests.ps1 deleted file mode 100644 index 9023679c7434..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesPrivateEndpointOperationStatus.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesPrivateEndpointOperationStatus')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesPrivateEndpointOperationStatus.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesPrivateEndpointOperationStatus' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectableContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectableContainer.Tests.ps1 deleted file mode 100644 index 60afb1127d3c..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectableContainer.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectableContainer')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectableContainer.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesProtectableContainer' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItem.Tests.ps1 deleted file mode 100644 index 465a5666b95f..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItem.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectedItem')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectedItem.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesProtectedItem' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationResult.Tests.ps1 deleted file mode 100644 index 9de89a47424c..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationResult.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectedItemOperationResult')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectedItemOperationResult.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesProtectedItemOperationResult' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationStatuses.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationStatuses.Tests.ps1 deleted file mode 100644 index 63de8b0a8544..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectedItemOperationStatuses.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectedItemOperationStatuses')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectedItemOperationStatuses.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesProtectedItemOperationStatuses' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainer.Tests.ps1 deleted file mode 100644 index bb9c9cfbcce2..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainer.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectionContainer')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectionContainer.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesProtectionContainer' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerOperationResult.Tests.ps1 deleted file mode 100644 index 7cff73ddce39..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerOperationResult.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectionContainerOperationResult')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectionContainerOperationResult.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesProtectionContainerOperationResult' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerRefreshOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerRefreshOperationResult.Tests.ps1 deleted file mode 100644 index 9c7b3c7b9efe..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionContainerRefreshOperationResult.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectionContainerRefreshOperationResult')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectionContainerRefreshOperationResult.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesProtectionContainerRefreshOperationResult' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionIntent.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionIntent.Tests.ps1 deleted file mode 100644 index 5c59bb6f87f1..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionIntent.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectionIntent')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectionIntent.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesProtectionIntent' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationResult.Tests.ps1 deleted file mode 100644 index 7bee802c72ed..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationResult.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectionPolicyOperationResult')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectionPolicyOperationResult.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesProtectionPolicyOperationResult' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationStatuses.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationStatuses.Tests.ps1 deleted file mode 100644 index ceaacbe6a994..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesProtectionPolicyOperationStatuses.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesProtectionPolicyOperationStatuses')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesProtectionPolicyOperationStatuses.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesProtectionPolicyOperationStatuses' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPoint.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPoint.Tests.ps1 deleted file mode 100644 index bbaa479012c6..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPoint.Tests.ps1 +++ /dev/null @@ -1,29 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesRecoveryPoint')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesRecoveryPoint.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesRecoveryPoint' { - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPointsRecommendedForMove.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPointsRecommendedForMove.Tests.ps1 deleted file mode 100644 index cdbf447452ce..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesRecoveryPointsRecommendedForMove.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesRecoveryPointsRecommendedForMove')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesRecoveryPointsRecommendedForMove.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesRecoveryPointsRecommendedForMove' { - It 'ListExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'List' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesResourceGuardProxy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesResourceGuardProxy.Tests.ps1 deleted file mode 100644 index 520bf5e9928e..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesResourceGuardProxy.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesResourceGuardProxy')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesResourceGuardProxy.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesResourceGuardProxy' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Get1' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity1' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesSecurityPiN.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesSecurityPiN.Tests.ps1 deleted file mode 100644 index c9d7505dc024..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesSecurityPiN.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesSecurityPiN')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesSecurityPiN.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesSecurityPiN' { - It 'GetExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationResult.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationResult.Tests.ps1 deleted file mode 100644 index 53defd3b7bb8..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationResult.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesValidateOperationResult')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesValidateOperationResult.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesValidateOperationResult' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationStatuses.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationStatuses.Tests.ps1 deleted file mode 100644 index e0cd7fee9448..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesValidateOperationStatuses.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-AzRecoveryServicesValidateOperationStatuses')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzRecoveryServicesValidateOperationStatuses.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-AzRecoveryServicesValidateOperationStatuses' { - It 'Get' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'GetViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-SourceResourceId.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-SourceResourceId.Tests.ps1 deleted file mode 100644 index 697cd6425153..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-SourceResourceId.Tests.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Get-SourceResourceId')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Get-SourceResourceId.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Get-SourceResourceId' { - It 'InitializeRestoreRequest' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Initialize-AzRecoveryServicesRestoreRequest.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Initialize-AzRecoveryServicesRestoreRequest.Tests.ps1 deleted file mode 100644 index 93edd97658ce..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Initialize-AzRecoveryServicesRestoreRequest.Tests.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' -if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' -} -. ($loadEnvPath) -$TestRecordingFile = Join-Path $PSScriptRoot 'Initialize-AzRecoveryServicesRestoreRequest.Recording.json' -$currentPath = $PSScriptRoot -while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent -} -. ($mockingPath | Select-Object -First 1).FullName - -Describe 'Initialize-AzRecoveryServicesRestoreRequest' { - It '__AllParameterSets' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesInquireProtectionContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesInquireProtectionContainer.Tests.ps1 deleted file mode 100644 index c5da9cd79923..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesInquireProtectionContainer.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzRecoveryServicesInquireProtectionContainer')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzRecoveryServicesInquireProtectionContainer.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Invoke-AzRecoveryServicesInquireProtectionContainer' { - It 'Inquire' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'InquireViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesPrepare.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesPrepare.Tests.ps1 deleted file mode 100644 index ebbbbd9686e8..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Invoke-AzRecoveryServicesPrepare.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzRecoveryServicesPrepare')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzRecoveryServicesPrepare.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Invoke-AzRecoveryServicesPrepare' { - It 'PrepareExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Prepare' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'PrepareViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'PrepareViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Move-AzRecoveryServicesRecoveryPoint.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Move-AzRecoveryServicesRecoveryPoint.Tests.ps1 deleted file mode 100644 index 36efa8d10d03..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Move-AzRecoveryServicesRecoveryPoint.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Move-AzRecoveryServicesRecoveryPoint')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Move-AzRecoveryServicesRecoveryPoint.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Move-AzRecoveryServicesRecoveryPoint' { - It 'MoveExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Move' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'MoveViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'MoveViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 deleted file mode 100644 index 901e92ae0a5e..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'New-AzRecoveryServicesItemLevelRecoveryConnection')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzRecoveryServicesItemLevelRecoveryConnection.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'New-AzRecoveryServicesItemLevelRecoveryConnection' { - It 'ProvisionExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Provision' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'ProvisionViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'ProvisionViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectedItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectedItem.Tests.ps1 deleted file mode 100644 index 6ac679180a99..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectedItem.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'New-AzRecoveryServicesProtectedItem')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzRecoveryServicesProtectedItem.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'New-AzRecoveryServicesProtectedItem' { - It 'CreateExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'CreateViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Create' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'CreateViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectionIntent.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectionIntent.Tests.ps1 deleted file mode 100644 index 8409d04b21f1..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesProtectionIntent.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'New-AzRecoveryServicesProtectionIntent')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzRecoveryServicesProtectionIntent.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'New-AzRecoveryServicesProtectionIntent' { - It 'CreateExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Create' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'CreateViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'CreateViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesRestoreRequest.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesRestoreRequest.Tests.ps1 deleted file mode 100644 index f1e3b45a73a0..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesRestoreRequest.Tests.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -$loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' -if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' -} -. ($loadEnvPath) -$TestRecordingFile = Join-Path $PSScriptRoot 'New-AzRecoveryServicesRestoreRequest.Recording.json' -$currentPath = $PSScriptRoot -while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent -} -. ($mockingPath | Select-Object -First 1).FullName - -Describe 'New-AzRecoveryServicesRestoreRequest' { - It '__AllParameterSets' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesBackupContainer.Recording.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesBackupContainer.Recording.json new file mode 100644 index 000000000000..1aa4ff97995b --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesBackupContainer.Recording.json @@ -0,0 +1,174 @@ +{ + "Register-AzRecoveryServicesBackupContainer+[NoContext]+ReRegister+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupProtectionContainers?api-version=2023-02-01\u0026$filter=backupManagementType eq %27AzureWorkload%27+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupProtectionContainers?api-version=2023-02-01\u0026$filter=backupManagementType%20eq%20%27AzureWorkload%27", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "55" ], + "x-ms-client-request-id": [ "bb71949b-f8a3-4368-8a92-7b6e3b82aa37" ], + "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupProtectionContainer" ], + "FullCommandName": [ "Get-AzRecoveryServicesBackupProtectionContainer_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "93ef152c-85e6-467d-8424-23c30886b089" ], + "x-ms-client-request-id": [ "bb71949b-f8a3-4368-8a92-7b6e3b82aa37" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Kestrel" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "296" ], + "x-ms-correlation-request-id": [ "93ef152c-85e6-467d-8424-23c30886b089" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093149Z:93ef152c-85e6-467d-8424-23c30886b089" ], + "Date": [ "Wed, 25 Oct 2023 09:31:49 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "5084" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-migration-vm1\",\"name\":\"VMAppContainer;Compute;hiagarg;sql-migration-vm1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-migration-vm1\",\"lastUpdatedTime\":\"2023-10-05T13:25:23.9952403Z\",\"extendedInfo\":{\"hostServerName\":\"sql-migration-v\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"inquiryDetails\":[{\"type\":\"SQL\",\"itemCount\":3,\"inquiryValidation\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"additionalDetail\":\"\"}}]}},\"friendlyName\":\"sql-migration-vm1\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-migration-vm2\",\"name\":\"VMAppContainer;Compute;hiagarg;sql-migration-vm2\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-migration-vm2\",\"lastUpdatedTime\":\"2023-10-12T10:19:56.1811718Z\",\"extendedInfo\":{\"hostServerName\":\"sql-migration-v\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"inquiryDetails\":[{\"type\":\"SQL\",\"itemCount\":3,\"inquiryValidation\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"additionalDetail\":\"\"}}]}},\"friendlyName\":\"sql-migration-vm2\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-pstest-vm1\",\"name\":\"VMAppContainer;Compute;hiagarg;sql-pstest-vm1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-pstest-vm1\",\"lastUpdatedTime\":\"2022-06-07T09:36:38.2664137Z\",\"extendedInfo\":{\"hostServerName\":\"sql-pstest-vm1\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"inquiryDetails\":[{\"type\":\"SQL\",\"itemCount\":6,\"inquiryValidation\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"additionalDetail\":\"\"}}]}},\"friendlyName\":\"sql-pstest-vm1\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;saphana-pstest;saphana-ccy-pstest-vm\",\"name\":\"VMAppContainer;Compute;saphana-pstest;saphana-ccy-pstest-vm\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/saphana-pstest/providers/Microsoft.Compute/virtualMachines/saphana-ccy-pstest-vm\",\"lastUpdatedTime\":\"2023-05-29T04:29:27.5165824Z\",\"extendedInfo\":{\"hostServerName\":\"saphana-ccy-pstest-vm\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"UserErrorHANASystemDBNotRunning\",\"message\":\"SYSTEMDB for the SAP HANA instance is not in running state.\",\"recommendations\":[\"Please start the SAP HANA system by running the command \u0027HDB start\u0027 as the sidadm user and retry the operation.\"]},\"inquiryDetails\":[{\"type\":\"SAPHana\",\"itemCount\":0,\"inquiryValidation\":{\"status\":\"Failed\",\"errorDetail\":{\"code\":\"UserErrorHANASystemDBNotRunning\",\"message\":\"SYSTEMDB for the SAP HANA instance is not in running state.\",\"recommendations\":[\"Please start the SAP HANA system by running the command \u0027HDB start\u0027 as the sidadm user and retry the operation.\"]},\"additionalDetail\":\"[HANAPlugin]: SystemDB is not in running state.\",\"protectableItemCount\":{\"SAPHanaSystem\":1,\"SAPHanaDatabase\":0,\"SAPHanaDBInstance\":6}}}]}},\"friendlyName\":\"saphana-ccy-pstest-vm\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}}]}", + "isContentBase64": false + } + }, + "Register-AzRecoveryServicesBackupContainer+[NoContext]+ReRegister+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupProtectionContainers?api-version=2023-02-01\u0026$filter=backupManagementType eq %27AzureWorkload%27+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupProtectionContainers?api-version=2023-02-01\u0026$filter=backupManagementType%20eq%20%27AzureWorkload%27", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "71" ], + "x-ms-client-request-id": [ "604cd2ea-42dd-413a-99d5-3b8fcd80b0f4" ], + "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupProtectionContainer" ], + "FullCommandName": [ "Get-AzRecoveryServicesBackupProtectionContainer_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "20796a73-0e55-4498-b0f2-48b915f96229" ], + "x-ms-client-request-id": [ "604cd2ea-42dd-413a-99d5-3b8fcd80b0f4" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Kestrel" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "294" ], + "x-ms-correlation-request-id": [ "20796a73-0e55-4498-b0f2-48b915f96229" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093511Z:20796a73-0e55-4498-b0f2-48b915f96229" ], + "Date": [ "Wed, 25 Oct 2023 09:35:10 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "5084" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-migration-vm1\",\"name\":\"VMAppContainer;Compute;hiagarg;sql-migration-vm1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-migration-vm1\",\"lastUpdatedTime\":\"2023-10-05T13:25:23.9952403Z\",\"extendedInfo\":{\"hostServerName\":\"sql-migration-v\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"inquiryDetails\":[{\"type\":\"SQL\",\"itemCount\":3,\"inquiryValidation\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"additionalDetail\":\"\"}}]}},\"friendlyName\":\"sql-migration-vm1\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-migration-vm2\",\"name\":\"VMAppContainer;Compute;hiagarg;sql-migration-vm2\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-migration-vm2\",\"lastUpdatedTime\":\"2023-10-12T10:19:56.1811718Z\",\"extendedInfo\":{\"hostServerName\":\"sql-migration-v\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"inquiryDetails\":[{\"type\":\"SQL\",\"itemCount\":3,\"inquiryValidation\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"additionalDetail\":\"\"}}]}},\"friendlyName\":\"sql-migration-vm2\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-pstest-vm1\",\"name\":\"VMAppContainer;Compute;hiagarg;sql-pstest-vm1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-pstest-vm1\",\"lastUpdatedTime\":\"2022-06-07T09:36:38.2664137Z\",\"extendedInfo\":{\"hostServerName\":\"sql-pstest-vm1\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"inquiryDetails\":[{\"type\":\"SQL\",\"itemCount\":6,\"inquiryValidation\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"additionalDetail\":\"\"}}]}},\"friendlyName\":\"sql-pstest-vm1\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;saphana-pstest;saphana-ccy-pstest-vm\",\"name\":\"VMAppContainer;Compute;saphana-pstest;saphana-ccy-pstest-vm\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/saphana-pstest/providers/Microsoft.Compute/virtualMachines/saphana-ccy-pstest-vm\",\"lastUpdatedTime\":\"2023-05-29T04:29:27.5165824Z\",\"extendedInfo\":{\"hostServerName\":\"saphana-ccy-pstest-vm\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"UserErrorHANASystemDBNotRunning\",\"message\":\"SYSTEMDB for the SAP HANA instance is not in running state.\",\"recommendations\":[\"Please start the SAP HANA system by running the command \u0027HDB start\u0027 as the sidadm user and retry the operation.\"]},\"inquiryDetails\":[{\"type\":\"SAPHana\",\"itemCount\":0,\"inquiryValidation\":{\"status\":\"Failed\",\"errorDetail\":{\"code\":\"UserErrorHANASystemDBNotRunning\",\"message\":\"SYSTEMDB for the SAP HANA instance is not in running state.\",\"recommendations\":[\"Please start the SAP HANA system by running the command \u0027HDB start\u0027 as the sidadm user and retry the operation.\"]},\"additionalDetail\":\"[HANAPlugin]: SystemDB is not in running state.\",\"protectableItemCount\":{\"SAPHanaSystem\":1,\"SAPHanaDatabase\":0,\"SAPHanaDBInstance\":6}}}]}},\"friendlyName\":\"saphana-ccy-pstest-vm\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}}]}", + "isContentBase64": false + } + }, + "Register-AzRecoveryServicesBackupContainer+[NoContext]+ReRegister+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupProtectionContainers?api-version=2023-02-01\u0026$filter=backupManagementType eq %27AzureWorkload%27+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupProtectionContainers?api-version=2023-02-01\u0026$filter=backupManagementType%20eq%20%27AzureWorkload%27", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "72" ], + "x-ms-client-request-id": [ "cd3d9056-7dbf-463c-acff-a1a397f76e94" ], + "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupProtectionContainer" ], + "FullCommandName": [ "Get-AzRecoveryServicesBackupProtectionContainer_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "520b9328-6582-4bc1-8a3f-7c90124581f1" ], + "x-ms-client-request-id": [ "cd3d9056-7dbf-463c-acff-a1a397f76e94" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Kestrel" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "293" ], + "x-ms-correlation-request-id": [ "520b9328-6582-4bc1-8a3f-7c90124581f1" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T093512Z:520b9328-6582-4bc1-8a3f-7c90124581f1" ], + "Date": [ "Wed, 25 Oct 2023 09:35:12 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "5084" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-migration-vm1\",\"name\":\"VMAppContainer;Compute;hiagarg;sql-migration-vm1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-migration-vm1\",\"lastUpdatedTime\":\"2023-10-05T13:25:23.9952403Z\",\"extendedInfo\":{\"hostServerName\":\"sql-migration-v\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"inquiryDetails\":[{\"type\":\"SQL\",\"itemCount\":3,\"inquiryValidation\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"additionalDetail\":\"\"}}]}},\"friendlyName\":\"sql-migration-vm1\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-migration-vm2\",\"name\":\"VMAppContainer;Compute;hiagarg;sql-migration-vm2\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-migration-vm2\",\"lastUpdatedTime\":\"2023-10-12T10:19:56.1811718Z\",\"extendedInfo\":{\"hostServerName\":\"sql-migration-v\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"inquiryDetails\":[{\"type\":\"SQL\",\"itemCount\":3,\"inquiryValidation\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"additionalDetail\":\"\"}}]}},\"friendlyName\":\"sql-migration-vm2\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-pstest-vm1\",\"name\":\"VMAppContainer;Compute;hiagarg;sql-pstest-vm1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-pstest-vm1\",\"lastUpdatedTime\":\"2022-06-07T09:36:38.2664137Z\",\"extendedInfo\":{\"hostServerName\":\"sql-pstest-vm1\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"inquiryDetails\":[{\"type\":\"SQL\",\"itemCount\":6,\"inquiryValidation\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"additionalDetail\":\"\"}}]}},\"friendlyName\":\"sql-pstest-vm1\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;saphana-pstest;saphana-ccy-pstest-vm\",\"name\":\"VMAppContainer;Compute;saphana-pstest;saphana-ccy-pstest-vm\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/saphana-pstest/providers/Microsoft.Compute/virtualMachines/saphana-ccy-pstest-vm\",\"lastUpdatedTime\":\"2023-05-29T04:29:27.5165824Z\",\"extendedInfo\":{\"hostServerName\":\"saphana-ccy-pstest-vm\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"UserErrorHANASystemDBNotRunning\",\"message\":\"SYSTEMDB for the SAP HANA instance is not in running state.\",\"recommendations\":[\"Please start the SAP HANA system by running the command \u0027HDB start\u0027 as the sidadm user and retry the operation.\"]},\"inquiryDetails\":[{\"type\":\"SAPHana\",\"itemCount\":0,\"inquiryValidation\":{\"status\":\"Failed\",\"errorDetail\":{\"code\":\"UserErrorHANASystemDBNotRunning\",\"message\":\"SYSTEMDB for the SAP HANA instance is not in running state.\",\"recommendations\":[\"Please start the SAP HANA system by running the command \u0027HDB start\u0027 as the sidadm user and retry the operation.\"]},\"additionalDetail\":\"[HANAPlugin]: SystemDB is not in running state.\",\"protectableItemCount\":{\"SAPHanaSystem\":1,\"SAPHanaDatabase\":0,\"SAPHanaDBInstance\":6}}}]}},\"friendlyName\":\"saphana-ccy-pstest-vm\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}}]}", + "isContentBase64": false + } + }, + "Register-AzRecoveryServicesBackupContainer+[NoContext]+ReRegister+$GET+https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupProtectionContainers?api-version=2023-02-01\u0026$filter=backupManagementType eq %27AzureWorkload%27+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupProtectionContainers?api-version=2023-02-01\u0026$filter=backupManagementType%20eq%20%27AzureWorkload%27", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "94" ], + "x-ms-client-request-id": [ "dad9da1c-fbfd-4ed4-a207-d61cbccb9ceb" ], + "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupProtectionContainer" ], + "FullCommandName": [ "Get-AzRecoveryServicesBackupProtectionContainer_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "X-Content-Type-Options": [ "nosniff" ], + "x-ms-request-id": [ "7dc6bf3a-f284-4071-91b0-58fe55f18fe7" ], + "x-ms-client-request-id": [ "dad9da1c-fbfd-4ed4-a207-d61cbccb9ceb" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "Kestrel" ], + "X-Powered-By": [ "ASP.NET" ], + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "291" ], + "x-ms-correlation-request-id": [ "7dc6bf3a-f284-4071-91b0-58fe55f18fe7" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231025T094138Z:7dc6bf3a-f284-4071-91b0-58fe55f18fe7" ], + "Date": [ "Wed, 25 Oct 2023 09:41:37 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "5083" ], + "Content-Type": [ "application/json; charset=utf-8" ], + "Expires": [ "-1" ] + }, + "Content": "{\"value\":[{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-migration-vm1\",\"name\":\"VMAppContainer;Compute;hiagarg;sql-migration-vm1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-migration-vm1\",\"lastUpdatedTime\":\"2023-10-05T13:25:23.9952403Z\",\"extendedInfo\":{\"hostServerName\":\"sql-migration-v\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"inquiryDetails\":[{\"type\":\"SQL\",\"itemCount\":3,\"inquiryValidation\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"additionalDetail\":\"\"}}]}},\"friendlyName\":\"sql-migration-vm1\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-migration-vm2\",\"name\":\"VMAppContainer;Compute;hiagarg;sql-migration-vm2\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-migration-vm2\",\"lastUpdatedTime\":\"2023-10-12T10:19:56.1811718Z\",\"extendedInfo\":{\"hostServerName\":\"sql-migration-v\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"inquiryDetails\":[{\"type\":\"SQL\",\"itemCount\":3,\"inquiryValidation\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"additionalDetail\":\"\"}}]}},\"friendlyName\":\"sql-migration-vm2\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-pstest-vm1\",\"name\":\"VMAppContainer;Compute;hiagarg;sql-pstest-vm1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-pstest-vm1\",\"lastUpdatedTime\":\"2022-06-07T09:36:38.2664137Z\",\"extendedInfo\":{\"hostServerName\":\"sql-pstest-vm1\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"inquiryDetails\":[{\"type\":\"SQL\",\"itemCount\":6,\"inquiryValidation\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"additionalDetail\":\"\"}}]}},\"friendlyName\":\"sql-pstest-vm1\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;saphana-pstest;saphana-ccy-pstest-vm\",\"name\":\"VMAppContainer;Compute;saphana-pstest;saphana-ccy-pstest-vm\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/saphana-pstest/providers/Microsoft.Compute/virtualMachines/saphana-ccy-pstest-vm\",\"lastUpdatedTime\":\"2023-05-29T04:29:27.5165824Z\",\"extendedInfo\":{\"hostServerName\":\"saphana-ccy-pstest-vm\",\"inquiryInfo\":{\"status\":\"Failed\",\"errorDetail\":{\"code\":\"UserErrorHANASystemDBNotRunning\",\"message\":\"SYSTEMDB for the SAP HANA instance is not in running state.\",\"recommendations\":[\"Please start the SAP HANA system by running the command \u0027HDB start\u0027 as the sidadm user and retry the operation.\"]},\"inquiryDetails\":[{\"type\":\"SAPHana\",\"itemCount\":0,\"inquiryValidation\":{\"status\":\"Failed\",\"errorDetail\":{\"code\":\"UserErrorHANASystemDBNotRunning\",\"message\":\"SYSTEMDB for the SAP HANA instance is not in running state.\",\"recommendations\":[\"Please start the SAP HANA system by running the command \u0027HDB start\u0027 as the sidadm user and retry the operation.\"]},\"additionalDetail\":\"[HANAPlugin]: SystemDB is not in running state.\",\"protectableItemCount\":{\"SAPHanaSystem\":1,\"SAPHanaDatabase\":0,\"SAPHanaDBInstance\":6}}}]}},\"friendlyName\":\"saphana-ccy-pstest-vm\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}}]}", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesBackupContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesBackupContainer.Tests.ps1 index 012465c4dfa9..44b72d9376f5 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesBackupContainer.Tests.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesBackupContainer.Tests.ps1 @@ -28,8 +28,7 @@ Describe 'Register-AzRecoveryServicesBackupContainer' { # unregister - TODO - # register - + # register ## get container should be null $container = Get-AzRecoveryServicesBackupContainer -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -ContainerType AzureVMAppContainer -DatasourceType MSSQL | Where-Object { $_.Name -match $containerFriendlyName } $container | Should -Be $null @@ -38,7 +37,7 @@ Describe 'Register-AzRecoveryServicesBackupContainer' { $reg.Property.SourceResourceId -match $resourceId | Should -Be $true } - It 'ReRegister' -skip { + It 'ReRegister' { $subscriptionId = $env.TestCommon.SubscriptionId $resourceGroupName = $env.TestCommon.ResourceGroupName $vaultName = $env.TestCommon.VaultName diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesProtectionContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesProtectionContainer.Tests.ps1 deleted file mode 100644 index 9fcdda764d2a..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesProtectionContainer.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Register-AzRecoveryServicesProtectionContainer')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Register-AzRecoveryServicesProtectionContainer.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Register-AzRecoveryServicesProtectionContainer' { - It 'RegisterExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Register' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'RegisterViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'RegisterViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 deleted file mode 100644 index c16e55a3b1da..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzRecoveryServicesPrivateEndpointConnection')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzRecoveryServicesPrivateEndpointConnection.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Remove-AzRecoveryServicesPrivateEndpointConnection' { - It 'Delete' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'DeleteViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectedItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectedItem.Tests.ps1 deleted file mode 100644 index ab5ceb1f5a91..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectedItem.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzRecoveryServicesProtectedItem')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzRecoveryServicesProtectedItem.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Remove-AzRecoveryServicesProtectedItem' { - It 'Delete' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'DeleteViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectionIntent.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectionIntent.Tests.ps1 deleted file mode 100644 index b3e5f712abfb..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesProtectionIntent.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzRecoveryServicesProtectionIntent')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzRecoveryServicesProtectionIntent.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Remove-AzRecoveryServicesProtectionIntent' { - It 'Delete' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'DeleteViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesResourceGuardProxy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesResourceGuardProxy.Tests.ps1 deleted file mode 100644 index 26ddee5aa073..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesResourceGuardProxy.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzRecoveryServicesResourceGuardProxy')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzRecoveryServicesResourceGuardProxy.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Remove-AzRecoveryServicesResourceGuardProxy' { - It 'Delete' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'DeleteViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Revoke-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Revoke-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 deleted file mode 100644 index c80441c4925d..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Revoke-AzRecoveryServicesItemLevelRecoveryConnection.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Revoke-AzRecoveryServicesItemLevelRecoveryConnection')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Revoke-AzRecoveryServicesItemLevelRecoveryConnection.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Revoke-AzRecoveryServicesItemLevelRecoveryConnection' { - It 'Revoke' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'RevokeViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 deleted file mode 100644 index 2fbc82ced7ed..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceEncryptionConfig.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesBackupResourceEncryptionConfig')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesBackupResourceEncryptionConfig.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Set-AzRecoveryServicesBackupResourceEncryptionConfig' { - It 'UpdateExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Update' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 deleted file mode 100644 index 46849657debe..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesBackupResourceStorageConfigsNonCrr')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Set-AzRecoveryServicesBackupResourceStorageConfigsNonCrr' { - It 'UpdateExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Update' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 deleted file mode 100644 index 8aee2071bf53..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesBackupResourceVaultConfig')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesBackupResourceVaultConfig.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Set-AzRecoveryServicesBackupResourceVaultConfig' { - It 'PutExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Put' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 deleted file mode 100644 index 3a242f36849b..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesPrivateEndpointConnection.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesPrivateEndpointConnection')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesPrivateEndpointConnection.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Set-AzRecoveryServicesPrivateEndpointConnection' { - It 'PutExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Put' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectedItem.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectedItem.Tests.ps1 deleted file mode 100644 index d286f00a801d..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectedItem.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesProtectedItem')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesProtectedItem.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Set-AzRecoveryServicesProtectedItem' { - It 'UpdateExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Update' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectionIntent.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectionIntent.Tests.ps1 deleted file mode 100644 index cc768e442439..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesProtectionIntent.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesProtectionIntent')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesProtectionIntent.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Set-AzRecoveryServicesProtectionIntent' { - It 'UpdateExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Update' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesResourceGuardProxy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesResourceGuardProxy.Tests.ps1 deleted file mode 100644 index 657ae5cb8747..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Set-AzRecoveryServicesResourceGuardProxy.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Set-AzRecoveryServicesResourceGuardProxy')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Set-AzRecoveryServicesResourceGuardProxy.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Set-AzRecoveryServicesResourceGuardProxy' { - It 'PutExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Put' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServices.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServices.Tests.ps1 deleted file mode 100644 index a57dfaf67aa6..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServices.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Start-AzRecoveryServices')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Start-AzRecoveryServices.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Start-AzRecoveryServices' { - It 'TriggerExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Trigger' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'TriggerViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'TriggerViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesBackup.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesBackup.Tests.ps1 deleted file mode 100644 index 0edd1eb00c9a..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesBackup.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Start-AzRecoveryServicesBackup')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Start-AzRecoveryServicesBackup.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Start-AzRecoveryServicesBackup' { - It 'TriggerExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Trigger' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'TriggerViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'TriggerViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesJobCancellation.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesJobCancellation.Tests.ps1 deleted file mode 100644 index 2b4e5ead3b20..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesJobCancellation.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Start-AzRecoveryServicesJobCancellation')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Start-AzRecoveryServicesJobCancellation.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Start-AzRecoveryServicesJobCancellation' { - It 'Trigger' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'TriggerViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesRestore.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesRestore.Tests.ps1 deleted file mode 100644 index 701f6e1e84dc..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesRestore.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Start-AzRecoveryServicesRestore')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Start-AzRecoveryServicesRestore.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Start-AzRecoveryServicesRestore' { - It 'TriggerExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Trigger' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'TriggerViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'TriggerViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesValidateOperation.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesValidateOperation.Tests.ps1 deleted file mode 100644 index f4fe76b779ab..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Start-AzRecoveryServicesValidateOperation.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Start-AzRecoveryServicesValidateOperation')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Start-AzRecoveryServicesValidateOperation.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Start-AzRecoveryServicesValidateOperation' { - It 'TriggerExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Trigger' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'TriggerViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'TriggerViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesFeatureSupport.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesFeatureSupport.Tests.ps1 deleted file mode 100644 index 7d8fc962aa12..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesFeatureSupport.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Test-AzRecoveryServicesFeatureSupport')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Test-AzRecoveryServicesFeatureSupport.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Test-AzRecoveryServicesFeatureSupport' { - It 'ValidateExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Validate' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'ValidateViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'ValidateViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesProtectionIntent.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesProtectionIntent.Tests.ps1 deleted file mode 100644 index 0a53ed57f0a9..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Test-AzRecoveryServicesProtectionIntent.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Test-AzRecoveryServicesProtectionIntent')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Test-AzRecoveryServicesProtectionIntent.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Test-AzRecoveryServicesProtectionIntent' { - It 'ValidateExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Validate' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'ValidateViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'ValidateViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unlock-AzRecoveryServicesResourceGuardProxyDelete.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unlock-AzRecoveryServicesResourceGuardProxyDelete.Tests.ps1 deleted file mode 100644 index b0d96af8758c..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unlock-AzRecoveryServicesResourceGuardProxyDelete.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Unlock-AzRecoveryServicesResourceGuardProxyDelete')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Unlock-AzRecoveryServicesResourceGuardProxyDelete.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Unlock-AzRecoveryServicesResourceGuardProxyDelete' { - It 'UnlockExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Unlock' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'UnlockViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'UnlockViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unregister-AzRecoveryServicesProtectionContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unregister-AzRecoveryServicesProtectionContainer.Tests.ps1 deleted file mode 100644 index 2fe327622268..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Unregister-AzRecoveryServicesProtectionContainer.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Unregister-AzRecoveryServicesProtectionContainer')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Unregister-AzRecoveryServicesProtectionContainer.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Unregister-AzRecoveryServicesProtectionContainer' { - It 'Unregister' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'UnregisterViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 deleted file mode 100644 index 0f96c094c9ff..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Update-AzRecoveryServicesBackupResourceStorageConfigsNonCrr')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzRecoveryServicesBackupResourceStorageConfigsNonCrr.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Update-AzRecoveryServicesBackupResourceStorageConfigsNonCrr' { - It 'PatchExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Patch' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'PatchViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'PatchViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 deleted file mode 100644 index dfaaf3cf338a..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesBackupResourceVaultConfig.Tests.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Update-AzRecoveryServicesBackupResourceVaultConfig')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzRecoveryServicesBackupResourceVaultConfig.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Update-AzRecoveryServicesBackupResourceVaultConfig' { - It 'UpdateExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'Update' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'UpdateViaIdentityExpanded' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'UpdateViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesProtectionContainer.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesProtectionContainer.Tests.ps1 deleted file mode 100644 index 73a0b6f31a6b..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Update-AzRecoveryServicesProtectionContainer.Tests.ps1 +++ /dev/null @@ -1,25 +0,0 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Update-AzRecoveryServicesProtectionContainer')) -{ - $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' - if (-Not (Test-Path -Path $loadEnvPath)) { - $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' - } - . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzRecoveryServicesProtectionContainer.Recording.json' - $currentPath = $PSScriptRoot - while(-not $mockingPath) { - $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File - $currentPath = Split-Path -Path $currentPath -Parent - } - . ($mockingPath | Select-Object -First 1).FullName -} - -Describe 'Update-AzRecoveryServicesProtectionContainer' { - It 'Refresh' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } - - It 'RefreshViaIdentity' -skip { - { throw [System.NotImplementedException] } | Should -Not -Throw - } -} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/env.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/env.json index b2e184ea1b63..3bf3a5dcb61e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/env.json +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/env.json @@ -1,16 +1,41 @@ { - "TestBackupSchedulePolicy": { - "NewPolicyName": "anssingh-testPolicy", - "VaultName": "anssingh-vault", + "TestBackup": { + "VirtualMachineName": "arohijain-vm", + "SubscriptionId": "38304e13-357e-405e-9e9a-220351dcce8c", + "ResourceGroupName": "arohijain-rg", + "VaultName": "arohijain-backupvault" + }, + "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "TestProtectableItem": { + "ServerName": "sql-migration-v", + "ProtectableItemName": "sqldatabase;mssqlserver;msdb" + }, + "TestRegisterContainer": { + "SQLVMName": "sql-migration-vm2", + "ResourceId": "/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-migration-vm2" + }, + "TestCommon": { + "Location": "centraluseuap", "SubscriptionId": "38304e13-357e-405e-9e9a-220351dcce8c", - "ResourceGroupName": "anssingh-rg" + "VaultId": "/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault", + "ResourceGroupName": "hiagarg", + "VaultName": "hiagaVault" + }, + "TestBackupItem": { + "PolicyId": "/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/HourlyLogBackup", + "ContainerFriendlyName": "sql-pstest-vm1" }, "SubscriptionId": "38304e13-357e-405e-9e9a-220351dcce8c", "TestBackupPolicy": { "NewPolicyName": "arohijain-p-1", - "VaultName": "arohijain-vault", "SubscriptionId": "38304e13-357e-405e-9e9a-220351dcce8c", - "ResourceGroupName": "arohijain-rg" + "ResourceGroupName": "arohijain-rg", + "VaultName": "arohijain-vault" }, - "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47" + "TestBackupSchedulePolicy": { + "NewPolicyName": "anssingh-testPolicy", + "SubscriptionId": "38304e13-357e-405e-9e9a-220351dcce8c", + "ResourceGroupName": "anssingh-rg", + "VaultName": "anssingh-vault" + } } From 59beca2c9d2ebba233e0bdbacd723ea5d828c9f1 Mon Sep 17 00:00:00 2001 From: Himanshu Agarwal Date: Thu, 26 Oct 2023 13:11:22 +0530 Subject: [PATCH 5/6] re-recorded failed tests --- ...zRecoveryServicesBackupItem.Recording.json | 36 +++++------ ...rvicesBackupProtectableItem.Recording.json | 16 ++--- ...veryServicesBackupContainer.Recording.json | 64 +++++++++---------- .../test/env.json | 42 ++++++------ 4 files changed, 79 insertions(+), 79 deletions(-) diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupItem.Recording.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupItem.Recording.json index e38d2c061204..b9e86a7ea82c 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupItem.Recording.json +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupItem.Recording.json @@ -6,8 +6,8 @@ "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "42" ], - "x-ms-client-request-id": [ "bdb893c3-2d88-4c43-b2a0-ca87546da4c2" ], + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "db786224-6f34-4c51-8c15-d0c5a89f3a97" ], "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupProtectionContainer" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupProtectionContainer_List" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -23,22 +23,22 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "d31493c0-c9b4-415c-b5a7-65920ea5ea6a" ], - "x-ms-client-request-id": [ "bdb893c3-2d88-4c43-b2a0-ca87546da4c2" ], + "x-ms-request-id": [ "c7f9d053-77fc-4d83-924f-2708fea9a63a" ], + "x-ms-client-request-id": [ "db786224-6f34-4c51-8c15-d0c5a89f3a97" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "298" ], - "x-ms-correlation-request-id": [ "d31493c0-c9b4-415c-b5a7-65920ea5ea6a" ], - "x-ms-routing-request-id": [ "WESTINDIA:20231025T093137Z:d31493c0-c9b4-415c-b5a7-65920ea5ea6a" ], - "Date": [ "Wed, 25 Oct 2023 09:31:37 GMT" ] + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "299" ], + "x-ms-correlation-request-id": [ "c7f9d053-77fc-4d83-924f-2708fea9a63a" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231026T074301Z:c7f9d053-77fc-4d83-924f-2708fea9a63a" ], + "Date": [ "Thu, 26 Oct 2023 07:43:00 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "5084" ], + "Content-Length": [ "5083" ], "Content-Type": [ "application/json; charset=utf-8" ], "Expires": [ "-1" ] }, - "Content": "{\"value\":[{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-migration-vm1\",\"name\":\"VMAppContainer;Compute;hiagarg;sql-migration-vm1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-migration-vm1\",\"lastUpdatedTime\":\"2023-10-05T13:25:23.9952403Z\",\"extendedInfo\":{\"hostServerName\":\"sql-migration-v\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"inquiryDetails\":[{\"type\":\"SQL\",\"itemCount\":3,\"inquiryValidation\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"additionalDetail\":\"\"}}]}},\"friendlyName\":\"sql-migration-vm1\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-migration-vm2\",\"name\":\"VMAppContainer;Compute;hiagarg;sql-migration-vm2\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-migration-vm2\",\"lastUpdatedTime\":\"2023-10-12T10:19:56.1811718Z\",\"extendedInfo\":{\"hostServerName\":\"sql-migration-v\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"inquiryDetails\":[{\"type\":\"SQL\",\"itemCount\":3,\"inquiryValidation\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"additionalDetail\":\"\"}}]}},\"friendlyName\":\"sql-migration-vm2\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-pstest-vm1\",\"name\":\"VMAppContainer;Compute;hiagarg;sql-pstest-vm1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-pstest-vm1\",\"lastUpdatedTime\":\"2022-06-07T09:36:38.2664137Z\",\"extendedInfo\":{\"hostServerName\":\"sql-pstest-vm1\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"inquiryDetails\":[{\"type\":\"SQL\",\"itemCount\":6,\"inquiryValidation\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"additionalDetail\":\"\"}}]}},\"friendlyName\":\"sql-pstest-vm1\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;saphana-pstest;saphana-ccy-pstest-vm\",\"name\":\"VMAppContainer;Compute;saphana-pstest;saphana-ccy-pstest-vm\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/saphana-pstest/providers/Microsoft.Compute/virtualMachines/saphana-ccy-pstest-vm\",\"lastUpdatedTime\":\"2023-05-29T04:29:27.5165824Z\",\"extendedInfo\":{\"hostServerName\":\"saphana-ccy-pstest-vm\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"UserErrorHANASystemDBNotRunning\",\"message\":\"SYSTEMDB for the SAP HANA instance is not in running state.\",\"recommendations\":[\"Please start the SAP HANA system by running the command \u0027HDB start\u0027 as the sidadm user and retry the operation.\"]},\"inquiryDetails\":[{\"type\":\"SAPHana\",\"itemCount\":0,\"inquiryValidation\":{\"status\":\"Failed\",\"errorDetail\":{\"code\":\"UserErrorHANASystemDBNotRunning\",\"message\":\"SYSTEMDB for the SAP HANA instance is not in running state.\",\"recommendations\":[\"Please start the SAP HANA system by running the command \u0027HDB start\u0027 as the sidadm user and retry the operation.\"]},\"additionalDetail\":\"[HANAPlugin]: SystemDB is not in running state.\",\"protectableItemCount\":{\"SAPHanaSystem\":1,\"SAPHanaDatabase\":0,\"SAPHanaDBInstance\":6}}}]}},\"friendlyName\":\"saphana-ccy-pstest-vm\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}}]}", + "Content": "{\"value\":[{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-migration-vm1\",\"name\":\"VMAppContainer;Compute;hiagarg;sql-migration-vm1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-migration-vm1\",\"lastUpdatedTime\":\"2023-10-05T13:25:23.9952403Z\",\"extendedInfo\":{\"hostServerName\":\"sql-migration-v\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"inquiryDetails\":[{\"type\":\"SQL\",\"itemCount\":3,\"inquiryValidation\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"additionalDetail\":\"\"}}]}},\"friendlyName\":\"sql-migration-vm1\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-migration-vm2\",\"name\":\"VMAppContainer;Compute;hiagarg;sql-migration-vm2\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-migration-vm2\",\"lastUpdatedTime\":\"2023-10-12T10:19:56.1811718Z\",\"extendedInfo\":{\"hostServerName\":\"sql-migration-v\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"inquiryDetails\":[{\"type\":\"SQL\",\"itemCount\":3,\"inquiryValidation\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"additionalDetail\":\"\"}}]}},\"friendlyName\":\"sql-migration-vm2\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;hiagarg;sql-pstest-vm1\",\"name\":\"VMAppContainer;Compute;hiagarg;sql-pstest-vm1\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-pstest-vm1\",\"lastUpdatedTime\":\"2022-06-07T09:36:38.2664137Z\",\"extendedInfo\":{\"hostServerName\":\"sql-pstest-vm1\",\"inquiryInfo\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"inquiryDetails\":[{\"type\":\"SQL\",\"itemCount\":6,\"inquiryValidation\":{\"status\":\"Success\",\"errorDetail\":{\"code\":\"Success\",\"message\":\"\",\"recommendations\":[\"\"]},\"additionalDetail\":\"\"}}]}},\"friendlyName\":\"sql-pstest-vm1\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}},{\"id\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupFabrics/Azure/protectionContainers/VMAppContainer;Compute;saphana-pstest;saphana-ccy-pstest-vm\",\"name\":\"VMAppContainer;Compute;saphana-pstest;saphana-ccy-pstest-vm\",\"type\":\"Microsoft.RecoveryServices/vaults/backupFabrics/protectionContainers\",\"properties\":{\"sourceResourceId\":\"/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/saphana-pstest/providers/Microsoft.Compute/virtualMachines/saphana-ccy-pstest-vm\",\"lastUpdatedTime\":\"2023-05-29T04:29:27.5165824Z\",\"extendedInfo\":{\"hostServerName\":\"saphana-ccy-pstest-vm\",\"inquiryInfo\":{\"status\":\"Failed\",\"errorDetail\":{\"code\":\"UserErrorHANASystemDBNotRunning\",\"message\":\"SYSTEMDB for the SAP HANA instance is not in running state.\",\"recommendations\":[\"Please start the SAP HANA system by running the command \u0027HDB start\u0027 as the sidadm user and retry the operation.\"]},\"inquiryDetails\":[{\"type\":\"SAPHana\",\"itemCount\":0,\"inquiryValidation\":{\"status\":\"Failed\",\"errorDetail\":{\"code\":\"UserErrorHANASystemDBNotRunning\",\"message\":\"SYSTEMDB for the SAP HANA instance is not in running state.\",\"recommendations\":[\"Please start the SAP HANA system by running the command \u0027HDB start\u0027 as the sidadm user and retry the operation.\"]},\"additionalDetail\":\"[HANAPlugin]: SystemDB is not in running state.\",\"protectableItemCount\":{\"SAPHanaSystem\":1,\"SAPHanaDatabase\":0,\"SAPHanaDBInstance\":6}}}]}},\"friendlyName\":\"saphana-ccy-pstest-vm\",\"backupManagementType\":\"AzureWorkload\",\"registrationStatus\":\"Registered\",\"healthStatus\":\"Healthy\",\"containerType\":\"VMAppContainer\",\"protectableObjectType\":\"VMAppContainer\"}}]}", "isContentBase64": false } }, @@ -49,8 +49,8 @@ "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "44" ], - "x-ms-client-request-id": [ "ac71f5da-d551-42b9-86b2-f182b7efd922" ], + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "c54bb0d9-f384-4506-a011-7b8f63b48a6a" ], "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupPolicy" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupPolicy_List" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -66,15 +66,15 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "c0f11f95-3466-4c78-a963-128c82cd21a0" ], - "x-ms-client-request-id": [ "ac71f5da-d551-42b9-86b2-f182b7efd922" ], + "x-ms-request-id": [ "e5952df6-6ef9-4031-8126-9698d8059bd5" ], + "x-ms-client-request-id": [ "c54bb0d9-f384-4506-a011-7b8f63b48a6a" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "286" ], - "x-ms-correlation-request-id": [ "c0f11f95-3466-4c78-a963-128c82cd21a0" ], - "x-ms-routing-request-id": [ "WESTINDIA:20231025T093139Z:c0f11f95-3466-4c78-a963-128c82cd21a0" ], - "Date": [ "Wed, 25 Oct 2023 09:31:38 GMT" ] + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "299" ], + "x-ms-correlation-request-id": [ "e5952df6-6ef9-4031-8126-9698d8059bd5" ], + "x-ms-routing-request-id": [ "WESTINDIA:20231026T074303Z:e5952df6-6ef9-4031-8126-9698d8059bd5" ], + "Date": [ "Thu, 26 Oct 2023 07:43:02 GMT" ] }, "ContentHeaders": { "Content-Length": [ "7810" ], diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectableItem.Recording.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectableItem.Recording.json index 24ae8d5bb370..5c2f9554612c 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectableItem.Recording.json +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Get-AzRecoveryServicesBackupProtectableItem.Recording.json @@ -6,8 +6,8 @@ "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "50" ], - "x-ms-client-request-id": [ "b685fd31-90c3-4624-982a-af38f8eb6af6" ], + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "10567f8a-9f07-4f69-8c6e-9d1fd3e5e098" ], "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupProtectionContainer" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupProtectionContainer_List" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -23,15 +23,15 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "ce29d8ad-3c01-4628-b538-d67b9db4b2b4" ], - "x-ms-client-request-id": [ "b685fd31-90c3-4624-982a-af38f8eb6af6" ], + "x-ms-request-id": [ "ce73df40-c231-4ed3-85d5-d0d79111f29a" ], + "x-ms-client-request-id": [ "10567f8a-9f07-4f69-8c6e-9d1fd3e5e098" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "297" ], - "x-ms-correlation-request-id": [ "ce29d8ad-3c01-4628-b538-d67b9db4b2b4" ], - "x-ms-routing-request-id": [ "WESTINDIA:20231025T093144Z:ce29d8ad-3c01-4628-b538-d67b9db4b2b4" ], - "Date": [ "Wed, 25 Oct 2023 09:31:44 GMT" ] + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "299" ], + "x-ms-correlation-request-id": [ "ce73df40-c231-4ed3-85d5-d0d79111f29a" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20231026T071552Z:ce73df40-c231-4ed3-85d5-d0d79111f29a" ], + "Date": [ "Thu, 26 Oct 2023 07:15:52 GMT" ] }, "ContentHeaders": { "Content-Length": [ "5084" ], diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesBackupContainer.Recording.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesBackupContainer.Recording.json index 1aa4ff97995b..c5078b8d40d5 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesBackupContainer.Recording.json +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Register-AzRecoveryServicesBackupContainer.Recording.json @@ -6,8 +6,8 @@ "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "55" ], - "x-ms-client-request-id": [ "bb71949b-f8a3-4368-8a92-7b6e3b82aa37" ], + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "0c915097-2239-43ba-a469-6d5abcba1e97" ], "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupProtectionContainer" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupProtectionContainer_List" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -23,15 +23,15 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "93ef152c-85e6-467d-8424-23c30886b089" ], - "x-ms-client-request-id": [ "bb71949b-f8a3-4368-8a92-7b6e3b82aa37" ], + "x-ms-request-id": [ "f93b4bdd-9b73-4a7a-a96e-dd2ca77ce1f3" ], + "x-ms-client-request-id": [ "0c915097-2239-43ba-a469-6d5abcba1e97" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "296" ], - "x-ms-correlation-request-id": [ "93ef152c-85e6-467d-8424-23c30886b089" ], - "x-ms-routing-request-id": [ "WESTINDIA:20231025T093149Z:93ef152c-85e6-467d-8424-23c30886b089" ], - "Date": [ "Wed, 25 Oct 2023 09:31:49 GMT" ] + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "299" ], + "x-ms-correlation-request-id": [ "f93b4bdd-9b73-4a7a-a96e-dd2ca77ce1f3" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20231026T071922Z:f93b4bdd-9b73-4a7a-a96e-dd2ca77ce1f3" ], + "Date": [ "Thu, 26 Oct 2023 07:19:21 GMT" ] }, "ContentHeaders": { "Content-Length": [ "5084" ], @@ -49,8 +49,8 @@ "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "71" ], - "x-ms-client-request-id": [ "604cd2ea-42dd-413a-99d5-3b8fcd80b0f4" ], + "x-ms-unique-id": [ "17" ], + "x-ms-client-request-id": [ "27715825-d0ad-426d-a28f-760222810dab" ], "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupProtectionContainer" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupProtectionContainer_List" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -66,15 +66,15 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "20796a73-0e55-4498-b0f2-48b915f96229" ], - "x-ms-client-request-id": [ "604cd2ea-42dd-413a-99d5-3b8fcd80b0f4" ], + "x-ms-request-id": [ "99e7e816-3c33-434f-a862-2fc00b81f051" ], + "x-ms-client-request-id": [ "27715825-d0ad-426d-a28f-760222810dab" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "294" ], - "x-ms-correlation-request-id": [ "20796a73-0e55-4498-b0f2-48b915f96229" ], - "x-ms-routing-request-id": [ "WESTINDIA:20231025T093511Z:20796a73-0e55-4498-b0f2-48b915f96229" ], - "Date": [ "Wed, 25 Oct 2023 09:35:10 GMT" ] + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "297" ], + "x-ms-correlation-request-id": [ "99e7e816-3c33-434f-a862-2fc00b81f051" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20231026T072245Z:99e7e816-3c33-434f-a862-2fc00b81f051" ], + "Date": [ "Thu, 26 Oct 2023 07:22:44 GMT" ] }, "ContentHeaders": { "Content-Length": [ "5084" ], @@ -92,8 +92,8 @@ "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "72" ], - "x-ms-client-request-id": [ "cd3d9056-7dbf-463c-acff-a1a397f76e94" ], + "x-ms-unique-id": [ "18" ], + "x-ms-client-request-id": [ "5a0223fa-05ad-4f25-98c2-de36bb004ee5" ], "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupProtectionContainer" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupProtectionContainer_List" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -109,15 +109,15 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "520b9328-6582-4bc1-8a3f-7c90124581f1" ], - "x-ms-client-request-id": [ "cd3d9056-7dbf-463c-acff-a1a397f76e94" ], + "x-ms-request-id": [ "583ce503-9bea-4c5f-a6a0-189ae8c210d4" ], + "x-ms-client-request-id": [ "5a0223fa-05ad-4f25-98c2-de36bb004ee5" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "293" ], - "x-ms-correlation-request-id": [ "520b9328-6582-4bc1-8a3f-7c90124581f1" ], - "x-ms-routing-request-id": [ "WESTINDIA:20231025T093512Z:520b9328-6582-4bc1-8a3f-7c90124581f1" ], - "Date": [ "Wed, 25 Oct 2023 09:35:12 GMT" ] + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "296" ], + "x-ms-correlation-request-id": [ "583ce503-9bea-4c5f-a6a0-189ae8c210d4" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20231026T072246Z:583ce503-9bea-4c5f-a6a0-189ae8c210d4" ], + "Date": [ "Thu, 26 Oct 2023 07:22:45 GMT" ] }, "ContentHeaders": { "Content-Length": [ "5084" ], @@ -135,8 +135,8 @@ "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "94" ], - "x-ms-client-request-id": [ "dad9da1c-fbfd-4ed4-a207-d61cbccb9ceb" ], + "x-ms-unique-id": [ "39" ], + "x-ms-client-request-id": [ "61467c22-0e76-4391-8b83-599cf061a0d7" ], "CommandName": [ "Az.RecoveryServices.Internal\\Get-AzRecoveryServicesBackupProtectionContainer" ], "FullCommandName": [ "Get-AzRecoveryServicesBackupProtectionContainer_List" ], "ParameterSetName": [ "__AllParameterSets" ], @@ -152,15 +152,15 @@ "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], "X-Content-Type-Options": [ "nosniff" ], - "x-ms-request-id": [ "7dc6bf3a-f284-4071-91b0-58fe55f18fe7" ], - "x-ms-client-request-id": [ "dad9da1c-fbfd-4ed4-a207-d61cbccb9ceb" ], + "x-ms-request-id": [ "9871e62b-0aa6-4616-a84c-d632cd1ea521" ], + "x-ms-client-request-id": [ "61467c22-0e76-4391-8b83-599cf061a0d7" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "Kestrel" ], "X-Powered-By": [ "ASP.NET" ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ "291" ], - "x-ms-correlation-request-id": [ "7dc6bf3a-f284-4071-91b0-58fe55f18fe7" ], - "x-ms-routing-request-id": [ "WESTINDIA:20231025T094138Z:7dc6bf3a-f284-4071-91b0-58fe55f18fe7" ], - "Date": [ "Wed, 25 Oct 2023 09:41:37 GMT" ] + "x-ms-ratelimit-remaining-subscription-resource-requests": [ "294" ], + "x-ms-correlation-request-id": [ "9871e62b-0aa6-4616-a84c-d632cd1ea521" ], + "x-ms-routing-request-id": [ "JIOINDIAWEST:20231026T072843Z:9871e62b-0aa6-4616-a84c-d632cd1ea521" ], + "Date": [ "Thu, 26 Oct 2023 07:28:43 GMT" ] }, "ContentHeaders": { "Content-Length": [ "5083" ], diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/env.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/env.json index 3bf3a5dcb61e..70df7761d518 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/env.json +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/env.json @@ -1,41 +1,41 @@ { + "TestBackupItem": { + "PolicyId": "/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/HourlyLogBackup", + "ContainerFriendlyName": "sql-pstest-vm1" + }, "TestBackup": { "VirtualMachineName": "arohijain-vm", "SubscriptionId": "38304e13-357e-405e-9e9a-220351dcce8c", "ResourceGroupName": "arohijain-rg", "VaultName": "arohijain-backupvault" }, - "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "TestProtectableItem": { - "ServerName": "sql-migration-v", - "ProtectableItemName": "sqldatabase;mssqlserver;msdb" - }, - "TestRegisterContainer": { - "SQLVMName": "sql-migration-vm2", - "ResourceId": "/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-migration-vm2" - }, - "TestCommon": { - "Location": "centraluseuap", - "SubscriptionId": "38304e13-357e-405e-9e9a-220351dcce8c", - "VaultId": "/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault", - "ResourceGroupName": "hiagarg", - "VaultName": "hiagaVault" - }, - "TestBackupItem": { - "PolicyId": "/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault/backupPolicies/HourlyLogBackup", - "ContainerFriendlyName": "sql-pstest-vm1" - }, - "SubscriptionId": "38304e13-357e-405e-9e9a-220351dcce8c", "TestBackupPolicy": { "NewPolicyName": "arohijain-p-1", "SubscriptionId": "38304e13-357e-405e-9e9a-220351dcce8c", "ResourceGroupName": "arohijain-rg", "VaultName": "arohijain-vault" }, + "SubscriptionId": "38304e13-357e-405e-9e9a-220351dcce8c", + "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "TestCommon": { + "SubscriptionId": "38304e13-357e-405e-9e9a-220351dcce8c", + "ResourceGroupName": "hiagarg", + "VaultName": "hiagaVault", + "VaultId": "/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.RecoveryServices/vaults/hiagaVault", + "Location": "centraluseuap" + }, "TestBackupSchedulePolicy": { "NewPolicyName": "anssingh-testPolicy", "SubscriptionId": "38304e13-357e-405e-9e9a-220351dcce8c", "ResourceGroupName": "anssingh-rg", "VaultName": "anssingh-vault" + }, + "TestProtectableItem": { + "ProtectableItemName": "sqldatabase;mssqlserver;msdb", + "ServerName": "sql-migration-v" + }, + "TestRegisterContainer": { + "ResourceId": "/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/hiagarg/providers/Microsoft.Compute/virtualMachines/sql-migration-vm2", + "SQLVMName": "sql-migration-vm2" } } From 5f9d5b0649f05c1b186e02c2d9c23116097e75c7 Mon Sep 17 00:00:00 2001 From: Himanshu Agarwal Date: Mon, 30 Oct 2023 12:34:20 +0530 Subject: [PATCH 6/6] updated command names for backup protection policy --- .../Az.RecoveryServices.psd1 | 2 +- .../README.md | 5 ++ .../vaults-backupPolicies.json | 52 +++++++++++++ ...ecoveryServicesBackupProtectionPolicy.ps1} | 2 +- .../custom/manifests/AzureFiles.json | 2 + .../docs/Az.RecoveryServices.md | 4 +- ...rvicesBackupRetentionPolicyClientObject.md | 12 --- ...ervicesBackupSchedulePolicyClientObject.md | 12 --- .../Get-AzRecoveryServicesBackupContainer.md | 2 - .../docs/Get-AzRecoveryServicesBackupItem.md | 28 ------- ...AzRecoveryServicesBackupProtectableItem.md | 19 ----- ...zRecoveryServicesBackupProtectionPolicy.md | 2 - .../Get-AzRecoveryServicesPolicyTemplate.md | 4 +- ...RecoveryServicesBackupProtectionPolicy.md} | 26 ++----- ...ister-AzRecoveryServicesBackupContainer.md | 19 ----- ...RecoveryServicesBackupProtectionPolicy.md} | 14 ++-- .../Get-AzRecoveryServicesPolicyTemplate.md | 2 +- ...RecoveryServicesBackupProtectionPolicy.md} | 8 +- .../Remove-AzRecoveryServicesBackupPolicy.md | 6 -- ...zRecoveryServicesBackupProtectionPolicy.md | 6 ++ ...RetentionPolicyClientObject.Recording.json | 24 +++--- ...ackupRetentionPolicyClientObject.Tests.ps1 | 24 +++--- ...pSchedulePolicyClientObject.Recording.json | 28 +++---- ...BackupSchedulePolicyClientObject.Tests.ps1 | 28 +++---- ...yServicesBackupProtectionPolicy.Tests.ps1} | 6 +- ...yServicesBackupProtectionPolicy.Tests.ps1} | 6 +- .../readme.azure.noprofile.md | 78 ------------------- 27 files changed, 146 insertions(+), 275 deletions(-) create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/UX/Microsoft.RecoveryServices/vaults-backupPolicies.json rename src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/{New-AzRecoveryServicesBackupPolicy.ps1 => New-AzRecoveryServicesBackupProtectionPolicy.ps1} (99%) rename src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/{New-AzRecoveryServicesBackupPolicy.md => New-AzRecoveryServicesBackupProtectionPolicy.md} (80%) rename src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/{Remove-AzRecoveryServicesBackupPolicy.md => Remove-AzRecoveryServicesBackupProtectionPolicy.md} (88%) rename src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/{New-AzRecoveryServicesBackupPolicy.md => New-AzRecoveryServicesBackupProtectionPolicy.md} (68%) delete mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Remove-AzRecoveryServicesBackupPolicy.md create mode 100644 src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Remove-AzRecoveryServicesBackupProtectionPolicy.md rename src/RecoveryServices/RecoveryServices.Backup.Autorest/test/{New-AzRecoveryServicesBackupPolicy.Tests.ps1 => New-AzRecoveryServicesBackupProtectionPolicy.Tests.ps1} (83%) rename src/RecoveryServices/RecoveryServices.Backup.Autorest/test/{Remove-AzRecoveryServicesBackupPolicy.Tests.ps1 => Remove-AzRecoveryServicesBackupProtectionPolicy.Tests.ps1} (82%) delete mode 100644 src/RecoveryServices/readme.azure.noprofile.md diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/Az.RecoveryServices.psd1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/Az.RecoveryServices.psd1 index d2a7f94a1449..81d767dbe4c1 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/Az.RecoveryServices.psd1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/Az.RecoveryServices.psd1 @@ -11,7 +11,7 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.RecoveryServices.private.dll' FormatsToProcess = './Az.RecoveryServices.format.ps1xml' - FunctionsToExport = 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject', 'Edit-AzRecoveryServicesBackupSchedulePolicyClientObject', 'Get-AzRecoveryServicesBackupContainer', 'Get-AzRecoveryServicesBackupItem', 'Get-AzRecoveryServicesBackupProtectableItem', 'Get-AzRecoveryServicesBackupProtectionPolicy', 'Get-AzRecoveryServicesPolicyTemplate', 'New-AzRecoveryServicesBackupPolicy', 'Register-AzRecoveryServicesBackupContainer', 'Remove-AzRecoveryServicesBackupPolicy', '*' + FunctionsToExport = 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject', 'Edit-AzRecoveryServicesBackupSchedulePolicyClientObject', 'Get-AzRecoveryServicesBackupContainer', 'Get-AzRecoveryServicesBackupItem', 'Get-AzRecoveryServicesBackupProtectableItem', 'Get-AzRecoveryServicesBackupProtectionPolicy', 'Get-AzRecoveryServicesPolicyTemplate', 'New-AzRecoveryServicesBackupProtectionPolicy', 'Register-AzRecoveryServicesBackupContainer', 'Remove-AzRecoveryServicesBackupProtectionPolicy', '*' AliasesToExport = '*' PrivateData = @{ PSData = @{ diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/README.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/README.md index d1842e8fa9cc..b04c484f74a7 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/README.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/README.md @@ -96,6 +96,11 @@ directive: verb: Get subject: BackupPolicy hide: true + - where: + verb: Remove + subject: BackupPolicy + set: + subject: BackupProtectionPolicy - where: subject: BackupProtectableItem hide: true diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/UX/Microsoft.RecoveryServices/vaults-backupPolicies.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/UX/Microsoft.RecoveryServices/vaults-backupPolicies.json new file mode 100644 index 000000000000..6da9178c212c --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/UX/Microsoft.RecoveryServices/vaults-backupPolicies.json @@ -0,0 +1,52 @@ +{ + "resourceType": "vaults/backupPolicies", + "apiVersion": "2023-02-01", + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.recoveryservices" + }, + "commands": [ + { + "name": "Remove-AzRecoveryServicesBackupProtectionPolicy", + "description": "Deletes specified backup policy from your Recovery Services Vault.\nThis is an asynchronous operation.\nStatus of the\\r\\noperation can be fetched using GetProtectionPolicyOperationResult API.", + "path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}", + "help": { + "learnMore": { + "url": "https://learn.microsoft.com/powershell/module/az.recoveryservices/remove-azrecoveryservicesbackupprotectionpolicy" + }, + "parameterSets": [ + { + "parameters": [ + "-PolicyName ", + "-ResourceGroupName ", + "[-SubscriptionId ]", + "-VaultName " + ] + } + ] + }, + "examples": [ + { + "description": "Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status of the\\r\\noperation can be fetched using GetProtectionPolicyOperationResult API.", + "parameters": [ + { + "name": "-PolicyName", + "value": "[Path.policyName]" + }, + { + "name": "-ResourceGroupName", + "value": "[Path.resourceGroupName]" + }, + { + "name": "-SubscriptionId", + "value": "[Path.subscriptionId]" + }, + { + "name": "-VaultName", + "value": "[Path.vaultName]" + } + ] + } + ] + } + ] +} diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/New-AzRecoveryServicesBackupPolicy.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/New-AzRecoveryServicesBackupProtectionPolicy.ps1 similarity index 99% rename from src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/New-AzRecoveryServicesBackupPolicy.ps1 rename to src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/New-AzRecoveryServicesBackupProtectionPolicy.ps1 index d9def124ed58..7d6988c48dcd 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/New-AzRecoveryServicesBackupPolicy.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/Cmdlets/Policy/New-AzRecoveryServicesBackupProtectionPolicy.ps1 @@ -1,4 +1,4 @@ -function New-AzRecoveryServicesBackupPolicy +function New-AzRecoveryServicesBackupProtectionPolicy { [OutputType('Microsoft.Azure.PowerShell.Cmdlets.RecoveryServices.Models.Api20230201.IProtectionPolicyResource')] [CmdletBinding(PositionalBinding=$false, SupportsShouldProcess)] diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/AzureFiles.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/AzureFiles.json index 9d429ba375ed..40f44f60c0b9 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/AzureFiles.json +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/custom/manifests/AzureFiles.json @@ -13,6 +13,8 @@ "containerInquiryType": null, "protectedItemType": "AzureVMWorkloadSapHanaDatabaseProtectedItem", "policySettings": { + "defaultPolicy": { + } } } \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Az.RecoveryServices.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Az.RecoveryServices.md index ae78563e88db..6c9852db7719 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Az.RecoveryServices.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Az.RecoveryServices.md @@ -34,13 +34,13 @@ Gets backup protection policies for a recovery services vault. ### [Get-AzRecoveryServicesPolicyTemplate](Get-AzRecoveryServicesPolicyTemplate.md) Gets default policy template for a selected datasource type. -### [New-AzRecoveryServicesBackupPolicy](New-AzRecoveryServicesBackupPolicy.md) +### [New-AzRecoveryServicesBackupProtectionPolicy](New-AzRecoveryServicesBackupProtectionPolicy.md) Creates a new backup policy in a given recovery services vault ### [Register-AzRecoveryServicesBackupContainer](Register-AzRecoveryServicesBackupContainer.md) The Register-AzRecoveryServicesBackupContainer cmdlet registers an Azure VM for AzureWorkloads with specific DatasourceType. -### [Remove-AzRecoveryServicesBackupPolicy](Remove-AzRecoveryServicesBackupPolicy.md) +### [Remove-AzRecoveryServicesBackupProtectionPolicy](Remove-AzRecoveryServicesBackupProtectionPolicy.md) Deletes specified backup policy from your Recovery Services Vault. This is an asynchronous operation. Status of the\r\noperation can be fetched using GetProtectionPolicyOperationResult API. diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.md index 34a712fb92e9..ad1f93114327 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.md @@ -1208,17 +1208,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`POLICY `: Specifies the policy to be edited. - - `BackupManagementType `: This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - - `[ProtectedItemsCount ]`: Number of items associated with this policy. - - `[ResourceGuardOperationRequest ]`: ResourceGuard Operation Requests - ## RELATED LINKS diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.md index 4528d5e63090..d73e33228e58 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.md @@ -438,17 +438,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`POLICY `: Specifies the policy to be edited. - - `BackupManagementType `: This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - - `[ProtectedItemsCount ]`: Number of items associated with this policy. - - `[ResourceGuardOperationRequest ]`: ResourceGuard Operation Requests - ## RELATED LINKS diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupContainer.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupContainer.md index 2a3d8104ebb0..44f4ee2b26ac 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupContainer.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupContainer.md @@ -181,7 +181,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - ## RELATED LINKS diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupItem.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupItem.md index 11f3ef18f037..f97ce62ab4b5 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupItem.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupItem.md @@ -323,33 +323,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`CONTAINER `: Specifies a container object from which this cmdlet gets backup items. To obtain an ProtectionContainerResource, use the Get-AzRecoveryServicesBackupContainer cmdlet. - - `[ETag ]`: Optional ETag. - - `[Location ]`: Resource location. - - `[Tag ]`: Resource tags. - - `[(Any) ]`: This indicates any property can be added to this object. - - `[BackupManagementType ]`: Type of backup management for the container. - - `[ContainerType ]`: Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload Backup is VMAppContainer - - `[FriendlyName ]`: Friendly name of the container. - - `[HealthStatus ]`: Status of health of the container. - - `[ProtectableObjectType ]`: Type of the protectable object associated with this container - - `[RegistrationStatus ]`: Status of registration of the container with the Recovery Services Vault. - -`POLICY `: Protection policy object - - `[ETag ]`: Optional ETag. - - `[Location ]`: Resource location. - - `[Tag ]`: Resource tags. - - `[(Any) ]`: This indicates any property can be added to this object. - - `[BackupManagementType ]`: This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - - `[ProtectedItemsCount ]`: Number of items associated with this policy. - - `[ResourceGuardOperationRequest ]`: ResourceGuard Operation Requests - ## RELATED LINKS diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupProtectableItem.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupProtectableItem.md index 9f7484e747cf..e32bddb1f5f4 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupProtectableItem.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupProtectableItem.md @@ -243,24 +243,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`CONTAINER `: Specifies a container object for which this cmdlet gets protectable items. To obtain an ProtectionContainerResource, use the Get-AzRecoveryServicesBackupContainer cmdlet - - `[ETag ]`: Optional ETag. - - `[Location ]`: Resource location. - - `[Tag ]`: Resource tags. - - `[(Any) ]`: This indicates any property can be added to this object. - - `[BackupManagementType ]`: Type of backup management for the container. - - `[ContainerType ]`: Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload Backup is VMAppContainer - - `[FriendlyName ]`: Friendly name of the container. - - `[HealthStatus ]`: Status of health of the container. - - `[ProtectableObjectType ]`: Type of the protectable object associated with this container - - `[RegistrationStatus ]`: Status of registration of the container with the Recovery Services Vault. - ## RELATED LINKS diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupProtectionPolicy.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupProtectionPolicy.md index dcf9efc65968..1f7c9d166f57 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupProtectionPolicy.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesBackupProtectionPolicy.md @@ -219,7 +219,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - ## RELATED LINKS diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesPolicyTemplate.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesPolicyTemplate.md index a633ff144a16..ec2f6ed3e614 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesPolicyTemplate.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Get-AzRecoveryServicesPolicyTemplate.md @@ -28,7 +28,7 @@ $vmPol= Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM This command is used to get default values for a VM policy. This object can further be used for editing any attributes in the policy client object either manually or using the Edit-AzRecoveryServicesBackupSchedulePolicyClientObject, Edit-AzRecoveryServicesBackupRetentionPolicyClientObject cmdlets. -After changing the values as per need, $vmPol object can further be used to create policy using New-AzRecoveryServicesBackupPolicy command. +After changing the values as per need, $vmPol object can further be used to create policy using New-AzRecoveryServicesBackupProtectionPolicy command. ### Example 2: Get the default policy client object for creating MSSQL policy ```powershell @@ -72,7 +72,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - ## RELATED LINKS diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/New-AzRecoveryServicesBackupPolicy.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/New-AzRecoveryServicesBackupProtectionPolicy.md similarity index 80% rename from src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/New-AzRecoveryServicesBackupPolicy.md rename to src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/New-AzRecoveryServicesBackupProtectionPolicy.md index e1495ad50db6..4dcbf70d08af 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/New-AzRecoveryServicesBackupPolicy.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/New-AzRecoveryServicesBackupProtectionPolicy.md @@ -1,11 +1,11 @@ --- external help file: Module Name: Az.RecoveryServices -online version: https://learn.microsoft.com/powershell/module/az.recoveryservices/new-azrecoveryservicesbackuppolicy +online version: https://learn.microsoft.com/powershell/module/az.recoveryservices/new-azrecoveryservicesbackupprotectionpolicy schema: 2.0.0 --- -# New-AzRecoveryServicesBackupPolicy +# New-AzRecoveryServicesBackupProtectionPolicy ## SYNOPSIS Creates a new backup policy in a given recovery services vault @@ -13,7 +13,7 @@ Creates a new backup policy in a given recovery services vault ## SYNTAX ``` -New-AzRecoveryServicesBackupPolicy -Policy -PolicyName +New-AzRecoveryServicesBackupProtectionPolicy -Policy -PolicyName -ResourceGroupName -VaultName [-DefaultProfile ] [-MoveToArchiveTier ] [-SnapshotRetentionDurationInDays ] [-SubscriptionId ] [-TierAfterDuration ] [-TierAfterDurationType ] [-TieringMode ] [-Confirm] [-WhatIf] [] @@ -27,7 +27,7 @@ Creates a new backup policy in a given recovery services vault ### Example 1: Enable TierRecommended for AzureVM ```powershell $pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM -New-AzRecoveryServicesBackupPolicy -ResourceGroupName arohijain-rg -VaultName arohijain-vault -Policy $pol1 -PolicyName tiertest4 -MoveToArchiveTier $true -TieringMode TierRecommended +New-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName arohijain-rg -VaultName arohijain-vault -Policy $pol1 -PolicyName tiertest4 -MoveToArchiveTier $true -TieringMode TierRecommended $pol1.TieringPolicy.AdditionalProperties.ArchivedRP | fl ``` @@ -45,7 +45,7 @@ The third command is to display modified tiering policy. ### Example 2: Enable TierAfter for AzureVM ```powershell $pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM -New-AzRecoveryServicesBackupPolicy -ResourceGroupName arohijain-rg -VaultName arohijain-vault -Policy $pol1 -PolicyName tiertest5 -MoveToArchiveTier $true -TierAfterDuration 54 -TieringMode TierAfter -TierAfterDurationType Months +New-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName arohijain-rg -VaultName arohijain-vault -Policy $pol1 -PolicyName tiertest5 -MoveToArchiveTier $true -TierAfterDuration 54 -TieringMode TierAfter -TierAfterDurationType Months $pol1.TieringPolicy.AdditionalProperties.ArchivedRP | fl ``` @@ -63,7 +63,7 @@ The third command is to display modified tiering policy. ### Example 3: Enable TierAfter for SAPHANA ```powershell $pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA -New-AzRecoveryServicesBackupPolicy -ResourceGroupName arohijain-rg -VaultName arohijain-vault -Policy $pol1 -PolicyName tiertest6 -MoveToArchiveTier $true -TierAfterDuration 64 -TieringMode TierAfter -TierAfterDurationType Days +New-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName arohijain-rg -VaultName arohijain-vault -Policy $pol1 -PolicyName tiertest6 -MoveToArchiveTier $true -TierAfterDuration 64 -TieringMode TierAfter -TierAfterDurationType Days $pol1.SubProtectionPolicy[0].TieringPolicy.AdditionalProperties.ArchivedRP | fl ``` @@ -80,7 +80,7 @@ The third command is to display modified tiering policy. ### Example 4: Disable Tiering Policy ```powershell -New-AzRecoveryServicesBackupPolicy -ResourceGroupName arohijain-rg -VaultName arohijain-vault -Policy $pol1 -PolicyName tiertest5 -MoveToArchiveTier $false +New-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName arohijain-rg -VaultName arohijain-vault -Policy $pol1 -PolicyName tiertest5 -MoveToArchiveTier $false $pol1.TieringPolicy.AdditionalProperties.ArchivedRP | fl ``` @@ -304,17 +304,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`POLICY `: Workload specific Backup policy object. - - `BackupManagementType `: This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types. - - `[ProtectedItemsCount ]`: Number of items associated with this policy. - - `[ResourceGuardOperationRequest ]`: ResourceGuard Operation Requests - ## RELATED LINKS diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Register-AzRecoveryServicesBackupContainer.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Register-AzRecoveryServicesBackupContainer.md index 15ff34a2fd20..8e12e9cefd99 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Register-AzRecoveryServicesBackupContainer.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Register-AzRecoveryServicesBackupContainer.md @@ -196,24 +196,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - -COMPLEX PARAMETER PROPERTIES - -To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. - - -`CONTAINER `: Specifies a container object for which this cmdlet triggers the re-registration. To obtain an ProtectionContainerResource, use the Get-AzRecoveryServicesBackupContainer cmdlet - - `[ETag ]`: Optional ETag. - - `[Location ]`: Resource location. - - `[Tag ]`: Resource tags. - - `[(Any) ]`: This indicates any property can be added to this object. - - `[BackupManagementType ]`: Type of backup management for the container. - - `[ContainerType ]`: Type of the container. The value of this property for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is AzureSqlContainer. 5. Storage containers is StorageContainer. 6. Azure workload Backup is VMAppContainer - - `[FriendlyName ]`: Friendly name of the container. - - `[HealthStatus ]`: Status of health of the container. - - `[ProtectableObjectType ]`: Type of the protectable object associated with this container - - `[RegistrationStatus ]`: Status of registration of the container with the Recovery Services Vault. - ## RELATED LINKS diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Remove-AzRecoveryServicesBackupPolicy.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Remove-AzRecoveryServicesBackupProtectionPolicy.md similarity index 88% rename from src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Remove-AzRecoveryServicesBackupPolicy.md rename to src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Remove-AzRecoveryServicesBackupProtectionPolicy.md index 4d8124d36311..aebcbdc33bcb 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Remove-AzRecoveryServicesBackupPolicy.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/docs/Remove-AzRecoveryServicesBackupProtectionPolicy.md @@ -1,11 +1,11 @@ --- external help file: Module Name: Az.RecoveryServices -online version: https://learn.microsoft.com/powershell/module/az.recoveryservices/remove-azrecoveryservicesbackuppolicy +online version: https://learn.microsoft.com/powershell/module/az.recoveryservices/remove-azrecoveryservicesbackupprotectionpolicy schema: 2.0.0 --- -# Remove-AzRecoveryServicesBackupPolicy +# Remove-AzRecoveryServicesBackupProtectionPolicy ## SYNOPSIS Deletes specified backup policy from your Recovery Services Vault. @@ -15,9 +15,9 @@ Status of the\r\noperation can be fetched using GetProtectionPolicyOperationResu ## SYNTAX ``` -Remove-AzRecoveryServicesBackupPolicy -PolicyName -ResourceGroupName -VaultName - [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] - [] +Remove-AzRecoveryServicesBackupProtectionPolicy -PolicyName -ResourceGroupName + -VaultName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-Confirm] [-WhatIf] [] ``` ## DESCRIPTION @@ -29,7 +29,7 @@ Status of the\r\noperation can be fetched using GetProtectionPolicyOperationResu ### Example 1: Remove a policy with its name ```powershell - Remove-AzRecoveryServicesBackupPolicy -PolicyName "policyName" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" + Remove-AzRecoveryServicesBackupProtectionPolicy -PolicyName "policyName" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" ``` This command deletes the specified backup policy. @@ -199,7 +199,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES -ALIASES - ## RELATED LINKS diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesPolicyTemplate.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesPolicyTemplate.md index 0ad34004b314..f7c3693ee654 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesPolicyTemplate.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Get-AzRecoveryServicesPolicyTemplate.md @@ -3,7 +3,7 @@ $vmPol= Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM ``` -This command is used to get default values for a VM policy. This object can further be used for editing any attributes in the policy client object either manually or using the Edit-AzRecoveryServicesBackupSchedulePolicyClientObject, Edit-AzRecoveryServicesBackupRetentionPolicyClientObject cmdlets. After changing the values as per need, $vmPol object can further be used to create policy using New-AzRecoveryServicesBackupPolicy command. +This command is used to get default values for a VM policy. This object can further be used for editing any attributes in the policy client object either manually or using the Edit-AzRecoveryServicesBackupSchedulePolicyClientObject, Edit-AzRecoveryServicesBackupRetentionPolicyClientObject cmdlets. After changing the values as per need, $vmPol object can further be used to create policy using New-AzRecoveryServicesBackupProtectionPolicy command. ### Example 2: Get the default policy client object for creating MSSQL policy ```powershell diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/New-AzRecoveryServicesBackupPolicy.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/New-AzRecoveryServicesBackupProtectionPolicy.md similarity index 68% rename from src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/New-AzRecoveryServicesBackupPolicy.md rename to src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/New-AzRecoveryServicesBackupProtectionPolicy.md index 471f7a767254..49b2db1b453b 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/New-AzRecoveryServicesBackupPolicy.md +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/New-AzRecoveryServicesBackupProtectionPolicy.md @@ -1,7 +1,7 @@ ### Example 1: Enable TierRecommended for AzureVM ```powershell $pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM -New-AzRecoveryServicesBackupPolicy -ResourceGroupName arohijain-rg -VaultName arohijain-vault -Policy $pol1 -PolicyName tiertest4 -MoveToArchiveTier $true -TieringMode TierRecommended +New-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName arohijain-rg -VaultName arohijain-vault -Policy $pol1 -PolicyName tiertest4 -MoveToArchiveTier $true -TieringMode TierRecommended $pol1.TieringPolicy.AdditionalProperties.ArchivedRP | fl ``` @@ -17,7 +17,7 @@ The first command gets the default policy template for a given DatasourceType. T ### Example 2: Enable TierAfter for AzureVM ```powershell $pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM -New-AzRecoveryServicesBackupPolicy -ResourceGroupName arohijain-rg -VaultName arohijain-vault -Policy $pol1 -PolicyName tiertest5 -MoveToArchiveTier $true -TierAfterDuration 54 -TieringMode TierAfter -TierAfterDurationType Months +New-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName arohijain-rg -VaultName arohijain-vault -Policy $pol1 -PolicyName tiertest5 -MoveToArchiveTier $true -TierAfterDuration 54 -TieringMode TierAfter -TierAfterDurationType Months $pol1.TieringPolicy.AdditionalProperties.ArchivedRP | fl ``` @@ -33,7 +33,7 @@ The first command gets the default policy template for a given DatasourceType. T ### Example 3: Enable TierAfter for SAPHANA ```powershell $pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA -New-AzRecoveryServicesBackupPolicy -ResourceGroupName arohijain-rg -VaultName arohijain-vault -Policy $pol1 -PolicyName tiertest6 -MoveToArchiveTier $true -TierAfterDuration 64 -TieringMode TierAfter -TierAfterDurationType Days +New-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName arohijain-rg -VaultName arohijain-vault -Policy $pol1 -PolicyName tiertest6 -MoveToArchiveTier $true -TierAfterDuration 64 -TieringMode TierAfter -TierAfterDurationType Days $pol1.SubProtectionPolicy[0].TieringPolicy.AdditionalProperties.ArchivedRP | fl ``` @@ -48,7 +48,7 @@ The first command gets the default policy template for a given DatasourceType. T ### Example 4: Disable Tiering Policy ```powershell -New-AzRecoveryServicesBackupPolicy -ResourceGroupName arohijain-rg -VaultName arohijain-vault -Policy $pol1 -PolicyName tiertest5 -MoveToArchiveTier $false +New-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName arohijain-rg -VaultName arohijain-vault -Policy $pol1 -PolicyName tiertest5 -MoveToArchiveTier $false $pol1.TieringPolicy.AdditionalProperties.ArchivedRP | fl ``` diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Remove-AzRecoveryServicesBackupPolicy.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Remove-AzRecoveryServicesBackupPolicy.md deleted file mode 100644 index 102d7476fd0f..000000000000 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Remove-AzRecoveryServicesBackupPolicy.md +++ /dev/null @@ -1,6 +0,0 @@ -### Example 1: Remove a policy with its name -```powershell - Remove-AzRecoveryServicesBackupPolicy -PolicyName "policyName" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -``` - -This command deletes the specified backup policy. diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Remove-AzRecoveryServicesBackupProtectionPolicy.md b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Remove-AzRecoveryServicesBackupProtectionPolicy.md new file mode 100644 index 000000000000..d8b3091f0573 --- /dev/null +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/examples/Remove-AzRecoveryServicesBackupProtectionPolicy.md @@ -0,0 +1,6 @@ +### Example 1: Remove a policy with its name +```powershell + Remove-AzRecoveryServicesBackupProtectionPolicy -PolicyName "policyName" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" +``` + +This command deletes the specified backup policy. diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Recording.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Recording.json index 1a98f123ec6f..f692649dfe15 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Recording.json +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Recording.json @@ -89,8 +89,8 @@ "Headers": { "x-ms-unique-id": [ "3" ], "x-ms-client-request-id": [ "ab4d513c-af32-4e2a-9d88-e8d9ebd6829e" ], - "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], - "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], + "CommandName": [ "Remove-AzRecoveryServicesBackupProtectionPolicy" ], + "FullCommandName": [ "Remove-AzRecoveryServicesBackupProtectionPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] @@ -212,8 +212,8 @@ "Headers": { "x-ms-unique-id": [ "6" ], "x-ms-client-request-id": [ "e5e4ea25-f9b9-4b35-958c-05279ce97fa7" ], - "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], - "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], + "CommandName": [ "Remove-AzRecoveryServicesBackupProtectionPolicy" ], + "FullCommandName": [ "Remove-AzRecoveryServicesBackupProtectionPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] @@ -335,8 +335,8 @@ "Headers": { "x-ms-unique-id": [ "9" ], "x-ms-client-request-id": [ "b29df603-0e05-454b-b6f1-e13191c9a301" ], - "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], - "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], + "CommandName": [ "Remove-AzRecoveryServicesBackupProtectionPolicy" ], + "FullCommandName": [ "Remove-AzRecoveryServicesBackupProtectionPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] @@ -458,8 +458,8 @@ "Headers": { "x-ms-unique-id": [ "12" ], "x-ms-client-request-id": [ "591acee0-4c27-4619-9916-ac31228c6d47" ], - "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], - "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], + "CommandName": [ "Remove-AzRecoveryServicesBackupProtectionPolicy" ], + "FullCommandName": [ "Remove-AzRecoveryServicesBackupProtectionPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] @@ -581,8 +581,8 @@ "Headers": { "x-ms-unique-id": [ "15" ], "x-ms-client-request-id": [ "f54d24c1-882e-4270-8258-ec0066801349" ], - "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], - "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], + "CommandName": [ "Remove-AzRecoveryServicesBackupProtectionPolicy" ], + "FullCommandName": [ "Remove-AzRecoveryServicesBackupProtectionPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] @@ -704,8 +704,8 @@ "Headers": { "x-ms-unique-id": [ "18" ], "x-ms-client-request-id": [ "f8e0ba07-1aca-4741-9cf3-434763720c9e" ], - "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], - "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], + "CommandName": [ "Remove-AzRecoveryServicesBackupProtectionPolicy" ], + "FullCommandName": [ "Remove-AzRecoveryServicesBackupProtectionPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Tests.ps1 index 503a3ecccaa5..1f4893ff3caa 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Tests.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupRetentionPolicyClientObject.Tests.ps1 @@ -31,13 +31,13 @@ Describe 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject' { $pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableDailyRetention 1 -DailyRetentionDurationInDays 56 -EnableWeeklyRetention 1 -WeeklyRetentionDurationInWeeks 34 -WeeklyRetentionDaysOfTheWeek Sunday -EnableMonthlyRetention 1 -MonthlyRetentionScheduleType Daily -MonthlyRetentionDurationInMonths 54 -MonthlyRetentionDaysOfTheMonth 1,2,3 -EnableYearlyRetention 1 -YearlyRetentionScheduleType Daily -YearlyRetentionDurationInYears 47 -YearlyRetentionMonthsOfTheYear March, April -YearlyRetentionDaysOfTheMonth 2,4,5 - New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $pol1 -PolicyName $newPolicyName + New-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $pol1 -PolicyName $newPolicyName # this Policy should be there - then delete it and then this policy shouldn't be there $policy=Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Name $newPolicyName $policy.Name | Should be $newPolicyName - Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName + Remove-AzRecoveryServicesBackupProtectionPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName #$pol = Get-AzRecoveryServicesBackupProtectionPolicy -VaultName $vaultName -ResourceGroupName $rgName -Name $newPolicyName #$pol | Should -Be "NotFound" } @@ -64,7 +64,7 @@ Describe 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject' { Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableYearlyRetention $true -YearlyRetentionScheduleType Weekly -YearlyRetentionDurationInYears 67 -YearlyRetentionMonthsOfTheYear May, June -YearlyRetentionDaysOfTheWeek Monday, Tuesday -YearlyRetentionWeeksOfTheMonth First, Third # create new policy with modified retention policy - New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $pol1 -PolicyName $newPolicyName + New-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $pol1 -PolicyName $newPolicyName # this Policy should be there - then delete it and then this policy shouldn't be there $policy=Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Name $newPolicyName @@ -85,7 +85,7 @@ Describe 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject' { $policy.Property.RetentionPolicy.YearlySchedule.MonthsOfYear | Should be "May","June" # remove policy - Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName + Remove-AzRecoveryServicesBackupProtectionPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName #$pol = Get-AzRecoveryServicesBackupProtectionPolicy -VaultName $vaultName -ResourceGroupName $rgName -Name $newPolicyName #$pol | Should -Be "NotFound" } @@ -118,7 +118,7 @@ Describe 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject' { Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType AzureVM -EnableYearlyRetention $true -YearlyRetentionScheduleType Daily -YearlyRetentionMonthsOfTheYear May,April -YearlyRetentionDaysOfTheMonth @("1","2","3") -YearlyRetentionDurationInYears 43 # create new policy with modified retention policy - New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $pol1 -PolicyName $newPolicyName + New-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $pol1 -PolicyName $newPolicyName # this Policy should be there - then delete it and then this policy shouldn't be there $policy=Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Name $newPolicyName @@ -136,7 +136,7 @@ Describe 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject' { $policy.Property.RetentionPolicy.YearlySchedule.RetentionScheduleDaily.DaysOfTheMonth[-1].Date | Should be 3 # remove policy - Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName + Remove-AzRecoveryServicesBackupProtectionPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName #$pol = Get-AzRecoveryServicesBackupProtectionPolicy -VaultName $vaultName -ResourceGroupName $rgName -Name $newPolicyName #$pol | Should -Be "NotFound" } @@ -170,7 +170,7 @@ Describe 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject' { Edit-AzRecoveryServicesBackupRetentionPolicyClientObject -Policy $pol1 -DatasourceType SAPHANA -ModifyLogBackup -LogRetentionPeriodInDays 23 # create new policy with modified retention policy - New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $pol1 -PolicyName $newPolicyName + New-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $pol1 -PolicyName $newPolicyName # this Policy should be there - then delete it and then this policy shouldn't be there $policy=Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Name $newPolicyName @@ -198,7 +198,7 @@ Describe 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject' { $LogBackupPolicy.RetentionPolicy.RetentionDurationCount | Should be "23" # remove policy - Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName + Remove-AzRecoveryServicesBackupProtectionPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName #$pol = Get-AzRecoveryServicesBackupProtectionPolicy -VaultName $vaultName -ResourceGroupName $rgName -Name $newPolicyName #$pol | Should -Be "NotFound" } @@ -213,7 +213,7 @@ Describe 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject' { $pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType SAPHANA #create a new policy with enable tiering - New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $pol1 -PolicyName $newPolicyName -MoveToArchiveTier $true -TierAfterDuration 54 -TieringMode TierAfter -TierAfterDurationType Days + New-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $pol1 -PolicyName $newPolicyName -MoveToArchiveTier $true -TierAfterDuration 54 -TieringMode TierAfter -TierAfterDurationType Days $policy=Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Name $newPolicyName @@ -224,7 +224,7 @@ Describe 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject' { $policy.Property.SubProtectionPolicy[0].TieringPolicy.AdditionalProperties.ArchivedRP.TieringMode | Should be "TierAfter" # remove policy - Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName + Remove-AzRecoveryServicesBackupProtectionPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName #$pol = Get-AzRecoveryServicesBackupProtectionPolicy -VaultName $vaultName -ResourceGroupName $rgName -Name $newPolicyName #$pol | Should -Be "NotFound" } @@ -239,7 +239,7 @@ Describe 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject' { $pol1=Get-AzRecoveryServicesPolicyTemplate -DatasourceType AzureVM #create a new policy with enable tiering - New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $pol1 -PolicyName $newPolicyName -MoveToArchiveTier $true -TieringMode TierRecommended + New-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $pol1 -PolicyName $newPolicyName -MoveToArchiveTier $true -TieringMode TierRecommended $policy=Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Name $newPolicyName @@ -250,7 +250,7 @@ Describe 'Edit-AzRecoveryServicesBackupRetentionPolicyClientObject' { $policy.Property.TieringPolicy.AdditionalProperties.ArchivedRP.TieringMode | Should be "TierRecommended" # remove policy - Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName + Remove-AzRecoveryServicesBackupProtectionPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName #$pol = Get-AzRecoveryServicesBackupProtectionPolicy -VaultName $vaultName -ResourceGroupName $rgName -Name $newPolicyName #$pol | Should -Be "NotFound" } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Recording.json b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Recording.json index 241de098e9ea..9a6e63631aac 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Recording.json +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Recording.json @@ -89,8 +89,8 @@ "Headers": { "x-ms-unique-id": [ "21" ], "x-ms-client-request-id": [ "41767e5c-ddbe-4ae6-ab97-d4d20d581bfc" ], - "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], - "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], + "CommandName": [ "Remove-AzRecoveryServicesBackupProtectionPolicy" ], + "FullCommandName": [ "Remove-AzRecoveryServicesBackupProtectionPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] @@ -212,8 +212,8 @@ "Headers": { "x-ms-unique-id": [ "24" ], "x-ms-client-request-id": [ "1d2197ef-4a31-43ae-a316-b62627c0f5f8" ], - "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], - "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], + "CommandName": [ "Remove-AzRecoveryServicesBackupProtectionPolicy" ], + "FullCommandName": [ "Remove-AzRecoveryServicesBackupProtectionPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] @@ -335,8 +335,8 @@ "Headers": { "x-ms-unique-id": [ "27" ], "x-ms-client-request-id": [ "5b6c8cb8-0103-4893-8d1e-43c11390ceb7" ], - "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], - "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], + "CommandName": [ "Remove-AzRecoveryServicesBackupProtectionPolicy" ], + "FullCommandName": [ "Remove-AzRecoveryServicesBackupProtectionPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] @@ -458,8 +458,8 @@ "Headers": { "x-ms-unique-id": [ "30" ], "x-ms-client-request-id": [ "b794630e-34c4-46d0-a870-b897ce5df4a7" ], - "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], - "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], + "CommandName": [ "Remove-AzRecoveryServicesBackupProtectionPolicy" ], + "FullCommandName": [ "Remove-AzRecoveryServicesBackupProtectionPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] @@ -581,8 +581,8 @@ "Headers": { "x-ms-unique-id": [ "33" ], "x-ms-client-request-id": [ "2496acc4-5a9b-4438-8950-1409217fc39d" ], - "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], - "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], + "CommandName": [ "Remove-AzRecoveryServicesBackupProtectionPolicy" ], + "FullCommandName": [ "Remove-AzRecoveryServicesBackupProtectionPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] @@ -704,8 +704,8 @@ "Headers": { "x-ms-unique-id": [ "36" ], "x-ms-client-request-id": [ "5f1e5c47-4ace-4dbd-a8d6-e5260d3f091e" ], - "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], - "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], + "CommandName": [ "Remove-AzRecoveryServicesBackupProtectionPolicy" ], + "FullCommandName": [ "Remove-AzRecoveryServicesBackupProtectionPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] @@ -827,8 +827,8 @@ "Headers": { "x-ms-unique-id": [ "39" ], "x-ms-client-request-id": [ "817b381d-a041-4bd8-915a-0f37567e0be4" ], - "CommandName": [ "Remove-AzRecoveryServicesBackupPolicy" ], - "FullCommandName": [ "Remove-AzRecoveryServicesBackupPolicy_Delete" ], + "CommandName": [ "Remove-AzRecoveryServicesBackupProtectionPolicy" ], + "FullCommandName": [ "Remove-AzRecoveryServicesBackupProtectionPolicy_Delete" ], "ParameterSetName": [ "__AllParameterSets" ], "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.3.8", "Az.RecoveryServices/0.1.0" ], "Authorization": [ "[Filtered]" ] diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Tests.ps1 index f2be63116ca6..5618ee14c867 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Tests.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Edit-AzRecoveryServicesBackupSchedulePolicyClientObject.Tests.ps1 @@ -41,13 +41,13 @@ Describe 'Edit-AzRecoveryServicesBackupSchedulePolicyClientObject' { $testPolicy.SchedulePolicy.ScheduleRunTime[0].ToString("HH:mm:ss") | Should be "13:30:00" $testPolicy.TimeZone | Should be "Tokyo Standard Time" - New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $testPolicy -PolicyName $newPolicyName + New-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $testPolicy -PolicyName $newPolicyName # this Policy should be there - then delete it and then this policy shouldn't be there $policy = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Name $newPolicyName $policy.Name | Should be $newPolicyName - Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName + Remove-AzRecoveryServicesBackupProtectionPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName } It 'AzureVMEnhancedWeekly' { @@ -76,13 +76,13 @@ Describe 'Edit-AzRecoveryServicesBackupSchedulePolicyClientObject' { $testPolicy.SchedulePolicy.Type | Should be "SimpleSchedulePolicyV2" $testPolicy.TimeZone | Should be "Tokyo Standard Time" - New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $testPolicy -PolicyName $newPolicyName + New-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $testPolicy -PolicyName $newPolicyName # this Policy should be there - then delete it and then this policy shouldn't be there $policy = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Name $newPolicyName $policy.Name | Should be $newPolicyName - Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName + Remove-AzRecoveryServicesBackupProtectionPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName } It 'AzureVMEnhancedHourly' { @@ -114,13 +114,13 @@ Describe 'Edit-AzRecoveryServicesBackupSchedulePolicyClientObject' { $testPolicy.SchedulePolicy.Type | Should be "SimpleSchedulePolicyV2" $testPolicy.TimeZone | Should be "Tokyo Standard Time" - New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $testPolicy -PolicyName $newPolicyName + New-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $testPolicy -PolicyName $newPolicyName # this Policy should be there - then delete it and then this policy shouldn't be there $policy = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Name $newPolicyName $policy.Name | Should be $newPolicyName - Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName + Remove-AzRecoveryServicesBackupProtectionPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName } It 'SAPHANADailyFull' { @@ -144,13 +144,13 @@ Describe 'Edit-AzRecoveryServicesBackupSchedulePolicyClientObject' { $FullBackupPolicy.SchedulePolicy.ScheduleRunTime[0].ToString("HH:mm:ss") | Should be "13:30:00" $testPolicy.Setting.TimeZone | Should be "Tokyo Standard Time" - New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $testPolicy -PolicyName $newPolicyName + New-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $testPolicy -PolicyName $newPolicyName # this Policy should be there - then delete it and then this policy shouldn't be there $policy = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Name $newPolicyName $policy.Name | Should be $newPolicyName - Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName + Remove-AzRecoveryServicesBackupProtectionPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName } It 'SAPHANAWeeklyDifferential' { @@ -198,13 +198,13 @@ Describe 'Edit-AzRecoveryServicesBackupSchedulePolicyClientObject' { $DifferentialPolicy.SchedulePolicy.ScheduleRunTime[0].ToString("HH:mm:ss") | Should be "02:00:00" $DifferentialPolicy.SchedulePolicy.ScheduleWeeklyFrequency | Should be 0 - New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $testPolicy -PolicyName $newPolicyName + New-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $testPolicy -PolicyName $newPolicyName # this Policy should be there - then delete it and then this policy shouldn't be there $policy = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Name $newPolicyName $policy.Name | Should be $newPolicyName - Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName + Remove-AzRecoveryServicesBackupProtectionPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName } It 'SAPHANWeeklyIncremental' { @@ -252,13 +252,13 @@ Describe 'Edit-AzRecoveryServicesBackupSchedulePolicyClientObject' { $IncrementalPolicy.SchedulePolicy.ScheduleRunTime[0].ToString("HH:mm:ss") | Should be "02:00:00" $IncrementalPolicy.SchedulePolicy.ScheduleWeeklyFrequency | Should be 0 - New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $testPolicy -PolicyName $newPolicyName + New-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $testPolicy -PolicyName $newPolicyName # this Policy should be there - then delete it and then this policy shouldn't be there $policy = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Name $newPolicyName $policy.Name | Should be $newPolicyName - Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName + Remove-AzRecoveryServicesBackupProtectionPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName } It 'SAPHANALog' { @@ -281,13 +281,13 @@ Describe 'Edit-AzRecoveryServicesBackupSchedulePolicyClientObject' { $LogBackupPolicy.PolicyType | Should be "Log" $LogBackupPolicy.SchedulePolicy.ScheduleFrequencyInMin | Should be 120 - New-AzRecoveryServicesBackupPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $testPolicy -PolicyName $newPolicyName + New-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Policy $testPolicy -PolicyName $newPolicyName # this Policy should be there - then delete it and then this policy shouldn't be there $policy = Get-AzRecoveryServicesBackupProtectionPolicy -ResourceGroupName $rgName -VaultName $vaultName -Name $newPolicyName $policy.Name | Should be $newPolicyName - Remove-AzRecoveryServicesBackupPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName + Remove-AzRecoveryServicesBackupProtectionPolicy -PolicyName $newPolicyName -ResourceGroupName $rgName -VaultName $vaultName } } \ No newline at end of file diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesBackupPolicy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesBackupProtectionPolicy.Tests.ps1 similarity index 83% rename from src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesBackupPolicy.Tests.ps1 rename to src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesBackupProtectionPolicy.Tests.ps1 index f2f19e0d5fe5..c626bda9c945 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesBackupPolicy.Tests.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/New-AzRecoveryServicesBackupProtectionPolicy.Tests.ps1 @@ -1,11 +1,11 @@ -if(($null -eq $TestName) -or ($TestName -contains 'New-AzRecoveryServicesBackupPolicy')) +if(($null -eq $TestName) -or ($TestName -contains 'New-AzRecoveryServicesBackupProtectionPolicy')) { $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' if (-Not (Test-Path -Path $loadEnvPath)) { $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' } . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzRecoveryServicesBackupPolicy.Recording.json' + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzRecoveryServicesBackupProtectionPolicy.Recording.json' $currentPath = $PSScriptRoot while(-not $mockingPath) { $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File @@ -14,7 +14,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'New-AzRecoveryServicesBackupP . ($mockingPath | Select-Object -First 1).FullName } -Describe 'New-AzRecoveryServicesBackupPolicy' { +Describe 'New-AzRecoveryServicesBackupProtectionPolicy' { It '__AllParameterSets' -skip { { throw [System.NotImplementedException] } | Should -Not -Throw } diff --git a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesBackupPolicy.Tests.ps1 b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesBackupProtectionPolicy.Tests.ps1 similarity index 82% rename from src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesBackupPolicy.Tests.ps1 rename to src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesBackupProtectionPolicy.Tests.ps1 index 41fef73e9698..6ff58a29932e 100644 --- a/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesBackupPolicy.Tests.ps1 +++ b/src/RecoveryServices/RecoveryServices.Backup.Autorest/test/Remove-AzRecoveryServicesBackupProtectionPolicy.Tests.ps1 @@ -1,11 +1,11 @@ -if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzRecoveryServicesBackupPolicy')) +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzRecoveryServicesBackupProtectionPolicy')) { $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' if (-Not (Test-Path -Path $loadEnvPath)) { $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' } . ($loadEnvPath) - $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzRecoveryServicesBackupPolicy.Recording.json' + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzRecoveryServicesBackupProtectionPolicy.Recording.json' $currentPath = $PSScriptRoot while(-not $mockingPath) { $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File @@ -14,7 +14,7 @@ if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzRecoveryServicesBack . ($mockingPath | Select-Object -First 1).FullName } -Describe 'Remove-AzRecoveryServicesBackupPolicy' { +Describe 'Remove-AzRecoveryServicesBackupProtectionPolicy' { It 'Delete' -skip { { throw [System.NotImplementedException] } | Should -Not -Throw } diff --git a/src/RecoveryServices/readme.azure.noprofile.md b/src/RecoveryServices/readme.azure.noprofile.md deleted file mode 100644 index ded432a57180..000000000000 --- a/src/RecoveryServices/readme.azure.noprofile.md +++ /dev/null @@ -1,78 +0,0 @@ -# Azure PowerShell AutoRest Configuration - -> Values -``` yaml -azure: true -powershell: true -help-link-prefix: https://learn.microsoft.com/powershell/module/ -license-header: MICROSOFT_MIT_NO_VERSION -pwsh-license-header: MICROSOFT_APACHE_NO_VERSION -branch: main -repo: https://github.com/Azure/azure-rest-api-specs/blob/$(branch) -metadata: - authors: Microsoft Corporation - owners: Microsoft Corporation - description: 'Microsoft Azure PowerShell: $(service-name) cmdlets' - copyright: Microsoft Corporation. All rights reserved. - tags: Azure ResourceManager ARM PSModule $(service-name) - companyName: Microsoft Corporation - requireLicenseAcceptance: true - licenseUri: https://aka.ms/azps-license - projectUri: https://github.com/Azure/azure-powershell -``` - -> Names -``` yaml -prefix: Az -subject-prefix: $(service-name) -module-name: $(prefix).$(service-name) -namespace: Microsoft.Azure.PowerShell.Cmdlets.$(service-name) -``` - -> Folders -``` yaml -clear-output-folder: true -output-folder: . -``` - -> Exclude some properties in table view -``` yaml -# For a specific module, we could override this configuration by setting default-exclude-tableview-properties to false in readme.md of that module. -default-exclude-tableview-properties: true -``` -``` yaml $(default-exclude-tableview-properties) -exclude-tableview-properties: - - Id - - Type -``` - -> Directives -``` yaml -directive: - - from: swagger-document - where: $.paths..responses.202.headers - transform: delete $["Location"] - - from: swagger-document - where: $.paths..responses.202.headers - transform: delete $["Retry-After"] - - from: swagger-document - where: $.paths..responses.202.headers - transform: delete $["Azure-AsyncOperation"] - - from: swagger-document - where: $.paths..responses.201.headers - transform: delete $["Location"] - - from: swagger-document - where: $.paths..responses.201.headers - transform: delete $["Retry-After"] - - from: swagger-document - where: $.paths..responses.201.headers - transform: delete $["Azure-AsyncOperation"] - - where: - subject: Operation - hide: true - - where: - parameter-name: SubscriptionId - set: - default: - script: '(Get-AzContext).Subscription.Id' -```