diff --git a/src/DataProtection/DataProtection.Autorest/Az.DataProtection.format.ps1xml b/src/DataProtection/DataProtection.Autorest/Az.DataProtection.format.ps1xml
index bfa336b675a4..e2c20c9f1887 100644
--- a/src/DataProtection/DataProtection.Autorest/Az.DataProtection.format.ps1xml
+++ b/src/DataProtection/DataProtection.Autorest/Az.DataProtection.format.ps1xml
@@ -89,6 +89,40 @@
+
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api40.ErrorDetail
+
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api40.ErrorDetail
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code
+
+
+ Message
+
+
+ Target
+
+
+
+
+
+
Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api40.SystemData
@@ -170,9 +204,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupInstanceResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupInstanceResource
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupInstanceResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupInstanceResource
@@ -198,9 +232,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AbsoluteDeleteOption
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AbsoluteDeleteOption
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AbsoluteDeleteOption
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AbsoluteDeleteOption
@@ -226,9 +260,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AdHocBackupRuleOptions
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AdHocBackupRuleOptions
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AdHocBackupRuleOptions
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AdHocBackupRuleOptions
@@ -248,9 +282,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AdhocBackupTriggerOption
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AdhocBackupTriggerOption
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AdhocBackupTriggerOption
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AdhocBackupTriggerOption
@@ -270,9 +304,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AdhocBasedTriggerContext
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AdhocBasedTriggerContext
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AdhocBasedTriggerContext
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AdhocBasedTriggerContext
@@ -292,9 +326,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AuthCredentials
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AuthCredentials
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AuthCredentials
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AuthCredentials
@@ -314,9 +348,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupDiscreteRecoveryPoint
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupDiscreteRecoveryPoint
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupDiscreteRecoveryPoint
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupDiscreteRecoveryPoint
@@ -338,6 +372,9 @@
+
+
+
@@ -372,6 +409,9 @@
RecoveryPointId
+
+ RecoveryPointState
+
RecoveryPointTime
@@ -390,9 +430,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupFindRestorableTimeRangesRequest
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupFindRestorableTimeRangesRequest
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupFindRestorableTimeRangesRequest
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupFindRestorableTimeRangesRequest
@@ -424,9 +464,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupFindRestorableTimeRangesRequestResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupFindRestorableTimeRangesRequestResource
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupFindRestorableTimeRangesRequestResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupFindRestorableTimeRangesRequestResource
@@ -470,9 +510,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupFindRestorableTimeRangesResponse
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupFindRestorableTimeRangesResponse
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupFindRestorableTimeRangesResponse
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupFindRestorableTimeRangesResponse
@@ -492,9 +532,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupFindRestorableTimeRangesResponseResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupFindRestorableTimeRangesResponseResource
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupFindRestorableTimeRangesResponseResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupFindRestorableTimeRangesResponseResource
@@ -514,9 +554,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupJob
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupJob
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupJob
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupJob
@@ -704,9 +744,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupJobResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupJobResource
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupJobResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupJobResource
@@ -726,9 +766,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupJobResourceList
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupJobResourceList
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupJobResourceList
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupJobResourceList
@@ -748,9 +788,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupParams
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupParams
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupParams
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupParams
@@ -776,9 +816,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupRecoveryPoint
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupRecoveryPoint
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupRecoveryPoint
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupRecoveryPoint
@@ -798,9 +838,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupRecoveryPointBasedRestoreRequest
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupRecoveryPointBasedRestoreRequest
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupRecoveryPointBasedRestoreRequest
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupRecoveryPointBasedRestoreRequest
@@ -850,9 +890,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupRecoveryPointResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupRecoveryPointResource
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupRecoveryPointResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupRecoveryPointResource
@@ -872,9 +912,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupRecoveryPointResourceList
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupRecoveryPointResourceList
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupRecoveryPointResourceList
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupRecoveryPointResourceList
@@ -894,9 +934,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupRecoveryTimeBasedRestoreRequest
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupRecoveryTimeBasedRestoreRequest
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupRecoveryTimeBasedRestoreRequest
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupRecoveryTimeBasedRestoreRequest
@@ -946,9 +986,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupRehydrationRequest
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupRehydrationRequest
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupRehydrationRequest
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupRehydrationRequest
@@ -980,9 +1020,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupRestoreRequest
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupRestoreRequest
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupRestoreRequest
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupRestoreRequest
@@ -1014,9 +1054,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupRestoreWithRehydrationRequest
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupRestoreWithRehydrationRequest
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupRestoreWithRehydrationRequest
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupRestoreWithRehydrationRequest
@@ -1078,9 +1118,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupRule
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupRule
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupRule
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupRule
@@ -1106,9 +1146,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureMonitorAlertSettings
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureMonitorAlertSettings
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureMonitorAlertSettings
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureMonitorAlertSettings
@@ -1128,9 +1168,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureOperationalStoreParameters
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureOperationalStoreParameters
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureOperationalStoreParameters
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureOperationalStoreParameters
@@ -1162,9 +1202,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureRetentionRule
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureRetentionRule
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureRetentionRule
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureRetentionRule
@@ -1196,9 +1236,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupCriteria
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupCriteria
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupCriteria
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupCriteria
@@ -1218,9 +1258,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupDatasourceParameters
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupDatasourceParameters
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupDatasourceParameters
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupDatasourceParameters
@@ -1240,9 +1280,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupInstance
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupInstance
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupInstance
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupInstance
@@ -1286,9 +1326,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupInstanceResourceList
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupInstanceResourceList
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupInstanceResourceList
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupInstanceResourceList
@@ -1308,9 +1348,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupParameters
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupParameters
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupParameters
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupParameters
@@ -1330,9 +1370,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupPolicy
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupPolicy
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupPolicy
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupPolicy
@@ -1358,9 +1398,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupSchedule
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupSchedule
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupSchedule
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupSchedule
@@ -1386,9 +1426,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupVault
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupVault
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupVault
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupVault
@@ -1398,6 +1438,9 @@
+
+
+
@@ -1414,6 +1457,9 @@
ProvisioningState
+
+ ReplicatedRegion
+
ResourceMoveState
@@ -1426,9 +1472,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupVaultResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupVaultResource
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupVaultResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupVaultResource
@@ -1460,9 +1506,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupVaultResourceList
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupVaultResourceList
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupVaultResourceList
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupVaultResourceList
@@ -1482,9 +1528,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BaseBackupPolicy
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BaseBackupPolicy
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BaseBackupPolicy
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BaseBackupPolicy
@@ -1510,9 +1556,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BaseBackupPolicyResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BaseBackupPolicyResource
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BaseBackupPolicyResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BaseBackupPolicyResource
@@ -1532,9 +1578,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BaseBackupPolicyResourceList
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BaseBackupPolicyResourceList
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BaseBackupPolicyResourceList
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BaseBackupPolicyResourceList
@@ -1554,9 +1600,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BasePolicyRule
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BasePolicyRule
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BasePolicyRule
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BasePolicyRule
@@ -1582,9 +1628,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BaseResourceProperties
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BaseResourceProperties
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BaseResourceProperties
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BaseResourceProperties
@@ -1604,9 +1650,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BlobBackupDatasourceParameters
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BlobBackupDatasourceParameters
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BlobBackupDatasourceParameters
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BlobBackupDatasourceParameters
@@ -1632,9 +1678,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.CheckNameAvailabilityRequest
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.CheckNameAvailabilityRequest
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.CheckNameAvailabilityRequest
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.CheckNameAvailabilityRequest
@@ -1654,9 +1700,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.CheckNameAvailabilityResult
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.CheckNameAvailabilityResult
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.CheckNameAvailabilityResult
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.CheckNameAvailabilityResult
@@ -1688,9 +1734,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ClientDiscoveryDisplay
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ClientDiscoveryDisplay
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ClientDiscoveryDisplay
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ClientDiscoveryDisplay
@@ -1728,9 +1774,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ClientDiscoveryForLogSpecification
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ClientDiscoveryForLogSpecification
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ClientDiscoveryForLogSpecification
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ClientDiscoveryForLogSpecification
@@ -1762,9 +1808,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ClientDiscoveryResponse
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ClientDiscoveryResponse
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ClientDiscoveryResponse
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ClientDiscoveryResponse
@@ -1784,9 +1830,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ClientDiscoveryValueForSingleApi
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ClientDiscoveryValueForSingleApi
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ClientDiscoveryValueForSingleApi
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ClientDiscoveryValueForSingleApi
@@ -1818,9 +1864,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.CopyOnExpiryOption
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.CopyOnExpiryOption
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.CopyOnExpiryOption
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.CopyOnExpiryOption
@@ -1840,9 +1886,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.CopyOption
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.CopyOption
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.CopyOption
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.CopyOption
@@ -1862,9 +1908,99 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.CrossRegionRestoreSettings
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.CrossRegionRestoreDetails
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.CrossRegionRestoreSettings
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.CrossRegionRestoreDetails
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SourceBackupInstanceId
+
+
+ SourceRegion
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.CrossRegionRestoreJobRequest
+
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.CrossRegionRestoreJobRequest
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ JobId
+
+
+ SourceBackupVaultId
+
+
+ SourceRegion
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.CrossRegionRestoreJobsRequest
+
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.CrossRegionRestoreJobsRequest
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SourceBackupVaultId
+
+
+ SourceRegion
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.CrossRegionRestoreSettings
+
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.CrossRegionRestoreSettings
@@ -1884,9 +2020,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.CrossSubscriptionRestoreSettings
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.CrossSubscriptionRestoreSettings
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.CrossSubscriptionRestoreSettings
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.CrossSubscriptionRestoreSettings
@@ -1906,9 +2042,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.CustomCopyOption
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.CustomCopyOption
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.CustomCopyOption
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.CustomCopyOption
@@ -1934,9 +2070,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.Datasource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.Datasource
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.Datasource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.Datasource
@@ -1986,9 +2122,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DatasourceSet
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DatasourceSet
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DatasourceSet
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DatasourceSet
@@ -2044,9 +2180,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DataStoreInfoBase
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DataStoreInfoBase
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DataStoreInfoBase
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DataStoreInfoBase
@@ -2072,9 +2208,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DataStoreParameters
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DataStoreParameters
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DataStoreParameters
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DataStoreParameters
@@ -2100,9 +2236,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.Day
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.Day
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.Day
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.Day
@@ -2128,9 +2264,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DefaultResourceProperties
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DefaultResourceProperties
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DefaultResourceProperties
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DefaultResourceProperties
@@ -2150,9 +2286,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DeletedBackupInstance
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DeletedBackupInstance
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DeletedBackupInstance
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DeletedBackupInstance
@@ -2196,9 +2332,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DeletedBackupInstanceResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DeletedBackupInstanceResource
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DeletedBackupInstanceResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DeletedBackupInstanceResource
@@ -2218,9 +2354,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DeletedBackupInstanceResourceList
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DeletedBackupInstanceResourceList
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DeletedBackupInstanceResourceList
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DeletedBackupInstanceResourceList
@@ -2240,9 +2376,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DeleteOption
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DeleteOption
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DeleteOption
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DeleteOption
@@ -2268,9 +2404,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DeletionInfo
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DeletionInfo
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DeletionInfo
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DeletionInfo
@@ -2308,9 +2444,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DppBaseResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DppBaseResource
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DppBaseResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DppBaseResource
@@ -2330,9 +2466,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DppBaseResourceList
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DppBaseResourceList
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DppBaseResourceList
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DppBaseResourceList
@@ -2352,9 +2488,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DppBaseTrackedResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DppBaseTrackedResource
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DppBaseTrackedResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DppBaseTrackedResource
@@ -2386,9 +2522,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DppBaseTrackedResourceTags
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DppBaseTrackedResourceTags
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DppBaseTrackedResourceTags
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DppBaseTrackedResourceTags
@@ -2408,9 +2544,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DppIdentityDetails
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DppIdentityDetails
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DppIdentityDetails
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DppIdentityDetails
@@ -2436,9 +2572,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DppProxyResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DppProxyResource
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DppProxyResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DppProxyResource
@@ -2458,9 +2594,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DppProxyResourceTags
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DppProxyResourceTags
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DppProxyResourceTags
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DppProxyResourceTags
@@ -2480,9 +2616,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DppResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DppResource
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DppResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DppResource
@@ -2502,9 +2638,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DppResourceList
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DppResourceList
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DppResourceList
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DppResourceList
@@ -2524,9 +2660,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DppTrackedResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DppTrackedResource
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DppTrackedResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DppTrackedResource
@@ -2558,9 +2694,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DppTrackedResourceList
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DppTrackedResourceList
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DppTrackedResourceList
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DppTrackedResourceList
@@ -2580,9 +2716,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DppWorkerRequest
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DppWorkerRequest
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DppWorkerRequest
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DppWorkerRequest
@@ -2626,9 +2762,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DppWorkerRequestHeaders
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DppWorkerRequestHeaders
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DppWorkerRequestHeaders
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DppWorkerRequestHeaders
@@ -2648,9 +2784,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DppWorkerRequestParameters
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DppWorkerRequestParameters
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DppWorkerRequestParameters
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DppWorkerRequestParameters
@@ -2670,9 +2806,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.Error
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.Error
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.Error
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.Error
@@ -2704,9 +2840,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ExportJobsResult
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ExportJobsResult
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ExportJobsResult
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ExportJobsResult
@@ -2744,9 +2880,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.FeatureValidationRequest
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.FeatureValidationRequest
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.FeatureValidationRequest
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.FeatureValidationRequest
@@ -2778,9 +2914,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.FeatureValidationRequestBase
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.FeatureValidationRequestBase
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.FeatureValidationRequestBase
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.FeatureValidationRequestBase
@@ -2800,9 +2936,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.FeatureValidationResponse
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.FeatureValidationResponse
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.FeatureValidationResponse
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.FeatureValidationResponse
@@ -2828,9 +2964,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.FeatureValidationResponseBase
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.FeatureValidationResponseBase
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.FeatureValidationResponseBase
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.FeatureValidationResponseBase
@@ -2850,9 +2986,37 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IdentityDetails
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.FetchSecondaryRPsRequestParameters
+
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.FetchSecondaryRPsRequestParameters
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SourceBackupInstanceId
+
+
+ SourceRegion
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IdentityDetails
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IdentityDetails
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IdentityDetails
@@ -2878,9 +3042,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ImmediateCopyOption
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ImmediateCopyOption
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ImmediateCopyOption
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ImmediateCopyOption
@@ -2900,9 +3064,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ImmutabilitySettings
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ImmutabilitySettings
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ImmutabilitySettings
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ImmutabilitySettings
@@ -2922,9 +3086,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.InnerError
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.InnerError
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.InnerError
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.InnerError
@@ -2944,9 +3108,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.InnerErrorAdditionalInfo
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.InnerErrorAdditionalInfo
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.InnerErrorAdditionalInfo
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.InnerErrorAdditionalInfo
@@ -2966,9 +3130,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ItemLevelRestoreCriteria
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ItemLevelRestoreCriteria
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ItemLevelRestoreCriteria
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ItemLevelRestoreCriteria
@@ -2988,9 +3152,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ItemLevelRestoreTargetInfo
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ItemLevelRestoreTargetInfo
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ItemLevelRestoreTargetInfo
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ItemLevelRestoreTargetInfo
@@ -3022,9 +3186,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ItemPathBasedRestoreCriteria
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ItemPathBasedRestoreCriteria
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ItemPathBasedRestoreCriteria
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ItemPathBasedRestoreCriteria
@@ -3062,9 +3226,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.JobExtendedInfo
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.JobExtendedInfo
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.JobExtendedInfo
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.JobExtendedInfo
@@ -3096,9 +3260,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.JobExtendedInfoAdditionalDetails
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.JobExtendedInfoAdditionalDetails
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.JobExtendedInfoAdditionalDetails
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.JobExtendedInfoAdditionalDetails
@@ -3118,9 +3282,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.JobSubTask
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.JobSubTask
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.JobSubTask
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.JobSubTask
@@ -3158,9 +3322,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.JobSubTaskAdditionalDetails
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.JobSubTaskAdditionalDetails
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.JobSubTaskAdditionalDetails
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.JobSubTaskAdditionalDetails
@@ -3180,9 +3344,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.KubernetesClusterBackupDatasourceParameters
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.KubernetesClusterBackupDatasourceParameters
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.KubernetesClusterBackupDatasourceParameters
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.KubernetesClusterBackupDatasourceParameters
@@ -3244,9 +3408,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.KubernetesClusterRestoreCriteria
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.KubernetesClusterRestoreCriteria
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.KubernetesClusterRestoreCriteria
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.KubernetesClusterRestoreCriteria
@@ -3314,9 +3478,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.KubernetesClusterRestoreCriteriaNamespaceMappings
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.KubernetesClusterRestoreCriteriaNamespaceMappings
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.KubernetesClusterRestoreCriteriaNamespaceMappings
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.KubernetesClusterRestoreCriteriaNamespaceMappings
@@ -3336,9 +3500,113 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.KubernetesPvRestoreCriteria
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.KubernetesClusterVaultTierRestoreCriteria
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.KubernetesPvRestoreCriteria
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.KubernetesClusterVaultTierRestoreCriteria
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ObjectType
+
+
+ ConflictPolicy
+
+
+ ExcludedNamespace
+
+
+ ExcludedResourceType
+
+
+ IncludeClusterScopeResource
+
+
+ IncludedNamespace
+
+
+ IncludedResourceType
+
+
+ LabelSelector
+
+
+ PersistentVolumeRestoreMode
+
+
+ StagingResourceGroupId
+
+
+ StagingStorageAccountId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.KubernetesClusterVaultTierRestoreCriteriaNamespaceMappings
+
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.KubernetesClusterVaultTierRestoreCriteriaNamespaceMappings
+
+
+
+
+
+
+
+
+
+
+
+ Item
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.KubernetesPvRestoreCriteria
+
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.KubernetesPvRestoreCriteria
@@ -3370,9 +3638,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.KubernetesStorageClassRestoreCriteria
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.KubernetesStorageClassRestoreCriteria
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.KubernetesStorageClassRestoreCriteria
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.KubernetesStorageClassRestoreCriteria
@@ -3404,9 +3672,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.NamespacedNameResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.NamespacedNameResource
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.NamespacedNameResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.NamespacedNameResource
@@ -3432,9 +3700,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.OperationExtendedInfo
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.OperationExtendedInfo
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.OperationExtendedInfo
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.OperationExtendedInfo
@@ -3454,9 +3722,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.OperationJobExtendedInfo
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.OperationJobExtendedInfo
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.OperationJobExtendedInfo
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.OperationJobExtendedInfo
@@ -3482,9 +3750,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.OperationResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.OperationResource
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.OperationResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.OperationResource
@@ -3522,9 +3790,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.PatchResourceGuardInputTags
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.PatchResourceGuardInputTags
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.PatchResourceGuardInputTags
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.PatchResourceGuardInputTags
@@ -3544,9 +3812,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.PatchResourceRequestInputTags
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.PatchResourceRequestInputTags
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.PatchResourceRequestInputTags
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.PatchResourceRequestInputTags
@@ -3566,9 +3834,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.PolicyInfo
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.PolicyInfo
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.PolicyInfo
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.PolicyInfo
@@ -3594,9 +3862,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ProtectionStatusDetails
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ProtectionStatusDetails
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ProtectionStatusDetails
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ProtectionStatusDetails
@@ -3616,9 +3884,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.RangeBasedItemLevelRestoreCriteria
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.RangeBasedItemLevelRestoreCriteria
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.RangeBasedItemLevelRestoreCriteria
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.RangeBasedItemLevelRestoreCriteria
@@ -3650,9 +3918,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.RecoveryPointDataStoreDetails
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.RecoveryPointDataStoreDetails
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.RecoveryPointDataStoreDetails
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.RecoveryPointDataStoreDetails
@@ -3708,9 +3976,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.RecoveryPointsFilters
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.RecoveryPointsFilters
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.RecoveryPointsFilters
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.RecoveryPointsFilters
@@ -3760,9 +4028,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ResourceGuard
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ResourceGuard
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ResourceGuard
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ResourceGuard
@@ -3800,9 +4068,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ResourceGuardOperation
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ResourceGuardOperation
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ResourceGuardOperation
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ResourceGuardOperation
@@ -3828,9 +4096,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ResourceGuardOperationDetail
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ResourceGuardOperationDetail
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ResourceGuardOperationDetail
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ResourceGuardOperationDetail
@@ -3856,9 +4124,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ResourceGuardProxyBase
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ResourceGuardProxyBase
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ResourceGuardProxyBase
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ResourceGuardProxyBase
@@ -3890,9 +4158,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ResourceGuardProxyBaseResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ResourceGuardProxyBaseResource
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ResourceGuardProxyBaseResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ResourceGuardProxyBaseResource
@@ -3912,9 +4180,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ResourceGuardProxyBaseResourceList
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ResourceGuardProxyBaseResourceList
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ResourceGuardProxyBaseResourceList
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ResourceGuardProxyBaseResourceList
@@ -3934,9 +4202,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ResourceGuardResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ResourceGuardResource
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ResourceGuardResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ResourceGuardResource
@@ -3968,9 +4236,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ResourceGuardResourceList
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ResourceGuardResourceList
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ResourceGuardResourceList
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ResourceGuardResourceList
@@ -3990,9 +4258,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ResourceMoveDetails
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ResourceMoveDetails
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ResourceMoveDetails
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ResourceMoveDetails
@@ -4036,9 +4304,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.RestorableTimeRange
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.RestorableTimeRange
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.RestorableTimeRange
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.RestorableTimeRange
@@ -4070,9 +4338,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.RestoreFilesTargetInfo
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.RestoreFilesTargetInfo
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.RestoreFilesTargetInfo
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.RestoreFilesTargetInfo
@@ -4104,9 +4372,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.RestoreJobRecoveryPointDetails
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.RestoreJobRecoveryPointDetails
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.RestoreJobRecoveryPointDetails
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.RestoreJobRecoveryPointDetails
@@ -4132,9 +4400,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.RestoreTargetInfo
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.RestoreTargetInfo
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.RestoreTargetInfo
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.RestoreTargetInfo
@@ -4166,9 +4434,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.RestoreTargetInfoBase
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.RestoreTargetInfoBase
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.RestoreTargetInfoBase
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.RestoreTargetInfoBase
@@ -4200,9 +4468,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.RetentionTag
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.RetentionTag
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.RetentionTag
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.RetentionTag
@@ -4228,9 +4496,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ScheduleBasedBackupCriteria
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ScheduleBasedBackupCriteria
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ScheduleBasedBackupCriteria
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ScheduleBasedBackupCriteria
@@ -4280,9 +4548,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ScheduleBasedTriggerContext
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ScheduleBasedTriggerContext
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ScheduleBasedTriggerContext
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ScheduleBasedTriggerContext
@@ -4302,9 +4570,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.SecretStoreBasedAuthCredentials
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.SecretStoreBasedAuthCredentials
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.SecretStoreBasedAuthCredentials
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.SecretStoreBasedAuthCredentials
@@ -4324,9 +4592,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.SecretStoreResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.SecretStoreResource
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.SecretStoreResource
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.SecretStoreResource
@@ -4358,9 +4626,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.SoftDeleteSettings
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.SoftDeleteSettings
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.SoftDeleteSettings
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.SoftDeleteSettings
@@ -4386,9 +4654,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.StorageSetting
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.StorageSetting
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.StorageSetting
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.StorageSetting
@@ -4408,9 +4676,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.SupportedFeature
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.SupportedFeature
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.SupportedFeature
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.SupportedFeature
@@ -4442,9 +4710,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.SyncBackupInstanceRequest
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.SyncBackupInstanceRequest
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.SyncBackupInstanceRequest
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.SyncBackupInstanceRequest
@@ -4464,9 +4732,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.TaggingCriteria
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.TaggingCriteria
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.TaggingCriteria
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.TaggingCriteria
@@ -4492,9 +4760,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.TargetDetails
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.TargetDetails
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.TargetDetails
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.TargetDetails
@@ -4532,9 +4800,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.TriggerContext
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.TriggerContext
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.TriggerContext
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.TriggerContext
@@ -4554,9 +4822,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.UnlockDeleteRequest
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.UnlockDeleteRequest
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.UnlockDeleteRequest
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.UnlockDeleteRequest
@@ -4582,9 +4850,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.UnlockDeleteResponse
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.UnlockDeleteResponse
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.UnlockDeleteResponse
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.UnlockDeleteResponse
@@ -4604,9 +4872,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.UserFacingError
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.UserFacingError
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.UserFacingError
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.UserFacingError
@@ -4656,9 +4924,9 @@
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.UserFacingErrorProperties
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.UserFacingErrorProperties
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.UserFacingErrorProperties
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.UserFacingErrorProperties
@@ -4677,5 +4945,27 @@
+
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.UserFacingWarningDetail
+
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.UserFacingWarningDetail
+
+
+
+
+
+
+
+
+
+
+
+ ResourceName
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/DataProtection/DataProtection.Autorest/Az.DataProtection.psd1 b/src/DataProtection/DataProtection.Autorest/Az.DataProtection.psd1
index d177e0bcda64..b77b7d4e914c 100644
--- a/src/DataProtection/DataProtection.Autorest/Az.DataProtection.psd1
+++ b/src/DataProtection/DataProtection.Autorest/Az.DataProtection.psd1
@@ -1,179 +1,24 @@
-#
-# Module manifest for module 'Az.DataProtection'
-#
-# Generated by: Microsoft Corporation
-#
-# Generated on: 9/20/2023
-#
-
@{
-
-# Script module or binary module file associated with this manifest.
-RootModule = './Az.DataProtection.psm1'
-
-# Version number of this module.
-ModuleVersion = '2.1.0'
-
-# Supported PSEditions
-CompatiblePSEditions = 'Core', 'Desktop'
-
-# ID used to uniquely identify this module
-GUID = '0796af7c-0a7c-417f-8d0d-19f9179dac7a'
-
-# Author of this module
-Author = 'Microsoft Corporation'
-
-# Company or vendor of this module
-CompanyName = 'Microsoft Corporation'
-
-# Copyright statement for this module
-Copyright = 'Microsoft Corporation. All rights reserved.'
-
-# Description of the functionality provided by this module
-Description = 'Microsoft Azure PowerShell: DataProtection cmdlets'
-
-# Minimum version of the PowerShell engine required by this module
-PowerShellVersion = '5.1'
-
-# Name of the PowerShell host required by this module
-# PowerShellHostName = ''
-
-# Minimum version of the PowerShell host required by this module
-# PowerShellHostVersion = ''
-
-# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
-DotNetFrameworkVersion = '4.7.2'
-
-# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
-# ClrVersion = ''
-
-# Processor architecture (None, X86, Amd64) required by this module
-# ProcessorArchitecture = ''
-
-# Modules that must be imported into the global environment prior to importing this module
-RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.13.1'; })
-
-# Assemblies that must be loaded prior to importing this module
-RequiredAssemblies = './bin/Az.DataProtection.private.dll'
-
-# Script files (.ps1) that are run in the caller's environment prior to importing this module.
-# ScriptsToProcess = @()
-
-# Type files (.ps1xml) to be loaded when importing this module
-# TypesToProcess = @()
-
-# Format files (.ps1xml) to be loaded when importing this module
-FormatsToProcess = './Az.DataProtection.format.ps1xml'
-
-# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
-# NestedModules = @()
-
-# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
-FunctionsToExport = 'Backup-AzDataProtectionBackupInstanceAdhoc',
- 'Edit-AzDataProtectionPolicyRetentionRuleClientObject',
- 'Edit-AzDataProtectionPolicyTagClientObject',
- 'Edit-AzDataProtectionPolicyTriggerClientObject',
- 'Find-AzDataProtectionRestorableTimeRange',
- 'Get-AzDataProtectionBackupInstance',
- 'Get-AzDataProtectionBackupPolicy',
- 'Get-AzDataProtectionBackupVault', 'Get-AzDataProtectionJob',
- 'Get-AzDataProtectionOperation',
- 'Get-AzDataProtectionOperationStatus',
- 'Get-AzDataProtectionPolicyTemplate',
- 'Get-AzDataProtectionRecoveryPoint',
- 'Get-AzDataProtectionResourceGuard',
- 'Get-AzDataProtectionResourceGuardMapping',
- 'Get-AzDataProtectionSoftDeletedBackupInstance',
- 'Initialize-AzDataProtectionBackupInstance',
- 'Initialize-AzDataProtectionRestoreRequest',
- 'New-AzDataProtectionBackupConfigurationClientObject',
- 'New-AzDataProtectionBackupInstance',
- 'New-AzDataProtectionBackupPolicy',
- 'New-AzDataProtectionBackupVault',
- 'New-AzDataProtectionBackupVaultStorageSettingObject',
- 'New-AzDataProtectionPolicyTagCriteriaClientObject',
- 'New-AzDataProtectionPolicyTriggerScheduleClientObject',
- 'New-AzDataProtectionResourceGuard',
- 'New-AzDataProtectionRestoreConfigurationClientObject',
- 'New-AzDataProtectionRetentionLifeCycleClientObject',
- 'Remove-AzDataProtectionBackupInstance',
- 'Remove-AzDataProtectionBackupPolicy',
- 'Remove-AzDataProtectionBackupVault',
- 'Remove-AzDataProtectionResourceGuard',
- 'Remove-AzDataProtectionResourceGuardMapping',
- 'Resume-AzDataProtectionBackupInstanceProtection',
- 'Search-AzDataProtectionBackupInstanceInAzGraph',
- 'Search-AzDataProtectionJobInAzGraph',
- 'Set-AzDataProtectionMSIPermission',
- 'Set-AzDataProtectionResourceGuardMapping',
- 'Start-AzDataProtectionBackupInstanceRestore',
- 'Stop-AzDataProtectionBackupInstanceProtection',
- 'Suspend-AzDataProtectionBackupInstanceBackup',
- 'Sync-AzDataProtectionBackupInstance',
- 'Test-AzDataProtectionBackupInstanceReadiness',
- 'Test-AzDataProtectionBackupInstanceRestore',
- 'Undo-AzDataProtectionBackupInstanceDeletion',
- 'Unlock-AzDataProtectionResourceGuardOperation',
- 'Update-AzDataProtectionBackupInstanceAssociatedPolicy',
- 'Update-AzDataProtectionBackupVault',
- 'Update-AzDataProtectionResourceGuard'
-
-# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
-CmdletsToExport = @()
-
-# Variables to export from this module
-# VariablesToExport = @()
-
-# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
-AliasesToExport = '*'
-
-# DSC resources to export from this module
-# DscResourcesToExport = @()
-
-# List of all modules packaged with this module
-# ModuleList = @()
-
-# List of all files packaged with this module
-# FileList = @()
-
-# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
-PrivateData = @{
-
+ GUID = 'e7388191-d3e0-4d54-b898-d55f0992a1dc'
+ RootModule = './Az.DataProtection.psm1'
+ ModuleVersion = '0.1.0'
+ CompatiblePSEditions = 'Core', 'Desktop'
+ Author = 'Microsoft Corporation'
+ CompanyName = 'Microsoft Corporation'
+ Copyright = 'Microsoft Corporation. All rights reserved.'
+ Description = 'Microsoft Azure PowerShell: DataProtection cmdlets'
+ PowerShellVersion = '5.1'
+ DotNetFrameworkVersion = '4.7.2'
+ RequiredAssemblies = './bin/Az.DataProtection.private.dll'
+ FormatsToProcess = './Az.DataProtection.format.ps1xml'
+ FunctionsToExport = 'Backup-AzDataProtectionBackupInstanceAdhoc', 'Edit-AzDataProtectionPolicyRetentionRuleClientObject', 'Edit-AzDataProtectionPolicyTagClientObject', 'Edit-AzDataProtectionPolicyTriggerClientObject', 'Find-AzDataProtectionRestorableTimeRange', 'Get-AzDataProtectionBackupInstance', 'Get-AzDataProtectionBackupPolicy', 'Get-AzDataProtectionBackupVault', 'Get-AzDataProtectionJob', 'Get-AzDataProtectionOperation', 'Get-AzDataProtectionOperationStatus', 'Get-AzDataProtectionPolicyTemplate', 'Get-AzDataProtectionRecoveryPoint', 'Get-AzDataProtectionResourceGuard', 'Get-AzDataProtectionResourceGuardMapping', 'Get-AzDataProtectionSoftDeletedBackupInstance', 'Initialize-AzDataProtectionBackupInstance', 'Initialize-AzDataProtectionRestoreRequest', 'New-AzDataProtectionBackupConfigurationClientObject', 'New-AzDataProtectionBackupInstance', 'New-AzDataProtectionBackupPolicy', 'New-AzDataProtectionBackupVault', 'New-AzDataProtectionBackupVaultStorageSettingObject', 'New-AzDataProtectionPolicyTagCriteriaClientObject', 'New-AzDataProtectionPolicyTriggerScheduleClientObject', 'New-AzDataProtectionResourceGuard', 'New-AzDataProtectionRestoreConfigurationClientObject', 'New-AzDataProtectionRetentionLifeCycleClientObject', 'Remove-AzDataProtectionBackupInstance', 'Remove-AzDataProtectionBackupPolicy', 'Remove-AzDataProtectionBackupVault', 'Remove-AzDataProtectionResourceGuard', 'Remove-AzDataProtectionResourceGuardMapping', 'Resume-AzDataProtectionBackupInstanceProtection', 'Search-AzDataProtectionBackupInstanceInAzGraph', 'Search-AzDataProtectionBackupVaultInAzGraph', 'Search-AzDataProtectionJobInAzGraph', 'Set-AzDataProtectionMSIPermission', 'Set-AzDataProtectionResourceGuardMapping', 'Start-AzDataProtectionBackupInstanceRestore', 'Stop-AzDataProtectionBackupInstanceProtection', 'Suspend-AzDataProtectionBackupInstanceBackup', 'Sync-AzDataProtectionBackupInstance', 'Test-AzDataProtectionBackupInstanceReadiness', 'Test-AzDataProtectionBackupInstanceRestore', 'Undo-AzDataProtectionBackupInstanceDeletion', 'Unlock-AzDataProtectionResourceGuardOperation', 'Update-AzDataProtectionBackupInstanceAssociatedPolicy', 'Update-AzDataProtectionBackupVault', 'Update-AzDataProtectionResourceGuard', '*'
+ AliasesToExport = '*'
+ PrivateData = @{
PSData = @{
-
- # Tags applied to this module. These help with module discovery in online galleries.
- Tags = 'Azure','ResourceManager','ARM','PSModule','DataProtection'
-
- # A URL to the license for this module.
- LicenseUri = 'https://aka.ms/azps-license'
-
- # A URL to the main website for this project.
- ProjectUri = 'https://github.com/Azure/azure-powershell'
-
- # A URL to an icon representing this module.
- # IconUri = ''
-
- # ReleaseNotes of this module
- ReleaseNotes = '* Added soft delete and MUA feature for Backup vaults'
-
- # Prerelease string of this module
- # Prerelease = ''
-
- # Flag to indicate whether the module requires explicit user acceptance for install/update/save
- # RequireLicenseAcceptance = $false
-
- # External dependent modules of this module
- # ExternalModuleDependencies = @()
-
- } # End of PSData hashtable
-
- } # End of PrivateData hashtable
-
-# HelpInfo URI of this module
-# HelpInfoURI = ''
-
-# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
-# DefaultCommandPrefix = ''
-
+ Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'DataProtection'
+ LicenseUri = 'https://aka.ms/azps-license'
+ ProjectUri = 'https://github.com/Azure/azure-powershell'
+ ReleaseNotes = ''
+ }
+ }
}
-
diff --git a/src/DataProtection/DataProtection.Autorest/README.md b/src/DataProtection/DataProtection.Autorest/README.md
index 1117acb046f3..175ea31d4060 100644
--- a/src/DataProtection/DataProtection.Autorest/README.md
+++ b/src/DataProtection/DataProtection.Autorest/README.md
@@ -34,12 +34,16 @@ This file contains the configuration for generating My API from the OpenAPI spec
``` yaml
# it's the same options as command line options, just drop the double-dash!
-branch: acf24167b5174d88f36302e243c883f2e63eec52
+commit: c0e7b1360c19187fde2497251f784aa82641aa95
require:
- - $(this-folder)/../readme.azure.noprofile.md
+ - $(this-folder)/../../readme.azure.noprofile.md
input-file:
- - $(repo)/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/dataprotection.json
+ - $(repo)/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/dataprotection.json
title: DataProtection
+# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
+use-extension:
+ "@autorest/powershell": "3.x"
+
directive:
- from: swagger-document
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}"].delete
@@ -232,6 +236,10 @@ directive:
verb: Start
subject: ExportJob
remove: true
+ - where:
+ verb: Start
+ subject: .*Restore$
+ hide: true
- where:
verb: Get
subject: OperationResultPatch
@@ -302,6 +310,23 @@ directive:
subject: BackupInstanceRestore
variant: ^Validate1$|^ValidateExpanded1$|^ValidateViaIdentity1$|^ValidateViaIdentityExpanded1$
hide: true
+ - where:
+ verb: Test
+ subject: BackupInstanceCrossRegionRestore
+ hide: true
+ - where:
+ subject: FetchCrossRegionRestoreJob
+ set:
+ subject: CrossRegionRestoreJob
+ - where:
+ subject: CrossRegionRestoreJob
+ variant: ^Get.*
+ set:
+ subject: CrossRegionRestoreJobDetail
+ - where:
+ verb: Get
+ subject: ^Job$|^CrossRegionRestoreJob.*|FetchSecondaryRecoveryPoint
+ hide: true
- where:
property-name: AzureMonitorAlertSettingAlertsForAllJobFailure
set:
@@ -359,6 +384,8 @@ directive:
- IdentityType
- no-inline:
- BackupInstance
+ - CrossRegionRestoreDetails
+ - CrossRegionRestoreRequestObject
- DeletionInfo
- InnerError
- ItemLevelRestoreTargetInfo
@@ -370,19 +397,20 @@ directive:
- SecretStoreResource
- SystemData
- UserFacingError
- - ValidateRestoreRequestObject
+ - ValidateRestoreRequestObject
+ - ValidateCrossRegionRestoreRequestObject
- from: source-file-csharp
where: $
- transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBaseBackupPolicy Property', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBaseBackupPolicy Property');
+ transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBaseBackupPolicy Property', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBaseBackupPolicy Property');
- from: source-file-csharp
where: $
- transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ITriggerContext Trigger', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ITriggerContext Trigger');
+ transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ITriggerContext Trigger', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ITriggerContext Trigger');
- from: source-file-csharp
where: $
- transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupParameters BackupParameter', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupParameters BackupParameter');
+ transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupParameters BackupParameter', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupParameters BackupParameter');
- from: source-file-csharp
where: $
- transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupRecoveryPoint Property', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupRecoveryPoint Property');
+ transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupRecoveryPoint Property', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupRecoveryPoint Property');
```
## Alternate settings
diff --git a/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/backupVaults-backupInstances-recoveryPoints.json b/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/backupVaults-backupInstances-recoveryPoints.json
index f2d38dd75dfd..5a16aca4878f 100644
--- a/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/backupVaults-backupInstances-recoveryPoints.json
+++ b/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/backupVaults-backupInstances-recoveryPoints.json
@@ -1,6 +1,6 @@
{
"resourceType": "backupVaults/backupInstances/recoveryPoints",
- "apiVersion": "2023-05-01",
+ "apiVersion": "2023-11-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.dataprotection"
},
diff --git a/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/backupVaults-backupInstances.json b/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/backupVaults-backupInstances.json
index aa8d856b63be..ba3478b1310e 100644
--- a/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/backupVaults-backupInstances.json
+++ b/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/backupVaults-backupInstances.json
@@ -1,6 +1,6 @@
{
"resourceType": "backupVaults/backupInstances",
- "apiVersion": "2023-05-01",
+ "apiVersion": "2023-11-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.dataprotection"
},
diff --git a/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/backupVaults-backupJobs.json b/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/backupVaults-backupJobs.json
index c9c86a3337bd..158aaa4cedd0 100644
--- a/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/backupVaults-backupJobs.json
+++ b/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/backupVaults-backupJobs.json
@@ -1,13 +1,13 @@
{
"resourceType": "backupVaults/backupJobs",
- "apiVersion": "2023-05-01",
+ "apiVersion": "2023-11-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.dataprotection"
},
"commands": [
{
"name": "Get-AzDataProtectionJob",
- "description": "Gets a job with id in a backup vault",
+ "description": "Gets or lists jobs in a backup vault",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs/{jobId}",
"help": {
"learnMore": {
diff --git a/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/backupVaults-backupPolicies.json b/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/backupVaults-backupPolicies.json
index 4339e578d6b6..3d0c05827da9 100644
--- a/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/backupVaults-backupPolicies.json
+++ b/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/backupVaults-backupPolicies.json
@@ -1,6 +1,6 @@
{
"resourceType": "backupVaults/backupPolicies",
- "apiVersion": "2023-05-01",
+ "apiVersion": "2023-11-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.dataprotection"
},
diff --git a/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/backupVaults-backupResourceGuardProxies.json b/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/backupVaults-backupResourceGuardProxies.json
index 30af3d73c2a3..5d0330b1bc4f 100644
--- a/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/backupVaults-backupResourceGuardProxies.json
+++ b/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/backupVaults-backupResourceGuardProxies.json
@@ -1,6 +1,6 @@
{
"resourceType": "backupVaults/backupResourceGuardProxies",
- "apiVersion": "2023-05-01",
+ "apiVersion": "2023-11-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.dataprotection"
},
diff --git a/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/backupVaults-deletedBackupInstances.json b/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/backupVaults-deletedBackupInstances.json
index 23e124c7e224..df72f64e6424 100644
--- a/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/backupVaults-deletedBackupInstances.json
+++ b/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/backupVaults-deletedBackupInstances.json
@@ -1,6 +1,6 @@
{
"resourceType": "backupVaults/deletedBackupInstances",
- "apiVersion": "2023-05-01",
+ "apiVersion": "2023-11-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.dataprotection"
},
diff --git a/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/backupVaults.json b/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/backupVaults.json
index 0a02feff4120..d5da8548af61 100644
--- a/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/backupVaults.json
+++ b/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/backupVaults.json
@@ -1,6 +1,6 @@
{
"resourceType": "backupVaults",
- "apiVersion": "2023-05-01",
+ "apiVersion": "2023-11-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.dataprotection"
},
diff --git a/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/locations-operationStatus.json b/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/locations-operationStatus.json
index 1da1141208e2..e1cd99e6b031 100644
--- a/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/locations-operationStatus.json
+++ b/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/locations-operationStatus.json
@@ -1,6 +1,6 @@
{
"resourceType": "locations/operationStatus",
- "apiVersion": "2023-05-01",
+ "apiVersion": "2023-11-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.dataprotection"
},
diff --git a/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/resourceGuards.json b/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/resourceGuards.json
index bcaf78d18dbb..14d4117ba3d7 100644
--- a/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/resourceGuards.json
+++ b/src/DataProtection/DataProtection.Autorest/UX/Microsoft.DataProtection/resourceGuards.json
@@ -1,6 +1,6 @@
{
"resourceType": "resourceGuards",
- "apiVersion": "2023-05-01",
+ "apiVersion": "2023-11-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.dataprotection"
},
diff --git a/src/DataProtection/DataProtection.Autorest/build-module.ps1 b/src/DataProtection/DataProtection.Autorest/build-module.ps1
index ac2836d67995..68463901cfef 100644
--- a/src/DataProtection/DataProtection.Autorest/build-module.ps1
+++ b/src/DataProtection/DataProtection.Autorest/build-module.ps1
@@ -143,7 +143,8 @@ if($NoDocs) {
$null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
}
$null = New-Item -ItemType Directory -Force -Path $docsFolder
- Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid
+ $addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true')
+ Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid -AddComplexInterfaceInfo:$addComplexInterfaceInfo
}
Write-Host -ForegroundColor Green 'Creating format.ps1xml...'
@@ -162,4 +163,10 @@ Export-TestStub -ModuleName $moduleName -ExportsFolder $exportsFolder -OutputFol
Write-Host -ForegroundColor Green 'Creating example stubs...'
Export-ExampleStub -ExportsFolder $exportsFolder -OutputFolder $examplesFolder
+if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
+{
+ Write-Host -ForegroundColor Green 'Creating ux metadata...'
+ . (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
+}
+
Write-Host -ForegroundColor Green '-------------Done-------------'
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Backupcenter/Search-AzDataProtectionBackupInstanceInAzGraph.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Backupcenter/Search-AzDataProtectionBackupInstanceInAzGraph.ps1
index c780b9974220..2df9f0ad89f8 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Backupcenter/Search-AzDataProtectionBackupInstanceInAzGraph.ps1
+++ b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Backupcenter/Search-AzDataProtectionBackupInstanceInAzGraph.ps1
@@ -23,7 +23,53 @@
[Parameter(Mandatory=$false, HelpMessage='Protection Status of the item')]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.ProtectionStatus[]]
- ${ProtectionStatus}
+ ${ProtectionStatus},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
)
process
@@ -49,13 +95,14 @@
$null = $PSBoundParameters.Add("Subscription", $Subscription)
$null = $PSBoundParameters.Add("query", $query)
$null = $PSBoundParameters.Add("First", 1000)
+ $null = $PSBoundParameters.Remove("HttpPipelinePrepend")
$argInstanceResponse = Az.ResourceGraph\Search-AzGraph @PSBoundParameters
$backupInstances = @()
foreach($argResponse in $argInstanceResponse)
{
$jsonStringResponse = $argResponse | ConvertTo-Json -Depth 100
- $backupInstances += [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupInstanceResource]::FromJsonString($jsonStringResponse)
+ $backupInstances += [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupInstanceResource]::FromJsonString($jsonStringResponse)
}
return $backupInstances
}
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Backupcenter/Search-AzDataProtectionBackupVaultInAzGraph.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Backupcenter/Search-AzDataProtectionBackupVaultInAzGraph.ps1
new file mode 100644
index 000000000000..6f2d89f41c0f
--- /dev/null
+++ b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Backupcenter/Search-AzDataProtectionBackupVaultInAzGraph.ps1
@@ -0,0 +1,98 @@
+function Search-AzDataProtectionBackupVaultInAzGraph
+{
+ [OutputType('PSObject')]
+ [CmdletBinding(PositionalBinding=$false)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Searches for Backup vaults in Azure Resource Graph and retrieves the expected entries')]
+
+ param (
+ [Parameter(Mandatory, HelpMessage='Subscription of Vault')]
+ [System.String[]]
+ ${Subscription},
+
+ [Parameter(Mandatory=$false, HelpMessage='Resource Group of Vault')]
+ [System.String[]]
+ ${ResourceGroup},
+
+ [Parameter(Mandatory=$false, HelpMessage='Name of the vault')]
+ [System.String[]]
+ ${Vault},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+ )
+
+ process
+ {
+ CheckResourceGraphModuleDependency
+
+ # $manifest = LoadManifest -DatasourceType $DatasourceType
+ $query = GetBackupVaultARGQuery
+
+ if($PSBoundParameters.ContainsKey("ResourceGroup")){ $query = AddFilterToQuery -Query $query -FilterKey "resourceGroup" -FilterValues $ResourceGroup }
+ if($PSBoundParameters.ContainsKey("Vault")){ $query = AddFilterToQuery -Query $query -FilterKey "name" -FilterValues $Vault }
+
+ foreach($param in @("Subscription", "ResourceGroup", "Vault"))
+ {
+ if($PSBoundParameters.ContainsKey($param))
+ {
+ $null = $PSBoundParameters.Remove($param)
+ }
+ }
+ $null = $PSBoundParameters.Add("Subscription", $Subscription)
+ $null = $PSBoundParameters.Add("query", $query)
+ $null = $PSBoundParameters.Add("First", 1000)
+ $null = $PSBoundParameters.Remove("HttpPipelinePrepend")
+
+ $argAllVaults = Az.ResourceGraph\Search-AzGraph @PSBoundParameters
+ $backupVaults = @()
+ foreach($argVault in $argAllVaults)
+ {
+ $jsonStringResponse = $argVault | ConvertTo-Json -Depth 100
+ $backupVaults += [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupVaultResource]::FromJsonString($jsonStringResponse)
+ }
+ return $backupVaults
+ }
+}
\ No newline at end of file
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Backupcenter/Search-AzDataProtectionJobInAzGraph.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Backupcenter/Search-AzDataProtectionJobInAzGraph.ps1
index df83d44b0c64..0eaca8744601 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Backupcenter/Search-AzDataProtectionJobInAzGraph.ps1
+++ b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Backupcenter/Search-AzDataProtectionJobInAzGraph.ps1
@@ -35,7 +35,53 @@
[Parameter(Mandatory, HelpMessage='Datasource Type')]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.DatasourceTypes]
- ${DatasourceType}
+ ${DatasourceType},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
)
process
@@ -76,6 +122,7 @@
$null = $PSBoundParameters.Add("Subscription", $Subscription)
$null = $PSBoundParameters.Add("query", $query)
$null = $PSBoundParameters.Add("First", 1000)
+ $null = $PSBoundParameters.Remove("HttpPipelinePrepend")
$argJobResponse = Az.ResourceGraph\Search-AzGraph @PSBoundParameters
@@ -83,7 +130,7 @@
foreach($jobresponse in $argJobResponse)
{
$jsonStringResponse = $jobresponse | ConvertTo-Json -Depth 100
- $backupJobs += [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupJobResource]::FromJsonString($jsonStringResponse)
+ $backupJobs += [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupJobResource]::FromJsonString($jsonStringResponse)
}
return $backupJobs
}
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Common/Initialize-AzDataProtectionBackupInstance.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Common/Initialize-AzDataProtectionBackupInstance.ps1
index 919e6d4ad6a4..d381085f89c8 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Common/Initialize-AzDataProtectionBackupInstance.ps1
+++ b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Common/Initialize-AzDataProtectionBackupInstance.ps1
@@ -2,7 +2,7 @@
function Initialize-AzDataProtectionBackupInstance {
- [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupInstanceResource')]
+ [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupInstanceResource')]
[CmdletBinding(PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Initializes Backup instance Request object for configuring backup')]
@@ -44,14 +44,14 @@ function Initialize-AzDataProtectionBackupInstance {
${FriendlyName},
[Parameter(Mandatory=$false, HelpMessage='Backup configuration for backup. Use this parameter to configure protection for AzureKubernetesService.')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupDatasourceParameters]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupDatasourceParameters]
${BackupConfiguration}
)
process {
$manifest = LoadManifest -DatasourceType $DatasourceType.ToString()
- $backupInstance = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupInstance]::new()
+ $backupInstance = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupInstance]::new()
$backupInstance.ObjectType = "BackupInstance"
if($manifest.snapshotRGPermissions.Length -eq 0 -and $SnapshotResourceGroupId -ne "")
@@ -106,9 +106,9 @@ function Initialize-AzDataProtectionBackupInstance {
$errormsg = "Please input SecretStoreType"
throw $errormsg
}
- $backupInstance.DatasourceAuthCredentials = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.SecretStoreBasedAuthCredentials]::new()
+ $backupInstance.DatasourceAuthCredentials = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.SecretStoreBasedAuthCredentials]::new()
$backupInstance.DatasourceAuthCredentials.ObjectType = "SecretStoreBasedAuthCredentials"
- $backupInstance.DatasourceAuthCredentials.SecretStoreResource = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.SecretStoreResource]::new()
+ $backupInstance.DatasourceAuthCredentials.SecretStoreResource = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.SecretStoreResource]::new()
$backupInstance.DatasourceAuthCredentials.SecretStoreResource.SecretStoreType = $SecretStoreType
$backupInstance.DatasourceAuthCredentials.SecretStoreResource.Uri = $SecretStoreURI
}
@@ -118,7 +118,7 @@ function Initialize-AzDataProtectionBackupInstance {
}
}
- $backupInstanceResource = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupInstanceResource]::new()
+ $backupInstanceResource = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupInstanceResource]::new()
$backupInstanceResource.Property = $backupInstance
if($PSBoundParameters.ContainsKey("DatasourceId"))
@@ -136,7 +136,7 @@ function Initialize-AzDataProtectionBackupInstance {
if($manifest.addDataStoreParametersList -eq $true)
{
- $operationalParam = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureOperationalStoreParameters]::new()
+ $operationalParam = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureOperationalStoreParameters]::new()
$operationalParam.DataStoreType = "OperationalStore"
$operationalParam.ObjectType = "AzureOperationalStoreParameters"
$operationalParam.ResourceGroupId = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}"
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Common/New-AzDataProtectionBackupConfigurationClientObject.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Common/New-AzDataProtectionBackupConfigurationClientObject.ps1
index 865a47fd87fc..7ba8131d9b3c 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Common/New-AzDataProtectionBackupConfigurationClientObject.ps1
+++ b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Common/New-AzDataProtectionBackupConfigurationClientObject.ps1
@@ -39,7 +39,7 @@ function New-AzDataProtectionBackupConfigurationClientObject{
${IncludeClusterScopeResource},
[Parameter(Mandatory=$false, HelpMessage='Hook reference to be executed during backup.')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.NamespacedNameResource[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.NamespacedNameResource[]]
${BackupHookReference},
[Parameter(Mandatory=$false, HelpMessage='List of containers to be backed up inside the VaultStore. Use this parameter for DatasourceType AzureBlob.')]
@@ -71,7 +71,7 @@ function New-AzDataProtectionBackupConfigurationClientObject{
throw $message
}
- $dataSourceParam = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.KubernetesClusterBackupDatasourceParameters]::new()
+ $dataSourceParam = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.KubernetesClusterBackupDatasourceParameters]::new()
$dataSourceParam.ObjectType = "KubernetesClusterBackupDatasourceParameters"
$dataSourceParam.ExcludedResourceType = $ExcludedResourceType
@@ -97,7 +97,7 @@ function New-AzDataProtectionBackupConfigurationClientObject{
}
if($DatasourceType.ToString() -eq "AzureBlob"){
- $dataSourceParam = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BlobBackupDatasourceParameters]::new()
+ $dataSourceParam = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BlobBackupDatasourceParameters]::new()
$dataSourceParam.ObjectType = "BlobBackupDatasourceParameters"
if($VaultedBackupContainer -ne $null){
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Common/New-AzDataProtectionBackupInstance.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Common/New-AzDataProtectionBackupInstance.ps1
index 8c410b0c7fcb..d6d209f59bec 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Common/New-AzDataProtectionBackupInstance.ps1
+++ b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Common/New-AzDataProtectionBackupInstance.ps1
@@ -20,7 +20,7 @@ function New-AzDataProtectionBackupInstance {
${VaultName},
[Parameter(Mandatory, HelpMessage='Backup instance request object which will be used to configure backup')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupInstanceResource]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupInstanceResource]
${BackupInstance},
[Parameter(Mandatory=$false, HelpMessage='Resource tags')]
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Common/New-AzDataProtectionResourceGuard.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Common/New-AzDataProtectionResourceGuard.ps1
index fab2773ebc51..33f3109487f9 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Common/New-AzDataProtectionResourceGuard.ps1
+++ b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Common/New-AzDataProtectionResourceGuard.ps1
@@ -2,7 +2,7 @@
function New-AzDataProtectionResourceGuard
{
- [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IResourceGuardResource')]
+ [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IResourceGuardResource')]
[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Creates a resource guard under a resource group')]
@@ -82,7 +82,7 @@ function New-AzDataProtectionResourceGuard
{
$null = $PSBoundParameters.Remove("IdentityType")
- # DppRef : need to move this to parameter level
+ # TODO : need to move this to parameter level
Write-Warning "Parameter IdentityType is no longer in use and will be depricated in upcoming breaking change release"
}
Az.DataProtection.Internal\New-AzDataProtectionResourceGuard @PSBoundParameters
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Common/Unlock-AzDataProtectionResourceGuardOperation.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Common/Unlock-AzDataProtectionResourceGuardOperation.ps1
index a51790951868..c1eadb406cd7 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Common/Unlock-AzDataProtectionResourceGuardOperation.ps1
+++ b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Common/Unlock-AzDataProtectionResourceGuardOperation.ps1
@@ -82,7 +82,7 @@ function Unlock-AzDataProtectionResourceGuardOperation
$ResGuardProxy = Get-AzDataProtectionResourceGuardMapping -VaultName $VaultName -ResourceGroupName $ResourceGroupName
}
- # DppRef : Add new operations
+ # TODO : Add new operations
$CriticalOperationsMap = @{ DisableMUA = "deleteResourceGuardProxyRequests"; DeleteBackupInstance = "deleteBackupInstanceRequests" }
# modify Critical operation exclusion list
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Common/Update-AzDataProtectionBackupInstanceAssociatedPolicy.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Common/Update-AzDataProtectionBackupInstanceAssociatedPolicy.ps1
index e09975d2843d..895e0a9017b7 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Common/Update-AzDataProtectionBackupInstanceAssociatedPolicy.ps1
+++ b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Common/Update-AzDataProtectionBackupInstanceAssociatedPolicy.ps1
@@ -2,7 +2,7 @@
function Update-AzDataProtectionBackupInstanceAssociatedPolicy
{
- [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupInstanceResource')]
+ [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupInstanceResource')]
[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Updates associated policy for a given backup instance')]
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Common/Update-AzDataProtectionResourceGuard.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Common/Update-AzDataProtectionResourceGuard.ps1
index c066a23c88bc..b3a5f280dd36 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Common/Update-AzDataProtectionResourceGuard.ps1
+++ b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Common/Update-AzDataProtectionResourceGuard.ps1
@@ -2,7 +2,7 @@
function Update-AzDataProtectionResourceGuard
{
- [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IResourceGuardResource')]
+ [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IResourceGuardResource')]
[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Updates a resource guard belonging to a resource group')]
@@ -113,7 +113,7 @@ function Update-AzDataProtectionResourceGuard
if($PSBoundParameters.ContainsKey("IdentityType"))
{
$null = $PSBoundParameters.Remove("IdentityType")
- # DppRef : need to move this to parameter level
+ # TODO : need to move this to parameter level
Write-Warning "Parameter IdentityType is no longer in use and will be depricated in upcoming breaking change release"
}
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Job/Get-AzDataProtectionJob.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Job/Get-AzDataProtectionJob.ps1
new file mode 100644
index 000000000000..1eda4db857e3
--- /dev/null
+++ b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Job/Get-AzDataProtectionJob.ps1
@@ -0,0 +1,126 @@
+function Get-AzDataProtectionJob
+{
+ [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupJobResource')]
+ [CmdletBinding(PositionalBinding=$false)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Gets or lists jobs in a backup vault')]
+
+ param(
+ [Parameter(ParameterSetName="Get", Mandatory=$false, HelpMessage='Subscription Id of the vault')]
+ [Parameter(ParameterSetName="List", Mandatory=$false, HelpMessage='Subscription Id of the vault')]
+ [System.String[]]
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName="Get", Mandatory=$true, HelpMessage='Resource Group of the backup vault')]
+ [Parameter(ParameterSetName="List", Mandatory=$true, HelpMessage='Resource Group of the backup vault')]
+ [System.String]
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName="Get", Mandatory=$true, HelpMessage='Name of the backup vault')]
+ [Parameter(ParameterSetName="List", Mandatory=$true, HelpMessage='Name of the backup vault')]
+ [System.String]
+ ${VaultName},
+
+ [Parameter(ParameterSetName="Get", Mandatory=$true, HelpMessage='Job ID to get a particular Job')]
+ [Alias('JobId')]
+ [System.String]
+ ${Id},
+
+ [Parameter(ParameterSetName="GetViaIdentity", Mandatory=$true, HelpMessage='Identity Parameter', ValueFromPipeline=$true)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity]
+ ${InputObject},
+
+ [Parameter(ParameterSetName="Get", Mandatory=$false, HelpMessage='Switch parameter to fetch dataprotection job from secondary region (Cross Region Restore)')]
+ [Parameter(ParameterSetName="List", Mandatory=$false, HelpMessage='Switch parameter to fetch dataprotection job from secondary region (Cross Region Restore)')]
+ [Switch]
+ ${UseSecondaryRegion},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+ )
+
+ process
+ {
+ $jobs = $null
+ $hasUseSecondaryRegion = $PSBoundParameters.Remove("UseSecondaryRegion")
+
+ if($hasUseSecondaryRegion){
+ $hasId = $PSBoundParameters.Remove("Id")
+
+ # fetch vault from ARG
+ $hasSubscriptionId = $PSBoundParameters.Remove("SubscriptionId")
+ $null = $PSBoundParameters.Remove("ResourceGroupName")
+ $null = $PSBoundParameters.Remove("VaultName")
+ $PSBoundParameters.Add('ResourceGroup', $ResourceGroupName)
+ $PSBoundParameters.Add('Vault', $VaultName)
+ if($hasSubscriptionId) { $PSBoundParameters.Add('Subscription', $SubscriptionId) }
+
+ $vault = Search-AzDataProtectionBackupVaultInAzGraph @PSBoundParameters
+
+ $null = $PSBoundParameters.Remove("Subscription")
+ $null = $PSBoundParameters.Remove("ResourceGroup")
+ $null = $PSBoundParameters.Remove("Vault")
+ $PSBoundParameters.Add('ResourceGroupName', $ResourceGroupName)
+ if($hasSubscriptionId) { $PSBoundParameters.Add('SubscriptionId', $SubscriptionId) }
+
+ # Location - CRR secondary region - $vault.ReplicatedRegion[0]
+ $PSBoundParameters.Add('Location', $vault.ReplicatedRegion[0])
+ $PSBoundParameters.Add('SourceBackupVaultId', $vault.Id)
+ $PSBoundParameters.Add('SourceRegion', $vault.Location)
+
+ if($hasId){
+ $PSBoundParameters.Add('JobId', $Id)
+ Az.DataProtection.internal\Get-AzDataProtectionCrossRegionRestoreJobDetail @PSBoundParameters
+ }
+ else{
+ Az.DataProtection.internal\Get-AzDataProtectionCrossRegionRestoreJob @PSBoundParameters
+ }
+ }
+ else{
+ Az.DataProtection.internal\Get-AzDataProtectionJob @PSBoundParameters
+ }
+
+ }
+}
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/RecoveryPoint/Get-AzDataProtectionRecoveryPoint_List.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/RecoveryPoint/Get-AzDataProtectionRecoveryPoint_List.ps1
index c4bdaa6b909b..1519b778be2d 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/RecoveryPoint/Get-AzDataProtectionRecoveryPoint_List.ps1
+++ b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/RecoveryPoint/Get-AzDataProtectionRecoveryPoint_List.ps1
@@ -29,6 +29,10 @@
[System.DateTime]
${EndTime},
+ [Parameter(Mandatory=$false, HelpMessage='Switch parameter to fetch recovery points from secondary region')]
+ [Switch]
+ ${UseSecondaryRegion},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -78,7 +82,6 @@
$utcStartTime = $StartTime.ToUniversalTime()
$startTimeFilter = $utcStartTime.ToString("yyyy-MM-ddTHH:mm:ss.0000000Z")
$filter = "startDate eq '" + $startTimeFilter + "'"
-
}
if($PSBoundParameters.ContainsKey("EndTime"))
{
@@ -102,7 +105,42 @@
$null = $PSBoundParameters.Add("Filter", $filter)
}
- $rps = Az.DataProtection.internal\Get-AzDataProtectionRecoveryPoint @PSBoundParameters
+ $hasUseSecondaryRegion = $PSBoundParameters.Remove("UseSecondaryRegion")
+
+ $rps = $null
+ if($hasUseSecondaryRegion){
+
+ # fetch vault from ARG
+ $null = $PSBoundParameters.Remove("BackupInstanceName")
+ $hasFilter = $PSBoundParameters.Remove("Filter")
+ $hasSubscriptionId = $PSBoundParameters.Remove("SubscriptionId")
+ $null = $PSBoundParameters.Remove("ResourceGroupName")
+ $null = $PSBoundParameters.Remove("VaultName")
+ $PSBoundParameters.Add('ResourceGroup', $ResourceGroupName)
+ $PSBoundParameters.Add('Vault', $VaultName)
+ if($hasSubscriptionId) { $PSBoundParameters.Add('Subscription', $SubscriptionId) }
+
+ $vault = Search-AzDataProtectionBackupVaultInAzGraph @PSBoundParameters
+
+ $null = $PSBoundParameters.Remove("Subscription")
+ $null = $PSBoundParameters.Remove("ResourceGroup")
+ $null = $PSBoundParameters.Remove("Vault")
+ $PSBoundParameters.Add('ResourceGroupName', $ResourceGroupName)
+ if($hasSubscriptionId) { $PSBoundParameters.Add('SubscriptionId', $SubscriptionId) }
+ if($hasFilter) { $PSBoundParameters.Add('Filter', $Filter) }
+
+ $backupInstanceId = "/subscriptions/" + $SubscriptionId + "/resourceGroups/" + $ResourceGroupName + "/providers/Microsoft.DataProtection/backupVaults/" + $VaultName + "/backupInstances/" + $BackupInstanceName
+
+ $PSBoundParameters.Add('Location', $vault.ReplicatedRegion[0])
+ $PSBoundParameters.Add('SourceBackupInstanceId', $backupInstanceId)
+ $PSBoundParameters.Add('SourceRegion', $vault.Location)
+
+ $rps = Az.DataProtection.internal\Get-AzDataProtectionFetchSecondaryRecoveryPoint @PSBoundParameters
+ }
+ else{
+ $rps = Az.DataProtection.internal\Get-AzDataProtectionRecoveryPoint @PSBoundParameters
+ }
+
return $rps
}
}
\ No newline at end of file
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Restore/Initialize-AzDataProtectionRestoreRequest.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Restore/Initialize-AzDataProtectionRestoreRequest.ps1
index ee5d319faa4f..004f43bf0479 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Restore/Initialize-AzDataProtectionRestoreRequest.ps1
+++ b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Restore/Initialize-AzDataProtectionRestoreRequest.ps1
@@ -1,6 +1,6 @@
function Initialize-AzDataProtectionRestoreRequest
{
- [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupRestoreRequest')]
+ [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupRestoreRequest')]
[CmdletBinding(PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Initializes Restore Request object for triggering restore on a protected backup instance.')]
@@ -67,11 +67,11 @@
[Parameter(ParameterSetName="RestoreAsFiles", Mandatory, HelpMessage='Restore Target Type')]
[Parameter(ParameterSetName="AlternateLocationILR", Mandatory, HelpMessage='Restore Target Type')]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.RestoreTargetType]
- ${RestoreType},
+ ${RestoreType},
[Parameter(ParameterSetName="OriginalLocationFullRecovery", Mandatory, HelpMessage='Backup Instance object to trigger original localtion restore.')]
[Parameter(ParameterSetName="OriginalLocationILR", Mandatory, HelpMessage='Backup Instance object to trigger original localtion restore.')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupInstanceResource]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupInstanceResource]
${BackupInstance},
# this is applicable to all workloads wherever ALR supported.
@@ -117,7 +117,7 @@
[Parameter(ParameterSetName="AlternateLocationILR", Mandatory=$false, HelpMessage='Restore configuration for restore. Use this parameter to restore with AzureKubernetesService.')]
[Parameter(ParameterSetName="OriginalLocationFullRecovery", Mandatory=$false, HelpMessage='Restore configuration for restore. Use this parameter to restore with AzureKubernetesService.')]
[Parameter(ParameterSetName="AlternateLocationFullRecovery", Mandatory=$false, HelpMessage='Restore configuration for restore. Use this parameter to restore with AzureKubernetesService.')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.KubernetesClusterRestoreCriteria]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.KubernetesClusterRestoreCriteria]
${RestoreConfiguration},
[Parameter(ParameterSetName="OriginalLocationFullRecovery", Mandatory=$false, HelpMessage='Secret uri for secret store authentication of data source. This parameter is only supported for AzureDatabaseForPostgreSQL currently.')]
@@ -151,7 +151,7 @@
Write-Debug -Message $RecoveryPoint
if($PSBoundParameters.ContainsKey("RehydrationPriority")){
- $restoreRequest = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupRestoreWithRehydrationRequest]::new()
+ $restoreRequest = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupRestoreWithRehydrationRequest]::new()
$restoreRequest.ObjectType = "AzureBackupRestoreWithRehydrationRequest"
$restoreRequest.RehydrationPriority = $RehydrationPriority
if($PSBoundParameters.ContainsKey("RehydrationDuration")){
@@ -162,7 +162,7 @@
}
}
else{
- $restoreRequest = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupRecoveryPointBasedRestoreRequest]::new()
+ $restoreRequest = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupRecoveryPointBasedRestoreRequest]::new()
$restoreRequest.ObjectType = "AzureBackupRecoveryPointBasedRestoreRequest"
}
$restoreRequest.RecoveryPointId = $RecoveryPoint
@@ -172,7 +172,7 @@
{
$utcTime = $PointInTime.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss.0000000Z")
Write-Debug -Message $utcTime
- $restoreRequest = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureBackupRecoveryTimeBasedRestoreRequest]::new()
+ $restoreRequest = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupRecoveryTimeBasedRestoreRequest]::new()
$restoreRequest.ObjectType = "AzureBackupRecoveryTimeBasedRestoreRequest"
$restoreRequest.RecoveryPointTime = $utcTime
$restoreMode = "PointInTimeBased"
@@ -189,7 +189,7 @@
if($RestoreType -eq "RestoreAsFiles")
{
- $restoreRequest.RestoreTargetInfo = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.RestoreFilesTargetInfo]::new()
+ $restoreRequest.RestoreTargetInfo = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.RestoreFilesTargetInfo]::new()
$restoreRequest.RestoreTargetInfo.ObjectType = "RestoreFilesTargetInfo"
if(!($PSBoundParameters.ContainsKey("FileNamePrefix")) -or !($PSBoundParameters.ContainsKey("TargetContainerURI")) ){
@@ -210,11 +210,11 @@
{
# RestoreTargetInfo for OLR ALR Full recovery
if($DatasourceType -ne "AzureKubernetesService"){
- $restoreRequest.RestoreTargetInfo = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.RestoreTargetInfo]::new()
+ $restoreRequest.RestoreTargetInfo = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.RestoreTargetInfo]::new()
$restoreRequest.RestoreTargetInfo.ObjectType = "restoreTargetInfo"
}
else{
- $restoreRequest.RestoreTargetInfo = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ItemLevelRestoreTargetInfo]::new()
+ $restoreRequest.RestoreTargetInfo = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ItemLevelRestoreTargetInfo]::new()
$restoreRequest.RestoreTargetInfo.ObjectType = "itemLevelRestoreTargetInfo"
$restoreCriteriaList = @()
@@ -234,18 +234,18 @@
else
{
# ILR: ItemLevelRestoreTargetInfo
- $restoreRequest.RestoreTargetInfo = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ItemLevelRestoreTargetInfo]::new()
+ $restoreRequest.RestoreTargetInfo = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ItemLevelRestoreTargetInfo]::new()
$restoreRequest.RestoreTargetInfo.ObjectType = "itemLevelRestoreTargetInfo"
$restoreCriteriaList = @()
# can generalise this condition to manifest level if needed
- if($DatasourceType -ne "AzureKubernetesService"){
+ if($DatasourceType -ne "AzureKubernetesService"){ # TODO: remove Datasource dependency
if(($RecoveryPoint -ne $null) -and ($RecoveryPoint -ne "") -and $ContainersList.length -gt 0){
for($i = 0; $i -lt $ContainersList.length; $i++){
- $restoreCriteria = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ItemPathBasedRestoreCriteria]::new()
+ $restoreCriteria = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ItemPathBasedRestoreCriteria]::new()
$restoreCriteria.ObjectType = "ItemPathBasedRestoreCriteria"
$restoreCriteria.ItemPath = $ContainersList[$i]
@@ -258,7 +258,7 @@
elseif($ContainersList.length -gt 0){
for($i = 0; $i -lt $ContainersList.length; $i++){
- $restoreCriteria = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.RangeBasedItemLevelRestoreCriteria]::new()
+ $restoreCriteria = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.RangeBasedItemLevelRestoreCriteria]::new()
$restoreCriteria.ObjectType = "RangeBasedItemLevelRestoreCriteria"
$restoreCriteria.MinMatchingValue = $ContainersList[$i]
@@ -277,7 +277,7 @@
for($i = 0; $i -lt $FromPrefixPattern.length; $i++){
- $restoreCriteria = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.RangeBasedItemLevelRestoreCriteria]::new()
+ $restoreCriteria = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.RangeBasedItemLevelRestoreCriteria]::new()
$restoreCriteria.ObjectType = "RangeBasedItemLevelRestoreCriteria"
$restoreCriteria.MinMatchingValue = $FromPrefixPattern[$i]
@@ -352,9 +352,9 @@
$errormsg = "Please input SecretStoreType"
throw $errormsg
}
- $restoreRequest.RestoreTargetInfo.DatasourceAuthCredentials = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.SecretStoreBasedAuthCredentials]::new()
+ $restoreRequest.RestoreTargetInfo.DatasourceAuthCredentials = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.SecretStoreBasedAuthCredentials]::new()
$restoreRequest.RestoreTargetInfo.DatasourceAuthCredentials.ObjectType = "SecretStoreBasedAuthCredentials"
- $restoreRequest.RestoreTargetInfo.DatasourceAuthCredentials.SecretStoreResource = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.SecretStoreResource]::new()
+ $restoreRequest.RestoreTargetInfo.DatasourceAuthCredentials.SecretStoreResource = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.SecretStoreResource]::new()
$restoreRequest.RestoreTargetInfo.DatasourceAuthCredentials.SecretStoreResource.SecretStoreType = $SecretStoreType
$restoreRequest.RestoreTargetInfo.DatasourceAuthCredentials.SecretStoreResource.Uri = $SecretStoreURI
}
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Restore/New-AzDataProtectionRestoreConfigurationClientObject.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Restore/New-AzDataProtectionRestoreConfigurationClientObject.ps1
index a8094430e4d8..0d01a9451a0c 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Restore/New-AzDataProtectionRestoreConfigurationClientObject.ps1
+++ b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Restore/New-AzDataProtectionRestoreConfigurationClientObject.ps1
@@ -40,7 +40,7 @@ function New-AzDataProtectionRestoreConfigurationClientObject{
${ConflictPolicy},
[Parameter(Mandatory=$false, HelpMessage='Namespaces mapping from source namespaces to target namespaces to resolve namespace naming conflicts in the target cluster.')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.KubernetesClusterRestoreCriteriaNamespaceMappings]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.KubernetesClusterRestoreCriteriaNamespaceMappings]
${NamespaceMapping},
[Parameter(Mandatory=$false, HelpMessage='Restore mode for persistent volumes. Allowed values are RestoreWithVolumeData, RestoreWithoutVolumeData. Default value is RestoreWithVolumeData')]
@@ -49,12 +49,12 @@ function New-AzDataProtectionRestoreConfigurationClientObject{
${PersistentVolumeRestoreMode},
[Parameter(Mandatory=$false, HelpMessage='Hook reference to be executed during restore.')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.NamespacedNameResource[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.NamespacedNameResource[]]
${RestoreHookReference}
)
process {
- $restoreCriteria = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.KubernetesClusterRestoreCriteria]::new()
+ $restoreCriteria = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.KubernetesClusterRestoreCriteria]::new()
$restoreCriteria.ObjectType = "KubernetesClusterRestoreCriteria"
$restoreCriteria.ExcludedResourceType = $ExcludedResourceType
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Restore/Start-AzDataProtectionBackupInstanceRestore.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Restore/Start-AzDataProtectionBackupInstanceRestore.ps1
new file mode 100644
index 000000000000..f876f68abadd
--- /dev/null
+++ b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Restore/Start-AzDataProtectionBackupInstanceRestore.ps1
@@ -0,0 +1,172 @@
+
+
+function Start-AzDataProtectionBackupInstanceRestore
+{
+ [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IOperationJobExtendedInfo')]
+ [CmdletBinding(PositionalBinding=$false, SupportsShouldProcess)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Triggers restore for a BackupInstance')]
+
+ param(
+ # Trigger, TriggerExpanded
+ [Parameter(Mandatory=$false, HelpMessage='Subscription Id of the backup vault')]
+ [System.String]
+ ${SubscriptionId},
+
+ [Parameter(Mandatory, HelpMessage='The name of the resource group where the backup vault is present')]
+ [System.String]
+ ${ResourceGroupName},
+
+ [Parameter(Mandatory, HelpMessage='The name of the backup instance')]
+ [System.String]
+ ${BackupInstanceName},
+
+ [Parameter(Mandatory, HelpMessage='The name of the backup vault')]
+ [System.String]
+ ${VaultName},
+
+ [Parameter(ParameterSetName="Trigger", Mandatory, HelpMessage='Restore request object to be initialized using Initialize-AzDataProtectionRestoreRequest cmdlet', ValueFromPipeline=$true)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupRestoreRequest]
+ ${Parameter},
+
+ [Parameter(ParameterSetName="TriggerExpanded", Mandatory, HelpMessage='Object type of the restore request')]
+ [System.String]
+ ${ObjectType},
+
+ [Parameter(ParameterSetName="TriggerExpanded", Mandatory, HelpMessage='Gets or sets the restore target information')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IRestoreTargetInfoBase]
+ ${RestoreTargetInfo},
+
+ [Parameter(ParameterSetName="TriggerExpanded", Mandatory, HelpMessage='Type of the source data store')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.SourceDataStoreType]
+ ${SourceDataStoreType},
+
+ [Parameter(ParameterSetName="TriggerExpanded", Mandatory=$false, HelpMessage='ARM URL for User Assigned Identity')]
+ [System.String]
+ ${IdentityDetailUserAssignedIdentityArmUrl}, # TODO: add parameter alias to this and below
+
+ [Parameter(ParameterSetName="TriggerExpanded", Mandatory=$false, HelpMessage='Specifies if the BI is protected by System Identity')]
+ [System.Management.Automation.SwitchParameter]
+ ${IdentityDetailUseSystemAssignedIdentity},
+
+ [Parameter(ParameterSetName="TriggerExpanded", Mandatory=$false, HelpMessage='Fully qualified Azure Resource Manager ID of the datasource which is being recovered')]
+ [System.String]
+ ${SourceResourceId},
+
+ [Parameter(Mandatory=$false, HelpMessage='Switch parameter to trigger restore to secondary region (Cross region restore)')]
+ [Switch]
+ ${RestoreToSecondaryRegion},
+
+ [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.DataProtection.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.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(HelpMessage='Run the command as a job')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(HelpMessage='Run the command asynchronously')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [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
+ {
+ $hasRestoreToSecondaryRegion = $PSBoundParameters.Remove("RestoreToSecondaryRegion")
+
+ if($hasRestoreToSecondaryRegion){
+
+ $hasParameter = $PSBoundParameters.Remove("Parameter")
+ $hasObjectType = $PSBoundParameters.Remove("ObjectType")
+ $hasRestoreTargetInfo = $PSBoundParameters.Remove("RestoreTargetInfo")
+ $hasSourceDataStoreType = $PSBoundParameters.Remove("SourceDataStoreType")
+ $hasSourceResourceId = $PSBoundParameters.Remove("SourceResourceId")
+ $hasIdentityDetailUserAssignedIdentityArmUrl = $PSBoundParameters.Remove("IdentityDetailUserAssignedIdentityArmUrl")
+ $hasIdentityDetailUseSystemAssignedIdentity = $PSBoundParameters.Remove("IdentityDetailUseSystemAssignedIdentity")
+
+ # fetch vault from ARG
+ $hasSubscriptionId = $PSBoundParameters.Remove("SubscriptionId")
+ $null = $PSBoundParameters.Remove("ResourceGroupName")
+ $null = $PSBoundParameters.Remove("VaultName")
+ $null = $PSBoundParameters.Remove("BackupInstanceName")
+
+ $PSBoundParameters.Add('ResourceGroup', $ResourceGroupName)
+ $PSBoundParameters.Add('Vault', $VaultName)
+ if($hasSubscriptionId) { $PSBoundParameters.Add('Subscription', $SubscriptionId) }
+
+ $vault = Search-AzDataProtectionBackupVaultInAzGraph @PSBoundParameters
+
+ $null = $PSBoundParameters.Remove("Subscription")
+ $null = $PSBoundParameters.Remove("ResourceGroup")
+ $null = $PSBoundParameters.Remove("Vault")
+ $PSBoundParameters.Add('ResourceGroupName', $ResourceGroupName)
+ if($hasSubscriptionId) { $PSBoundParameters.Add('SubscriptionId', $SubscriptionId) }
+
+ $backupInstanceId = "/subscriptions/" + $SubscriptionId + "/resourceGroups/" + $ResourceGroupName + "/providers/Microsoft.DataProtection/backupVaults/" + $VaultName + "/backupInstances/" + $BackupInstanceName
+
+ $crossRegionRestoreDetail = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.CrossRegionRestoreDetails]::new()
+ $crossRegionRestoreDetail.SourceBackupInstanceId = $backupInstanceId
+ $crossRegionRestoreDetail.SourceRegion = $vault.Location
+
+ $PSBoundParameters.Add('Location', $vault.ReplicatedRegion[0])
+ $PSBoundParameters.Add("CrossRegionRestoreDetail", $crossRegionRestoreDetail)
+
+ if($hasParameter){
+ $PSBoundParameters.Add("RestoreRequestObject", $Parameter)
+ }
+ else{
+ $restoreRequestObject = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureBackupRestoreRequest]::new()
+ if($hasObjectType) { $restoreRequestObject.ObjectType = $ObjectType }
+ if($hasRestoreTargetInfo) { $restoreRequestObject.RestoreTargetInfo = $RestoreTargetInfo }
+ if($hasSourceDataStoreType) { $restoreRequestObject.SourceDataStoreType = $SourceDataStoreType }
+ if($hasSourceResourceId) { $restoreRequestObject.SourceResourceId = $SourceResourceId }
+ if($hasIdentityDetailUseSystemAssignedIdentity) { $restoreRequestObject.IdentityDetailUseSystemAssignedIdentity = $IdentityDetailUseSystemAssignedIdentity }
+ if($hasIdentityDetailUserAssignedIdentityArmUrl) { $restoreRequestObject.IdentityDetailUserAssignedIdentityArmUrl = $IdentityDetailUserAssignedIdentityArmUrl }
+
+ $PSBoundParameters.Add("RestoreRequestObject", $restoreRequestObject)
+ }
+
+ Az.DataProtection.Internal\Start-AzDataProtectionBackupInstanceCrossRegionRestore @PSBoundParameters
+ }
+ else{
+ Az.DataProtection.Internal\Start-AzDataProtectionBackupInstanceRestore @PSBoundParameters
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Restore/Test-AzDataProtectionBackupInstanceRestore.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Restore/Test-AzDataProtectionBackupInstanceRestore.ps1
index e33f00439b9a..de534eab8556 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Restore/Test-AzDataProtectionBackupInstanceRestore.ps1
+++ b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Restore/Test-AzDataProtectionBackupInstanceRestore.ps1
@@ -2,7 +2,7 @@
function Test-AzDataProtectionBackupInstanceRestore
{
- [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IOperationJobExtendedInfo')]
+ [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IOperationJobExtendedInfo')]
[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Validates if Restore can be triggered for a DataSource')]
@@ -24,9 +24,13 @@ function Test-AzDataProtectionBackupInstanceRestore
${VaultName},
[Parameter(ParameterSetName="ValidateRestore", Mandatory, HelpMessage='Restore request object for which to validate')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupRestoreRequest]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupRestoreRequest]
${RestoreRequest},
+ [Parameter(Mandatory=$false, HelpMessage='Switch parameter to trigger restore to secondary region')]
+ [Switch]
+ ${RestoreToSecondaryRegion},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -80,12 +84,49 @@ function Test-AzDataProtectionBackupInstanceRestore
process
{
- $Parameter = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ValidateRestoreRequestObject]::new()
- $Parameter.RestoreRequestObject = $RestoreRequest
+ $hasRestoreToSecondaryRegion = $PSBoundParameters.Remove("RestoreToSecondaryRegion")
$null = $PSBoundParameters.Remove("RestoreRequest")
+ if($hasRestoreToSecondaryRegion){
+
+ # fetch vault from ARG
+ $hasSubscriptionId = $PSBoundParameters.Remove("SubscriptionId")
+ $null = $PSBoundParameters.Remove("ResourceGroupName")
+ $null = $PSBoundParameters.Remove("VaultName")
+ $null = $PSBoundParameters.Remove("Name")
+
+ $PSBoundParameters.Add('ResourceGroup', $ResourceGroupName)
+ $PSBoundParameters.Add('Vault', $VaultName)
+ if($hasSubscriptionId) { $PSBoundParameters.Add('Subscription', $SubscriptionId) }
+
+ $vault = Search-AzDataProtectionBackupVaultInAzGraph @PSBoundParameters
+
+ $null = $PSBoundParameters.Remove("Subscription")
+ $null = $PSBoundParameters.Remove("ResourceGroup")
+ $null = $PSBoundParameters.Remove("Vault")
+ $PSBoundParameters.Add('ResourceGroupName', $ResourceGroupName)
+ if($hasSubscriptionId) { $PSBoundParameters.Add('SubscriptionId', $SubscriptionId) }
+
+ $backupInstanceId = "/subscriptions/" + $SubscriptionId + "/resourceGroups/" + $ResourceGroupName + "/providers/Microsoft.DataProtection/backupVaults/" + $VaultName + "/backupInstances/" + $Name
+
+ $Parameter = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ValidateCrossRegionRestoreRequestObject]::new()
+ $Parameter.RestoreRequestObject = $RestoreRequest
+
+ $Parameter.CrossRegionRestoreDetail = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.CrossRegionRestoreDetails]::new()
+ $Parameter.CrossRegionRestoreDetail.SourceBackupInstanceId = $backupInstanceId
+ $Parameter.CrossRegionRestoreDetail.SourceRegion = $vault.Location
+
+ $PSBoundParameters.Add("Parameter", $Parameter)
+ $PSBoundParameters.Add('Location', $vault.ReplicatedRegion[0])
+
+ Az.DataProtection.Internal\Test-AzDataProtectionBackupInstanceCrossRegionRestore @PSBoundParameters
+ }
+ else{
+ $Parameter = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ValidateRestoreRequestObject]::new()
+ $Parameter.RestoreRequestObject = $RestoreRequest
- $null = $PSBoundParameters.Add("Parameter", $Parameter)
+ $null = $PSBoundParameters.Add("Parameter", $Parameter)
- Az.DataProtection.Internal\Test-AzDataProtectionBackupInstanceRestore @PSBoundParameters
+ Az.DataProtection.Internal\Test-AzDataProtectionBackupInstanceRestore @PSBoundParameters
+ }
}
}
\ No newline at end of file
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Vault/New-AzDataProtectionBackupVault.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Vault/New-AzDataProtectionBackupVault.ps1
index 52087f0658e4..653f398bc72f 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Vault/New-AzDataProtectionBackupVault.ps1
+++ b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Vault/New-AzDataProtectionBackupVault.ps1
@@ -30,7 +30,7 @@
${Location},
[Parameter(Mandatory, HelpMessage='Storage Settings of the vault. Use New-AzDataProtectionBackupVaultStorageSetting Cmdlet to Create.')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IStorageSetting[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IStorageSetting[]]
${StorageSetting},
[Parameter(Mandatory=$false, HelpMessage='Parameter to Enable or Disable built-in azure monitor alerts for job failures. Security alerts cannot be disabled.')]
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Vault/New-AzDataProtectionBackupVaultStorageSettingObject.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Vault/New-AzDataProtectionBackupVaultStorageSettingObject.ps1
index db3e29591115..7d19850bb409 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Vault/New-AzDataProtectionBackupVaultStorageSettingObject.ps1
+++ b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Vault/New-AzDataProtectionBackupVaultStorageSettingObject.ps1
@@ -15,7 +15,7 @@ function New-AzDataProtectionBackupVaultStorageSettingObject{
)
process {
- $storageSetting = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.StorageSetting]::new()
+ $storageSetting = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.StorageSetting]::new()
$storageSetting.Type = $Type
$storageSetting.DataStoreType = $DataStoreType
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Vault/Set-AzDataProtectionMSIPermission.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Vault/Set-AzDataProtectionMSIPermission.ps1
index b998dde14985..112335ae6533 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Vault/Set-AzDataProtectionMSIPermission.ps1
+++ b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Platform/Vault/Set-AzDataProtectionMSIPermission.ps1
@@ -5,7 +5,7 @@
param(
[Parameter(ParameterSetName="SetPermissionsForBackup", Mandatory, HelpMessage='Backup instance request object which will be used to configure backup')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupInstanceResource]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupInstanceResource]
${BackupInstance},
[Parameter(ParameterSetName="SetPermissionsForBackup", Mandatory=$false, HelpMessage='ID of the keyvault')]
@@ -27,7 +27,7 @@
${PermissionsScope},
[Parameter(ParameterSetName="SetPermissionsForRestore", Mandatory, HelpMessage='Restore request object which will be used for restore')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupRestoreRequest]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupRestoreRequest]
${RestoreRequest},
[Parameter(ParameterSetName="SetPermissionsForRestore", Mandatory, HelpMessage='Sanpshot Resource Group')]
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/Edit-AzDataProtectionPolicyRetentionRuleClientObject.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/Edit-AzDataProtectionPolicyRetentionRuleClientObject.ps1
index daf3f920b9ca..8bd20805adab 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/Edit-AzDataProtectionPolicyRetentionRuleClientObject.ps1
+++ b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/Edit-AzDataProtectionPolicyRetentionRuleClientObject.ps1
@@ -1,14 +1,14 @@

function Edit-AzDataProtectionPolicyRetentionRuleClientObject {
- [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy')]
+ [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy')]
[CmdletBinding(PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Adds or removes Retention Rule to existing Policy')]
param(
[Parameter(ParameterSetName='AddRetention',Mandatory, HelpMessage='Backup Policy Object')]
[Parameter(ParameterSetName='RemoveRetention',Mandatory, HelpMessage='Backup Policy Object')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy]
${Policy},
[Parameter(ParameterSetName='AddRetention',Mandatory, HelpMessage='Retention Rule Name')]
@@ -29,7 +29,7 @@ function Edit-AzDataProtectionPolicyRetentionRuleClientObject {
${OverwriteLifeCycle},
[Parameter(ParameterSetName='AddRetention',Mandatory, HelpMessage='Life cycles associated with the retention rule.')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ISourceLifeCycle[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ISourceLifeCycle[]]
${LifeCycles}
)
@@ -68,7 +68,7 @@ function Edit-AzDataProtectionPolicyRetentionRuleClientObject {
throw "Selected Retention Rule " + $Name + " is not applicable for datasource type " + $DatasourceType
}
- $newRetentionRule = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureRetentionRule]::new()
+ $newRetentionRule = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureRetentionRule]::new()
$newRetentionRule.ObjectType = "AzureRetentionRule"
$newRetentionRule.IsDefault = $IsDefault
$newRetentionRule.Name = $Name
@@ -92,7 +92,7 @@ function Edit-AzDataProtectionPolicyRetentionRuleClientObject {
throw $message
}
- $newRetentionRule = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.AzureRetentionRule]::new()
+ $newRetentionRule = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.AzureRetentionRule]::new()
$newRetentionRule.ObjectType = "AzureRetentionRule"
$newRetentionRule.IsDefault = $IsDefault
$newRetentionRule.Name = $Name
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/Edit-AzDataProtectionPolicyTagClientObject.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/Edit-AzDataProtectionPolicyTagClientObject.ps1
index 592fee79a93e..15d337707f6e 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/Edit-AzDataProtectionPolicyTagClientObject.ps1
+++ b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/Edit-AzDataProtectionPolicyTagClientObject.ps1
@@ -1,12 +1,12 @@
function Edit-AzDataProtectionPolicyTagClientObject{
- [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy')]
+ [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy')]
[CmdletBinding(PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Adds or removes schedule tag in an existing backup policy.')]
param(
[Parameter(ParameterSetName='updateTag', Mandatory, HelpMessage='Backup Policy Object.')]
[Parameter(ParameterSetName='RemoveTag', Mandatory, HelpMessage='Backup Policy Object.')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy]
${Policy},
[Parameter(ParameterSetName='updateTag', Mandatory, HelpMessage='Name of the Schedule tag.')]
@@ -19,7 +19,7 @@
${RemoveRule},
[Parameter(ParameterSetName='updateTag', Mandatory, HelpMessage='Criterias to be associated with the schedule tag.')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IScheduleBasedBackupCriteria[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IScheduleBasedBackupCriteria[]]
${Criteria}
)
@@ -83,7 +83,7 @@
if($tagIndex -eq -1)
{
- $tagCriteria = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.TaggingCriteria]::new()
+ $tagCriteria = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.TaggingCriteria]::new()
$tagCriteria.TaggingPriority = GetTaggingPriority -Name $Name
$tagCriteria.Criterion = $Criteria
$tagCriteria.TagInfoTagName = $Name
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/Edit-AzDataProtectionPolicyTriggerClientObject.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/Edit-AzDataProtectionPolicyTriggerClientObject.ps1
index ea96d3dac8cd..7cccb0209bc2 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/Edit-AzDataProtectionPolicyTriggerClientObject.ps1
+++ b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/Edit-AzDataProtectionPolicyTriggerClientObject.ps1
@@ -1,12 +1,12 @@
function Edit-AzDataProtectionPolicyTriggerClientObject{
- [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy')]
+ [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy')]
[CmdletBinding(PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Updates Backup schedule of an existing backup policy.')]
param (
[Parameter(ParameterSetName='ModifyBackupSchedule', Mandatory, HelpMessage='Backup Policy object.')]
[Parameter(ParameterSetName='RemoveBackupSchedule', Mandatory, HelpMessage='Backup Policy object.')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy]
${Policy},
[Parameter(ParameterSetName='ModifyBackupSchedule', Mandatory, HelpMessage='Schedule to be associated to backup policy.')]
@@ -40,7 +40,7 @@
if($index -ne -1) # $backupRuleIndex -ne -1
{
- # DppRef : can add a optional parameter TimeZone
+ # TODO : can add a optional parameter TimeZone
# set Local TimeZone for policy Schedule
$timezone = Get-TimeZone
$Policy.PolicyRule[$backupRuleIndex].Trigger.ScheduleTimeZone = $timezone.StandardName
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/Get-AzDataProtectionPolicyTemplate.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/Get-AzDataProtectionPolicyTemplate.ps1
index a864b07ba9b1..f59870bd63bf 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/Get-AzDataProtectionPolicyTemplate.ps1
+++ b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/Get-AzDataProtectionPolicyTemplate.ps1
@@ -1,7 +1,7 @@

function Get-AzDataProtectionPolicyTemplate {
- [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy')]
+ [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy')]
[CmdletBinding(PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Gets default policy template for a selected datasource type.')]
@@ -17,7 +17,7 @@ function Get-AzDataProtectionPolicyTemplate {
$manifestPolicyObject = $manifest.policySettings.defaultPolicy
$jsonPolicyString = $manifestPolicyObject | ConvertTo-Json -Depth 100
- $defaultPolicy = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupPolicy]::FromJsonString($jsonPolicyString)
+ $defaultPolicy = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupPolicy]::FromJsonString($jsonPolicyString)
return $defaultPolicy
}
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/New-AzDataProtectionBackupPolicy.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/New-AzDataProtectionBackupPolicy.ps1
index 11d2d3b3c6f7..e7d8bbbac53f 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/New-AzDataProtectionBackupPolicy.ps1
+++ b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/New-AzDataProtectionBackupPolicy.ps1
@@ -1,7 +1,7 @@
function New-AzDataProtectionBackupPolicy
{
- [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBaseBackupPolicyResource')]
+ [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBaseBackupPolicyResource')]
[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Creates a new backup policy in a given backup vault')]
@@ -23,7 +23,7 @@
${Name},
[Parameter(Mandatory, HelpMessage='Policy Request Object')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy]
${Policy},
[Parameter()]
@@ -114,7 +114,7 @@
$index += 1
}
- $policyObject = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BaseBackupPolicyResource]::new()
+ $policyObject = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BaseBackupPolicyResource]::new()
$policyObject.Property = $Policy
$null = $PSBoundParameters.Remove("Policy")
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/New-AzDataProtectionPolicyTagCriteriaClientObject.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/New-AzDataProtectionPolicyTagCriteriaClientObject.ps1
index cd569681af09..6b76776968b6 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/New-AzDataProtectionPolicyTagCriteriaClientObject.ps1
+++ b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/New-AzDataProtectionPolicyTagCriteriaClientObject.ps1
@@ -1,5 +1,5 @@
function New-AzDataProtectionPolicyTagCriteriaClientObject{
- [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IScheduleBasedBackupCriteria')]
+ [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IScheduleBasedBackupCriteria')]
[CmdletBinding(PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Creates a new criteria object')]
@@ -32,7 +32,7 @@
)
process {
- $criteria = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ScheduleBasedBackupCriteria]::new()
+ $criteria = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ScheduleBasedBackupCriteria]::new()
$criteria.ObjectType = "ScheduleBasedBackupCriteria"
if($AbsoluteCriteria -ne $null){
$criteria.AbsoluteCriterion = $AbsoluteCriteria
@@ -61,7 +61,7 @@
{
throw "Day of month should be between 1 and 28."
}
- $day = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.Day]::new()
+ $day = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.Day]::new()
$day.Date = $dayOfMonthNumber
$day.IsLast = $false
$criteria.DaysOfMonth += $day
@@ -72,7 +72,7 @@
{
thow "Day of month should either be between 1 and 28 or it should be last"
}
- $day = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.Day]::new()
+ $day = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.Day]::new()
$day.IsLast = $true
$criteria.DaysOfMonth += $day
}
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/New-AzDataProtectionPolicyTriggerScheduleClientObject.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/New-AzDataProtectionPolicyTriggerScheduleClientObject.ps1
index 2cd54e9306f2..efe08015a712 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/New-AzDataProtectionPolicyTriggerScheduleClientObject.ps1
+++ b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/New-AzDataProtectionPolicyTriggerScheduleClientObject.ps1
@@ -19,7 +19,7 @@ function New-AzDataProtectionPolicyTriggerScheduleClientObject{
)
process {
- # DppRef: can add a TimeZone parameter to control the timezone and offset
+ # TODO: can add a TimeZone parameter to control the timezone and offset
# Validation for Interval Type and Interval count
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/New-AzDataProtectionRetentionLifeCycleClientObject.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/New-AzDataProtectionRetentionLifeCycleClientObject.ps1
index 1802965f33a1..1f6b757893c0 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/New-AzDataProtectionRetentionLifeCycleClientObject.ps1
+++ b/src/DataProtection/DataProtection.Autorest/custom/Cmdlets/Policy/New-AzDataProtectionRetentionLifeCycleClientObject.ps1
@@ -1,5 +1,5 @@
function New-AzDataProtectionRetentionLifeCycleClientObject {
- [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ISourceLifeCycle')]
+ [OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ISourceLifeCycle')]
[CmdletBinding(PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Creates new Lifecycle object')]
@@ -26,7 +26,7 @@
)
process {
- $lifeCycle = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.SourceLifeCycle]::new()
+ $lifeCycle = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.SourceLifeCycle]::new()
$lifeCycle.SourceDataStoreObjectType = "DataStoreInfoBase"
$lifeCycle.SourceDataStoreType = $SourceDataStore
$lifeCycle.DeleteAfterObjectType = "AbsoluteDeleteOption"
@@ -34,7 +34,7 @@
if(($TargetDataStore -ne $null) -and ($CopyOption -ne $null))
{
- $targetCopySetting = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.TargetCopySetting]::new()
+ $targetCopySetting = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.TargetCopySetting]::new()
$targetCopySetting.DataStoreObjectType = "DataStoreInfoBase"
$targetCopySetting.DataStoreType = $TargetDataStore
$targetCopySetting.CopyAfterObjectType = $CopyOption
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Helpers/BackupcenterHelper.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Helpers/BackupcenterHelper.ps1
index 96b3533db207..9f7031b00c79 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/Helpers/BackupcenterHelper.ps1
+++ b/src/DataProtection/DataProtection.Autorest/custom/Helpers/BackupcenterHelper.ps1
@@ -285,6 +285,17 @@ function GetBackupJobARGQuery {
$query += ", tolower(properties.operationCategory) startswith 'backup' and properties.isUserTriggered == 'false', strcat('Scheduled', properties.operationCategory)"
$query += ", type =~ 'microsoft.dataprotection/backupVaults/backupJobs', properties.operationCategory, 'Invalid')"
+ return $query
+ }
+}
+
+function GetBackupVaultARGQuery {
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.DoNotExportAttribute()]
+ param()
+
+ process {
+ $query = "Resources | where type =~ 'microsoft.dataprotection/backupvaults'"
+
return $query
}
}
\ No newline at end of file
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Helpers/CommonHelpers.ps1 b/src/DataProtection/DataProtection.Autorest/custom/Helpers/CommonHelpers.ps1
index f14cd457c1a4..3df0dc36ce7d 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/Helpers/CommonHelpers.ps1
+++ b/src/DataProtection/DataProtection.Autorest/custom/Helpers/CommonHelpers.ps1
@@ -5,7 +5,7 @@ function GetDatasourceSetInfo
param(
[Parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IDatasource]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IDatasource]
$DatasourceInfo,
[Parameter(Mandatory=$true)]
@@ -16,7 +16,7 @@ function GetDatasourceSetInfo
process
{
- $DataSourceSetInfo = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.DatasourceSet]::new()
+ $DataSourceSetInfo = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.DatasourceSet]::new()
$DataSourceSetInfo.DatasourceType = $DatasourceInfo.Type
$DataSourceSetInfo.ObjectType = "DatasourceSet"
$DataSourceSetInfo.ResourceLocation = $DatasourceInfo.ResourceLocation
@@ -64,7 +64,7 @@ function GetDatasourceInfo
process
{
$manifest = LoadManifest -DatasourceType $DatasourceType.ToString()
- $DataSourceInfo = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.Datasource]::new()
+ $DataSourceInfo = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.Datasource]::new()
$DataSourceInfo.ObjectType = "Datasource"
$DataSourceInfo.ResourceId = $ResourceId
$DataSourceInfo.ResourceLocation = $ResourceLocation
diff --git a/src/DataProtection/DataProtection.Autorest/custom/Models/BackupInstanceResource.cs b/src/DataProtection/DataProtection.Autorest/custom/Models/BackupInstanceResource.cs
index 0e5464e19f88..6ee1b1544806 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/Models/BackupInstanceResource.cs
+++ b/src/DataProtection/DataProtection.Autorest/custom/Models/BackupInstanceResource.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;
-namespace Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501
+namespace Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101
{
public partial class BackupInstanceResource
{
diff --git a/src/DataProtection/DataProtection.Autorest/custom/manifests/AzureBlob.json b/src/DataProtection/DataProtection.Autorest/custom/manifests/AzureBlob.json
index 193bb14db1dd..9e561f7ce9bd 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/manifests/AzureBlob.json
+++ b/src/DataProtection/DataProtection.Autorest/custom/manifests/AzureBlob.json
@@ -16,6 +16,7 @@
"addDataStoreParametersList": false,
"friendlyNameRequired": false,
"supportSecretStoreAuthentication": false,
+ "supportCrossRegionRestore": false,
"policySettings": {
"supportedRetentionTags": [ "Weekly", "Monthly", "Yearly" ],
"supportedDatastoreTypes": [ "OperationalStore", "VaultStore" ],
diff --git a/src/DataProtection/DataProtection.Autorest/custom/manifests/AzureDatabaseForPostgreSQL.json b/src/DataProtection/DataProtection.Autorest/custom/manifests/AzureDatabaseForPostgreSQL.json
index daf421ea28de..aae91425084a 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/manifests/AzureDatabaseForPostgreSQL.json
+++ b/src/DataProtection/DataProtection.Autorest/custom/manifests/AzureDatabaseForPostgreSQL.json
@@ -16,6 +16,7 @@
"addDataStoreParametersList": false,
"friendlyNameRequired": false,
"supportSecretStoreAuthentication": true,
+ "supportCrossRegionRestore": true,
"policySettings": {
"supportedRetentionTags": [ "Weekly", "Monthly", "Yearly" ],
"supportedDatastoreTypes": [ "VaultStore", "ArchiveStore" ],
diff --git a/src/DataProtection/DataProtection.Autorest/custom/manifests/AzureDisk.json b/src/DataProtection/DataProtection.Autorest/custom/manifests/AzureDisk.json
index 75a34bd29761..fd53b446472a 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/manifests/AzureDisk.json
+++ b/src/DataProtection/DataProtection.Autorest/custom/manifests/AzureDisk.json
@@ -16,6 +16,7 @@
"addDataStoreParametersList": true,
"friendlyNameRequired": false,
"supportSecretStoreAuthentication": false,
+ "supportCrossRegionRestore": false,
"policySettings": {
"supportedRetentionTags": [ "Daily", "Weekly" ],
"supportedDatastoreTypes": [ "OperationalStore" ],
diff --git a/src/DataProtection/DataProtection.Autorest/custom/manifests/AzureKubernetesService.json b/src/DataProtection/DataProtection.Autorest/custom/manifests/AzureKubernetesService.json
index 58d3561f393c..f37c964f85ca 100644
--- a/src/DataProtection/DataProtection.Autorest/custom/manifests/AzureKubernetesService.json
+++ b/src/DataProtection/DataProtection.Autorest/custom/manifests/AzureKubernetesService.json
@@ -12,10 +12,11 @@
"allowedRestoreTargetTypes": [ "AlternateLocation", "OriginalLocation" ],
"itemLevelRecoveyEnabled": true,
"addBackupDatasourceParametersList": true,
- "backupConfigurationRequired": true,
+ "backupConfigurationRequired": true,
"addDataStoreParametersList": true,
"friendlyNameRequired": true,
"supportSecretStoreAuthentication": false,
+ "supportCrossRegionRestore": false,
"policySettings": {
"supportedRetentionTags": [ "Daily", "Weekly" ],
"supportedDatastoreTypes": [ "OperationalStore" ],
diff --git a/src/DataProtection/DataProtection.Autorest/examples/Get-AzDataProtectionJob.md b/src/DataProtection/DataProtection.Autorest/examples/Get-AzDataProtectionJob.md
index 548d520ad616..e6242db8a7f4 100644
--- a/src/DataProtection/DataProtection.Autorest/examples/Get-AzDataProtectionJob.md
+++ b/src/DataProtection/DataProtection.Autorest/examples/Get-AzDataProtectionJob.md
@@ -16,7 +16,7 @@ a6a4879d-f914-4174-b129-0e27da8a4fb0 Microsoft.DataProtection/backupVaults/backu
This command gets all the backup jobs in a given backup vault.
-### Example 2: Get a single Job
+### Example 2: Get a single Job with Id
```powershell
Get-AzDataProtectionJob -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName sarath-rg -VaultName sarath-vault -Id 4abaea8c-f53a-4bb1-9963-59f96b597165
```
@@ -29,3 +29,16 @@ Name Type
This command returns a single job entity with given Id.
+### Example 3: Get backup Jobs in a backup vault from secondary region
+```powershell
+Get-AzDataProtectionJob -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName sarath-rg -VaultName sarath-vault -UseSecondaryRegion
+```
+
+```output
+Name Type
+---- ----
+a6a4879d-f914-4174-b129-0e27da8a4fb0 Microsoft.DataProtection/backupVaults/backupJobs
+1a402664-a245-4a9d-8bb5-a6bafbb40d26 Microsoft.DataProtection/backupVaults/backupJobs
+```
+
+This command gets cross region restore jobs in a backup vault from secondary region.
\ No newline at end of file
diff --git a/src/DataProtection/DataProtection.Autorest/examples/Get-AzDataProtectionRecoveryPoint.md b/src/DataProtection/DataProtection.Autorest/examples/Get-AzDataProtectionRecoveryPoint.md
index 5cf83dfa6fa6..914e5f6b0f84 100644
--- a/src/DataProtection/DataProtection.Autorest/examples/Get-AzDataProtectionRecoveryPoint.md
+++ b/src/DataProtection/DataProtection.Autorest/examples/Get-AzDataProtectionRecoveryPoint.md
@@ -31,3 +31,18 @@ Name Type
This command returns a recovery point with given id.
+### Example 3: Get all recovery points of a given backup instance from secondary region
+```powershell
+$instance = $instance = Search-AzDataProtectionBackupInstanceInAzGraph -DatasourceType AzureDatabaseForPostgreSQL -Subscription "xxxxxxxx-xxxx-xxxxxxxxxxxx" -ResourceGroup sarath-rg -Vault sarath-vault
+$recoveryPoints = Get-AzDataProtectionRecoveryPoint -SubscriptionId "xxxxxxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName sarath-rg -VaultName sarath-vault -BackupInstanceName $instance[2].Name -UseSecondaryRegion
+```
+
+```output
+Name
+----
+aded40a562134f97b732f30d0b486fef
+aecc362b85484f4eb905bb05ef445e3e
+dc814d61a9624c36a1f9d635bc0b80f0
+```
+
+This command lists all recovery points of a given backup instance from secondary region. One of these recovery points can be used to trigger cross region restore to secondary region.
\ No newline at end of file
diff --git a/src/DataProtection/DataProtection.Autorest/examples/Get-AzDataProtectionResourceGuardMapping.md b/src/DataProtection/DataProtection.Autorest/examples/Get-AzDataProtectionResourceGuardMapping.md
index a9bef1503fcd..656cc6b3a108 100644
--- a/src/DataProtection/DataProtection.Autorest/examples/Get-AzDataProtectionResourceGuardMapping.md
+++ b/src/DataProtection/DataProtection.Autorest/examples/Get-AzDataProtectionResourceGuardMapping.md
@@ -12,8 +12,8 @@ LastUpdatedTime : 2023-08-29T07:23:05.1111730Z
Name : DppResourceGuardProxy
ResourceGuardId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/hiaga-rg/providers/Microsoft.DataProtection/resourceGuard
s/mua-pstest-resguard
-ResourceGuardOperationDetail : {Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ResourceGuardOperationDetail,
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ResourceGuardOperationDetail}
+ResourceGuardOperationDetail : {Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ResourceGuardOperationDetail,
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ResourceGuardOperationDetail}
SystemData : Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api40.SystemData
Type : Microsoft.DataProtection/vaults/backupResourceGuardProxies
```
diff --git a/src/DataProtection/DataProtection.Autorest/examples/Initialize-AzDataProtectionRestoreRequest.md b/src/DataProtection/DataProtection.Autorest/examples/Initialize-AzDataProtectionRestoreRequest.md
index 0df8aba9b515..0ddfca73df1a 100644
--- a/src/DataProtection/DataProtection.Autorest/examples/Initialize-AzDataProtectionRestoreRequest.md
+++ b/src/DataProtection/DataProtection.Autorest/examples/Initialize-AzDataProtectionRestoreRequest.md
@@ -77,3 +77,41 @@ FromPrefix ToPrefix
Note: The ranges shouldn't overlap with each other. Reference: https://learn.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata
+### Example 5: Get cross region restore request object for restore as database for datasource type AzureDatabaseForPostgreSQL
+
+```powershell
+$vault = Search-AzDataProtectionBackupVaultInAzGraph -ResourceGroup $ResourceGroupName -Subscription $SubscriptionId -Vault $VaultName
+$instance = Search-AzDataProtectionBackupInstanceInAzGraph -Subscription $subscriptionId -ResourceGroup $resourceGroupName -Vault $vaultName -DatasourceType AzureDatabaseForPostgreSQL
+$recoveryPointsCrr = Get-AzDataProtectionRecoveryPoint -BackupInstanceName $instance.Name -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -UseSecondaryRegion
+$targetResourceId = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/{targetResourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{targetServerName}/databases/{targetDatabaseName}"
+$secretURI = "https://{crr-key-vault}.vault.azure.net/secrets/{secret-for-crr}"
+$OssRestoreReq = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureDatabaseForPostgreSQL -SourceDataStore VaultStore -RestoreLocation $vault.ReplicatedRegion[0] -RestoreType AlternateLocation -RecoveryPoint $recoveryPointsCrr[0].Property.RecoveryPointId -TargetResourceId $targetResourceId -SecretStoreURI $secretURI -SecretStoreType AzureKeyVault
+```
+
+```output
+ObjectType SourceDataStoreType SourceResourceId RecoveryPointId
+---------- ------------------- ---------------- ---------------
+AzureBackupRecoveryPointBasedRestoreRequest VaultStore d49aeb83264456ccab92a105cade9afe
+```
+
+First and second commands fetch the vault and backup instance from Azure resource graph. Third command is used to fetch recovery points from secondary region for cross region restore. Last command constructs the cross region restore request object for restore to alternate location as database for datasourcetype AzureDatabaseForPostgreSQL. Please note that we set RestoreLocation parameter to $vault.ReplicatedRegion[0] (paired region) instead of $vault.Location for normal restore.
+Use Test-AzDataProtectionBackupInstanceRestore, Start-AzDataProtectionBackupInstanceRestore commands to validate and trigger restore.
+
+### Example 6: Get cross region restore request object for restore as database for datasource type AzureDatabaseForPostgreSQL
+
+```powershell
+$vault = Search-AzDataProtectionBackupVaultInAzGraph -ResourceGroup $ResourceGroupName -Subscription $SubscriptionId -Vault $VaultName
+$instance = Search-AzDataProtectionBackupInstanceInAzGraph -Subscription $subscriptionId -ResourceGroup $resourceGroupName -Vault $vaultName -DatasourceType AzureDatabaseForPostgreSQL
+$recoveryPointsCrr = Get-AzDataProtectionRecoveryPoint -BackupInstanceName $instance.Name -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -UseSecondaryRegion
+$targetContainerURI = "https://{targetStorageAccountName}.blob.core.windows.net/{targetContainerName}"
+$fileNamePrefix = "oss-pstest-crrasfiles"
+$OssRestoreReq = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureDatabaseForPostgreSQL -SourceDataStore VaultStore -RestoreLocation $vault.ReplicatedRegion[0] -RestoreType RestoreAsFiles -RecoveryPoint $recoveryPointsCrr[0].Property.RecoveryPointId -TargetContainerURI $targetContainerURI -FileNamePrefix $fileNamePrefix
+```
+
+```output
+ObjectType SourceDataStoreType SourceResourceId RecoveryPointId
+---------- ------------------- ---------------- ---------------
+AzureBackupRecoveryPointBasedRestoreRequest VaultStore d49aeb83264456ccab92a105cade9afe
+```
+
+First and second commands fetch the vault and backup instance from Azure resource graph. Third command is used to fetch recovery points from secondary region for cross region restore. Last command constructs the cross region restore request object for restore as files for datasourcetype AzureDatabaseForPostgreSQL. Please note that we set RestoreLocation parameter to $vault.ReplicatedRegion[0] (paired region) instead of $vault.Location for normal restore. Use Test-AzDataProtectionBackupInstanceRestore, Start-AzDataProtectionBackupInstanceRestore commands to validate and trigger restore.
diff --git a/src/DataProtection/DataProtection.Autorest/examples/Search-AzDataProtectionBackupVaultInAzGraph.md b/src/DataProtection/DataProtection.Autorest/examples/Search-AzDataProtectionBackupVaultInAzGraph.md
new file mode 100644
index 000000000000..64ebc3026bcd
--- /dev/null
+++ b/src/DataProtection/DataProtection.Autorest/examples/Search-AzDataProtectionBackupVaultInAzGraph.md
@@ -0,0 +1,13 @@
+### Example 1: Get a specific vault with its name.
+```powershell
+Search-AzDataProtectionBackupVaultInAzGraph -Subscription "xxxxxxxx-xxxx-xxxxxxxxxxxx" -ResourceGroup $resourceGroupName -Vault $vaultName
+```
+
+```output
+ETag IdentityPrincipalId IdentityTenantId IdentityType Location Name Type
+---- ------------------- ---------------- ------------ -------- ---- ----
+ xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx SystemAssigned centraluseuap sarath-vault Microsoft.DataProtection/backupVaults
+```
+
+This command gets a specific vault by given vault name from ARG (Azure Resource Graph).
+
diff --git a/src/DataProtection/DataProtection.Autorest/examples/Set-AzDataProtectionResourceGuardMapping.md b/src/DataProtection/DataProtection.Autorest/examples/Set-AzDataProtectionResourceGuardMapping.md
index cf365dd3b29c..c768d24c0425 100644
--- a/src/DataProtection/DataProtection.Autorest/examples/Set-AzDataProtectionResourceGuardMapping.md
+++ b/src/DataProtection/DataProtection.Autorest/examples/Set-AzDataProtectionResourceGuardMapping.md
@@ -12,8 +12,8 @@ LastUpdatedTime : 2023-08-29T07:23:05.1111730Z
Name : DppResourceGuardProxy
ResourceGuardId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/hiaga-rg/providers/Microsoft.DataProtection/resourceGuard
s/mua-pstest-resguard
-ResourceGuardOperationDetail : {Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ResourceGuardOperationDetail,
- Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ResourceGuardOperationDetail}
+ResourceGuardOperationDetail : {Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ResourceGuardOperationDetail,
+ Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ResourceGuardOperationDetail}
SystemData : Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api40.SystemData
Type : Microsoft.DataProtection/vaults/backupResourceGuardProxies
```
diff --git a/src/DataProtection/DataProtection.Autorest/examples/Start-AzDataProtectionBackupInstanceRestore.md b/src/DataProtection/DataProtection.Autorest/examples/Start-AzDataProtectionBackupInstanceRestore.md
index 39ee63c15333..7caedb795872 100644
--- a/src/DataProtection/DataProtection.Autorest/examples/Start-AzDataProtectionBackupInstanceRestore.md
+++ b/src/DataProtection/DataProtection.Autorest/examples/Start-AzDataProtectionBackupInstanceRestore.md
@@ -134,3 +134,19 @@ The fourth, fifth command initializes targetContainerURI and fileNamePrefix for
The sixth command initializes the restore request object for AzureDatabaseForPostgreSQL restore.
The seventh command triggers validate before restore.
The last command triggers the cross subscription restore as files for AzureDatabaseForPostgreSQL.
+
+### Example 8: Trigger cross region restore for AzureDatabaseForPostgreSQL.
+```powershell
+$restoreJobCRR = Start-AzDataProtectionBackupInstanceRestore -BackupInstanceName $instance.Name -ResourceGroupName $ResourceGroupName -VaultName $vaultName -SubscriptionId $SubscriptionId -Parameter $OssRestoreReq -RestoreToSecondaryRegion
+$jobid = $restoreJobCRR.JobId.Split("/")[-1]
+$jobstatus = "InProgress"
+while($jobstatus -ne "Completed")
+{
+ Start-Sleep -Seconds 10
+ $currentjob = Get-AzDataProtectionJob -Id $jobid -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -UseSecondaryRegion
+ $jobstatus = $currentjob.Status
+}
+```
+
+
+This command command triggers the cross region restore for AzureDatabaseForPostgreSQL. For triggering cross region restore to secondary region, use RestoreToSecondaryRegion switch.
diff --git a/src/DataProtection/DataProtection.Autorest/examples/Test-AzDataProtectionBackupInstanceRestore.md b/src/DataProtection/DataProtection.Autorest/examples/Test-AzDataProtectionBackupInstanceRestore.md
index 9126947434ed..fe0094e1fedc 100644
--- a/src/DataProtection/DataProtection.Autorest/examples/Test-AzDataProtectionBackupInstanceRestore.md
+++ b/src/DataProtection/DataProtection.Autorest/examples/Test-AzDataProtectionBackupInstanceRestore.md
@@ -8,3 +8,10 @@ $validateRestore = Test-AzDataProtectionBackupInstanceRestore -Name $instances[0
```
The command tests the restore request object is valid for restore
+
+### Example 2: Validate cross region restore
+```powershell
+$validateRestore = Test-AzDataProtectionBackupInstanceRestore -ResourceGroupName $ResourceGroupName -Name $instance[0].Name -VaultName $VaultName -RestoreRequest $RestoreRequestObject -SubscriptionId $SubscriptionId -RestoreToSecondaryRegion
+```
+
+The command tests the restore request object is valid for cross region restore. For normal restore (non-CRR), DO NOT use RestoreToSecondaryRegion switch.
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Backup-AzDataProtectionBackupInstanceAdhoc.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Backup-AzDataProtectionBackupInstanceAdhoc.ps1
index c774ec67f23b..cb9f01fbd5e2 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Backup-AzDataProtectionBackupInstanceAdhoc.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Backup-AzDataProtectionBackupInstanceAdhoc.ps1
@@ -38,7 +38,7 @@ while($jobstatus -ne "Completed")
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IOperationJobExtendedInfo
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IOperationJobExtendedInfo
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -62,7 +62,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.dataprotection/backup-azdataprotectionbackupinstanceadhoc
#>
function Backup-AzDataProtectionBackupInstanceAdhoc {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IOperationJobExtendedInfo])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IOperationJobExtendedInfo])]
[CmdletBinding(DefaultParameterSetName='BackupExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='BackupExpanded', Mandatory)]
@@ -206,6 +206,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Edit-AzDataProtectionPolicyRetentionRuleClientObject.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Edit-AzDataProtectionPolicyRetentionRuleClientObject.ps1
index dc2fc6cea63b..0d2913d73c11 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Edit-AzDataProtectionPolicyRetentionRuleClientObject.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Edit-AzDataProtectionPolicyRetentionRuleClientObject.ps1
@@ -27,7 +27,7 @@ Edit-AzDataProtectionPolicyRetentionRuleClientObject -Policy $pol -Name Weekly -
Edit-AzDataProtectionPolicyRetentionRuleClientObject -Policy $pol -Name Weekly -RemoveRule
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -67,12 +67,12 @@ POLICY : Backup Policy Object
https://learn.microsoft.com/powershell/module/az.dataprotection/edit-azdataprotectionpolicyretentionruleclientobject
#>
function Edit-AzDataProtectionPolicyRetentionRuleClientObject {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy])]
[CmdletBinding(DefaultParameterSetName='RemoveRetention', PositionalBinding=$false)]
param(
[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy]
# Backup Policy Object
# To construct, see NOTES section for POLICY properties and create a hash table.
${Policy},
@@ -97,7 +97,7 @@ param(
[Parameter(ParameterSetName='AddRetention', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ISourceLifeCycle[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ISourceLifeCycle[]]
# Life cycles associated with the retention rule.
# To construct, see NOTES section for LIFECYCLES properties and create a hash table.
${LifeCycles},
@@ -140,6 +140,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Edit-AzDataProtectionPolicyTagClientObject.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Edit-AzDataProtectionPolicyTagClientObject.ps1
index a29d1cbe98e1..e3532d07b954 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Edit-AzDataProtectionPolicyTagClientObject.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Edit-AzDataProtectionPolicyTagClientObject.ps1
@@ -26,7 +26,7 @@ Edit-AzDataProtectionPolicyTagClientObject -Policy $pol -Name Weekly -Criteria $
Edit-AzDataProtectionPolicyTagClientObject -Policy $pol -Name Weekly -RemoveRule
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -67,12 +67,12 @@ POLICY : Backup Policy Object.
https://learn.microsoft.com/powershell/module/az.dataprotection/edit-azdataprotectionpolicytagclientobject
#>
function Edit-AzDataProtectionPolicyTagClientObject {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy])]
[CmdletBinding(DefaultParameterSetName='RemoveTag', PositionalBinding=$false)]
param(
[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy]
# Backup Policy Object.
# To construct, see NOTES section for POLICY properties and create a hash table.
${Policy},
@@ -91,7 +91,7 @@ param(
[Parameter(ParameterSetName='updateTag', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IScheduleBasedBackupCriteria[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IScheduleBasedBackupCriteria[]]
# Criterias to be associated with the schedule tag.
# To construct, see NOTES section for CRITERIA properties and create a hash table.
${Criteria}
@@ -128,6 +128,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Edit-AzDataProtectionPolicyTriggerClientObject.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Edit-AzDataProtectionPolicyTriggerClientObject.ps1
index 9c7506ca53d4..51f89ebd77ab 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Edit-AzDataProtectionPolicyTriggerClientObject.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Edit-AzDataProtectionPolicyTriggerClientObject.ps1
@@ -24,7 +24,7 @@ $schedule = New-AzDataProtectionPolicyTriggerScheduleClientObject -ScheduleDays
Edit-AzDataProtectionPolicyTriggerClientObject -Policy $pol -Schedule $schedule
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -54,12 +54,12 @@ POLICY : Backup Policy object.
https://learn.microsoft.com/powershell/module/az.dataprotection/edit-azdataprotectionpolicytriggerclientobject
#>
function Edit-AzDataProtectionPolicyTriggerClientObject {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy])]
[CmdletBinding(DefaultParameterSetName='RemoveBackupSchedule', PositionalBinding=$false)]
param(
[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy]
# Backup Policy object.
# To construct, see NOTES section for POLICY properties and create a hash table.
${Policy},
@@ -108,6 +108,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Find-AzDataProtectionRestorableTimeRange.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Find-AzDataProtectionRestorableTimeRange.ps1
index 1c27198a8c96..b60812a21543 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Find-AzDataProtectionRestorableTimeRange.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Find-AzDataProtectionRestorableTimeRange.ps1
@@ -27,12 +27,12 @@ $pointInTimeRange = Find-AzDataProtectionRestorableTimeRange -BackupInstanceName
$pointInTimeRange.RestorableTimeRange | Format-List
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupFindRestorableTimeRangesResponseResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupFindRestorableTimeRangesResponseResource
.Link
https://learn.microsoft.com/powershell/module/az.dataprotection/find-azdataprotectionrestorabletimerange
#>
function Find-AzDataProtectionRestorableTimeRange {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupFindRestorableTimeRangesResponseResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupFindRestorableTimeRangesResponseResource])]
[CmdletBinding(DefaultParameterSetName='FindExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -165,6 +165,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionBackupInstance.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionBackupInstance.ps1
index fd28511eafb4..55150b2a1499 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionBackupInstance.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionBackupInstance.ps1
@@ -27,7 +27,7 @@ Get-AzDataProtectionBackupInstance -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxxxxxxx
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupInstanceResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupInstanceResource
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -51,7 +51,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionbackupinstance
#>
function Get-AzDataProtectionBackupInstance {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupInstanceResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupInstanceResource])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -176,6 +176,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionBackupPolicy.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionBackupPolicy.ps1
index 83e8e2c5ce1c..14d66c64eceb 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionBackupPolicy.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionBackupPolicy.ps1
@@ -27,7 +27,7 @@ Get-AzDataProtectionBackupPolicy -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupNa
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBaseBackupPolicyResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBaseBackupPolicyResource
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -51,7 +51,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionbackuppolicy
#>
function Get-AzDataProtectionBackupPolicy {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBaseBackupPolicyResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBaseBackupPolicyResource])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -176,6 +176,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionBackupVault.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionBackupVault.ps1
index b610e478e6f2..db8a99532d7b 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionBackupVault.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionBackupVault.ps1
@@ -32,7 +32,7 @@ $vault.SecureScore
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupVaultResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupVaultResource
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -56,7 +56,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionbackupvault
#>
function Get-AzDataProtectionBackupVault {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupVaultResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupVaultResource])]
[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get')]
@@ -175,6 +175,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionJob.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionJob.ps1
index 0b672686f45f..35e164593bd3 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionJob.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionJob.ps1
@@ -16,18 +16,20 @@
<#
.Synopsis
-Gets a job with id in a backup vault
+Gets or lists jobs in a backup vault
.Description
-Gets a job with id in a backup vault
+Gets or lists jobs in a backup vault
.Example
Get-AzDataProtectionJob -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName sarath-rg -VaultName sarath-vault
.Example
Get-AzDataProtectionJob -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName sarath-rg -VaultName sarath-vault -Id 4abaea8c-f53a-4bb1-9963-59f96b597165
+.Example
+Get-AzDataProtectionJob -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName sarath-rg -VaultName sarath-vault -UseSecondaryRegion
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupJobResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupJobResource
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -51,95 +53,89 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionjob
#>
function Get-AzDataProtectionJob {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupJobResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupJobResource])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
+ [Parameter(ParameterSetName='List', Mandatory)]
[Parameter(ParameterSetName='Get', Mandatory)]
- [Alias('JobId')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[System.String]
- # The Job ID.
- # This is a GUID-formatted string (e.g.
- # 00000000-0000-0000-0000-000000000000).
- ${Id},
+ # Resource Group of the backup vault
+ ${ResourceGroupName},
- [Parameter(ParameterSetName='Get', Mandatory)]
[Parameter(ParameterSetName='List', Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[System.String]
- # The name of the resource group.
- # The name is case insensitive.
- ${ResourceGroupName},
+ # Name of the backup vault
+ ${VaultName},
- [Parameter(ParameterSetName='Get')]
[Parameter(ParameterSetName='List')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [Parameter(ParameterSetName='Get')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[System.String[]]
- # The ID of the target subscription.
- # The value must be an UUID.
+ # Subscription Id of the vault
${SubscriptionId},
+ [Parameter(ParameterSetName='List')]
+ [Parameter(ParameterSetName='Get')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # Switch parameter to fetch dataprotection job from secondary region (Cross Region Restore)
+ ${UseSecondaryRegion},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.Management.Automation.PSObject]
+ ${DefaultProfile},
+
[Parameter(ParameterSetName='Get', Mandatory)]
- [Parameter(ParameterSetName='List', Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
+ [Alias('JobId')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[System.String]
- # The name of the backup vault.
- ${VaultName},
+ # Job ID to get a particular Job
+ ${Id},
[Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity]
# Identity Parameter
# To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
${InputObject},
- [Parameter()]
- [Alias('AzureRMContext', 'AzureCredential')]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Azure')]
- [System.Management.Automation.PSObject]
- # The DefaultProfile parameter is not functional.
- # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
- ${DefaultProfile},
-
[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
[System.Management.Automation.SwitchParameter]
- # Wait for .NET debugger to attach
${Break},
[Parameter(DontShow)]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
- # SendAsync Pipeline Steps to be appended to the front of the pipeline
${HttpPipelineAppend},
[Parameter(DontShow)]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
- # SendAsync Pipeline Steps to be prepended to the front of the pipeline
${HttpPipelinePrepend},
[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
[System.Uri]
- # The URI for the proxy server to use
${Proxy},
[Parameter(DontShow)]
[ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
[System.Management.Automation.PSCredential]
- # Credentials for a proxy server to use for the remote call
${ProxyCredential},
[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
[System.Management.Automation.SwitchParameter]
- # Use the default credentials for the proxy
${ProxyUseDefaultCredentials}
)
@@ -169,15 +165,16 @@ begin {
}
$mapping = @{
- Get = 'Az.DataProtection.private\Get-AzDataProtectionJob_Get';
- GetViaIdentity = 'Az.DataProtection.private\Get-AzDataProtectionJob_GetViaIdentity';
- List = 'Az.DataProtection.private\Get-AzDataProtectionJob_List';
- }
- if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ List = 'Az.DataProtection.custom\Get-AzDataProtectionJob';
+ Get = 'Az.DataProtection.custom\Get-AzDataProtectionJob';
+ GetViaIdentity = 'Az.DataProtection.custom\Get-AzDataProtectionJob';
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionOperation.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionOperation.ps1
index b154b9a5386a..585e9ab31a29 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionOperation.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionOperation.ps1
@@ -23,12 +23,12 @@ Returns the list of available operations.
Get-AzDataProtectionOperation
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IClientDiscoveryValueForSingleApi
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IClientDiscoveryValueForSingleApi
.Link
https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionoperation
#>
function Get-AzDataProtectionOperation {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IClientDiscoveryValueForSingleApi])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IClientDiscoveryValueForSingleApi])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter()]
@@ -110,6 +110,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionOperationStatus.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionOperationStatus.ps1
index 51d4f301e67e..d10103cc26c3 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionOperationStatus.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionOperationStatus.ps1
@@ -30,7 +30,7 @@ While((Get-AzDataProtectionOperationStatus -OperationId $operationId -Location $
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IOperationResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IOperationResource
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -54,7 +54,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionoperationstatus
#>
function Get-AzDataProtectionOperationStatus {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IOperationResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IOperationResource])]
[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -167,6 +167,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionPolicyTemplate.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionPolicyTemplate.ps1
index 8d5e0c4a004c..2779fca527bf 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionPolicyTemplate.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionPolicyTemplate.ps1
@@ -23,12 +23,12 @@ Gets default policy template for a selected datasource type.
Get-AzDataProtectionPolicyTemplate -DatasourceType AzureDisk
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy
.Link
https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionpolicytemplate
#>
function Get-AzDataProtectionPolicyTemplate {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy])]
[CmdletBinding(PositionalBinding=$false)]
param(
[Parameter(Mandatory)]
@@ -68,6 +68,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionRecoveryPoint.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionRecoveryPoint.ps1
index 6114583d364b..9a73046a9f2a 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionRecoveryPoint.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionRecoveryPoint.ps1
@@ -25,11 +25,14 @@ Get-AzDataProtectionRecoveryPoint -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupN
.Example
$instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName sarath-rg -VaultName sarath-vault
Get-AzDataProtectionRecoveryPoint -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName sarath-rg -VaultName sarath-vault -BackupInstanceName $instance[2].Name -Id 892e5c5014dc4a96807d22924f5745c9
+.Example
+$instance = $instance = Search-AzDataProtectionBackupInstanceInAzGraph -DatasourceType AzureDatabaseForPostgreSQL -Subscription "xxxxxxxx-xxxx-xxxxxxxxxxxx" -ResourceGroup sarath-rg -Vault sarath-vault
+$recoveryPoints = Get-AzDataProtectionRecoveryPoint -SubscriptionId "xxxxxxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName sarath-rg -VaultName sarath-vault -BackupInstanceName $instance[2].Name -UseSecondaryRegion
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupRecoveryPointResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupRecoveryPointResource
.Outputs
System.Management.Automation.PSObject
.Notes
@@ -55,7 +58,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionrecoverypoint
#>
function Get-AzDataProtectionRecoveryPoint {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupRecoveryPointResource], [PSObject])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupRecoveryPointResource], [PSObject])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -161,7 +164,13 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[System.DateTime]
# End Time filter for recovery points
- ${EndTime}
+ ${EndTime},
+
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # Switch parameter to fetch recovery points from secondary region
+ ${UseSecondaryRegion}
)
begin {
@@ -199,6 +208,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionResourceGuard.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionResourceGuard.ps1
index ebeb07831488..6aa917298a91 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionResourceGuard.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionResourceGuard.ps1
@@ -27,7 +27,7 @@ Get-AzDataProtectionResourceGuard -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxx
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IResourceGuardResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IResourceGuardResource
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -51,7 +51,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionresourceguard
#>
function Get-AzDataProtectionResourceGuard {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IResourceGuardResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IResourceGuardResource])]
[CmdletBinding(DefaultParameterSetName='Get1', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -168,6 +168,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionResourceGuardMapping.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionResourceGuardMapping.ps1
index 40c0b65d8fc2..0499b5b781c3 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionResourceGuardMapping.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionResourceGuardMapping.ps1
@@ -26,7 +26,7 @@ $mapping | fl
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IResourceGuardProxyBaseResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IResourceGuardProxyBaseResource
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -50,7 +50,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionresourceguardmapping
#>
function Get-AzDataProtectionResourceGuardMapping {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IResourceGuardProxyBaseResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IResourceGuardProxyBaseResource])]
[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -171,6 +171,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionSoftDeletedBackupInstance.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionSoftDeletedBackupInstance.ps1
index 7c3a09117efc..81e0f8e98696 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionSoftDeletedBackupInstance.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Get-AzDataProtectionSoftDeletedBackupInstance.ps1
@@ -25,7 +25,7 @@ Get-AzDataProtectionSoftDeletedBackupInstance -ResourceGroupName $resourceGroupN
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IDeletedBackupInstanceResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IDeletedBackupInstanceResource
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -49,7 +49,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionsoftdeletedbackupinstance
#>
function Get-AzDataProtectionSoftDeletedBackupInstance {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IDeletedBackupInstanceResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IDeletedBackupInstanceResource])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -173,6 +173,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Initialize-AzDataProtectionBackupInstance.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Initialize-AzDataProtectionBackupInstance.ps1
index df8925ceca6a..6b8bf5328256 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Initialize-AzDataProtectionBackupInstance.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Initialize-AzDataProtectionBackupInstance.ps1
@@ -34,7 +34,7 @@ $backupInstance = Initialize-AzDataProtectionBackupInstance -DatasourceType Azur
$instance
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupInstanceResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupInstanceResource
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -46,7 +46,7 @@ BACKUPCONFIGURATION : Backup configuration for back
https://learn.microsoft.com/powershell/module/az.dataprotection/initialize-azdataprotectionbackupinstance
#>
function Initialize-AzDataProtectionBackupInstance {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupInstanceResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupInstanceResource])]
[CmdletBinding(PositionalBinding=$false)]
param(
[Parameter(Mandatory)]
@@ -101,7 +101,7 @@ param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupDatasourceParameters]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupDatasourceParameters]
# Backup configuration for backup.
# Use this parameter to configure protection for AzureKubernetesService.
# To construct, see NOTES section for BACKUPCONFIGURATION properties and create a hash table.
@@ -138,6 +138,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Initialize-AzDataProtectionRestoreRequest.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Initialize-AzDataProtectionRestoreRequest.ps1
index c96f7f1e7cb1..2e9857f04dd7 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Initialize-AzDataProtectionRestoreRequest.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Initialize-AzDataProtectionRestoreRequest.ps1
@@ -41,9 +41,23 @@ $endTime = (Get-Date).AddDays(0).ToString("yyyy-MM-ddTHH:mm:ss.0000000Z")
$instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName "rgName" -VaultName "vaultName"
$pointInTimeRange = Find-AzDataProtectionRestorableTimeRange -BackupInstanceName $instance[0].BackupInstanceName -ResourceGroupName "rgName" -SubscriptionId "subscriptionId" -VaultName "vaultName" -SourceDataStoreType OperationalStore -StartTime $startTime -EndTime $endTime
Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureBlob -SourceDataStore OperationalStore -RestoreLocation $vault.Location -RestoreType OriginalLocation -BackupInstance $instances[0] -PointInTime (Get-Date).AddDays(-1) -ItemLevelRecovery -FromPrefixPattern "container1/aaa","container1/ccc", "container2/aab", "container3" -ToPrefixPattern "container1/bbb","container1/ddd", "container2/abc", "container3-0"
+.Example
+$vault = Search-AzDataProtectionBackupVaultInAzGraph -ResourceGroup $ResourceGroupName -Subscription $SubscriptionId -Vault $VaultName
+$instance = Search-AzDataProtectionBackupInstanceInAzGraph -Subscription $subscriptionId -ResourceGroup $resourceGroupName -Vault $vaultName -DatasourceType AzureDatabaseForPostgreSQL
+$recoveryPointsCrr = Get-AzDataProtectionRecoveryPoint -BackupInstanceName $instance.Name -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -UseSecondaryRegion
+$targetResourceId = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/{targetResourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{targetServerName}/databases/{targetDatabaseName}"
+$secretURI = "https://{crr-key-vault}.vault.azure.net/secrets/{secret-for-crr}"
+$OssRestoreReq = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureDatabaseForPostgreSQL -SourceDataStore VaultStore -RestoreLocation $vault.ReplicatedRegion[0] -RestoreType AlternateLocation -RecoveryPoint $recoveryPointsCrr[0].Property.RecoveryPointId -TargetResourceId $targetResourceId -SecretStoreURI $secretURI -SecretStoreType AzureKeyVault
+.Example
+$vault = Search-AzDataProtectionBackupVaultInAzGraph -ResourceGroup $ResourceGroupName -Subscription $SubscriptionId -Vault $VaultName
+$instance = Search-AzDataProtectionBackupInstanceInAzGraph -Subscription $subscriptionId -ResourceGroup $resourceGroupName -Vault $vaultName -DatasourceType AzureDatabaseForPostgreSQL
+$recoveryPointsCrr = Get-AzDataProtectionRecoveryPoint -BackupInstanceName $instance.Name -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -UseSecondaryRegion
+$targetContainerURI = "https://{targetStorageAccountName}.blob.core.windows.net/{targetContainerName}"
+$fileNamePrefix = "oss-pstest-crrasfiles"
+$OssRestoreReq = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureDatabaseForPostgreSQL -SourceDataStore VaultStore -RestoreLocation $vault.ReplicatedRegion[0] -RestoreType RestoreAsFiles -RecoveryPoint $recoveryPointsCrr[0].Property.RecoveryPointId -TargetContainerURI $targetContainerURI -FileNamePrefix $fileNamePrefix
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupRestoreRequest
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupRestoreRequest
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -105,7 +119,7 @@ RESTORECONFIGURATION : Restore configuration f
https://learn.microsoft.com/powershell/module/az.dataprotection/initialize-azdataprotectionrestorerequest
#>
function Initialize-AzDataProtectionRestoreRequest {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupRestoreRequest])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupRestoreRequest])]
[CmdletBinding(DefaultParameterSetName='AlternateLocationFullRecovery', PositionalBinding=$false)]
param(
[Parameter(Mandatory)]
@@ -165,7 +179,7 @@ param(
[Parameter(ParameterSetName='AlternateLocationFullRecovery')]
[Parameter(ParameterSetName='OriginalLocationFullRecovery')]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.KubernetesClusterRestoreCriteria]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.KubernetesClusterRestoreCriteria]
# Restore configuration for restore.
# Use this parameter to restore with AzureKubernetesService.
# To construct, see NOTES section for RESTORECONFIGURATION properties and create a hash table.
@@ -232,7 +246,7 @@ param(
[Parameter(ParameterSetName='OriginalLocationILR', Mandatory)]
[Parameter(ParameterSetName='OriginalLocationFullRecovery', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupInstanceResource]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupInstanceResource]
# Backup Instance object to trigger original localtion restore.
# To construct, see NOTES section for BACKUPINSTANCE properties and create a hash table.
${BackupInstance},
@@ -292,6 +306,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionBackupConfigurationClientObject.ps1 b/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionBackupConfigurationClientObject.ps1
index 25e32b9a9690..0b499d376d66 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionBackupConfigurationClientObject.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionBackupConfigurationClientObject.ps1
@@ -95,7 +95,7 @@ param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.NamespacedNameResource[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.NamespacedNameResource[]]
# Hook reference to be executed during backup.
# To construct, see NOTES section for BACKUPHOOKREFERENCE properties and create a hash table.
${BackupHookReference},
@@ -159,6 +159,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionBackupInstance.ps1 b/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionBackupInstance.ps1
index edc79f7c82d7..079492c92a9e 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionBackupInstance.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionBackupInstance.ps1
@@ -118,7 +118,7 @@ param(
[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupInstanceResource]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupInstanceResource]
# Backup instance request object which will be used to configure backup
# To construct, see NOTES section for BACKUPINSTANCE properties and create a hash table.
${BackupInstance},
@@ -216,6 +216,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionBackupPolicy.ps1 b/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionBackupPolicy.ps1
index cd913606c151..3b71a11eea8a 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionBackupPolicy.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionBackupPolicy.ps1
@@ -98,7 +98,7 @@ $defaultPol.PolicyRule[0].Trigger.ScheduleTimeZone = $timeZone[0].Id
$operationalVaultedPolicy = New-AzDataProtectionBackupPolicy -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -Name "operationalVaultedPolicyName" -Policy $defaultPol
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBaseBackupPolicyResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBaseBackupPolicyResource
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -128,7 +128,7 @@ POLICY : Policy Request Object
https://learn.microsoft.com/powershell/module/az.dataprotection/new-azdataprotectionbackuppolicy
#>
function New-AzDataProtectionBackupPolicy {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBaseBackupPolicyResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBaseBackupPolicyResource])]
[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -151,7 +151,7 @@ param(
[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy]
# Policy Request Object
# To construct, see NOTES section for POLICY properties and create a hash table.
${Policy},
@@ -233,6 +233,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionBackupVault.ps1 b/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionBackupVault.ps1
index 2dbfca0bb907..9ac77b4064c3 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionBackupVault.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionBackupVault.ps1
@@ -65,7 +65,7 @@ param(
[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IStorageSetting[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IStorageSetting[]]
# Storage Settings of the vault.
# Use New-AzDataProtectionBackupVaultStorageSetting Cmdlet to Create.
# To construct, see NOTES section for STORAGESETTING properties and create a hash table.
@@ -217,6 +217,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionBackupVaultStorageSettingObject.ps1 b/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionBackupVaultStorageSettingObject.ps1
index 4792aeb8b894..e2f90bbdfb5d 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionBackupVaultStorageSettingObject.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionBackupVaultStorageSettingObject.ps1
@@ -74,6 +74,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionPolicyTagCriteriaClientObject.ps1 b/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionPolicyTagCriteriaClientObject.ps1
index 31a88d44be89..e7b91e1f43af 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionPolicyTagCriteriaClientObject.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionPolicyTagCriteriaClientObject.ps1
@@ -25,12 +25,12 @@ New-AzDataProtectionPolicyTagCriteriaClientObject -AbsoluteCriteria FirstOfDay
New-AzDataProtectionPolicyTagCriteriaClientObject -DaysOfWeek @("Sunday", "Monday")
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IScheduleBasedBackupCriteria
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IScheduleBasedBackupCriteria
.Link
https://learn.microsoft.com/powershell/module/az.dataprotection/new-azdataprotectionpolicytagcriteriaclientobject
#>
function New-AzDataProtectionPolicyTagCriteriaClientObject {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IScheduleBasedBackupCriteria])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IScheduleBasedBackupCriteria])]
[CmdletBinding(DefaultParameterSetName='ScheduleCriteria', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='AbsoluteCriteria', Mandatory)]
@@ -105,6 +105,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionPolicyTriggerScheduleClientObject.ps1 b/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionPolicyTriggerScheduleClientObject.ps1
index 2054f911945e..94bb6f25ab33 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionPolicyTriggerScheduleClientObject.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionPolicyTriggerScheduleClientObject.ps1
@@ -84,6 +84,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionResourceGuard.ps1 b/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionResourceGuard.ps1
index 06597c140b94..af968b7fccb1 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionResourceGuard.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionResourceGuard.ps1
@@ -23,12 +23,12 @@ Creates a resource guard under a resource group
New-AzDataProtectionResourceGuard -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "mua-rg" -Name "mua-resource-guard" -Location "centraluseuap"
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IResourceGuardResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IResourceGuardResource
.Link
https://learn.microsoft.com/powershell/module/az.dataprotection/new-azdataprotectionresourceguard
#>
function New-AzDataProtectionResourceGuard {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IResourceGuardResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IResourceGuardResource])]
[CmdletBinding(DefaultParameterSetName='CreateResourceGuard', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -144,6 +144,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionRestoreConfigurationClientObject.ps1 b/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionRestoreConfigurationClientObject.ps1
index ff725cfd733f..5751d8413bbb 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionRestoreConfigurationClientObject.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionRestoreConfigurationClientObject.ps1
@@ -95,7 +95,7 @@ param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.KubernetesClusterRestoreCriteriaNamespaceMappings]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.KubernetesClusterRestoreCriteriaNamespaceMappings]
# Namespaces mapping from source namespaces to target namespaces to resolve namespace naming conflicts in the target cluster.
# To construct, see NOTES section for NAMESPACEMAPPING properties and create a hash table.
${NamespaceMapping},
@@ -110,7 +110,7 @@ param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.NamespacedNameResource[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.NamespacedNameResource[]]
# Hook reference to be executed during restore.
# To construct, see NOTES section for RESTOREHOOKREFERENCE properties and create a hash table.
${RestoreHookReference}
@@ -146,6 +146,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionRetentionLifeCycleClientObject.ps1 b/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionRetentionLifeCycleClientObject.ps1
index 18a41279d3d6..db09b6e491b5 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionRetentionLifeCycleClientObject.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/New-AzDataProtectionRetentionLifeCycleClientObject.ps1
@@ -25,12 +25,12 @@ New-AzDataProtectionRetentionLifeCycleClientObject -SourceDataStore OperationalS
New-AzDataProtectionRetentionLifeCycleClientObject -SourceDataStore OperationalStore -SourceRetentionDurationType Weeks -SourceRetentionDurationCount 20
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ISourceLifeCycle
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ISourceLifeCycle
.Link
https://learn.microsoft.com/powershell/module/az.dataprotection/new-azdataprotectionretentionlifecycleclientobject
#>
function New-AzDataProtectionRetentionLifeCycleClientObject {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ISourceLifeCycle])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ISourceLifeCycle])]
[CmdletBinding(PositionalBinding=$false)]
param(
[Parameter(Mandatory)]
@@ -94,6 +94,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/ProxyCmdletDefinitions.ps1 b/src/DataProtection/DataProtection.Autorest/exports/ProxyCmdletDefinitions.ps1
index f95f9ad3d69f..cccbf4bc4ceb 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/ProxyCmdletDefinitions.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/ProxyCmdletDefinitions.ps1
@@ -38,7 +38,7 @@ while($jobstatus -ne "Completed")
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IOperationJobExtendedInfo
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IOperationJobExtendedInfo
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -62,7 +62,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.dataprotection/backup-azdataprotectionbackupinstanceadhoc
#>
function Backup-AzDataProtectionBackupInstanceAdhoc {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IOperationJobExtendedInfo])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IOperationJobExtendedInfo])]
[CmdletBinding(DefaultParameterSetName='BackupExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='BackupExpanded', Mandatory)]
@@ -206,6 +206,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -263,12 +267,12 @@ $pointInTimeRange = Find-AzDataProtectionRestorableTimeRange -BackupInstanceName
$pointInTimeRange.RestorableTimeRange | Format-List
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupFindRestorableTimeRangesResponseResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupFindRestorableTimeRangesResponseResource
.Link
https://learn.microsoft.com/powershell/module/az.dataprotection/find-azdataprotectionrestorabletimerange
#>
function Find-AzDataProtectionRestorableTimeRange {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupFindRestorableTimeRangesResponseResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupFindRestorableTimeRangesResponseResource])]
[CmdletBinding(DefaultParameterSetName='FindExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -401,6 +405,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -458,7 +466,7 @@ Get-AzDataProtectionBackupInstance -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxxxxxxx
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupInstanceResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupInstanceResource
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -482,7 +490,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionbackupinstance
#>
function Get-AzDataProtectionBackupInstance {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupInstanceResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupInstanceResource])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -607,6 +615,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -664,7 +676,7 @@ Get-AzDataProtectionBackupPolicy -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupNa
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBaseBackupPolicyResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBaseBackupPolicyResource
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -688,7 +700,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionbackuppolicy
#>
function Get-AzDataProtectionBackupPolicy {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBaseBackupPolicyResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBaseBackupPolicyResource])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -813,6 +825,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -875,7 +891,7 @@ $vault.SecureScore
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupVaultResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupVaultResource
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -899,7 +915,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionbackupvault
#>
function Get-AzDataProtectionBackupVault {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupVaultResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupVaultResource])]
[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get')]
@@ -1018,214 +1034,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
- $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
- $scriptCmd = {& $wrappedCmd @PSBoundParameters}
- $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
- $steppablePipeline.Begin($PSCmdlet)
- } catch {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- throw
- }
-}
-
-process {
- try {
- $steppablePipeline.Process($_)
- } catch {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- throw
- }
-
- finally {
- $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
- $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- }
-
-}
-end {
- try {
- $steppablePipeline.End()
-
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
- if ($preTelemetryId -eq '') {
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- }
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
-
- } catch {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- throw
- }
-}
-}
-
-<#
-.Synopsis
-Gets a job with id in a backup vault
-.Description
-Gets a job with id in a backup vault
-.Example
-Get-AzDataProtectionJob -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName sarath-rg -VaultName sarath-vault
-.Example
-Get-AzDataProtectionJob -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName sarath-rg -VaultName sarath-vault -Id 4abaea8c-f53a-4bb1-9963-59f96b597165
-
-.Inputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity
-.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupJobResource
-.Notes
-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.
-
-INPUTOBJECT : Identity Parameter
- [BackupInstanceName ]: The name of the backup instance.
- [BackupPolicyName ]:
- [Id ]: Resource identity path
- [JobId ]: The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
- [Location ]: The location in which uniqueness will be verified.
- [OperationId ]:
- [RecoveryPointId ]:
- [RequestName ]:
- [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
- [ResourceGuardProxyName ]: name of the resource guard proxy
- [ResourceGuardsName ]: The name of ResourceGuard
- [SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
- [VaultName ]: The name of the backup vault.
-.Link
-https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionjob
-#>
-function Get-AzDataProtectionJob {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupJobResource])]
-[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
-param(
- [Parameter(ParameterSetName='Get', Mandatory)]
- [Alias('JobId')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
- [System.String]
- # The Job ID.
- # This is a GUID-formatted string (e.g.
- # 00000000-0000-0000-0000-000000000000).
- ${Id},
-
- [Parameter(ParameterSetName='Get', Mandatory)]
- [Parameter(ParameterSetName='List', Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
- [System.String]
- # The name of the resource group.
- # The name is case insensitive.
- ${ResourceGroupName},
-
- [Parameter(ParameterSetName='Get')]
- [Parameter(ParameterSetName='List')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
- [System.String[]]
- # The ID of the target subscription.
- # The value must be an UUID.
- ${SubscriptionId},
-
- [Parameter(ParameterSetName='Get', Mandatory)]
- [Parameter(ParameterSetName='List', Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
- [System.String]
- # The name of the backup vault.
- ${VaultName},
-
- [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity]
- # Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
- ${InputObject},
-
- [Parameter()]
- [Alias('AzureRMContext', 'AzureCredential')]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Azure')]
- [System.Management.Automation.PSObject]
- # The DefaultProfile parameter is not functional.
- # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
- ${DefaultProfile},
-
- [Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- # Wait for .NET debugger to attach
- ${Break},
-
- [Parameter(DontShow)]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
- # SendAsync Pipeline Steps to be appended to the front of the pipeline
- ${HttpPipelineAppend},
-
- [Parameter(DontShow)]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
- # SendAsync Pipeline Steps to be prepended to the front of the pipeline
- ${HttpPipelinePrepend},
-
- [Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
- [System.Uri]
- # The URI for the proxy server to use
- ${Proxy},
-
- [Parameter(DontShow)]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
- [System.Management.Automation.PSCredential]
- # Credentials for a proxy server to use for the remote call
- ${ProxyCredential},
-
- [Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- # Use the default credentials for the proxy
- ${ProxyUseDefaultCredentials}
-)
-
-begin {
- try {
- $outBuffer = $null
- if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
- $PSBoundParameters['OutBuffer'] = 1
- }
- $parameterSet = $PSCmdlet.ParameterSetName
-
- if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
- [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
- }
- $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
- if ($preTelemetryId -eq '') {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
- } else {
- $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
- if ($internalCalledCmdlets -eq '') {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
- } else {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
- }
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
- }
-
- $mapping = @{
- Get = 'Az.DataProtection.private\Get-AzDataProtectionJob_Get';
- GetViaIdentity = 'Az.DataProtection.private\Get-AzDataProtectionJob_GetViaIdentity';
- List = 'Az.DataProtection.private\Get-AzDataProtectionJob_List';
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
}
- if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
- }
- $cmdInfo = Get-Command -Name $mapping[$parameterSet]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -1286,7 +1098,7 @@ While((Get-AzDataProtectionOperationStatus -OperationId $operationId -Location $
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IOperationResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IOperationResource
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -1310,7 +1122,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionoperationstatus
#>
function Get-AzDataProtectionOperationStatus {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IOperationResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IOperationResource])]
[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -1423,6 +1235,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -1476,12 +1292,12 @@ Returns the list of available operations.
Get-AzDataProtectionOperation
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IClientDiscoveryValueForSingleApi
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IClientDiscoveryValueForSingleApi
.Link
https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionoperation
#>
function Get-AzDataProtectionOperation {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IClientDiscoveryValueForSingleApi])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IClientDiscoveryValueForSingleApi])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter()]
@@ -1563,6 +1379,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -1618,11 +1438,14 @@ Get-AzDataProtectionRecoveryPoint -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupN
.Example
$instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName sarath-rg -VaultName sarath-vault
Get-AzDataProtectionRecoveryPoint -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName sarath-rg -VaultName sarath-vault -BackupInstanceName $instance[2].Name -Id 892e5c5014dc4a96807d22924f5745c9
+.Example
+$instance = $instance = Search-AzDataProtectionBackupInstanceInAzGraph -DatasourceType AzureDatabaseForPostgreSQL -Subscription "xxxxxxxx-xxxx-xxxxxxxxxxxx" -ResourceGroup sarath-rg -Vault sarath-vault
+$recoveryPoints = Get-AzDataProtectionRecoveryPoint -SubscriptionId "xxxxxxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName sarath-rg -VaultName sarath-vault -BackupInstanceName $instance[2].Name -UseSecondaryRegion
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupRecoveryPointResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupRecoveryPointResource
.Outputs
System.Management.Automation.PSObject
.Notes
@@ -1648,7 +1471,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionrecoverypoint
#>
function Get-AzDataProtectionRecoveryPoint {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupRecoveryPointResource], [PSObject])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupRecoveryPointResource], [PSObject])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -1754,7 +1577,13 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[System.DateTime]
# End Time filter for recovery points
- ${EndTime}
+ ${EndTime},
+
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # Switch parameter to fetch recovery points from secondary region
+ ${UseSecondaryRegion}
)
begin {
@@ -1792,6 +1621,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -1848,7 +1681,7 @@ $mapping | fl
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IResourceGuardProxyBaseResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IResourceGuardProxyBaseResource
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -1872,7 +1705,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionresourceguardmapping
#>
function Get-AzDataProtectionResourceGuardMapping {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IResourceGuardProxyBaseResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IResourceGuardProxyBaseResource])]
[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -1993,6 +1826,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -2050,7 +1887,7 @@ Get-AzDataProtectionResourceGuard -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxx
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IResourceGuardResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IResourceGuardResource
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -2074,7 +1911,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionresourceguard
#>
function Get-AzDataProtectionResourceGuard {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IResourceGuardResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IResourceGuardResource])]
[CmdletBinding(DefaultParameterSetName='Get1', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -2191,6 +2028,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -2246,7 +2087,7 @@ Get-AzDataProtectionSoftDeletedBackupInstance -ResourceGroupName $resourceGroupN
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IDeletedBackupInstanceResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IDeletedBackupInstanceResource
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -2270,7 +2111,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionsoftdeletedbackupinstance
#>
function Get-AzDataProtectionSoftDeletedBackupInstance {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IDeletedBackupInstanceResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IDeletedBackupInstanceResource])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get', Mandatory)]
@@ -2394,6 +2235,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -2613,6 +2458,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -2820,6 +2669,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -3031,6 +2884,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -3236,6 +3093,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -3435,6 +3296,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -3652,6 +3517,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -3706,7 +3575,7 @@ $proxy = Set-AzDataProtectionResourceGuardMapping -ResourceGroupName $resourceGr
$proxy | fl
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IResourceGuardProxyBaseResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IResourceGuardProxyBaseResource
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -3719,7 +3588,7 @@ RESOURCEGUARDOPERATIONDETAIL : .
https://learn.microsoft.com/powershell/module/az.dataprotection/set-azdataprotectionresourceguardmapping
#>
function Set-AzDataProtectionResourceGuardMapping {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IResourceGuardProxyBaseResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IResourceGuardProxyBaseResource])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -3834,6 +3703,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -3880,136 +3753,56 @@ end {
<#
.Synopsis
-Triggers restore for a BackupInstance
+This operation will stop protection of a backup instance and data will be held forever
.Description
-Triggers restore for a BackupInstance
-.Example
-$instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName "sarath-rg" -VaultName "sarath-vault"
-$rp = Get-AzDataProtectionRecoveryPoint -SubscriptionId "xxx-xxx-xxx" -ResourceGroupName "sarath-rg" -VaultName "sarath-vault" -BackupInstanceName $instance.Name
-$restoreRequest = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureDisk -SourceDataStore OperationalStore -RestoreLocation "westus" -RestoreType AlternateLocation -TargetResourceId "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/disks/{DiskName}" -RecoveryPoint $rp[0].name
-Start-AzDataProtectionBackupInstanceRestore -BackupInstanceName $instance.BackupInstanceName -ResourceGroupName sarath-rg -VaultName sarath-vault -SubscriptionId "xxx-xxx-xxx" -Parameter $restorerequest
-.Example
-$instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName"
-$rp = Get-AzDataProtectionRecoveryPoint -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -BackupInstanceName $instance.Name
-$targetResourceId = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourceGroupName/providers/Microsoft.DBforPostgreSQL/servers/serverName/databases/targetDbName"
-$secretURI = "https://oss-keyvault.vault.azure.net/secrets/oss-secret"
-$restoreRequest = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureDatabaseForPostgreSQL -SourceDataStore VaultStore -RestoreLocation "westus" -RestoreType AlternateLocation -TargetResourceId $targetResourceId -RecoveryPoint $rp[0].Property.RecoveryPointId -SecretStoreURI $secretURI -SecretStoreType AzureKeyVault
-$restoreJob = Start-AzDataProtectionBackupInstanceRestore -BackupInstanceName $instance.BackupInstanceName -ResourceGroupName resourceGroupName -VaultName vaultName -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -Parameter $restorerequest
-$jobid = $restoreJob.JobId.Split("/")[-1]
-$jobstatus = "InProgress"
-while($jobstatus -ne "Completed")
-{
- Start-Sleep -Seconds 10
- $currentjob = Get-AzDataProtectionJob -Id $jobid -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName"
- $jobstatus = $currentjob.Status
-}
+This operation will stop protection of a backup instance and data will be held forever
.Example
-$instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName"
-$rp = Get-AzDataProtectionRecoveryPoint -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -BackupInstanceName $instance.Name
-$targetContainerURI = "https://targetStorageAccount.blob.core.windows.net/targetContainerName"
-$fileNamePrefix = "restore_as_files_12345"
-$restoreRequest = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureDatabaseForPostgreSQL -SourceDataStore VaultStore -RestoreLocation "westus" -RestoreType RestoreAsFiles -RecoveryPoint $rp[0].Property.RecoveryPointId -TargetContainerURI $targetContainerURI -FileNamePrefix $fileNamePrefix
-$restoreJob = Start-AzDataProtectionBackupInstanceRestore -BackupInstanceName $instance.BackupInstanceName -ResourceGroupName resourceGroupName -VaultName vaultName -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -Parameter $restorerequest
-$jobid = $restoreJob.JobId.Split("/")[-1]
-$jobstatus = "InProgress"
-while($jobstatus -ne "Completed")
-{
- Start-Sleep -Seconds 10
- $currentjob = Get-AzDataProtectionJob -Id $jobid -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName"
- $jobstatus = $currentjob.Status
-}
-.Example
-$instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" | Where { $_.Name -match "aks-cluster-name" }
-$rp = Get-AzDataProtectionRecoveryPoint -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -BackupInstanceName $instance.Name
-$aksRestoreCriteria = New-AzDataProtectionRestoreConfigurationClientObject -DatasourceType AzureKubernetesService -PersistentVolumeRestoreMode RestoreWithVolumeData -IncludeClusterScopeResource $true -NamespaceMapping @{"sourceNamespace1"="targetNamespace1";"sourceNamespace2"="targetNamespace2"}
-$snapshotResourceGroupId = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/snapshotResourceGroup"
-$aksOLRRestoreRequest = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureKubernetesService -SourceDataStore OperationalStore -RestoreLocation eastus -RestoreType OriginalLocation -RecoveryPoint $rps[0].Property.RecoveryPointId -RestoreConfiguration $aksRestoreCriteria -BackupInstance $instance
-
-Set-AzDataProtectionMSIPermission -VaultResourceGroup "resourceGroupName" -VaultName "vaultName" -PermissionsScope "ResourceGroup" -RestoreRequest $aksOLRRestoreRequest -SnapshotResourceGroupId $snapshotResourceGroupId
-$validateRestore = Test-AzDataProtectionBackupInstanceRestore -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -RestoreRequest $aksOLRRestoreRequest -Name $instance.BackupInstanceName
-$restoreJob = Start-AzDataProtectionBackupInstanceRestore -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -BackupInstanceName $instance.BackupInstanceName -Parameter $aksOLRRestoreRequest
-.Example
-$instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" | Where { $_.Name -match "storageAcountName" }
-$rp = Get-AzDataProtectionRecoveryPoint -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -BackupInstanceName $instance.Name
-$backedUpContainers = $instance.Property.PolicyInfo.PolicyParameter.BackupDatasourceParametersList[0].ContainersList
-$restoreReq = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureBlob -SourceDataStore VaultStore -RestoreLocation "vaultLocation" -RecoveryPoint $rp[0].Name -ItemLevelRecovery -RestoreType AlternateLocation -TargetResourceId "targetStorageAccountId" -ContainersList $backedUpContainers[0,1]
-Test-AzDataProtectionBackupInstanceRestore -Name $instance[0].Name -ResourceGroupName "resourceGroupName" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -VaultName "vaultName" -RestoreRequest $restoreReq
-$restoreJob = Start-AzDataProtectionBackupInstanceRestore -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -BackupInstanceName $instance.BackupInstanceName -Parameter $restoreReq
-.Example
-$instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" | Where { $_.Name -match "storageAcountName" }
-$rp = Get-AzDataProtectionRecoveryPoint -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -BackupInstanceName $instance.Name
-$backedUpContainers = $instance.Property.PolicyInfo.PolicyParameter.BackupDatasourceParametersList[0].ContainersList
-$targetCrossSubscriptionStorageAccountId = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/targetStorageAccount"
-$restoreReqCSR = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureBlob -SourceDataStore VaultStore -RestoreLocation "vaultLocation" -RecoveryPoint $rp[0].Name -ItemLevelRecovery -RestoreType AlternateLocation -TargetResourceId $targetCrossSubscriptionStorageAccountId -ContainersList $backedUpContainers[0,1]
-Test-AzDataProtectionBackupInstanceRestore -Name $instance[0].Name -ResourceGroupName "resourceGroupName" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -VaultName "vaultName" -RestoreRequest $restoreReqCSR
-$restoreJobCSR = Start-AzDataProtectionBackupInstanceRestore -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -BackupInstanceName $instance.BackupInstanceName -Parameter $restoreReqCSR
-.Example
-$instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" | Where { $_.Property.DataSourceInfo.ResourceType -match "Postgre" }
-$rp = Get-AzDataProtectionRecoveryPoint -BackupInstanceName $instance[0].BackupInstanceName -ResourceGroupName "resourceGroupName" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -VaultName "vaultName"
-$targetResourceArmId = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/crossSubResourceGroupName/providers/Microsoft.Storage/storageAccounts/akneemasaecy/blobServices/default/containers/oss-csr-container"
-$targetContainerURI = "https://akneemasaecy.blob.core.windows.net/oss-csr-container"
-$fileNamePrefix = "oss-csr-pstest-restoreasfiles"
-$ossRestoreReqFiles = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureDatabaseForPostgreSQL -SourceDataStore VaultStore -RestoreLocation "vaultLocation" -RestoreType RestoreAsFiles -RecoveryPoint $rp[0].Property.RecoveryPointId -TargetContainerURI $targetContainerURI -FileNamePrefix $fileNamePrefix -TargetResourceIdForRestoreAsFile $targetContainerArmId
-$validateRestore = Test-AzDataProtectionBackupInstanceRestore -Name $instance[0].Name -ResourceGroupName "resourceGroupName" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -VaultName "vaultName" -RestoreRequest $ossRestoreReqFiles
-$restoreJobCSR = Start-AzDataProtectionBackupInstanceRestore -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -BackupInstanceName $instance.BackupInstanceName -Parameter $ossRestoreReqFiles
-$jobid = $restoreJobCSR.JobId.Split("/")[-1]
-$jobstatus = "InProgress"
-while($jobstatus -ne "Completed")
-{
- Start-Sleep -Seconds 10
- $currentjob = Get-AzDataProtectionJob -Id $jobid -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName"
- $jobstatus = $currentjob.Status
-}
+Stop-AzDataProtectionBackupInstanceProtection -ResourceGroupName "rgName" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx" -VaultName "vaultName" -BackupInstanceName $backupInstance.BackupInstanceName
.Inputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupRestoreRequest
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IOperationJobExtendedInfo
+System.Boolean
.Notes
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.
-PARAMETER : Azure backup restore request
- ObjectType :
- RestoreTargetInfo : Gets or sets the restore target information.
- ObjectType : Type of Datasource object, used to initialize the right inherited type
- [RestoreLocation ]: Target Restore region
- SourceDataStoreType : Gets or sets the type of the source data store.
- [IdentityDetailUseSystemAssignedIdentity ]: Specifies if the BI is protected by System Identity.
- [IdentityDetailUserAssignedIdentityArmUrl ]: ARM URL for User Assigned Identity.
- [SourceResourceId ]: Fully qualified Azure Resource Manager ID of the datasource which is being recovered.
-
-RESTORETARGETINFO : Gets or sets the restore target information.
- ObjectType : Type of Datasource object, used to initialize the right inherited type
- [RestoreLocation ]: Target Restore region
+INPUTOBJECT : Identity Parameter
+ [BackupInstanceName ]: The name of the backup instance.
+ [BackupPolicyName ]:
+ [Id ]: Resource identity path
+ [JobId ]: The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
+ [Location ]: The location in which uniqueness will be verified.
+ [OperationId ]:
+ [RecoveryPointId ]:
+ [RequestName ]:
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [ResourceGuardProxyName ]: name of the resource guard proxy
+ [ResourceGuardsName ]: The name of ResourceGuard
+ [SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
+ [VaultName ]: The name of the backup vault.
.Link
-https://learn.microsoft.com/powershell/module/az.dataprotection/start-azdataprotectionbackupinstancerestore
+https://learn.microsoft.com/powershell/module/az.dataprotection/stop-azdataprotectionbackupinstanceprotection
#>
-function Start-AzDataProtectionBackupInstanceRestore {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IOperationJobExtendedInfo])]
-[CmdletBinding(DefaultParameterSetName='Trigger', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+function Stop-AzDataProtectionBackupInstanceProtection {
+[OutputType([System.Boolean])]
+[CmdletBinding(DefaultParameterSetName='Stop', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
- [Parameter(Mandatory)]
+ [Parameter(ParameterSetName='Stop', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
[System.String]
# The name of the backup instance.
${BackupInstanceName},
- [Parameter(Mandatory)]
+ [Parameter(ParameterSetName='Stop', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
[System.String]
# The name of the resource group.
# The name is case insensitive.
${ResourceGroupName},
- [Parameter(Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
- [System.String]
- # The name of the backup vault.
- ${VaultName},
-
- [Parameter()]
+ [Parameter(ParameterSetName='Stop')]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String]
@@ -4017,50 +3810,18 @@ param(
# The value must be an UUID.
${SubscriptionId},
- [Parameter(ParameterSetName='Trigger', Mandatory, ValueFromPipeline)]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupRestoreRequest]
- # Azure backup restore request
- # To construct, see NOTES section for PARAMETER properties and create a hash table.
- ${Parameter},
-
- [Parameter(ParameterSetName='TriggerExpanded', Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [System.String]
- # .
- ${ObjectType},
-
- [Parameter(ParameterSetName='TriggerExpanded', Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IRestoreTargetInfoBase]
- # Gets or sets the restore target information.
- # To construct, see NOTES section for RESTORETARGETINFO properties and create a hash table.
- ${RestoreTargetInfo},
-
- [Parameter(ParameterSetName='TriggerExpanded', Mandatory)]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.SourceDataStoreType])]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.SourceDataStoreType]
- # Gets or sets the type of the source data store.
- ${SourceDataStoreType},
-
- [Parameter(ParameterSetName='TriggerExpanded')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [System.Management.Automation.SwitchParameter]
- # Specifies if the BI is protected by System Identity.
- ${IdentityDetailUseSystemAssignedIdentity},
-
- [Parameter(ParameterSetName='TriggerExpanded')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [Parameter(ParameterSetName='Stop', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
[System.String]
- # ARM URL for User Assigned Identity.
- ${IdentityDetailUserAssignedIdentityArmUrl},
+ # The name of the backup vault.
+ ${VaultName},
- [Parameter(ParameterSetName='TriggerExpanded')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [System.String]
- # Fully qualified Azure Resource Manager ID of the datasource which is being recovered.
- ${SourceResourceId},
+ [Parameter(ParameterSetName='StopViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
@@ -4103,6 +3864,12 @@ param(
# Run the command asynchronously
${NoWait},
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Returns true when the command succeeds
+ ${PassThru},
+
[Parameter(DontShow)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
[System.Uri]
@@ -4149,14 +3916,18 @@ begin {
}
$mapping = @{
- Trigger = 'Az.DataProtection.private\Start-AzDataProtectionBackupInstanceRestore_Trigger';
- TriggerExpanded = 'Az.DataProtection.private\Start-AzDataProtectionBackupInstanceRestore_TriggerExpanded';
+ Stop = 'Az.DataProtection.private\Stop-AzDataProtectionBackupInstanceProtection_Stop';
+ StopViaIdentity = 'Az.DataProtection.private\Stop-AzDataProtectionBackupInstanceProtection_StopViaIdentity';
}
- if (('Trigger', 'TriggerExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ if (('Stop') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -4203,11 +3974,11 @@ end {
<#
.Synopsis
-This operation will stop protection of a backup instance and data will be held forever
+This operation will stop backup for a backup instance and retains the backup data as per the policy (except latest Recovery point, which will be retained forever)
.Description
-This operation will stop protection of a backup instance and data will be held forever
+This operation will stop backup for a backup instance and retains the backup data as per the policy (except latest Recovery point, which will be retained forever)
.Example
-Stop-AzDataProtectionBackupInstanceProtection -ResourceGroupName "rgName" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx" -VaultName "vaultName" -BackupInstanceName $backupInstance.BackupInstanceName
+Suspend-AzDataProtectionBackupInstanceBackup -ResourceGroupName "rgName" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx" -VaultName "vaultName" -BackupInstanceName $backupInstance.BackupInstanceName
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity
@@ -4233,26 +4004,26 @@ INPUTOBJECT : Identity Parameter
[SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
[VaultName ]: The name of the backup vault.
.Link
-https://learn.microsoft.com/powershell/module/az.dataprotection/stop-azdataprotectionbackupinstanceprotection
+https://learn.microsoft.com/powershell/module/az.dataprotection/suspend-azdataprotectionbackupinstancebackup
#>
-function Stop-AzDataProtectionBackupInstanceProtection {
+function Suspend-AzDataProtectionBackupInstanceBackup {
[OutputType([System.Boolean])]
-[CmdletBinding(DefaultParameterSetName='Stop', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+[CmdletBinding(DefaultParameterSetName='Suspend', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
- [Parameter(ParameterSetName='Stop', Mandatory)]
+ [Parameter(ParameterSetName='Suspend', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
[System.String]
# The name of the backup instance.
${BackupInstanceName},
- [Parameter(ParameterSetName='Stop', Mandatory)]
+ [Parameter(ParameterSetName='Suspend', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
[System.String]
# The name of the resource group.
# The name is case insensitive.
${ResourceGroupName},
- [Parameter(ParameterSetName='Stop')]
+ [Parameter(ParameterSetName='Suspend')]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String]
@@ -4260,13 +4031,13 @@ param(
# The value must be an UUID.
${SubscriptionId},
- [Parameter(ParameterSetName='Stop', Mandatory)]
+ [Parameter(ParameterSetName='Suspend', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
[System.String]
# The name of the backup vault.
${VaultName},
- [Parameter(ParameterSetName='StopViaIdentity', Mandatory, ValueFromPipeline)]
+ [Parameter(ParameterSetName='SuspendViaIdentity', Mandatory, ValueFromPipeline)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity]
# Identity Parameter
@@ -4366,14 +4137,18 @@ begin {
}
$mapping = @{
- Stop = 'Az.DataProtection.private\Stop-AzDataProtectionBackupInstanceProtection_Stop';
- StopViaIdentity = 'Az.DataProtection.private\Stop-AzDataProtectionBackupInstanceProtection_StopViaIdentity';
+ Suspend = 'Az.DataProtection.private\Suspend-AzDataProtectionBackupInstanceBackup_Suspend';
+ SuspendViaIdentity = 'Az.DataProtection.private\Suspend-AzDataProtectionBackupInstanceBackup_SuspendViaIdentity';
}
- if (('Stop') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ if (('Suspend') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -4420,56 +4195,42 @@ end {
<#
.Synopsis
-This operation will stop backup for a backup instance and retains the backup data as per the policy (except latest Recovery point, which will be retained forever)
+Sync backup instance again in case of failure\r\nThis action will retry last failed operation and will bring backup instance to valid state
.Description
-This operation will stop backup for a backup instance and retains the backup data as per the policy (except latest Recovery point, which will be retained forever)
+Sync backup instance again in case of failure\r\nThis action will retry last failed operation and will bring backup instance to valid state
.Example
-Suspend-AzDataProtectionBackupInstanceBackup -ResourceGroupName "rgName" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx" -VaultName "vaultName" -BackupInstanceName $backupInstance.BackupInstanceName
+Sync-AzDataProtectionBackupInstance -ResourceGroupName "rgName" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx" -VaultName "vaultName" -BackupInstanceName $backupInstance.BackupInstanceName
-.Inputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity
.Outputs
System.Boolean
-.Notes
-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.
-
-INPUTOBJECT : Identity Parameter
- [BackupInstanceName ]: The name of the backup instance.
- [BackupPolicyName ]:
- [Id ]: Resource identity path
- [JobId ]: The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
- [Location ]: The location in which uniqueness will be verified.
- [OperationId ]:
- [RecoveryPointId ]:
- [RequestName ]:
- [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
- [ResourceGuardProxyName ]: name of the resource guard proxy
- [ResourceGuardsName ]: The name of ResourceGuard
- [SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
- [VaultName ]: The name of the backup vault.
.Link
-https://learn.microsoft.com/powershell/module/az.dataprotection/suspend-azdataprotectionbackupinstancebackup
+https://learn.microsoft.com/powershell/module/az.dataprotection/sync-azdataprotectionbackupinstance
#>
-function Suspend-AzDataProtectionBackupInstanceBackup {
+function Sync-AzDataProtectionBackupInstance {
[OutputType([System.Boolean])]
-[CmdletBinding(DefaultParameterSetName='Suspend', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+[CmdletBinding(DefaultParameterSetName='SyncExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
- [Parameter(ParameterSetName='Suspend', Mandatory)]
+ [Parameter(Mandatory)]
+ [Alias('BackupInstanceName')]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
[System.String]
# The name of the backup instance.
- ${BackupInstanceName},
+ ${Name},
- [Parameter(ParameterSetName='Suspend', Mandatory)]
+ [Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
[System.String]
# The name of the resource group.
# The name is case insensitive.
${ResourceGroupName},
- [Parameter(ParameterSetName='Suspend')]
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
+ [System.String]
+ # The name of the backup vault.
+ ${VaultName},
+
+ [Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
[System.String]
@@ -4477,18 +4238,13 @@ param(
# The value must be an UUID.
${SubscriptionId},
- [Parameter(ParameterSetName='Suspend', Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
- [System.String]
- # The name of the backup vault.
- ${VaultName},
-
- [Parameter(ParameterSetName='SuspendViaIdentity', Mandatory, ValueFromPipeline)]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity]
- # Identity Parameter
- # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
- ${InputObject},
+ [Parameter()]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.SyncType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.SyncType]
+ # Field indicating sync type e.g.
+ # to sync only in case of failure or in all cases
+ ${SyncType},
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
@@ -4583,14 +4339,17 @@ begin {
}
$mapping = @{
- Suspend = 'Az.DataProtection.private\Suspend-AzDataProtectionBackupInstanceBackup_Suspend';
- SuspendViaIdentity = 'Az.DataProtection.private\Suspend-AzDataProtectionBackupInstanceBackup_SuspendViaIdentity';
+ SyncExpanded = 'Az.DataProtection.private\Sync-AzDataProtectionBackupInstance_SyncExpanded';
}
- if (('Suspend') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ if (('SyncExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
$PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -4637,206 +4396,9 @@ end {
<#
.Synopsis
-Sync backup instance again in case of failure\r\nThis action will retry last failed operation and will bring backup instance to valid state
+Validate whether adhoc backup will be successful or not
.Description
-Sync backup instance again in case of failure\r\nThis action will retry last failed operation and will bring backup instance to valid state
-.Example
-Sync-AzDataProtectionBackupInstance -ResourceGroupName "rgName" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx" -VaultName "vaultName" -BackupInstanceName $backupInstance.BackupInstanceName
-
-.Outputs
-System.Boolean
-.Link
-https://learn.microsoft.com/powershell/module/az.dataprotection/sync-azdataprotectionbackupinstance
-#>
-function Sync-AzDataProtectionBackupInstance {
-[OutputType([System.Boolean])]
-[CmdletBinding(DefaultParameterSetName='SyncExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
-param(
- [Parameter(Mandatory)]
- [Alias('BackupInstanceName')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
- [System.String]
- # The name of the backup instance.
- ${Name},
-
- [Parameter(Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
- [System.String]
- # The name of the resource group.
- # The name is case insensitive.
- ${ResourceGroupName},
-
- [Parameter(Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
- [System.String]
- # The name of the backup vault.
- ${VaultName},
-
- [Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
- [System.String]
- # The ID of the target subscription.
- # The value must be an UUID.
- ${SubscriptionId},
-
- [Parameter()]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.SyncType])]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.SyncType]
- # Field indicating sync type e.g.
- # to sync only in case of failure or in all cases
- ${SyncType},
-
- [Parameter()]
- [Alias('AzureRMContext', 'AzureCredential')]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Azure')]
- [System.Management.Automation.PSObject]
- # The DefaultProfile parameter is not functional.
- # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
- ${DefaultProfile},
-
- [Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- # Run the command as a job
- ${AsJob},
-
- [Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- # Wait for .NET debugger to attach
- ${Break},
-
- [Parameter(DontShow)]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
- # SendAsync Pipeline Steps to be appended to the front of the pipeline
- ${HttpPipelineAppend},
-
- [Parameter(DontShow)]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
- # SendAsync Pipeline Steps to be prepended to the front of the pipeline
- ${HttpPipelinePrepend},
-
- [Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- # Run the command asynchronously
- ${NoWait},
-
- [Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- # Returns true when the command succeeds
- ${PassThru},
-
- [Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
- [System.Uri]
- # The URI for the proxy server to use
- ${Proxy},
-
- [Parameter(DontShow)]
- [ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
- [System.Management.Automation.PSCredential]
- # Credentials for a proxy server to use for the remote call
- ${ProxyCredential},
-
- [Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- # Use the default credentials for the proxy
- ${ProxyUseDefaultCredentials}
-)
-
-begin {
- try {
- $outBuffer = $null
- if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
- $PSBoundParameters['OutBuffer'] = 1
- }
- $parameterSet = $PSCmdlet.ParameterSetName
-
- if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
- [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
- }
- $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
- if ($preTelemetryId -eq '') {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
- } else {
- $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
- if ($internalCalledCmdlets -eq '') {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
- } else {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
- }
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
- }
-
- $mapping = @{
- SyncExpanded = 'Az.DataProtection.private\Sync-AzDataProtectionBackupInstance_SyncExpanded';
- }
- if (('SyncExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
- }
- $cmdInfo = Get-Command -Name $mapping[$parameterSet]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
- $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
- $scriptCmd = {& $wrappedCmd @PSBoundParameters}
- $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
- $steppablePipeline.Begin($PSCmdlet)
- } catch {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- throw
- }
-}
-
-process {
- try {
- $steppablePipeline.Process($_)
- } catch {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- throw
- }
-
- finally {
- $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
- $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- }
-
-}
-end {
- try {
- $steppablePipeline.End()
-
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
- if ($preTelemetryId -eq '') {
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- }
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
-
- } catch {
- [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
- throw
- }
-}
-}
-
-<#
-.Synopsis
-Validate whether adhoc backup will be successful or not
-.Description
-Validate whether adhoc backup will be successful or not
+Validate whether adhoc backup will be successful or not
.Example
$vault = Get-AzDataProtectionBackupVault -ResourceGroupName "resourceGroupName" -VaultName "vaultName"
$diskBackupPolicy = Get-AzDataProtectionBackupPolicy -ResourceGroupName "resourceGroupName" -VaultName $vault.Name -Name "diskBackupPolicy"
@@ -4846,7 +4408,7 @@ $instance = Initialize-AzDataProtectionBackupInstance -SnapshotResourceGroupId $
Test-AzDataProtectionBackupInstanceReadiness -ResourceGroupName "resourceGroupName" -VaultName $vault.Name -BackupInstance $instance[0].Property
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IOperationJobExtendedInfo
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IOperationJobExtendedInfo
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -4889,7 +4451,7 @@ BACKUPINSTANCE : Backup Instance
https://learn.microsoft.com/powershell/module/az.dataprotection/test-azdataprotectionbackupinstancereadiness
#>
function Test-AzDataProtectionBackupInstanceReadiness {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IOperationJobExtendedInfo])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IOperationJobExtendedInfo])]
[CmdletBinding(DefaultParameterSetName='ValidateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -4915,7 +4477,7 @@ param(
[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupInstance]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupInstance]
# Backup Instance
# To construct, see NOTES section for BACKUPINSTANCE properties and create a hash table.
${BackupInstance},
@@ -5014,6 +4576,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -5232,6 +4798,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -5294,7 +4864,7 @@ Update-AzDataProtectionBackupVault -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxx
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupVaultResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupVaultResource
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -5318,7 +4888,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.dataprotection/update-azdataprotectionbackupvault
#>
function Update-AzDataProtectionBackupVault {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupVaultResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupVaultResource])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
@@ -5410,7 +4980,7 @@ param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IPatchResourceRequestInputTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IPatchResourceRequestInputTags]))]
[System.Collections.Hashtable]
# Resource tags.
${Tag},
@@ -5510,6 +5080,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -5567,7 +5141,7 @@ Edit-AzDataProtectionPolicyRetentionRuleClientObject -Policy $pol -Name Weekly -
Edit-AzDataProtectionPolicyRetentionRuleClientObject -Policy $pol -Name Weekly -RemoveRule
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -5607,12 +5181,12 @@ POLICY : Backup Policy Object
https://learn.microsoft.com/powershell/module/az.dataprotection/edit-azdataprotectionpolicyretentionruleclientobject
#>
function Edit-AzDataProtectionPolicyRetentionRuleClientObject {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy])]
[CmdletBinding(DefaultParameterSetName='RemoveRetention', PositionalBinding=$false)]
param(
[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy]
# Backup Policy Object
# To construct, see NOTES section for POLICY properties and create a hash table.
${Policy},
@@ -5637,7 +5211,7 @@ param(
[Parameter(ParameterSetName='AddRetention', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ISourceLifeCycle[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ISourceLifeCycle[]]
# Life cycles associated with the retention rule.
# To construct, see NOTES section for LIFECYCLES properties and create a hash table.
${LifeCycles},
@@ -5680,6 +5254,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -5736,7 +5314,7 @@ Edit-AzDataProtectionPolicyTagClientObject -Policy $pol -Name Weekly -Criteria $
Edit-AzDataProtectionPolicyTagClientObject -Policy $pol -Name Weekly -RemoveRule
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -5777,12 +5355,12 @@ POLICY : Backup Policy Object.
https://learn.microsoft.com/powershell/module/az.dataprotection/edit-azdataprotectionpolicytagclientobject
#>
function Edit-AzDataProtectionPolicyTagClientObject {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy])]
[CmdletBinding(DefaultParameterSetName='RemoveTag', PositionalBinding=$false)]
param(
[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy]
# Backup Policy Object.
# To construct, see NOTES section for POLICY properties and create a hash table.
${Policy},
@@ -5801,7 +5379,7 @@ param(
[Parameter(ParameterSetName='updateTag', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IScheduleBasedBackupCriteria[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IScheduleBasedBackupCriteria[]]
# Criterias to be associated with the schedule tag.
# To construct, see NOTES section for CRITERIA properties and create a hash table.
${Criteria}
@@ -5838,6 +5416,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -5892,7 +5474,7 @@ $schedule = New-AzDataProtectionPolicyTriggerScheduleClientObject -ScheduleDays
Edit-AzDataProtectionPolicyTriggerClientObject -Policy $pol -Schedule $schedule
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -5922,12 +5504,12 @@ POLICY : Backup Policy object.
https://learn.microsoft.com/powershell/module/az.dataprotection/edit-azdataprotectionpolicytriggerclientobject
#>
function Edit-AzDataProtectionPolicyTriggerClientObject {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy])]
[CmdletBinding(DefaultParameterSetName='RemoveBackupSchedule', PositionalBinding=$false)]
param(
[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy]
# Backup Policy object.
# To construct, see NOTES section for POLICY properties and create a hash table.
${Policy},
@@ -5976,6 +5558,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -6022,38 +5608,243 @@ end {
<#
.Synopsis
-Gets default policy template for a selected datasource type.
+Gets or lists jobs in a backup vault
.Description
-Gets default policy template for a selected datasource type.
+Gets or lists jobs in a backup vault
.Example
-Get-AzDataProtectionPolicyTemplate -DatasourceType AzureDisk
+Get-AzDataProtectionJob -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName sarath-rg -VaultName sarath-vault
+.Example
+Get-AzDataProtectionJob -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName sarath-rg -VaultName sarath-vault -Id 4abaea8c-f53a-4bb1-9963-59f96b597165
+.Example
+Get-AzDataProtectionJob -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName sarath-rg -VaultName sarath-vault -UseSecondaryRegion
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupJobResource
+.Notes
+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.
+
+INPUTOBJECT : Identity Parameter
+ [BackupInstanceName ]: The name of the backup instance.
+ [BackupPolicyName ]:
+ [Id ]: Resource identity path
+ [JobId ]: The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).
+ [Location ]: The location in which uniqueness will be verified.
+ [OperationId ]:
+ [RecoveryPointId ]:
+ [RequestName ]:
+ [ResourceGroupName ]: The name of the resource group. The name is case insensitive.
+ [ResourceGuardProxyName ]: name of the resource guard proxy
+ [ResourceGuardsName ]: The name of ResourceGuard
+ [SubscriptionId ]: The ID of the target subscription. The value must be an UUID.
+ [VaultName ]: The name of the backup vault.
.Link
-https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionpolicytemplate
+https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionjob
#>
-function Get-AzDataProtectionPolicyTemplate {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy])]
-[CmdletBinding(PositionalBinding=$false)]
+function Get-AzDataProtectionJob {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupJobResource])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
- [Parameter(Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Parameter(ParameterSetName='Get', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.DatasourceTypes]
- # Datasource Type
- ${DatasourceType}
-)
+ [System.String]
+ # Resource Group of the backup vault
+ ${ResourceGroupName},
-begin {
- try {
- $outBuffer = $null
- if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
- $PSBoundParameters['OutBuffer'] = 1
- }
- $parameterSet = $PSCmdlet.ParameterSetName
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.String]
+ # Name of the backup vault
+ ${VaultName},
- if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
- [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ [Parameter(ParameterSetName='List')]
+ [Parameter(ParameterSetName='Get')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.String[]]
+ # Subscription Id of the vault
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='List')]
+ [Parameter(ParameterSetName='Get')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # Switch parameter to fetch dataprotection job from secondary region (Cross Region Restore)
+ ${UseSecondaryRegion},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.Management.Automation.PSObject]
+ ${DefaultProfile},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Alias('JobId')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.String]
+ # Job ID to get a particular Job
+ ${Id},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Uri]
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ List = 'Az.DataProtection.custom\Get-AzDataProtectionJob';
+ Get = 'Az.DataProtection.custom\Get-AzDataProtectionJob';
+ GetViaIdentity = 'Az.DataProtection.custom\Get-AzDataProtectionJob';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Gets default policy template for a selected datasource type.
+.Description
+Gets default policy template for a selected datasource type.
+.Example
+Get-AzDataProtectionPolicyTemplate -DatasourceType AzureDisk
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy
+.Link
+https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionpolicytemplate
+#>
+function Get-AzDataProtectionPolicyTemplate {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy])]
+[CmdletBinding(PositionalBinding=$false)]
+param(
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.DatasourceTypes]
+ # Datasource Type
+ ${DatasourceType}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
}
$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
if ($preTelemetryId -eq '') {
@@ -6074,6 +5865,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -6138,7 +5933,7 @@ $backupInstance = Initialize-AzDataProtectionBackupInstance -DatasourceType Azur
$instance
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupInstanceResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupInstanceResource
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -6150,7 +5945,7 @@ BACKUPCONFIGURATION : Backup configuration for back
https://learn.microsoft.com/powershell/module/az.dataprotection/initialize-azdataprotectionbackupinstance
#>
function Initialize-AzDataProtectionBackupInstance {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupInstanceResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupInstanceResource])]
[CmdletBinding(PositionalBinding=$false)]
param(
[Parameter(Mandatory)]
@@ -6205,7 +6000,7 @@ param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupDatasourceParameters]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupDatasourceParameters]
# Backup configuration for backup.
# Use this parameter to configure protection for AzureKubernetesService.
# To construct, see NOTES section for BACKUPCONFIGURATION properties and create a hash table.
@@ -6242,6 +6037,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -6313,9 +6112,23 @@ $endTime = (Get-Date).AddDays(0).ToString("yyyy-MM-ddTHH:mm:ss.0000000Z")
$instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName "rgName" -VaultName "vaultName"
$pointInTimeRange = Find-AzDataProtectionRestorableTimeRange -BackupInstanceName $instance[0].BackupInstanceName -ResourceGroupName "rgName" -SubscriptionId "subscriptionId" -VaultName "vaultName" -SourceDataStoreType OperationalStore -StartTime $startTime -EndTime $endTime
Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureBlob -SourceDataStore OperationalStore -RestoreLocation $vault.Location -RestoreType OriginalLocation -BackupInstance $instances[0] -PointInTime (Get-Date).AddDays(-1) -ItemLevelRecovery -FromPrefixPattern "container1/aaa","container1/ccc", "container2/aab", "container3" -ToPrefixPattern "container1/bbb","container1/ddd", "container2/abc", "container3-0"
+.Example
+$vault = Search-AzDataProtectionBackupVaultInAzGraph -ResourceGroup $ResourceGroupName -Subscription $SubscriptionId -Vault $VaultName
+$instance = Search-AzDataProtectionBackupInstanceInAzGraph -Subscription $subscriptionId -ResourceGroup $resourceGroupName -Vault $vaultName -DatasourceType AzureDatabaseForPostgreSQL
+$recoveryPointsCrr = Get-AzDataProtectionRecoveryPoint -BackupInstanceName $instance.Name -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -UseSecondaryRegion
+$targetResourceId = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/{targetResourceGroupName}/providers/Microsoft.DBforPostgreSQL/servers/{targetServerName}/databases/{targetDatabaseName}"
+$secretURI = "https://{crr-key-vault}.vault.azure.net/secrets/{secret-for-crr}"
+$OssRestoreReq = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureDatabaseForPostgreSQL -SourceDataStore VaultStore -RestoreLocation $vault.ReplicatedRegion[0] -RestoreType AlternateLocation -RecoveryPoint $recoveryPointsCrr[0].Property.RecoveryPointId -TargetResourceId $targetResourceId -SecretStoreURI $secretURI -SecretStoreType AzureKeyVault
+.Example
+$vault = Search-AzDataProtectionBackupVaultInAzGraph -ResourceGroup $ResourceGroupName -Subscription $SubscriptionId -Vault $VaultName
+$instance = Search-AzDataProtectionBackupInstanceInAzGraph -Subscription $subscriptionId -ResourceGroup $resourceGroupName -Vault $vaultName -DatasourceType AzureDatabaseForPostgreSQL
+$recoveryPointsCrr = Get-AzDataProtectionRecoveryPoint -BackupInstanceName $instance.Name -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId -UseSecondaryRegion
+$targetContainerURI = "https://{targetStorageAccountName}.blob.core.windows.net/{targetContainerName}"
+$fileNamePrefix = "oss-pstest-crrasfiles"
+$OssRestoreReq = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureDatabaseForPostgreSQL -SourceDataStore VaultStore -RestoreLocation $vault.ReplicatedRegion[0] -RestoreType RestoreAsFiles -RecoveryPoint $recoveryPointsCrr[0].Property.RecoveryPointId -TargetContainerURI $targetContainerURI -FileNamePrefix $fileNamePrefix
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupRestoreRequest
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupRestoreRequest
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -6377,7 +6190,7 @@ RESTORECONFIGURATION : Restore configuration f
https://learn.microsoft.com/powershell/module/az.dataprotection/initialize-azdataprotectionrestorerequest
#>
function Initialize-AzDataProtectionRestoreRequest {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupRestoreRequest])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupRestoreRequest])]
[CmdletBinding(DefaultParameterSetName='AlternateLocationFullRecovery', PositionalBinding=$false)]
param(
[Parameter(Mandatory)]
@@ -6437,7 +6250,7 @@ param(
[Parameter(ParameterSetName='AlternateLocationFullRecovery')]
[Parameter(ParameterSetName='OriginalLocationFullRecovery')]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.KubernetesClusterRestoreCriteria]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.KubernetesClusterRestoreCriteria]
# Restore configuration for restore.
# Use this parameter to restore with AzureKubernetesService.
# To construct, see NOTES section for RESTORECONFIGURATION properties and create a hash table.
@@ -6504,7 +6317,7 @@ param(
[Parameter(ParameterSetName='OriginalLocationILR', Mandatory)]
[Parameter(ParameterSetName='OriginalLocationFullRecovery', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupInstanceResource]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupInstanceResource]
# Backup Instance object to trigger original localtion restore.
# To construct, see NOTES section for BACKUPINSTANCE properties and create a hash table.
${BackupInstance},
@@ -6564,6 +6377,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -6689,7 +6506,7 @@ param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.NamespacedNameResource[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.NamespacedNameResource[]]
# Hook reference to be executed during backup.
# To construct, see NOTES section for BACKUPHOOKREFERENCE properties and create a hash table.
${BackupHookReference},
@@ -6753,6 +6570,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -6901,7 +6722,7 @@ param(
[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupInstanceResource]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupInstanceResource]
# Backup instance request object which will be used to configure backup
# To construct, see NOTES section for BACKUPINSTANCE properties and create a hash table.
${BackupInstance},
@@ -6999,6 +6820,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -7127,7 +6952,7 @@ $defaultPol.PolicyRule[0].Trigger.ScheduleTimeZone = $timeZone[0].Id
$operationalVaultedPolicy = New-AzDataProtectionBackupPolicy -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -Name "operationalVaultedPolicyName" -Policy $defaultPol
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBaseBackupPolicyResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBaseBackupPolicyResource
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -7157,7 +6982,7 @@ POLICY : Policy Request Object
https://learn.microsoft.com/powershell/module/az.dataprotection/new-azdataprotectionbackuppolicy
#>
function New-AzDataProtectionBackupPolicy {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBaseBackupPolicyResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBaseBackupPolicyResource])]
[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -7180,7 +7005,7 @@ param(
[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupPolicy]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupPolicy]
# Policy Request Object
# To construct, see NOTES section for POLICY properties and create a hash table.
${Policy},
@@ -7262,6 +7087,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -7357,7 +7186,7 @@ param(
[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IStorageSetting[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IStorageSetting[]]
# Storage Settings of the vault.
# Use New-AzDataProtectionBackupVaultStorageSetting Cmdlet to Create.
# To construct, see NOTES section for STORAGESETTING properties and create a hash table.
@@ -7509,6 +7338,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -7613,6 +7446,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -7668,12 +7505,12 @@ New-AzDataProtectionPolicyTagCriteriaClientObject -AbsoluteCriteria FirstOfDay
New-AzDataProtectionPolicyTagCriteriaClientObject -DaysOfWeek @("Sunday", "Monday")
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IScheduleBasedBackupCriteria
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IScheduleBasedBackupCriteria
.Link
https://learn.microsoft.com/powershell/module/az.dataprotection/new-azdataprotectionpolicytagcriteriaclientobject
#>
function New-AzDataProtectionPolicyTagCriteriaClientObject {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IScheduleBasedBackupCriteria])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IScheduleBasedBackupCriteria])]
[CmdletBinding(DefaultParameterSetName='ScheduleCriteria', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='AbsoluteCriteria', Mandatory)]
@@ -7748,6 +7585,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -7862,6 +7703,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -7915,12 +7760,12 @@ Creates a resource guard under a resource group
New-AzDataProtectionResourceGuard -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "mua-rg" -Name "mua-resource-guard" -Location "centraluseuap"
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IResourceGuardResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IResourceGuardResource
.Link
https://learn.microsoft.com/powershell/module/az.dataprotection/new-azdataprotectionresourceguard
#>
function New-AzDataProtectionResourceGuard {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IResourceGuardResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IResourceGuardResource])]
[CmdletBinding(DefaultParameterSetName='CreateResourceGuard', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -8036,6 +7881,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -8161,7 +8010,7 @@ param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.KubernetesClusterRestoreCriteriaNamespaceMappings]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.KubernetesClusterRestoreCriteriaNamespaceMappings]
# Namespaces mapping from source namespaces to target namespaces to resolve namespace naming conflicts in the target cluster.
# To construct, see NOTES section for NAMESPACEMAPPING properties and create a hash table.
${NamespaceMapping},
@@ -8176,7 +8025,7 @@ param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.NamespacedNameResource[]]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.NamespacedNameResource[]]
# Hook reference to be executed during restore.
# To construct, see NOTES section for RESTOREHOOKREFERENCE properties and create a hash table.
${RestoreHookReference}
@@ -8212,6 +8061,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -8267,12 +8120,12 @@ New-AzDataProtectionRetentionLifeCycleClientObject -SourceDataStore OperationalS
New-AzDataProtectionRetentionLifeCycleClientObject -SourceDataStore OperationalStore -SourceRetentionDurationType Weeks -SourceRetentionDurationCount 20
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ISourceLifeCycle
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ISourceLifeCycle
.Link
https://learn.microsoft.com/powershell/module/az.dataprotection/new-azdataprotectionretentionlifecycleclientobject
#>
function New-AzDataProtectionRetentionLifeCycleClientObject {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ISourceLifeCycle])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ISourceLifeCycle])]
[CmdletBinding(PositionalBinding=$false)]
param(
[Parameter(Mandatory)]
@@ -8336,6 +8189,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -8429,7 +8286,47 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.ProtectionStatus[]]
# Protection Status of the item
- ${ProtectionStatus}
+ ${ProtectionStatus},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.Management.Automation.PSObject]
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Uri]
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ ${ProxyUseDefaultCredentials}
)
begin {
@@ -8462,6 +8359,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -8508,22 +8409,18 @@ end {
<#
.Synopsis
-Searches for Backup Jobs in Azure Resource Graph and retrieves the expected entries
+Searches for Backup vaults in Azure Resource Graph and retrieves the expected entries
.Description
-Searches for Backup Jobs in Azure Resource Graph and retrieves the expected entries
-.Example
-$endtime = Get-Date
-$starttime = $endtime.AddHours(-5)
-Search-AzDataProtectionJobInAzGraph -Subscription "xxx-xxx-xxx" -ResourceGroup sarath-rg -Vault sarath-vault -DatasourceType AzureDisk -StartTime $starttime -EndTime $endtime
+Searches for Backup vaults in Azure Resource Graph and retrieves the expected entries
.Example
-Search-AzDataProtectionJobInAzGraph -Subscription "xxxx-xxx-xxx" -ResourceGroup sarath-rg -Vault sarath-vault -DatasourceType AzureDisk -Operation OnDemandBackup
+Search-AzDataProtectionBackupVaultInAzGraph -Subscription "xxxxxxxx-xxxx-xxxxxxxxxxxx" -ResourceGroup $resourceGroupName -Vault $vaultName
.Outputs
System.Management.Automation.PSObject
.Link
-https://learn.microsoft.com/powershell/module/az.dataprotection/search-azdataprotectionjobinazgraph
+https://learn.microsoft.com/powershell/module/az.dataprotection/search-azdataprotectionbackupvaultinazgraph
#>
-function Search-AzDataProtectionJobInAzGraph {
+function Search-AzDataProtectionBackupVaultInAzGraph {
[OutputType([PSObject])]
[CmdletBinding(PositionalBinding=$false)]
param(
@@ -8533,12 +8430,6 @@ param(
# Subscription of Vault
${Subscription},
- [Parameter(Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.DatasourceTypes]
- # Datasource Type
- ${DatasourceType},
-
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[System.String[]]
@@ -8552,16 +8443,180 @@ param(
${Vault},
[Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [System.DateTime]
- # Start Time filter for the backup Job
- ${StartTime},
-
- [Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [System.DateTime]
- # End Time filter for the Backup Job
- ${EndTime},
+ [System.Management.Automation.PSObject]
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Uri]
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ __AllParameterSets = 'Az.DataProtection.custom\Search-AzDataProtectionBackupVaultInAzGraph';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Searches for Backup Jobs in Azure Resource Graph and retrieves the expected entries
+.Description
+Searches for Backup Jobs in Azure Resource Graph and retrieves the expected entries
+.Example
+$endtime = Get-Date
+$starttime = $endtime.AddHours(-5)
+Search-AzDataProtectionJobInAzGraph -Subscription "xxx-xxx-xxx" -ResourceGroup sarath-rg -Vault sarath-vault -DatasourceType AzureDisk -StartTime $starttime -EndTime $endtime
+.Example
+Search-AzDataProtectionJobInAzGraph -Subscription "xxxx-xxx-xxx" -ResourceGroup sarath-rg -Vault sarath-vault -DatasourceType AzureDisk -Operation OnDemandBackup
+
+.Outputs
+System.Management.Automation.PSObject
+.Link
+https://learn.microsoft.com/powershell/module/az.dataprotection/search-azdataprotectionjobinazgraph
+#>
+function Search-AzDataProtectionJobInAzGraph {
+[OutputType([PSObject])]
+[CmdletBinding(PositionalBinding=$false)]
+param(
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.String[]]
+ # Subscription of Vault
+ ${Subscription},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.DatasourceTypes]
+ # Datasource Type
+ ${DatasourceType},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.String[]]
+ # Resource Group of Vault
+ ${ResourceGroup},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.String[]]
+ # Name of the vault
+ ${Vault},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.DateTime]
+ # Start Time filter for the backup Job
+ ${StartTime},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.DateTime]
+ # End Time filter for the Backup Job
+ ${EndTime},
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
@@ -8573,7 +8628,47 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.JobStatus[]]
# Status filter for the backup job
- ${Status}
+ ${Status},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.Management.Automation.PSObject]
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Uri]
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ ${ProxyUseDefaultCredentials}
)
begin {
@@ -8606,6 +8701,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -8649,68 +8748,310 @@ end {
}
}
}
-
-<#
-.Synopsis
-Grants required permissions to the backup vault and other resources for configure backup and restore scenarios
-.Description
-Grants required permissions to the backup vault and other resources for configure backup and restore scenarios
+
+<#
+.Synopsis
+Grants required permissions to the backup vault and other resources for configure backup and restore scenarios
+.Description
+Grants required permissions to the backup vault and other resources for configure backup and restore scenarios
+.Example
+Set-AzDataProtectionMSIPermission -BackupInstance $instance -VaultResourceGroup "VaultRG" -VaultName "Vaultname" -PermissionsScope "ResourceGroup"
+
+.Example
+Set-AzDataProtectionMSIPermission -BackupInstance $instance -VaultResourceGroup "VaultRG" -VaultName "Vaultname" -PermissionsScope "Subscription"
+.Example
+Set-AzDataProtectionMSIPermission -KeyVaultId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/Sqlrg/providers/Microsoft.KeyVault/vaults/testkeyvault" -BackupInstance $instance -VaultResourceGroup "VaultRG" -VaultName "Vaultname" -PermissionsScope "Resource"
+
+.Example
+Set-AzDataProtectionMSIPermission -BackupInstance $backupInstance -VaultResourceGroup "resourceGroupName" -VaultName "vaultName" -PermissionsScope "ResourceGroup"
+
+.Outputs
+System.Object
+.Notes
+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.
+
+BACKUPINSTANCE : Backup instance request object which will be used to configure backup
+ [Tag ]: Proxy Resource tags.
+ [(Any) ]: This indicates any property can be added to this object.
+ [Property ]: BackupInstanceResource properties
+ DataSourceInfo : Gets or sets the data source information.
+ ResourceId : Full ARM ID of the resource. For azure resources, this is ARM ID. For non azure resources, this will be the ID created by backup service via Fabric/Vault.
+ [ObjectType ]: Type of Datasource object, used to initialize the right inherited type
+ [ResourceLocation ]: Location of datasource.
+ [ResourceName ]: Unique identifier of the resource in the context of parent.
+ [ResourceType ]: Resource Type of Datasource.
+ [ResourceUri ]: Uri of the resource.
+ [Type ]: DatasourceType of the resource.
+ ObjectType :
+ PolicyInfo : Gets or sets the policy information.
+ PolicyId :
+ [PolicyParameter ]: Policy parameters for the backup instance
+ [BackupDatasourceParametersList ]: Gets or sets the Backup Data Source Parameters
+ ObjectType : Type of the specific object - used for deserializing
+ [DataStoreParametersList ]: Gets or sets the DataStore Parameters
+ DataStoreType : type of datastore; Operational/Vault/Archive
+ ObjectType : Type of the specific object - used for deserializing
+ [DataSourceSetInfo ]: Gets or sets the data source set information.
+ ResourceId : Full ARM ID of the resource. For azure resources, this is ARM ID. For non azure resources, this will be the ID created by backup service via Fabric/Vault.
+ [DatasourceType ]: DatasourceType of the resource.
+ [ObjectType ]: Type of Datasource object, used to initialize the right inherited type
+ [ResourceLocation ]: Location of datasource.
+ [ResourceName ]: Unique identifier of the resource in the context of parent.
+ [ResourceType ]: Resource Type of Datasource.
+ [ResourceUri ]: Uri of the resource.
+ [DatasourceAuthCredentials ]: Credentials to use to authenticate with data source provider.
+ ObjectType : Type of the specific object - used for deserializing
+ [FriendlyName ]: Gets or sets the Backup Instance friendly name.
+ [IdentityDetail ]: Contains information of the Identity Details for the BI. If it is null, default will be considered as System Assigned.
+ [UseSystemAssignedIdentity ]: Specifies if the BI is protected by System Identity.
+ [UserAssignedIdentityArmUrl ]: ARM URL for User Assigned Identity.
+ [ValidationType ]: Specifies the type of validation. In case of DeepValidation, all validations from /validateForBackup API will run again.
+
+RESTOREREQUEST : Restore request object which will be used for restore
+ ObjectType :
+ RestoreTargetInfo : Gets or sets the restore target information.
+ ObjectType : Type of Datasource object, used to initialize the right inherited type
+ [RestoreLocation ]: Target Restore region
+ SourceDataStoreType : Gets or sets the type of the source data store.
+ [IdentityDetailUseSystemAssignedIdentity ]: Specifies if the BI is protected by System Identity.
+ [IdentityDetailUserAssignedIdentityArmUrl ]: ARM URL for User Assigned Identity.
+ [SourceResourceId ]: Fully qualified Azure Resource Manager ID of the datasource which is being recovered.
+.Link
+https://learn.microsoft.com/powershell/module/az.dataprotection/set-azdataprotectionmsipermission
+#>
+function Set-AzDataProtectionMSIPermission {
+[OutputType([System.Object])]
+[CmdletBinding(DefaultParameterSetName='SetPermissionsForBackup', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.String]
+ # Resource group of the backup vault
+ ${VaultResourceGroup},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.String]
+ # Name of the backup vault
+ ${VaultName},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.String]
+ # Scope at which the permissions need to be granted
+ ${PermissionsScope},
+
+ [Parameter(ParameterSetName='SetPermissionsForBackup', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupInstanceResource]
+ # Backup instance request object which will be used to configure backup
+ # To construct, see NOTES section for BACKUPINSTANCE properties and create a hash table.
+ ${BackupInstance},
+
+ [Parameter(ParameterSetName='SetPermissionsForBackup')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.String]
+ # ID of the keyvault
+ ${KeyVaultId},
+
+ [Parameter(ParameterSetName='SetPermissionsForRestore', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupRestoreRequest]
+ # Restore request object which will be used for restore
+ # To construct, see NOTES section for RESTOREREQUEST properties and create a hash table.
+ ${RestoreRequest},
+
+ [Parameter(ParameterSetName='SetPermissionsForRestore', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.String]
+ # Sanpshot Resource Group
+ ${SnapshotResourceGroupId}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ SetPermissionsForBackup = 'Az.DataProtection.custom\Set-AzDataProtectionMSIPermission';
+ SetPermissionsForRestore = 'Az.DataProtection.custom\Set-AzDataProtectionMSIPermission';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Triggers restore for a BackupInstance
+.Description
+Triggers restore for a BackupInstance
+.Example
+$instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName "sarath-rg" -VaultName "sarath-vault"
+$rp = Get-AzDataProtectionRecoveryPoint -SubscriptionId "xxx-xxx-xxx" -ResourceGroupName "sarath-rg" -VaultName "sarath-vault" -BackupInstanceName $instance.Name
+$restoreRequest = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureDisk -SourceDataStore OperationalStore -RestoreLocation "westus" -RestoreType AlternateLocation -TargetResourceId "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/disks/{DiskName}" -RecoveryPoint $rp[0].name
+Start-AzDataProtectionBackupInstanceRestore -BackupInstanceName $instance.BackupInstanceName -ResourceGroupName sarath-rg -VaultName sarath-vault -SubscriptionId "xxx-xxx-xxx" -Parameter $restorerequest
+.Example
+$instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName"
+$rp = Get-AzDataProtectionRecoveryPoint -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -BackupInstanceName $instance.Name
+$targetResourceId = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourceGroupName/providers/Microsoft.DBforPostgreSQL/servers/serverName/databases/targetDbName"
+$secretURI = "https://oss-keyvault.vault.azure.net/secrets/oss-secret"
+$restoreRequest = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureDatabaseForPostgreSQL -SourceDataStore VaultStore -RestoreLocation "westus" -RestoreType AlternateLocation -TargetResourceId $targetResourceId -RecoveryPoint $rp[0].Property.RecoveryPointId -SecretStoreURI $secretURI -SecretStoreType AzureKeyVault
+$restoreJob = Start-AzDataProtectionBackupInstanceRestore -BackupInstanceName $instance.BackupInstanceName -ResourceGroupName resourceGroupName -VaultName vaultName -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -Parameter $restorerequest
+$jobid = $restoreJob.JobId.Split("/")[-1]
+$jobstatus = "InProgress"
+while($jobstatus -ne "Completed")
+{
+ Start-Sleep -Seconds 10
+ $currentjob = Get-AzDataProtectionJob -Id $jobid -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName"
+ $jobstatus = $currentjob.Status
+}
.Example
-Set-AzDataProtectionMSIPermission -BackupInstance $instance -VaultResourceGroup "VaultRG" -VaultName "Vaultname" -PermissionsScope "ResourceGroup"
+$instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName"
+$rp = Get-AzDataProtectionRecoveryPoint -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -BackupInstanceName $instance.Name
+$targetContainerURI = "https://targetStorageAccount.blob.core.windows.net/targetContainerName"
+$fileNamePrefix = "restore_as_files_12345"
+$restoreRequest = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureDatabaseForPostgreSQL -SourceDataStore VaultStore -RestoreLocation "westus" -RestoreType RestoreAsFiles -RecoveryPoint $rp[0].Property.RecoveryPointId -TargetContainerURI $targetContainerURI -FileNamePrefix $fileNamePrefix
+$restoreJob = Start-AzDataProtectionBackupInstanceRestore -BackupInstanceName $instance.BackupInstanceName -ResourceGroupName resourceGroupName -VaultName vaultName -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -Parameter $restorerequest
+$jobid = $restoreJob.JobId.Split("/")[-1]
+$jobstatus = "InProgress"
+while($jobstatus -ne "Completed")
+{
+ Start-Sleep -Seconds 10
+ $currentjob = Get-AzDataProtectionJob -Id $jobid -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName"
+ $jobstatus = $currentjob.Status
+}
+.Example
+$instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" | Where { $_.Name -match "aks-cluster-name" }
+$rp = Get-AzDataProtectionRecoveryPoint -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -BackupInstanceName $instance.Name
+$aksRestoreCriteria = New-AzDataProtectionRestoreConfigurationClientObject -DatasourceType AzureKubernetesService -PersistentVolumeRestoreMode RestoreWithVolumeData -IncludeClusterScopeResource $true -NamespaceMapping @{"sourceNamespace1"="targetNamespace1";"sourceNamespace2"="targetNamespace2"}
+$snapshotResourceGroupId = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/snapshotResourceGroup"
+$aksOLRRestoreRequest = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureKubernetesService -SourceDataStore OperationalStore -RestoreLocation eastus -RestoreType OriginalLocation -RecoveryPoint $rps[0].Property.RecoveryPointId -RestoreConfiguration $aksRestoreCriteria -BackupInstance $instance
+Set-AzDataProtectionMSIPermission -VaultResourceGroup "resourceGroupName" -VaultName "vaultName" -PermissionsScope "ResourceGroup" -RestoreRequest $aksOLRRestoreRequest -SnapshotResourceGroupId $snapshotResourceGroupId
+$validateRestore = Test-AzDataProtectionBackupInstanceRestore -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -RestoreRequest $aksOLRRestoreRequest -Name $instance.BackupInstanceName
+$restoreJob = Start-AzDataProtectionBackupInstanceRestore -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -BackupInstanceName $instance.BackupInstanceName -Parameter $aksOLRRestoreRequest
.Example
-Set-AzDataProtectionMSIPermission -BackupInstance $instance -VaultResourceGroup "VaultRG" -VaultName "Vaultname" -PermissionsScope "Subscription"
+$instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" | Where { $_.Name -match "storageAcountName" }
+$rp = Get-AzDataProtectionRecoveryPoint -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -BackupInstanceName $instance.Name
+$backedUpContainers = $instance.Property.PolicyInfo.PolicyParameter.BackupDatasourceParametersList[0].ContainersList
+$restoreReq = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureBlob -SourceDataStore VaultStore -RestoreLocation "vaultLocation" -RecoveryPoint $rp[0].Name -ItemLevelRecovery -RestoreType AlternateLocation -TargetResourceId "targetStorageAccountId" -ContainersList $backedUpContainers[0,1]
+Test-AzDataProtectionBackupInstanceRestore -Name $instance[0].Name -ResourceGroupName "resourceGroupName" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -VaultName "vaultName" -RestoreRequest $restoreReq
+$restoreJob = Start-AzDataProtectionBackupInstanceRestore -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -BackupInstanceName $instance.BackupInstanceName -Parameter $restoreReq
.Example
-Set-AzDataProtectionMSIPermission -KeyVaultId "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/Sqlrg/providers/Microsoft.KeyVault/vaults/testkeyvault" -BackupInstance $instance -VaultResourceGroup "VaultRG" -VaultName "Vaultname" -PermissionsScope "Resource"
-
+$instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" | Where { $_.Name -match "storageAcountName" }
+$rp = Get-AzDataProtectionRecoveryPoint -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -BackupInstanceName $instance.Name
+$backedUpContainers = $instance.Property.PolicyInfo.PolicyParameter.BackupDatasourceParametersList[0].ContainersList
+$targetCrossSubscriptionStorageAccountId = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/targetStorageAccount"
+$restoreReqCSR = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureBlob -SourceDataStore VaultStore -RestoreLocation "vaultLocation" -RecoveryPoint $rp[0].Name -ItemLevelRecovery -RestoreType AlternateLocation -TargetResourceId $targetCrossSubscriptionStorageAccountId -ContainersList $backedUpContainers[0,1]
+Test-AzDataProtectionBackupInstanceRestore -Name $instance[0].Name -ResourceGroupName "resourceGroupName" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -VaultName "vaultName" -RestoreRequest $restoreReqCSR
+$restoreJobCSR = Start-AzDataProtectionBackupInstanceRestore -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -BackupInstanceName $instance.BackupInstanceName -Parameter $restoreReqCSR
.Example
-Set-AzDataProtectionMSIPermission -BackupInstance $backupInstance -VaultResourceGroup "resourceGroupName" -VaultName "vaultName" -PermissionsScope "ResourceGroup"
+$instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" | Where { $_.Property.DataSourceInfo.ResourceType -match "Postgre" }
+$rp = Get-AzDataProtectionRecoveryPoint -BackupInstanceName $instance[0].BackupInstanceName -ResourceGroupName "resourceGroupName" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -VaultName "vaultName"
+$targetResourceArmId = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/crossSubResourceGroupName/providers/Microsoft.Storage/storageAccounts/akneemasaecy/blobServices/default/containers/oss-csr-container"
+$targetContainerURI = "https://akneemasaecy.blob.core.windows.net/oss-csr-container"
+$fileNamePrefix = "oss-csr-pstest-restoreasfiles"
+$ossRestoreReqFiles = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureDatabaseForPostgreSQL -SourceDataStore VaultStore -RestoreLocation "vaultLocation" -RestoreType RestoreAsFiles -RecoveryPoint $rp[0].Property.RecoveryPointId -TargetContainerURI $targetContainerURI -FileNamePrefix $fileNamePrefix -TargetResourceIdForRestoreAsFile $targetContainerArmId
+$validateRestore = Test-AzDataProtectionBackupInstanceRestore -Name $instance[0].Name -ResourceGroupName "resourceGroupName" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -VaultName "vaultName" -RestoreRequest $ossRestoreReqFiles
+$restoreJobCSR = Start-AzDataProtectionBackupInstanceRestore -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -BackupInstanceName $instance.BackupInstanceName -Parameter $ossRestoreReqFiles
+$jobid = $restoreJobCSR.JobId.Split("/")[-1]
+$jobstatus = "InProgress"
+while($jobstatus -ne "Completed")
+{
+ Start-Sleep -Seconds 10
+ $currentjob = Get-AzDataProtectionJob -Id $jobid -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName"
+ $jobstatus = $currentjob.Status
+}
+.Example
+$restoreJobCRR = Start-AzDataProtectionBackupInstanceRestore -BackupInstanceName $instance.Name -ResourceGroupName $ResourceGroupName -VaultName $vaultName -SubscriptionId $SubscriptionId -Parameter $OssRestoreReq -RestoreToSecondaryRegion
+$jobid = $restoreJobCRR.JobId.Split("/")[-1]
+$jobstatus = "InProgress"
+while($jobstatus -ne "Completed")
+{
+ Start-Sleep -Seconds 10
+ $currentjob = Get-AzDataProtectionJob -Id $jobid -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -UseSecondaryRegion
+ $jobstatus = $currentjob.Status
+}
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupRestoreRequest
.Outputs
-System.Object
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IOperationJobExtendedInfo
.Notes
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.
-BACKUPINSTANCE : Backup instance request object which will be used to configure backup
- [Tag ]: Proxy Resource tags.
- [(Any) ]: This indicates any property can be added to this object.
- [Property ]: BackupInstanceResource properties
- DataSourceInfo : Gets or sets the data source information.
- ResourceId : Full ARM ID of the resource. For azure resources, this is ARM ID. For non azure resources, this will be the ID created by backup service via Fabric/Vault.
- [ObjectType ]: Type of Datasource object, used to initialize the right inherited type
- [ResourceLocation ]: Location of datasource.
- [ResourceName ]: Unique identifier of the resource in the context of parent.
- [ResourceType ]: Resource Type of Datasource.
- [ResourceUri ]: Uri of the resource.
- [Type ]: DatasourceType of the resource.
- ObjectType :
- PolicyInfo : Gets or sets the policy information.
- PolicyId :
- [PolicyParameter ]: Policy parameters for the backup instance
- [BackupDatasourceParametersList ]: Gets or sets the Backup Data Source Parameters
- ObjectType : Type of the specific object - used for deserializing
- [DataStoreParametersList ]: Gets or sets the DataStore Parameters
- DataStoreType : type of datastore; Operational/Vault/Archive
- ObjectType : Type of the specific object - used for deserializing
- [DataSourceSetInfo ]: Gets or sets the data source set information.
- ResourceId : Full ARM ID of the resource. For azure resources, this is ARM ID. For non azure resources, this will be the ID created by backup service via Fabric/Vault.
- [DatasourceType ]: DatasourceType of the resource.
- [ObjectType ]: Type of Datasource object, used to initialize the right inherited type
- [ResourceLocation ]: Location of datasource.
- [ResourceName ]: Unique identifier of the resource in the context of parent.
- [ResourceType ]: Resource Type of Datasource.
- [ResourceUri ]: Uri of the resource.
- [DatasourceAuthCredentials ]: Credentials to use to authenticate with data source provider.
- ObjectType : Type of the specific object - used for deserializing
- [FriendlyName ]: Gets or sets the Backup Instance friendly name.
- [IdentityDetail ]: Contains information of the Identity Details for the BI. If it is null, default will be considered as System Assigned.
- [UseSystemAssignedIdentity ]: Specifies if the BI is protected by System Identity.
- [UserAssignedIdentityArmUrl ]: ARM URL for User Assigned Identity.
- [ValidationType ]: Specifies the type of validation. In case of DeepValidation, all validations from /validateForBackup API will run again.
-
-RESTOREREQUEST : Restore request object which will be used for restore
+PARAMETER : Restore request object to be initialized using Initialize-AzDataProtectionRestoreRequest cmdlet
ObjectType :
RestoreTargetInfo : Gets or sets the restore target information.
ObjectType : Type of Datasource object, used to initialize the right inherited type
@@ -8719,56 +9060,142 @@ RESTOREREQUEST : Restore request object which will b
[IdentityDetailUseSystemAssignedIdentity ]: Specifies if the BI is protected by System Identity.
[IdentityDetailUserAssignedIdentityArmUrl ]: ARM URL for User Assigned Identity.
[SourceResourceId ]: Fully qualified Azure Resource Manager ID of the datasource which is being recovered.
+
+RESTORETARGETINFO : Gets or sets the restore target information
+ ObjectType : Type of Datasource object, used to initialize the right inherited type
+ [RestoreLocation ]: Target Restore region
.Link
-https://learn.microsoft.com/powershell/module/az.dataprotection/set-azdataprotectionmsipermission
+https://learn.microsoft.com/powershell/module/az.dataprotection/start-azdataprotectionbackupinstancerestore
#>
-function Set-AzDataProtectionMSIPermission {
-[OutputType([System.Object])]
-[CmdletBinding(DefaultParameterSetName='SetPermissionsForBackup', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+function Start-AzDataProtectionBackupInstanceRestore {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IOperationJobExtendedInfo])]
+[CmdletBinding(DefaultParameterSetName='Trigger', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[System.String]
- # Resource group of the backup vault
- ${VaultResourceGroup},
+ # The name of the resource group where the backup vault is present
+ ${ResourceGroupName},
[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[System.String]
- # Name of the backup vault
- ${VaultName},
+ # The name of the backup instance
+ ${BackupInstanceName},
[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[System.String]
- # Scope at which the permissions need to be granted
- ${PermissionsScope},
+ # The name of the backup vault
+ ${VaultName},
- [Parameter(ParameterSetName='SetPermissionsForBackup', Mandatory)]
+ [Parameter(ParameterSetName='Trigger', Mandatory, ValueFromPipeline)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupInstanceResource]
- # Backup instance request object which will be used to configure backup
- # To construct, see NOTES section for BACKUPINSTANCE properties and create a hash table.
- ${BackupInstance},
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupRestoreRequest]
+ # Restore request object to be initialized using Initialize-AzDataProtectionRestoreRequest cmdlet
+ # To construct, see NOTES section for PARAMETER properties and create a hash table.
+ ${Parameter},
- [Parameter(ParameterSetName='SetPermissionsForBackup')]
+ [Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[System.String]
- # ID of the keyvault
- ${KeyVaultId},
+ # Subscription Id of the backup vault
+ ${SubscriptionId},
- [Parameter(ParameterSetName='SetPermissionsForRestore', Mandatory)]
+ [Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupRestoreRequest]
- # Restore request object which will be used for restore
- # To construct, see NOTES section for RESTOREREQUEST properties and create a hash table.
- ${RestoreRequest},
+ [System.Management.Automation.SwitchParameter]
+ # Switch parameter to trigger restore to secondary region (Cross region restore)
+ ${RestoreToSecondaryRegion},
- [Parameter(ParameterSetName='SetPermissionsForRestore', Mandatory)]
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.Management.Automation.PSObject]
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.Uri]
+ ${Proxy},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.Management.Automation.PSCredential]
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ ${ProxyUseDefaultCredentials},
+
+ [Parameter(ParameterSetName='TriggerExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[System.String]
- # Sanpshot Resource Group
- ${SnapshotResourceGroupId}
+ # Object type of the restore request
+ ${ObjectType},
+
+ [Parameter(ParameterSetName='TriggerExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IRestoreTargetInfoBase]
+ # Gets or sets the restore target information
+ # To construct, see NOTES section for RESTORETARGETINFO properties and create a hash table.
+ ${RestoreTargetInfo},
+
+ [Parameter(ParameterSetName='TriggerExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.SourceDataStoreType]
+ # Type of the source data store
+ ${SourceDataStoreType},
+
+ [Parameter(ParameterSetName='TriggerExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.String]
+ # ARM URL for User Assigned Identity
+ ${IdentityDetailUserAssignedIdentityArmUrl},
+
+ [Parameter(ParameterSetName='TriggerExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # Specifies if the BI is protected by System Identity
+ ${IdentityDetailUseSystemAssignedIdentity},
+
+ [Parameter(ParameterSetName='TriggerExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.String]
+ # Fully qualified Azure Resource Manager ID of the datasource which is being recovered
+ ${SourceResourceId}
)
begin {
@@ -8797,11 +9224,15 @@ begin {
}
$mapping = @{
- SetPermissionsForBackup = 'Az.DataProtection.custom\Set-AzDataProtectionMSIPermission';
- SetPermissionsForRestore = 'Az.DataProtection.custom\Set-AzDataProtectionMSIPermission';
+ Trigger = 'Az.DataProtection.custom\Start-AzDataProtectionBackupInstanceRestore';
+ TriggerExpanded = 'Az.DataProtection.custom\Start-AzDataProtectionBackupInstanceRestore';
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -8857,9 +9288,11 @@ $pointInTimeRange = Find-AzDataProtectionRestorableTimeRange -BackupInstanceName
$vault = Get-AzDataProtectionBackupVault -ResourceGroupName "testResourceGroup" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -VaultName "testVault"
$RestoreRequestObject = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureBlob -SourceDataStore OperationalStore -RestoreLocation $vault.Location -RestoreType OriginalLocation -BackupInstance $instances[0] -PointInTime (Get-Date -Date $pointInTimeRange.RestorableTimeRange.EndTime)
$validateRestore = Test-AzDataProtectionBackupInstanceRestore -Name $instances[0].Name -ResourceGroupName "testResourceGroup" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -VaultName "testVault" -RestoreRequest $RestoreRequestObject
+.Example
+$validateRestore = Test-AzDataProtectionBackupInstanceRestore -ResourceGroupName $ResourceGroupName -Name $instance[0].Name -VaultName $VaultName -RestoreRequest $RestoreRequestObject -SubscriptionId $SubscriptionId -RestoreToSecondaryRegion
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IOperationJobExtendedInfo
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IOperationJobExtendedInfo
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -8878,7 +9311,7 @@ RESTOREREQUEST : Restore request object for which to
https://learn.microsoft.com/powershell/module/az.dataprotection/test-azdataprotectionbackupinstancerestore
#>
function Test-AzDataProtectionBackupInstanceRestore {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IOperationJobExtendedInfo])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IOperationJobExtendedInfo])]
[CmdletBinding(DefaultParameterSetName='ValidateRestore', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -8901,7 +9334,7 @@ param(
[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupRestoreRequest]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupRestoreRequest]
# Restore request object for which to validate
# To construct, see NOTES section for RESTOREREQUEST properties and create a hash table.
${RestoreRequest},
@@ -8912,6 +9345,12 @@ param(
# Subscription Id of the backup vault
${SubscriptionId},
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # Switch parameter to trigger restore to secondary region
+ ${RestoreToSecondaryRegion},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -8993,6 +9432,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -9190,6 +9633,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -9246,12 +9693,12 @@ $policy = Get-AzDataProtectionBackupPolicy -SubscriptionId $sub -ResourceGroupNa
Update-AzDataProtectionBackupInstanceAssociatedPolicy -SubscriptionId $sub -ResourceGroupName sarath-rg -VaultName sarath-vault -BackupInstanceName $instance[0].Name -PolicyId $policy[1].Id
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupInstanceResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupInstanceResource
.Link
https://learn.microsoft.com/powershell/module/az.dataprotection/update-azdataprotectionbackupinstanceassociatedpolicy
#>
function Update-AzDataProtectionBackupInstanceAssociatedPolicy {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupInstanceResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupInstanceResource])]
[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -9365,6 +9812,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
@@ -9421,12 +9872,12 @@ $operationsToBeExcluded = $criticalOperations | Where-Object { $_ -match "backup
Update-AzDataProtectionResourceGuard -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "rgName" -Name $resourceGuard.Name -CriticalOperationExclusionList $operationsToBeExcluded
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IResourceGuardResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IResourceGuardResource
.Link
https://learn.microsoft.com/powershell/module/az.dataprotection/update-azdataprotectionresourceguard
#>
function Update-AzDataProtectionResourceGuard {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IResourceGuardResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IResourceGuardResource])]
[CmdletBinding(DefaultParameterSetName='UpdateResourceGuardOperations', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -9543,6 +9994,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Remove-AzDataProtectionBackupInstance.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Remove-AzDataProtectionBackupInstance.ps1
index 07ea51368c5c..e54184dc8d2e 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Remove-AzDataProtectionBackupInstance.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Remove-AzDataProtectionBackupInstance.ps1
@@ -189,6 +189,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Remove-AzDataProtectionBackupPolicy.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Remove-AzDataProtectionBackupPolicy.ps1
index 7f322012f93e..f5b95a19eafa 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Remove-AzDataProtectionBackupPolicy.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Remove-AzDataProtectionBackupPolicy.ps1
@@ -177,6 +177,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Remove-AzDataProtectionBackupVault.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Remove-AzDataProtectionBackupVault.ps1
index 008baacc042e..418c3ba2dd59 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Remove-AzDataProtectionBackupVault.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Remove-AzDataProtectionBackupVault.ps1
@@ -181,6 +181,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Remove-AzDataProtectionResourceGuard.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Remove-AzDataProtectionResourceGuard.ps1
index 0cb0df123561..1183c657a479 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Remove-AzDataProtectionResourceGuard.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Remove-AzDataProtectionResourceGuard.ps1
@@ -169,6 +169,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Remove-AzDataProtectionResourceGuardMapping.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Remove-AzDataProtectionResourceGuardMapping.ps1
index 02970eb46993..8877cce18fb1 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Remove-AzDataProtectionResourceGuardMapping.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Remove-AzDataProtectionResourceGuardMapping.ps1
@@ -175,6 +175,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Resume-AzDataProtectionBackupInstanceProtection.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Resume-AzDataProtectionBackupInstanceProtection.ps1
index d7ea3f33ed8a..ed26e504a7e7 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Resume-AzDataProtectionBackupInstanceProtection.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Resume-AzDataProtectionBackupInstanceProtection.ps1
@@ -187,6 +187,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Search-AzDataProtectionBackupInstanceInAzGraph.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Search-AzDataProtectionBackupInstanceInAzGraph.ps1
index aea0c532b7f6..fbf471b97f2e 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Search-AzDataProtectionBackupInstanceInAzGraph.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Search-AzDataProtectionBackupInstanceInAzGraph.ps1
@@ -63,7 +63,47 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.ProtectionStatus[]]
# Protection Status of the item
- ${ProtectionStatus}
+ ${ProtectionStatus},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.Management.Automation.PSObject]
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Uri]
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ ${ProxyUseDefaultCredentials}
)
begin {
@@ -96,6 +136,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Search-AzDataProtectionBackupVaultInAzGraph.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Search-AzDataProtectionBackupVaultInAzGraph.ps1
new file mode 100644
index 000000000000..556e63d69626
--- /dev/null
+++ b/src/DataProtection/DataProtection.Autorest/exports/Search-AzDataProtectionBackupVaultInAzGraph.ps1
@@ -0,0 +1,169 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# 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.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Searches for Backup vaults in Azure Resource Graph and retrieves the expected entries
+.Description
+Searches for Backup vaults in Azure Resource Graph and retrieves the expected entries
+.Example
+Search-AzDataProtectionBackupVaultInAzGraph -Subscription "xxxxxxxx-xxxx-xxxxxxxxxxxx" -ResourceGroup $resourceGroupName -Vault $vaultName
+
+.Outputs
+System.Management.Automation.PSObject
+.Link
+https://learn.microsoft.com/powershell/module/az.dataprotection/search-azdataprotectionbackupvaultinazgraph
+#>
+function Search-AzDataProtectionBackupVaultInAzGraph {
+[OutputType([PSObject])]
+[CmdletBinding(PositionalBinding=$false)]
+param(
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.String[]]
+ # Subscription of Vault
+ ${Subscription},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.String[]]
+ # Resource Group of Vault
+ ${ResourceGroup},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.String[]]
+ # Name of the vault
+ ${Vault},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.Management.Automation.PSObject]
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Uri]
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ __AllParameterSets = 'Az.DataProtection.custom\Search-AzDataProtectionBackupVaultInAzGraph';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Search-AzDataProtectionJobInAzGraph.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Search-AzDataProtectionJobInAzGraph.ps1
index fadb8b3c4535..1b02ca9fad41 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Search-AzDataProtectionJobInAzGraph.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Search-AzDataProtectionJobInAzGraph.ps1
@@ -81,7 +81,47 @@ param(
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.JobStatus[]]
# Status filter for the backup job
- ${Status}
+ ${Status},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.Management.Automation.PSObject]
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Uri]
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ ${ProxyUseDefaultCredentials}
)
begin {
@@ -114,6 +154,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Set-AzDataProtectionMSIPermission.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Set-AzDataProtectionMSIPermission.ps1
index dbc7a710f0fe..38c1854e62d9 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Set-AzDataProtectionMSIPermission.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Set-AzDataProtectionMSIPermission.ps1
@@ -110,7 +110,7 @@ param(
[Parameter(ParameterSetName='SetPermissionsForBackup', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupInstanceResource]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupInstanceResource]
# Backup instance request object which will be used to configure backup
# To construct, see NOTES section for BACKUPINSTANCE properties and create a hash table.
${BackupInstance},
@@ -123,7 +123,7 @@ param(
[Parameter(ParameterSetName='SetPermissionsForRestore', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupRestoreRequest]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupRestoreRequest]
# Restore request object which will be used for restore
# To construct, see NOTES section for RESTOREREQUEST properties and create a hash table.
${RestoreRequest},
@@ -166,6 +166,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Set-AzDataProtectionResourceGuardMapping.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Set-AzDataProtectionResourceGuardMapping.ps1
index 8d93079507d3..e9b8919dc60a 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Set-AzDataProtectionResourceGuardMapping.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Set-AzDataProtectionResourceGuardMapping.ps1
@@ -24,7 +24,7 @@ $proxy = Set-AzDataProtectionResourceGuardMapping -ResourceGroupName $resourceGr
$proxy | fl
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IResourceGuardProxyBaseResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IResourceGuardProxyBaseResource
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -37,7 +37,7 @@ RESOURCEGUARDOPERATIONDETAIL : .
https://learn.microsoft.com/powershell/module/az.dataprotection/set-azdataprotectionresourceguardmapping
#>
function Set-AzDataProtectionResourceGuardMapping {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IResourceGuardProxyBaseResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IResourceGuardProxyBaseResource])]
[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -152,6 +152,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Start-AzDataProtectionBackupInstanceRestore.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Start-AzDataProtectionBackupInstanceRestore.ps1
index 05d6b2c3f818..f199844aaea8 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Start-AzDataProtectionBackupInstanceRestore.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Start-AzDataProtectionBackupInstanceRestore.ps1
@@ -96,17 +96,27 @@ while($jobstatus -ne "Completed")
$currentjob = Get-AzDataProtectionJob -Id $jobid -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName"
$jobstatus = $currentjob.Status
}
+.Example
+$restoreJobCRR = Start-AzDataProtectionBackupInstanceRestore -BackupInstanceName $instance.Name -ResourceGroupName $ResourceGroupName -VaultName $vaultName -SubscriptionId $SubscriptionId -Parameter $OssRestoreReq -RestoreToSecondaryRegion
+$jobid = $restoreJobCRR.JobId.Split("/")[-1]
+$jobstatus = "InProgress"
+while($jobstatus -ne "Completed")
+{
+ Start-Sleep -Seconds 10
+ $currentjob = Get-AzDataProtectionJob -Id $jobid -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -UseSecondaryRegion
+ $jobstatus = $currentjob.Status
+}
.Inputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupRestoreRequest
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupRestoreRequest
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IOperationJobExtendedInfo
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IOperationJobExtendedInfo
.Notes
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.
-PARAMETER : Azure backup restore request
+PARAMETER : Restore request object to be initialized using Initialize-AzDataProtectionRestoreRequest cmdlet
ObjectType :
RestoreTargetInfo : Gets or sets the restore target information.
ObjectType : Type of Datasource object, used to initialize the right inherited type
@@ -116,147 +126,141 @@ PARAMETER : Azure backup restore request
[IdentityDetailUserAssignedIdentityArmUrl ]: ARM URL for User Assigned Identity.
[SourceResourceId ]: Fully qualified Azure Resource Manager ID of the datasource which is being recovered.
-RESTORETARGETINFO : Gets or sets the restore target information.
+RESTORETARGETINFO : Gets or sets the restore target information
ObjectType : Type of Datasource object, used to initialize the right inherited type
[RestoreLocation ]: Target Restore region
.Link
https://learn.microsoft.com/powershell/module/az.dataprotection/start-azdataprotectionbackupinstancerestore
#>
function Start-AzDataProtectionBackupInstanceRestore {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IOperationJobExtendedInfo])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IOperationJobExtendedInfo])]
[CmdletBinding(DefaultParameterSetName='Trigger', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[System.String]
- # The name of the backup instance.
- ${BackupInstanceName},
+ # The name of the resource group where the backup vault is present
+ ${ResourceGroupName},
[Parameter(Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[System.String]
- # The name of the resource group.
- # The name is case insensitive.
- ${ResourceGroupName},
+ # The name of the backup instance
+ ${BackupInstanceName},
[Parameter(Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[System.String]
- # The name of the backup vault.
+ # The name of the backup vault
${VaultName},
- [Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
- [System.String]
- # The ID of the target subscription.
- # The value must be an UUID.
- ${SubscriptionId},
-
[Parameter(ParameterSetName='Trigger', Mandatory, ValueFromPipeline)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupRestoreRequest]
- # Azure backup restore request
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupRestoreRequest]
+ # Restore request object to be initialized using Initialize-AzDataProtectionRestoreRequest cmdlet
# To construct, see NOTES section for PARAMETER properties and create a hash table.
${Parameter},
- [Parameter(ParameterSetName='TriggerExpanded', Mandatory)]
+ [Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[System.String]
- # .
- ${ObjectType},
-
- [Parameter(ParameterSetName='TriggerExpanded', Mandatory)]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IRestoreTargetInfoBase]
- # Gets or sets the restore target information.
- # To construct, see NOTES section for RESTORETARGETINFO properties and create a hash table.
- ${RestoreTargetInfo},
-
- [Parameter(ParameterSetName='TriggerExpanded', Mandatory)]
- [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.SourceDataStoreType])]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.SourceDataStoreType]
- # Gets or sets the type of the source data store.
- ${SourceDataStoreType},
+ # Subscription Id of the backup vault
+ ${SubscriptionId},
- [Parameter(ParameterSetName='TriggerExpanded')]
+ [Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[System.Management.Automation.SwitchParameter]
- # Specifies if the BI is protected by System Identity.
- ${IdentityDetailUseSystemAssignedIdentity},
-
- [Parameter(ParameterSetName='TriggerExpanded')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [System.String]
- # ARM URL for User Assigned Identity.
- ${IdentityDetailUserAssignedIdentityArmUrl},
-
- [Parameter(ParameterSetName='TriggerExpanded')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [System.String]
- # Fully qualified Azure Resource Manager ID of the datasource which is being recovered.
- ${SourceResourceId},
+ # Switch parameter to trigger restore to secondary region (Cross region restore)
+ ${RestoreToSecondaryRegion},
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Azure')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[System.Management.Automation.PSObject]
- # The DefaultProfile parameter is not functional.
- # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
${DefaultProfile},
- [Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
- [System.Management.Automation.SwitchParameter]
- # Run the command as a job
- ${AsJob},
-
[Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[System.Management.Automation.SwitchParameter]
- # Wait for .NET debugger to attach
${Break},
[Parameter(DontShow)]
[ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
- # SendAsync Pipeline Steps to be appended to the front of the pipeline
${HttpPipelineAppend},
[Parameter(DontShow)]
[ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]]
- # SendAsync Pipeline Steps to be prepended to the front of the pipeline
${HttpPipelinePrepend},
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.Uri]
+ ${Proxy},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
[Parameter()]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[System.Management.Automation.SwitchParameter]
# Run the command asynchronously
${NoWait},
- [Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
- [System.Uri]
- # The URI for the proxy server to use
- ${Proxy},
-
[Parameter(DontShow)]
[ValidateNotNull()]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[System.Management.Automation.PSCredential]
- # Credentials for a proxy server to use for the remote call
${ProxyCredential},
[Parameter(DontShow)]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
[System.Management.Automation.SwitchParameter]
- # Use the default credentials for the proxy
- ${ProxyUseDefaultCredentials}
+ ${ProxyUseDefaultCredentials},
+
+ [Parameter(ParameterSetName='TriggerExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.String]
+ # Object type of the restore request
+ ${ObjectType},
+
+ [Parameter(ParameterSetName='TriggerExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IRestoreTargetInfoBase]
+ # Gets or sets the restore target information
+ # To construct, see NOTES section for RESTORETARGETINFO properties and create a hash table.
+ ${RestoreTargetInfo},
+
+ [Parameter(ParameterSetName='TriggerExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.SourceDataStoreType]
+ # Type of the source data store
+ ${SourceDataStoreType},
+
+ [Parameter(ParameterSetName='TriggerExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.String]
+ # ARM URL for User Assigned Identity
+ ${IdentityDetailUserAssignedIdentityArmUrl},
+
+ [Parameter(ParameterSetName='TriggerExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # Specifies if the BI is protected by System Identity
+ ${IdentityDetailUseSystemAssignedIdentity},
+
+ [Parameter(ParameterSetName='TriggerExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.String]
+ # Fully qualified Azure Resource Manager ID of the datasource which is being recovered
+ ${SourceResourceId}
)
begin {
@@ -285,14 +289,15 @@ begin {
}
$mapping = @{
- Trigger = 'Az.DataProtection.private\Start-AzDataProtectionBackupInstanceRestore_Trigger';
- TriggerExpanded = 'Az.DataProtection.private\Start-AzDataProtectionBackupInstanceRestore_TriggerExpanded';
- }
- if (('Trigger', 'TriggerExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
- $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ Trigger = 'Az.DataProtection.custom\Start-AzDataProtectionBackupInstanceRestore';
+ TriggerExpanded = 'Az.DataProtection.custom\Start-AzDataProtectionBackupInstanceRestore';
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Stop-AzDataProtectionBackupInstanceProtection.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Stop-AzDataProtectionBackupInstanceProtection.ps1
index 88b672dd74da..0b27c2b6f31d 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Stop-AzDataProtectionBackupInstanceProtection.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Stop-AzDataProtectionBackupInstanceProtection.ps1
@@ -187,6 +187,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Suspend-AzDataProtectionBackupInstanceBackup.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Suspend-AzDataProtectionBackupInstanceBackup.ps1
index 88768bcc278a..e65678760cb2 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Suspend-AzDataProtectionBackupInstanceBackup.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Suspend-AzDataProtectionBackupInstanceBackup.ps1
@@ -187,6 +187,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Sync-AzDataProtectionBackupInstance.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Sync-AzDataProtectionBackupInstance.ps1
index 3d21211e580c..b3a6ef10097e 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Sync-AzDataProtectionBackupInstance.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Sync-AzDataProtectionBackupInstance.ps1
@@ -167,6 +167,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Test-AzDataProtectionBackupInstanceReadiness.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Test-AzDataProtectionBackupInstanceReadiness.ps1
index 2518cee15a12..a17dbf49db2b 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Test-AzDataProtectionBackupInstanceReadiness.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Test-AzDataProtectionBackupInstanceReadiness.ps1
@@ -28,7 +28,7 @@ $instance = Initialize-AzDataProtectionBackupInstance -SnapshotResourceGroupId $
Test-AzDataProtectionBackupInstanceReadiness -ResourceGroupName "resourceGroupName" -VaultName $vault.Name -BackupInstance $instance[0].Property
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IOperationJobExtendedInfo
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IOperationJobExtendedInfo
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -71,7 +71,7 @@ BACKUPINSTANCE : Backup Instance
https://learn.microsoft.com/powershell/module/az.dataprotection/test-azdataprotectionbackupinstancereadiness
#>
function Test-AzDataProtectionBackupInstanceReadiness {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IOperationJobExtendedInfo])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IOperationJobExtendedInfo])]
[CmdletBinding(DefaultParameterSetName='ValidateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -97,7 +97,7 @@ param(
[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupInstance]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupInstance]
# Backup Instance
# To construct, see NOTES section for BACKUPINSTANCE properties and create a hash table.
${BackupInstance},
@@ -196,6 +196,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Test-AzDataProtectionBackupInstanceRestore.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Test-AzDataProtectionBackupInstanceRestore.ps1
index 0cf5925b6ff2..0818cb1f687d 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Test-AzDataProtectionBackupInstanceRestore.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Test-AzDataProtectionBackupInstanceRestore.ps1
@@ -25,9 +25,11 @@ $pointInTimeRange = Find-AzDataProtectionRestorableTimeRange -BackupInstanceName
$vault = Get-AzDataProtectionBackupVault -ResourceGroupName "testResourceGroup" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -VaultName "testVault"
$RestoreRequestObject = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureBlob -SourceDataStore OperationalStore -RestoreLocation $vault.Location -RestoreType OriginalLocation -BackupInstance $instances[0] -PointInTime (Get-Date -Date $pointInTimeRange.RestorableTimeRange.EndTime)
$validateRestore = Test-AzDataProtectionBackupInstanceRestore -Name $instances[0].Name -ResourceGroupName "testResourceGroup" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -VaultName "testVault" -RestoreRequest $RestoreRequestObject
+.Example
+$validateRestore = Test-AzDataProtectionBackupInstanceRestore -ResourceGroupName $ResourceGroupName -Name $instance[0].Name -VaultName $VaultName -RestoreRequest $RestoreRequestObject -SubscriptionId $SubscriptionId -RestoreToSecondaryRegion
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IOperationJobExtendedInfo
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IOperationJobExtendedInfo
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -46,7 +48,7 @@ RESTOREREQUEST : Restore request object for which to
https://learn.microsoft.com/powershell/module/az.dataprotection/test-azdataprotectionbackupinstancerestore
#>
function Test-AzDataProtectionBackupInstanceRestore {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IOperationJobExtendedInfo])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IOperationJobExtendedInfo])]
[CmdletBinding(DefaultParameterSetName='ValidateRestore', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -69,7 +71,7 @@ param(
[Parameter(Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupRestoreRequest]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupRestoreRequest]
# Restore request object for which to validate
# To construct, see NOTES section for RESTOREREQUEST properties and create a hash table.
${RestoreRequest},
@@ -80,6 +82,12 @@ param(
# Subscription Id of the backup vault
${SubscriptionId},
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
+ [System.Management.Automation.SwitchParameter]
+ # Switch parameter to trigger restore to secondary region
+ ${RestoreToSecondaryRegion},
+
[Parameter()]
[Alias('AzureRMContext', 'AzureCredential')]
[ValidateNotNull()]
@@ -161,6 +169,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Undo-AzDataProtectionBackupInstanceDeletion.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Undo-AzDataProtectionBackupInstanceDeletion.ps1
index d8b3a43c1d7b..7fd599011611 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Undo-AzDataProtectionBackupInstanceDeletion.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Undo-AzDataProtectionBackupInstanceDeletion.ps1
@@ -188,6 +188,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Unlock-AzDataProtectionResourceGuardOperation.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Unlock-AzDataProtectionResourceGuardOperation.ps1
index c00429ef66f0..748e5b698e31 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Unlock-AzDataProtectionResourceGuardOperation.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Unlock-AzDataProtectionResourceGuardOperation.ps1
@@ -167,6 +167,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Update-AzDataProtectionBackupInstanceAssociatedPolicy.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Update-AzDataProtectionBackupInstanceAssociatedPolicy.ps1
index b47aec7146ef..a75a3dd3dfbe 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Update-AzDataProtectionBackupInstanceAssociatedPolicy.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Update-AzDataProtectionBackupInstanceAssociatedPolicy.ps1
@@ -26,12 +26,12 @@ $policy = Get-AzDataProtectionBackupPolicy -SubscriptionId $sub -ResourceGroupNa
Update-AzDataProtectionBackupInstanceAssociatedPolicy -SubscriptionId $sub -ResourceGroupName sarath-rg -VaultName sarath-vault -BackupInstanceName $instance[0].Name -PolicyId $policy[1].Id
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupInstanceResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupInstanceResource
.Link
https://learn.microsoft.com/powershell/module/az.dataprotection/update-azdataprotectionbackupinstanceassociatedpolicy
#>
function Update-AzDataProtectionBackupInstanceAssociatedPolicy {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupInstanceResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupInstanceResource])]
[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -145,6 +145,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Update-AzDataProtectionBackupVault.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Update-AzDataProtectionBackupVault.ps1
index 838b4451822f..d1cfa5697d73 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Update-AzDataProtectionBackupVault.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Update-AzDataProtectionBackupVault.ps1
@@ -32,7 +32,7 @@ Update-AzDataProtectionBackupVault -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxx
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupVaultResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupVaultResource
.Notes
COMPLEX PARAMETER PROPERTIES
@@ -56,7 +56,7 @@ INPUTOBJECT : Identity Parameter
https://learn.microsoft.com/powershell/module/az.dataprotection/update-azdataprotectionbackupvault
#>
function Update-AzDataProtectionBackupVault {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupVaultResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupVaultResource])]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
@@ -148,7 +148,7 @@ param(
[Parameter()]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')]
- [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IPatchResourceRequestInputTags]))]
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IPatchResourceRequestInputTags]))]
[System.Collections.Hashtable]
# Resource tags.
${Tag},
@@ -248,6 +248,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/exports/Update-AzDataProtectionResourceGuard.ps1 b/src/DataProtection/DataProtection.Autorest/exports/Update-AzDataProtectionResourceGuard.ps1
index 40f564120aeb..e7373e487f3b 100644
--- a/src/DataProtection/DataProtection.Autorest/exports/Update-AzDataProtectionResourceGuard.ps1
+++ b/src/DataProtection/DataProtection.Autorest/exports/Update-AzDataProtectionResourceGuard.ps1
@@ -26,12 +26,12 @@ $operationsToBeExcluded = $criticalOperations | Where-Object { $_ -match "backup
Update-AzDataProtectionResourceGuard -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "rgName" -Name $resourceGuard.Name -CriticalOperationExclusionList $operationsToBeExcluded
.Outputs
-Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IResourceGuardResource
+Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IResourceGuardResource
.Link
https://learn.microsoft.com/powershell/module/az.dataprotection/update-azdataprotectionresourceguard
#>
function Update-AzDataProtectionResourceGuard {
-[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IResourceGuardResource])]
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IResourceGuardResource])]
[CmdletBinding(DefaultParameterSetName='UpdateResourceGuardOperations', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(Mandatory)]
@@ -148,6 +148,10 @@ begin {
}
$cmdInfo = Get-Command -Name $mapping[$parameterSet]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){
+ [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name)
+ }
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
$scriptCmd = {& $wrappedCmd @PSBoundParameters}
$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
diff --git a/src/DataProtection/DataProtection.Autorest/generate-help.ps1 b/src/DataProtection/DataProtection.Autorest/generate-help.ps1
index 4c1ab0572768..96afeaa78b26 100644
--- a/src/DataProtection/DataProtection.Autorest/generate-help.ps1
+++ b/src/DataProtection/DataProtection.Autorest/generate-help.ps1
@@ -66,8 +66,8 @@ foreach($directory in $directories)
$docsPath = Join-Path $docsFolder $directory.Name
$null = New-Item -ItemType Directory -Force -Path $docsPath -ErrorAction SilentlyContinue
$examplesPath = Join-Path $examplesFolder $directory.Name
-
- Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath
+ $addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true')
+ Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath -AddComplexInterfaceInfo:$addComplexInterfaceInfo
Write-Host -ForegroundColor Green "Created documentation in '$docsPath'"
}
diff --git a/src/DataProtection/DataProtection.Autorest/generate-portal-ux.ps1 b/src/DataProtection/DataProtection.Autorest/generate-portal-ux.ps1
new file mode 100644
index 000000000000..5c6eed72ff98
--- /dev/null
+++ b/src/DataProtection/DataProtection.Autorest/generate-portal-ux.ps1
@@ -0,0 +1,375 @@
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# 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.
+#
+# This Script will create a folder dedicated to Azure-specific content and includes metadata files essential for enhancing the user experience (UX) within the Azure portal.
+# These files are utilized by the Azure portal to effectively present the usage of cmdlets related to specific resources on portal pages.
+# ----------------------------------------------------------------------------------
+param([switch]$Isolated)
+$ErrorActionPreference = 'Stop'
+
+$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+if(-not $Isolated) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+ return
+}
+
+$moduleName = 'Az.DataProtection'
+$rootModuleName = ''
+if ($rootModuleName -eq "")
+{
+ $rootModuleName = $moduleName
+}
+$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot "./$moduleName.psd1")
+$modulePath = $modulePsd1.FullName
+
+# Load DLL to use build-time cmdlets
+Import-Module -Name $modulePath
+Import-Module -Name (Join-Path $PSScriptRoot "./bin/$moduleName.private.dll")
+$instance = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Module]::Instance
+# Module info is shared per profile
+$moduleInfo = Get-Module -Name $moduleName
+$parameterSetsInfo = Get-Module -Name "$moduleName.private"
+
+$buildinFunctions = @("Export-CmdletSurface", "Export-ExampleStub", "Export-FormatPs1xml", "Export-HelpMarkdown", "Export-ModelSurface", "Export-ProxyCmdlet", "Export-Psd1", "Export-TestStub", "Get-CommonParameter", "Get-ModuleGuid", "Get-ScriptCmdlet")
+
+function Test-FunctionSupported()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [string]
+ $FunctionName
+ )
+
+ If ($buildinfunctions.Contains($FunctionName)) {
+ return $false
+ }
+
+ $cmdletName, $parameterSetName = $FunctionName.Split("_")
+ If ($parameterSetName.Contains("List") -or $parameterSetName.Contains("ViaIdentity")) {
+ return $false
+ }
+ If ($cmdletName.StartsWith("New") -or $cmdletName.StartsWith("Set") -or $cmdletName.StartsWith("Update")) {
+ return $false
+ }
+
+ $parameterSetInfo = $parameterSetsInfo.ExportedCmdlets[$FunctionName]
+ foreach ($parameterInfo in $parameterSetInfo.Parameters.Values)
+ {
+ $category = (Get-ParameterAttribute -ParameterInfo $parameterInfo -AttributeName "CategoryAttribute").Categories
+ $invalideCategory = @('Query', 'Body')
+ if ($invalideCategory -contains $category)
+ {
+ return $false
+ }
+ }
+
+ $customFiles = Get-ChildItem -Path custom -Filter "$cmdletName.*"
+ if ($customFiles.Length -ne 0)
+ {
+ return $false
+ }
+
+ return $true
+}
+
+function Get-MappedCmdletFromFunctionName()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [string]
+ $FunctionName
+ )
+
+ $cmdletName, $parameterSetName = $FunctionName.Split("_")
+
+ return $cmdletName
+}
+
+function Get-ParameterAttribute()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [System.Management.Automation.ParameterMetadata]
+ $ParameterInfo,
+ [Parameter()]
+ [String]
+ $AttributeName
+ )
+ return $ParameterInfo.Attributes | Where-Object { $_.TypeId.Name -eq $AttributeName }
+}
+
+function Get-CmdletAttribute()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [System.Management.Automation.CommandInfo]
+ $CmdletInfo,
+ [Parameter()]
+ [String]
+ $AttributeName
+ )
+
+ return $CmdletInfo.ImplementingType.GetTypeInfo().GetCustomAttributes([System.object], $true) | Where-Object { $_.TypeId.Name -eq $AttributeName }
+}
+
+function Get-CmdletDescription()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [String]
+ $CmdletName
+ )
+ $helpInfo = Get-Help $CmdletName -Full
+
+ $description = $helpInfo.Description.Text
+ if ($null -eq $description)
+ {
+ return ""
+ }
+ return $description
+}
+
+# Test whether the parameter is from swagger http path
+function Test-ParameterFromSwagger()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [System.Management.Automation.ParameterMetadata]
+ $ParameterInfo
+ )
+ $category = (Get-ParameterAttribute -ParameterInfo $ParameterInfo -AttributeName "CategoryAttribute").Categories
+ $doNotExport = Get-ParameterAttribute -ParameterInfo $ParameterInfo -AttributeName "DoNotExportAttribute"
+ if ($null -ne $doNotExport)
+ {
+ return $false
+ }
+
+ $valideCategory = @('Path')
+ if ($valideCategory -contains $category)
+ {
+ return $true
+ }
+ return $false
+}
+
+function New-ExampleForParameterSet()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [System.Management.Automation.CommandInfo]
+ $ParameterSetInfo
+ )
+ $parameters = $ParameterSetInfo.Parameters.Values | Where-Object { Test-ParameterFromSwagger $_ }
+ $result = @()
+ foreach ($parameter in $parameters)
+ {
+ $category = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "CategoryAttribute").Categories
+ $sourceName = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "InfoAttribute").SerializedName
+ $name = $parameter.Name
+ $result += [ordered]@{
+ name = "-$Name"
+ value = "[$category.$sourceName]"
+ }
+ }
+
+ return $result
+}
+
+function New-ParameterArrayInParameterSet()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [System.Management.Automation.CommandInfo]
+ $ParameterSetInfo
+ )
+ $parameters = $ParameterSetInfo.Parameters.Values | Where-Object { Test-ParameterFromSwagger $_ }
+ $result = @()
+ foreach ($parameter in $parameters)
+ {
+ $isMandatory = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "ParameterAttribute").Mandatory
+ $parameterName = $parameter.Name
+ $parameterType = $parameter.ParameterType.ToString().Split('.')[1]
+ if ($parameter.SwitchParameter)
+ {
+ $parameterSignature = "-$parameterName"
+ }
+ else
+ {
+ $parameterSignature = "-$parameterName <$parameterType>"
+ }
+ if ($parameterName -eq "SubscriptionId")
+ {
+ $isMandatory = $false
+ }
+ if (-not $isMandatory)
+ {
+ $parameterSignature = "[$parameterSignature]"
+ }
+ $result += $parameterSignature
+ }
+
+ return $result
+}
+
+function New-MetadataForParameterSet()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [System.Management.Automation.CommandInfo]
+ $ParameterSetInfo
+ )
+ $httpAttribute = Get-CmdletAttribute -CmdletInfo $ParameterSetInfo -AttributeName "HttpPathAttribute"
+ $httpPath = $httpAttribute.Path
+ $apiVersion = $httpAttribute.ApiVersion
+ $provider = [System.Text.RegularExpressions.Regex]::New("/providers/([\w+\.]+)/").Match($httpPath).Groups[1].Value
+ $resourcePath = "/" + $httpPath.Split("$provider/")[1]
+ $resourceType = [System.Text.RegularExpressions.Regex]::New("/([\w]+)/\{\w+\}").Matches($resourcePath) | ForEach-Object {$_.groups[1].Value} | Join-String -Separator "/"
+ $cmdletName = Get-MappedCmdletFromFunctionName $ParameterSetInfo.Name
+ $description = (Get-CmdletAttribute -CmdletInfo $ParameterSetInfo -AttributeName "DescriptionAttribute").Description
+ [object[]]$example = New-ExampleForParameterSet $ParameterSetInfo
+ [string[]]$signature = New-ParameterArrayInParameterSet $ParameterSetInfo
+
+ return @{
+ Path = $httpPath
+ Provider = $provider
+ ResourceType = $resourceType
+ ApiVersion = $apiVersion
+ CmdletName = $cmdletName
+ Description = $description
+ Example = $example
+ Signature = @{
+ parameters = $signature
+ }
+ }
+}
+
+function Merge-WithExistCmdletMetadata()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [System.Collections.Specialized.OrderedDictionary]
+ $ExistedCmdletInfo,
+ [Parameter()]
+ [Hashtable]
+ $ParameterSetMetadata
+ )
+ $ExistedCmdletInfo.help.parameterSets += $ParameterSetMetadata.Signature
+ $ExistedCmdletInfo.examples += [ordered]@{
+ description = $ParameterSetMetadata.Description
+ parameters = $ParameterSetMetadata.Example
+ }
+
+ return $ExistedCmdletInfo
+}
+
+function New-MetadataForCmdlet()
+{
+ [CmdletBinding()]
+ Param (
+ [Parameter()]
+ [Hashtable]
+ $ParameterSetMetadata
+ )
+ $cmdletName = $ParameterSetMetadata.CmdletName
+ $description = Get-CmdletDescription $cmdletName
+ $result = [ordered]@{
+ name = $cmdletName
+ description = $description
+ path = $ParameterSetMetadata.Path
+ help = [ordered]@{
+ learnMore = [ordered]@{
+ url = "https://learn.microsoft.com/powershell/module/$rootModuleName/$cmdletName".ToLower()
+ }
+ parameterSets = @()
+ }
+ examples = @()
+ }
+ $result = Merge-WithExistCmdletMetadata -ExistedCmdletInfo $result -ParameterSetMetadata $ParameterSetMetadata
+ return $result
+}
+
+$parameterSets = $parameterSetsInfo.ExportedCmdlets.Keys | Where-Object { Test-functionSupported($_) }
+$resourceTypes = @{}
+foreach ($parameterSetName in $parameterSets)
+{
+ $cmdletInfo = $parameterSetsInfo.ExportedCommands[$parameterSetName]
+ $parameterSetMetadata = New-MetadataForParameterSet -ParameterSetInfo $cmdletInfo
+ $cmdletName = $parameterSetMetadata.CmdletName
+ if (-not ($moduleInfo.ExportedCommands.ContainsKey($cmdletName)))
+ {
+ continue
+ }
+ if ($resourceTypes.ContainsKey($parameterSetMetadata.ResourceType))
+ {
+ $ExistedCmdletInfo = $resourceTypes[$parameterSetMetadata.ResourceType].commands | Where-Object { $_.name -eq $cmdletName }
+ if ($ExistedCmdletInfo)
+ {
+ $ExistedCmdletInfo = Merge-WithExistCmdletMetadata -ExistedCmdletInfo $ExistedCmdletInfo -ParameterSetMetadata $parameterSetMetadata
+ }
+ else
+ {
+ $cmdletInfo = New-MetadataForCmdlet -ParameterSetMetadata $parameterSetMetadata
+ $resourceTypes[$parameterSetMetadata.ResourceType].commands += $cmdletInfo
+ }
+ }
+ else
+ {
+ $cmdletInfo = New-MetadataForCmdlet -ParameterSetMetadata $parameterSetMetadata
+ $resourceTypes[$parameterSetMetadata.ResourceType] = [ordered]@{
+ resourceType = $parameterSetMetadata.ResourceType
+ apiVersion = $parameterSetMetadata.ApiVersion
+ learnMore = @{
+ url = "https://learn.microsoft.com/powershell/module/$rootModuleName".ToLower()
+ }
+ commands = @($cmdletInfo)
+ provider = $parameterSetMetadata.Provider
+ }
+ }
+}
+
+$UXFolder = 'UX'
+if (Test-Path $UXFolder)
+{
+ Remove-Item -Path $UXFolder -Recurse
+}
+$null = New-Item -ItemType Directory -Path $UXFolder
+
+foreach ($resourceType in $resourceTypes.Keys)
+{
+ $resourceTypeFileName = $resourceType -replace "/", "-"
+ if ($resourceTypeFileName -eq "")
+ {
+ continue
+ }
+ $resourceTypeInfo = $resourceTypes[$resourceType]
+ $provider = $resourceTypeInfo.provider
+ $providerFolder = "$UXFolder/$provider"
+ if (-not (Test-Path $providerFolder))
+ {
+ $null = New-Item -ItemType Directory -Path $providerFolder
+ }
+ $resourceTypeInfo.Remove("provider")
+ $resourceTypeInfo | ConvertTo-Json -Depth 10 | Out-File "$providerFolder/$resourceTypeFileName.json"
+}
\ No newline at end of file
diff --git a/src/DataProtection/DataProtection.Autorest/generated/api/DataProtection.cs b/src/DataProtection/DataProtection.Autorest/generated/api/DataProtection.cs
index ea74aef4f5d7..c9e5a8dae21c 100644
--- a/src/DataProtection/DataProtection.Autorest/generated/api/DataProtection.cs
+++ b/src/DataProtection/DataProtection.Autorest/generated/api/DataProtection.cs
@@ -27,9 +27,9 @@ public partial class DataProtection
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task BackupInstancesAdhocBackup(string subscriptionId, string resourceGroupName, string vaultName, string backupInstanceName, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ITriggerBackupRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task BackupInstancesAdhocBackup(string subscriptionId, string resourceGroupName, string vaultName, string backupInstanceName, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ITriggerBackupRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.ISendAsync sender)
{
- var apiVersion = @"2023-05-01";
+ var apiVersion = @"2023-11-01";
// Constant Parameters
using( NoSynchronizationContext )
{
@@ -76,9 +76,9 @@ public partial class DataProtection
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task BackupInstancesAdhocBackupViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ITriggerBackupRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task BackupInstancesAdhocBackupViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ITriggerBackupRequest body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.ISendAsync sender)
{
- var apiVersion = @"2023-05-01";
+ var apiVersion = @"2023-11-01";
// Constant Parameters
using( NoSynchronizationContext )
{
@@ -137,7 +137,7 @@ public partial class DataProtection
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task BackupInstancesAdhocBackup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task BackupInstancesAdhocBackup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.ISendAsync sender)
{
using( NoSynchronizationContext )
{
@@ -252,13 +252,13 @@ public partial class DataProtection
case global::System.Net.HttpStatusCode.OK:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.OperationJobExtendedInfo.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.OperationJobExtendedInfo.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
@@ -286,7 +286,7 @@ public partial class DataProtection
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task BackupInstancesAdhocBackup_Validate(string subscriptionId, string resourceGroupName, string vaultName, string backupInstanceName, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ITriggerBackupRequest body, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.IEventListener eventListener)
+ internal async global::System.Threading.Tasks.Task BackupInstancesAdhocBackup_Validate(string subscriptionId, string resourceGroupName, string vaultName, string backupInstanceName, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ITriggerBackupRequest body, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.IEventListener eventListener)
{
using( NoSynchronizationContext )
{
@@ -316,9 +316,9 @@ public partial class DataProtection
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task BackupInstancesCreateOrUpdate(string subscriptionId, string resourceGroupName, string vaultName, string backupInstanceName, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupInstanceResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task BackupInstancesCreateOrUpdate(string subscriptionId, string resourceGroupName, string vaultName, string backupInstanceName, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupInstanceResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.ISendAsync sender)
{
- var apiVersion = @"2023-05-01";
+ var apiVersion = @"2023-11-01";
// Constant Parameters
using( NoSynchronizationContext )
{
@@ -364,9 +364,9 @@ public partial class DataProtection
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task BackupInstancesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupInstanceResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task BackupInstancesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupInstanceResource body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.ISendAsync sender)
{
- var apiVersion = @"2023-05-01";
+ var apiVersion = @"2023-11-01";
// Constant Parameters
using( NoSynchronizationContext )
{
@@ -424,7 +424,7 @@ public partial class DataProtection
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task BackupInstancesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task BackupInstancesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.ISendAsync sender)
{
using( NoSynchronizationContext )
{
@@ -541,13 +541,13 @@ public partial class DataProtection
case global::System.Net.HttpStatusCode.OK:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.BackupInstanceResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.BackupInstanceResource.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
default:
{
await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; }
- await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Json.JsonNode.Parse(body.Result)) ));
+ await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Json.JsonNode.Parse(body.Result)) ));
break;
}
}
@@ -575,7 +575,7 @@ public partial class DataProtection
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task BackupInstancesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string vaultName, string backupInstanceName, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupInstanceResource body, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.IEventListener eventListener)
+ internal async global::System.Threading.Tasks.Task BackupInstancesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string vaultName, string backupInstanceName, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupInstanceResource body, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.IEventListener eventListener)
{
using( NoSynchronizationContext )
{
@@ -605,9 +605,9 @@ public partial class DataProtection
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task BackupInstancesDelete(string subscriptionId, string resourceGroupName, string vaultName, string backupInstanceName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task BackupInstancesDelete(string subscriptionId, string resourceGroupName, string vaultName, string backupInstanceName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.ISendAsync sender)
{
- var apiVersion = @"2023-05-01";
+ var apiVersion = @"2023-11-01";
// Constant Parameters
using( NoSynchronizationContext )
{
@@ -649,9 +649,9 @@ public partial class DataProtection
///
/// A that will be complete when handling of the response is completed.
///
- public async global::System.Threading.Tasks.Task BackupInstancesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.ISendAsync sender)
+ public async global::System.Threading.Tasks.Task BackupInstancesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.ISendAsync sender)
{
- var apiVersion = @"2023-05-01";
+ var apiVersion = @"2023-11-01";
// Constant Parameters
using( NoSynchronizationContext )
{
@@ -706,7 +706,7 @@ public partial class DataProtection
///
/// A that will be complete when handling of the response is completed.
///
- internal async global::System.Threading.Tasks.Task BackupInstancesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.ISendAsync sender)
+ internal async global::System.Threading.Tasks.Task BackupInstancesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func