DataProtection.Autorest/internal/ProxyCmdletDefinitions.ps1
# ---------------------------------------------------------------------------------- # 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 Returns resource collection belonging to a resource group. .Description Returns resource collection belonging to a resource group. .Example Get-AzDataProtectionBackupVault .Example Get-AzDataProtectionBackupVault -SubscriptionId "xxxx-xxx-xxxx" -ResourceGroupName sarath-rg .Example Get-AzDataProtectionBackupVault -SubscriptionId "xxxx-xxx-xxxx" -ResourceGroupName sarath-rg -VaultName sarath-vault .Example $vault = Get-AzDataProtectionBackupVault -SubscriptionId "xxxx-xxx-xxxx" -ResourceGroupName hiaga-rg -VaultName hiaga-vault $vault.SecureScore .Example $vault = Get-AzDataProtectionBackupVault -SubscriptionId "xxxx-xxx-xxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" $vault.EncryptionSetting |fl $vault.EncryptionSetting.CmkIdentity |fl $vault.EncryptionSetting.CmkKeyVaultProperty |fl .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IBackupVaultResource .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 <IDataProtectionIdentity>: Identity Parameter [BackupInstanceName <String>]: The name of the backup instance. [BackupPolicyName <String>]: [Id <String>]: Resource identity path [JobId <String>]: The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). [Location <String>]: The location in which uniqueness will be verified. [OperationId <String>]: [RecoveryPointId <String>]: [RequestName <String>]: [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceGuardProxyName <String>]: name of the resource guard proxy [ResourceGuardsName <String>]: The name of ResourceGuard [ResourceId <String>]: ARM path of the resource to be protected using Microsoft.DataProtection [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [VaultName <String>]: The name of the backup vault. .Link https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionbackupvault #> function Get-AzDataProtectionBackupVault { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IBackupVaultResource])] [CmdletBinding(DefaultParameterSetName='GetViaIdentity1', PositionalBinding=$false)] param( [Parameter(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 $mapping = @{ GetViaIdentity1 = 'Az.DataProtection.private\Get-AzDataProtectionBackupVault_GetViaIdentity1'; GetViaIdentity2 = 'Az.DataProtection.private\Get-AzDataProtectionBackupVault_GetViaIdentity2'; } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Fetches the Cross Region Restore Job .Description Fetches the Cross Region Restore Job .Example {{ Add code here }} .Example {{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.ICrossRegionRestoreJobRequest .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.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 <IDataProtectionIdentity>: Identity Parameter [BackupInstanceName <String>]: The name of the backup instance. [BackupPolicyName <String>]: [Id <String>]: Resource identity path [JobId <String>]: The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). [Location <String>]: The location in which uniqueness will be verified. [OperationId <String>]: [RecoveryPointId <String>]: [RequestName <String>]: [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceGuardProxyName <String>]: name of the resource guard proxy [ResourceGuardsName <String>]: The name of ResourceGuard [ResourceId <String>]: ARM path of the resource to be protected using Microsoft.DataProtection [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [VaultName <String>]: The name of the backup vault. PARAMETER <ICrossRegionRestoreJobRequest>: Details of CRR Job to be fetched JobId <String>: SourceBackupVaultId <String>: SourceRegion <String>: .Link https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectioncrossregionrestorejobdetail #> function Get-AzDataProtectionCrossRegionRestoreJobDetail { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IAzureBackupJobResource])] [CmdletBinding(DefaultParameterSetName='GetExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the Azure region. ${Location}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='GetExpanded', 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='GetExpanded')] [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='GetViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='GetViaIdentityExpanded', 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(ParameterSetName='Get', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.ICrossRegionRestoreJobRequest] # Details of CRR Job to be fetched # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter(ParameterSetName='GetExpanded', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # . ${JobId}, [Parameter(ParameterSetName='GetExpanded', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # . ${SourceBackupVaultId}, [Parameter(ParameterSetName='GetExpanded', Mandatory)] [Parameter(ParameterSetName='GetViaIdentityExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # . ${SourceRegion}, [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 $mapping = @{ Get = 'Az.DataProtection.private\Get-AzDataProtectionCrossRegionRestoreJobDetail_Get'; GetExpanded = 'Az.DataProtection.private\Get-AzDataProtectionCrossRegionRestoreJobDetail_GetExpanded'; GetViaIdentity = 'Az.DataProtection.private\Get-AzDataProtectionCrossRegionRestoreJobDetail_GetViaIdentity'; GetViaIdentityExpanded = 'Az.DataProtection.private\Get-AzDataProtectionCrossRegionRestoreJobDetail_GetViaIdentityExpanded'; } if (('Get', 'GetExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Fetches list of Cross Region Restore job belonging to the vault .Description Fetches list of Cross Region Restore job belonging to the vault .Example {{ Add code here }} .Example {{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.ICrossRegionRestoreJobsRequest .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.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. PARAMETER <ICrossRegionRestoreJobsRequest>: Details of Backup Vault for which CRR Jobs are to be fetched SourceBackupVaultId <String>: SourceRegion <String>: .Link https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectioncrossregionrestorejob #> function Get-AzDataProtectionCrossRegionRestoreJob { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IAzureBackupJobResource])] [CmdletBinding(DefaultParameterSetName='ListExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the Azure region. ${Location}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [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()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Query')] [System.String] # OData filter options. ${Filter}, [Parameter(ParameterSetName='List', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.ICrossRegionRestoreJobsRequest] # Details of Backup Vault for which CRR Jobs are to be fetched # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter(ParameterSetName='ListExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # . ${SourceBackupVaultId}, [Parameter(ParameterSetName='ListExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # . ${SourceRegion}, [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 $mapping = @{ List = 'Az.DataProtection.private\Get-AzDataProtectionCrossRegionRestoreJob_List'; ListExpanded = 'Az.DataProtection.private\Get-AzDataProtectionCrossRegionRestoreJob_ListExpanded'; } if (('List', 'ListExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Returns a list of Secondary Recovery Points for a DataSource in a vault, that can be used for Cross Region Restore. .Description Returns a list of Secondary Recovery Points for a DataSource in a vault, that can be used for Cross Region Restore. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IFetchSecondaryRPsRequestParameters .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IAzureBackupRecoveryPointResource .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 <IFetchSecondaryRPsRequestParameters>: Information about BI whose secondary RecoveryPoints are requested Source region and BI ARM path [SourceBackupInstanceId <String>]: ARM Path of BackupInstance [SourceRegion <String>]: Source region in which BackupInstance is located .Link https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionfetchsecondaryrecoverypoint #> function Get-AzDataProtectionFetchSecondaryRecoveryPoint { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IAzureBackupRecoveryPointResource])] [CmdletBinding(DefaultParameterSetName='ListExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the Azure region. ${Location}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [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()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Query')] [System.String] # OData filter options. ${Filter}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Query')] [System.String] # skipToken Filter. ${SkipToken}, [Parameter(ParameterSetName='List', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IFetchSecondaryRPsRequestParameters] # Information about BI whose secondary RecoveryPoints are requested # Source region and # BI ARM path # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter(ParameterSetName='ListExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # ARM Path of BackupInstance ${SourceBackupInstanceId}, [Parameter(ParameterSetName='ListExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # Source region in which BackupInstance is located ${SourceRegion}, [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 $mapping = @{ List = 'Az.DataProtection.private\Get-AzDataProtectionFetchSecondaryRecoveryPoint_List'; ListExpanded = 'Az.DataProtection.private\Get-AzDataProtectionFetchSecondaryRecoveryPoint_ListExpanded'; } if (('List', 'ListExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { 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 .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.Api202501.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 <IDataProtectionIdentity>: Identity Parameter [BackupInstanceName <String>]: The name of the backup instance. [BackupPolicyName <String>]: [Id <String>]: Resource identity path [JobId <String>]: The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). [Location <String>]: The location in which uniqueness will be verified. [OperationId <String>]: [RecoveryPointId <String>]: [RequestName <String>]: [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceGuardProxyName <String>]: name of the resource guard proxy [ResourceGuardsName <String>]: The name of ResourceGuard [ResourceId <String>]: ARM path of the resource to be protected using Microsoft.DataProtection [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [VaultName <String>]: 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.Api202501.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 $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')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Returns a list of Recovery Points for a DataSource in a vault. .Description Returns a list of Recovery Points for a DataSource in a vault. .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 .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 .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IAzureBackupRecoveryPointResource .Link https://learn.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionrecoverypoint #> function Get-AzDataProtectionRecoveryPoint { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IAzureBackupRecoveryPointResource])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the backup instance. ${BackupInstanceName}, [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()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Query')] [System.String] # OData filter options. ${Filter}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Query')] [System.String] # skipToken Filter. ${SkipToken}, [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 $mapping = @{ List = 'Az.DataProtection.private\Get-AzDataProtectionRecoveryPoint_List'; } if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Create or update a backup instance in a backup vault .Description Create or update a backup instance in a backup vault .Example $sub = "xxxx-xxx-xx" $DiskId = "/subscriptions/{subscription}/resourceGroups/{resourcegroup}/providers/Microsoft.Compute/disks/{diskname}" $policy = Get-AzDataProtectionBackupPolicy -SubscriptionId $sub -ResourceGroupName sarath-rg -VaultName sarath-vault -Name "MyPolicy" $instance = Initialize-AzDataProtectionBackupInstance -DatasourceType AzureDisk -DatasourceLocation $vault.Location -PolicyId $policy.Id -DatasourceId $DiskId $instance.Property.PolicyInfo.PolicyParameter.DataStoreParametersList[0].ResourceGroupId = "/subscriptions/{subscription}/resourceGroups/{resourceGroup}" New-AzDataProtectionBackupInstance -SubscriptionId $sub -ResourceGroupName sarath-rg -VaultName sarath-vault -BackupInstance $instance .Example $sub = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" $dataSourceId = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/ResourceGroupName/providers/Microsoft.DBforPostgreSQL/servers/OssServerName/databases/DBName" $secretURI = "https://oss-keyvault.vault.azure.net/secrets/oss-secret" $vault = Get-AzDataProtectionBackupVault -SubscriptionId $sub -ResourceGroupName "ResourceGroupName" -VaultName $vaultName $policy = Get-AzDataProtectionBackupPolicy -SubscriptionId $sub -ResourceGroupName "ResourceGroupName" -VaultName "vaultName" -Name "MyPolicy" $instance = Initialize-AzDataProtectionBackupInstance -DatasourceType AzureDatabaseForPostgreSQL -DatasourceLocation $vault.Location -PolicyId $policy.Id -DatasourceId $dataSourceId -SecretStoreURI $secretURI -SecretStoreType AzureKeyVault New-AzDataProtectionBackupInstance -SubscriptionId $sub -ResourceGroupName "ResourceGroupName" -VaultName "vaultName" -BackupInstance $instance .Example $policy = Get-AzDataProtectionBackupPolicy -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -VaultName "vaultName" -ResourceGroupName "resourceGroupName" | Where-Object {$_.Name -eq "policyName"} $sourceClusterId = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourceGroupName/providers/Microsoft.ContainerService/managedClusters/aks-cluster" $snapshotResourceGroupId = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourceGroupName" $backupConfig = New-AzDataProtectionBackupConfigurationClientObject -SnapshotVolume $true -IncludeClusterScopeResource $true -DatasourceType AzureKubernetesService -LabelSelector "x=y","foo=bar" $backupInstance = Initialize-AzDataProtectionBackupInstance -DatasourceType AzureKubernetesService -DatasourceLocation "eastus" -PolicyId $policy.Id -DatasourceId $sourceClusterId -SnapshotResourceGroupId $snapshotResourceGroupId -FriendlyName "aks-cluster-friendlyName" -BackupConfiguration $backupConfig Set-AzDataProtectionMSIPermission -BackupInstance $backupInstance -VaultResourceGroup "resourceGroupName" -VaultName "vaultName" -PermissionsScope "ResourceGroup" $tag= @{"Owner"="BIOwnerName";"Foo"="Bar";"A"="B"} $biCreate = New-AzDataProtectionBackupInstance -ResourceGroupName "ResourceGroupName" -VaultName "vaultName" -BackupInstance $backupInstance -SubscriptionId $sub -Tag $tag $biCreate .Example $vault = Get-AzDataProtectionBackupVault -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" $pol = Get-AzDataProtectionBackupPolicy -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -VaultName "vaultName" -ResourceGroupName "resourceGroupName" | Where-Object { $_.Name -match "vaultedPolicyName" } $backupConfig = New-AzDataProtectionBackupConfigurationClientObject -DatasourceType AzureBlob -IncludeAllContainer -StorageAccountResourceGroupName "resourceGroupName" -StorageAccountName "storageAcountName" $backupInstanceClientObject = Initialize-AzDataProtectionBackupInstance -DatasourceType AzureBlob -DatasourceLocation $vault.Location -PolicyId $pol[0].Id -DatasourceId "storageAccId" -BackupConfiguration $backupConfig Set-AzDataProtectionMSIPermission -VaultResourceGroup "resourceGroupName" -VaultName "vaultName" -BackupInstance $backupInstanceClientObject -PermissionsScope ResourceGroup $operationResponse = Test-AzDataProtectionBackupInstanceReadiness -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -BackupInstance $backupInstanceClientObject.Property -NoWait $operationId = $operationResponse.Target.Split("/")[-1].Split("?")[0] While((Get-AzDataProtectionOperationStatus -OperationId $operationId -Location $vault.Location -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx").Status -eq "Inprogress"){ Start-Sleep -Seconds 10 } $backupnstanceCreate = New-AzDataProtectionBackupInstance -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -BackupInstance $backupInstanceClientObject .Example $vault = Get-AzDataProtectionBackupVault -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" $pol = Get-AzDataProtectionBackupPolicy -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -VaultName "vaultName" -ResourceGroupName "resourceGroupName" | Where-Object { $_.DatasourceType -match "mysql" } $datasourceId = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/rgName/providers/Microsoft.DBforMySQL/flexibleServers/test-mysql" $backupInstanceClientObject = Initialize-AzDataProtectionBackupInstance -DatasourceType AzureDatabaseForMySQL -DatasourceLocation $vault.Location -PolicyId $pol[0].Id -DatasourceId $datasourceId Set-AzDataProtectionMSIPermission -VaultResourceGroup "resourceGroupName" -VaultName "vaultName" -BackupInstance $backupInstanceClientObject -PermissionsScope ResourceGroup $operationResponse = Test-AzDataProtectionBackupInstanceReadiness -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -BackupInstance $backupInstanceClientObject.Property -NoWait $operationId = $operationResponse.Target.Split("/")[-1].Split("?")[0] While((Get-AzDataProtectionOperationStatus -OperationId $operationId -Location $vault.Location -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx").Status -eq "Inprogress"){ Start-Sleep -Seconds 10 } $backupnstanceCreate = New-AzDataProtectionBackupInstance -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -BackupInstance $backupInstanceClientObject .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IBackupInstanceResource .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IBackupInstanceResource .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 <IBackupInstanceResource>: BackupInstance Resource [Tag <IDppProxyResourceTags>]: Proxy Resource tags. [(Any) <String>]: This indicates any property can be added to this object. [Property <IBackupInstance>]: BackupInstanceResource properties DataSourceInfo <IDatasource>: Gets or sets the data source information. ResourceId <String>: 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 <String>]: Type of Datasource object, used to initialize the right inherited type [ResourceLocation <String>]: Location of datasource. [ResourceName <String>]: Unique identifier of the resource in the context of parent. [ResourceType <String>]: Resource Type of Datasource. [ResourceUri <String>]: Uri of the resource. [Type <String>]: DatasourceType of the resource. ObjectType <String>: PolicyInfo <IPolicyInfo>: Gets or sets the policy information. PolicyId <String>: [PolicyParameter <IPolicyParameters>]: Policy parameters for the backup instance [BackupDatasourceParametersList <IBackupDatasourceParameters[]>]: Gets or sets the Backup Data Source Parameters ObjectType <String>: Type of the specific object - used for deserializing [DataStoreParametersList <IDataStoreParameters[]>]: Gets or sets the DataStore Parameters DataStoreType <DataStoreTypes>: type of datastore; Operational/Vault/Archive ObjectType <String>: Type of the specific object - used for deserializing [DataSourceSetInfo <IDatasourceSet>]: Gets or sets the data source set information. ResourceId <String>: 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 <String>]: DatasourceType of the resource. [ObjectType <String>]: Type of Datasource object, used to initialize the right inherited type [ResourceLocation <String>]: Location of datasource. [ResourceName <String>]: Unique identifier of the resource in the context of parent. [ResourceType <String>]: Resource Type of Datasource. [ResourceUri <String>]: Uri of the resource. [DatasourceAuthCredentials <IAuthCredentials>]: Credentials to use to authenticate with data source provider. ObjectType <String>: Type of the specific object - used for deserializing [FriendlyName <String>]: Gets or sets the Backup Instance friendly name. [IdentityDetail <IIdentityDetails>]: Contains information of the Identity Details for the BI. If it is null, default will be considered as System Assigned. [UseSystemAssignedIdentity <Boolean?>]: Specifies if the BI is protected by System Identity. [UserAssignedIdentityArmUrl <String>]: ARM URL for User Assigned Identity. [ResourceGuardOperationRequest <String[]>]: ResourceGuardOperationRequests on which LAC check will be performed [ValidationType <ValidationType?>]: Specifies the type of validation. In case of DeepValidation, all validations from /validateForBackup API will run again. PROPERTY <IBackupInstance>: BackupInstanceResource properties DataSourceInfo <IDatasource>: Gets or sets the data source information. ResourceId <String>: 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 <String>]: Type of Datasource object, used to initialize the right inherited type [ResourceLocation <String>]: Location of datasource. [ResourceName <String>]: Unique identifier of the resource in the context of parent. [ResourceType <String>]: Resource Type of Datasource. [ResourceUri <String>]: Uri of the resource. [Type <String>]: DatasourceType of the resource. ObjectType <String>: PolicyInfo <IPolicyInfo>: Gets or sets the policy information. PolicyId <String>: [PolicyParameter <IPolicyParameters>]: Policy parameters for the backup instance [BackupDatasourceParametersList <IBackupDatasourceParameters[]>]: Gets or sets the Backup Data Source Parameters ObjectType <String>: Type of the specific object - used for deserializing [DataStoreParametersList <IDataStoreParameters[]>]: Gets or sets the DataStore Parameters DataStoreType <DataStoreTypes>: type of datastore; Operational/Vault/Archive ObjectType <String>: Type of the specific object - used for deserializing [DataSourceSetInfo <IDatasourceSet>]: Gets or sets the data source set information. ResourceId <String>: 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 <String>]: DatasourceType of the resource. [ObjectType <String>]: Type of Datasource object, used to initialize the right inherited type [ResourceLocation <String>]: Location of datasource. [ResourceName <String>]: Unique identifier of the resource in the context of parent. [ResourceType <String>]: Resource Type of Datasource. [ResourceUri <String>]: Uri of the resource. [DatasourceAuthCredentials <IAuthCredentials>]: Credentials to use to authenticate with data source provider. ObjectType <String>: Type of the specific object - used for deserializing [FriendlyName <String>]: Gets or sets the Backup Instance friendly name. [IdentityDetail <IIdentityDetails>]: Contains information of the Identity Details for the BI. If it is null, default will be considered as System Assigned. [UseSystemAssignedIdentity <Boolean?>]: Specifies if the BI is protected by System Identity. [UserAssignedIdentityArmUrl <String>]: ARM URL for User Assigned Identity. [ResourceGuardOperationRequest <String[]>]: ResourceGuardOperationRequests on which LAC check will be performed [ValidationType <ValidationType?>]: Specifies the type of validation. In case of DeepValidation, all validations from /validateForBackup API will run again. .Link https://learn.microsoft.com/powershell/module/az.dataprotection/new-azdataprotectionbackupinstance #> function New-AzDataProtectionBackupInstance { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IBackupInstanceResource])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', 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()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Header')] [System.String] # Parameter deprecate. # Please use SecureToken instead. ${Token}, [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IBackupInstanceResource] # BackupInstance Resource # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IBackupInstance] # BackupInstanceResource properties # To construct, see NOTES section for PROPERTY properties and create a hash table. ${Property}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IDppProxyResourceTags]))] [System.Collections.Hashtable] # Proxy Resource tags. ${Tag}, [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(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 $mapping = @{ Create = 'Az.DataProtection.private\New-AzDataProtectionBackupInstance_Create'; CreateExpanded = 'Az.DataProtection.private\New-AzDataProtectionBackupInstance_CreateExpanded'; } if (('Create', 'CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Creates or Updates a backup policy belonging to a backup vault .Description Creates or Updates a backup policy belonging to a backup vault .Example $defaultPol = Get-AzDataProtectionPolicyTemplate -DatasourceType AzureDisk New-AzDataProtectionBackupPolicy -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName sarath-rg -VaultName sarath-vault -Name "MyPolicy" -Policy $defaultPol .Example $defaultPol = Get-AzDataProtectionPolicyTemplate -DatasourceType AzureDatabaseForPostgreSQL $lifeCycleVault = New-AzDataProtectionRetentionLifeCycleClientObject -SourceDataStore VaultStore -SourceRetentionDurationType Months -SourceRetentionDurationCount 3 -TargetDataStore ArchiveStore -CopyOption CopyOnExpiryOption $lifeCycleArchive = New-AzDataProtectionRetentionLifeCycleClientObject -SourceDataStore ArchiveStore -SourceRetentionDurationType Months -SourceRetentionDurationCount 6 Edit-AzDataProtectionPolicyRetentionRuleClientObject -Policy $defaultPol -Name Default -LifeCycles $lifeCycleVault, $lifeCycleArchive -IsDefault $true $schDates = @( ( (Get-Date -Year 2021 -Month 08 -Day 18 -Hour 10 -Minute 0 -Second 0) ), ( (Get-Date -Year 2021 -Month 08 -Day 22 -Hour 10 -Minute 0 -Second 0) )) $trigger = New-AzDataProtectionPolicyTriggerScheduleClientObject -ScheduleDays $schDates -IntervalType Weekly -IntervalCount 1 Edit-AzDataProtectionPolicyTriggerClientObject -Schedule $trigger -Policy $defaultPol $lifeCycleVault = New-AzDataProtectionRetentionLifeCycleClientObject -SourceDataStore VaultStore -SourceRetentionDurationType Months -SourceRetentionDurationCount 6 -TargetDataStore ArchiveStore -CopyOption CopyOnExpiryOption $lifeCycleArchive = New-AzDataProtectionRetentionLifeCycleClientObject -SourceDataStore ArchiveStore -SourceRetentionDurationType Months -SourceRetentionDurationCount 12 Edit-AzDataProtectionPolicyRetentionRuleClientObject -Policy $defaultPol -Name Monthly -LifeCycles $lifeCycleVault, $lifeCycleArchive -IsDefault $false $tagCriteria = New-AzDataProtectionPolicyTagCriteriaClientObject -AbsoluteCriteria FirstOfMonth Edit-AzDataProtectionPolicyTagClientObject -Policy $defaultPol -Name Monthly -Criteria $tagCriteria New-AzDataProtectionBackupPolicy -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -Name "newOSSPolicy" -Policy $defaultPol .Example $defaultPol = Get-AzDataProtectionPolicyTemplate -DatasourceType AzureKubernetesService $schDate = @( ( (Get-Date -Year 2023 -Month 03 -Day 18 -Hour 16 -Minute 0 -Second 0) )) $trigger = New-AzDataProtectionPolicyTriggerScheduleClientObject -ScheduleDays $schDate -IntervalType Daily -IntervalCount 1 Edit-AzDataProtectionPolicyTriggerClientObject -Schedule $trigger -Policy $defaultPol $lifeCycleDaily = New-AzDataProtectionRetentionLifeCycleClientObject -SourceDataStore OperationalStore -SourceRetentionDurationType Days -SourceRetentionDurationCount 8 $lifeCycleWeekly = New-AzDataProtectionRetentionLifeCycleClientObject -SourceDataStore OperationalStore -SourceRetentionDurationType Weeks -SourceRetentionDurationCount 9 Edit-AzDataProtectionPolicyRetentionRuleClientObject -Policy $defaultPol -Name Daily -LifeCycles $lifeCycleDaily -IsDefault $false Edit-AzDataProtectionPolicyRetentionRuleClientObject -Policy $defaultPol -Name Weekly -LifeCycles $lifeCycleWeekly -IsDefault $false $tagCriteriaDaily = New-AzDataProtectionPolicyTagCriteriaClientObject -AbsoluteCriteria FirstOfDay Edit-AzDataProtectionPolicyTagClientObject -Policy $defaultPol -Name Daily -Criteria $tagCriteriaDaily $tagCriteriaWeekly = New-AzDataProtectionPolicyTagCriteriaClientObject -AbsoluteCriteria FirstOfWeek Edit-AzDataProtectionPolicyTagClientObject -Policy $defaultPol -Name Weekly -Criteria $tagCriteriaWeekly $newPolicy = New-AzDataProtectionBackupPolicy -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -Name "newAKSPolicy" -Policy $defaultPol -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" .Example $defaultPol = Get-AzDataProtectionPolicyTemplate -DatasourceType AzureBlob Edit-AzDataProtectionPolicyTriggerClientObject -Policy $defaultPol -RemoveSchedule $lifeCycleOperationalTier = New-AzDataProtectionRetentionLifeCycleClientObject -SourceDataStore OperationalStore -SourceRetentionDurationType Days -SourceRetentionDurationCount 30 Edit-AzDataProtectionPolicyRetentionRuleClientObject -Policy $defaultPol -Name Default -LifeCycles $lifeCycleOperationalTier -IsDefault $true -OverwriteLifeCycle $true $opPolicy = New-AzDataProtectionBackupPolicy -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -Name "operationalPolicyName" -Policy $defaultPol .Example $defaultPol = Get-AzDataProtectionPolicyTemplate -DatasourceType AzureBlob $lifeCycleVaultTierWeekly = New-AzDataProtectionRetentionLifeCycleClientObject -SourceDataStore VaultStore -SourceRetentionDurationType Weeks -SourceRetentionDurationCount 4 Edit-AzDataProtectionPolicyRetentionRuleClientObject -Policy $defaultPol -Name Weekly -LifeCycles $lifeCycleVaultTierWeekly -IsDefault $false $tagCriteria = New-AzDataProtectionPolicyTagCriteriaClientObject -AbsoluteCriteria FirstOfWeek Edit-AzDataProtectionPolicyTagClientObject -Policy $defaultPol -Name Weekly -Criteria $tagCriteria $vaultedPolicy = New-AzDataProtectionBackupPolicy -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -Name "vaultedPolicyName" -Policy $defaultPol .Example $defaultPol = Get-AzDataProtectionPolicyTemplate -DatasourceType AzureBlob $lifeCycleOperationalTier = New-AzDataProtectionRetentionLifeCycleClientObject -SourceDataStore OperationalStore -SourceRetentionDurationType Days -SourceRetentionDurationCount 30 Edit-AzDataProtectionPolicyRetentionRuleClientObject -Policy $defaultPol -Name Default -LifeCycles $lifeCycleOperationalTier -IsDefault $true -OverwriteLifeCycle $false $lifeCycleVaultTierWeekly = New-AzDataProtectionRetentionLifeCycleClientObject -SourceDataStore VaultStore -SourceRetentionDurationType Weeks -SourceRetentionDurationCount 7 Edit-AzDataProtectionPolicyRetentionRuleClientObject -Policy $defaultPol -Name Weekly -LifeCycles $lifeCycleVaultTierWeekly -IsDefault $false $tagCriteria = New-AzDataProtectionPolicyTagCriteriaClientObject -AbsoluteCriteria FirstOfWeek Edit-AzDataProtectionPolicyTagClientObject -Policy $defaultPol -Name Weekly -Criteria $tagCriteria $lifeCycleVaultTierMonthly = New-AzDataProtectionRetentionLifeCycleClientObject -SourceDataStore VaultStore -SourceRetentionDurationType Months -SourceRetentionDurationCount 5 Edit-AzDataProtectionPolicyRetentionRuleClientObject -Policy $defaultPol -Name Monthly -LifeCycles $lifeCycleVaultTierMonthly -IsDefault $false $tagCriteria = New-AzDataProtectionPolicyTagCriteriaClientObject -AbsoluteCriteria FirstOfMonth Edit-AzDataProtectionPolicyTagClientObject -Policy $defaultPol -Name Monthly -Criteria $tagCriteria $lifeCycleVaultTierYearly = New-AzDataProtectionRetentionLifeCycleClientObject -SourceDataStore VaultStore -SourceRetentionDurationType Years -SourceRetentionDurationCount 1 Edit-AzDataProtectionPolicyRetentionRuleClientObject -Policy $defaultPol -Name Yearly -LifeCycles $lifeCycleVaultTierYearly -IsDefault $false $tagCriteria = New-AzDataProtectionPolicyTagCriteriaClientObject -AbsoluteCriteria FirstOfYear Edit-AzDataProtectionPolicyTagClientObject -Policy $defaultPol -Name Yearly -Criteria $tagCriteria $scheduleDate = Get-Date $trigger = New-AzDataProtectionPolicyTriggerScheduleClientObject -ScheduleDays $scheduleDate -IntervalType Weekly -IntervalCount 1 Edit-AzDataProtectionPolicyTriggerClientObject -Schedule $trigger -Policy $defaultPol $defaultPol.PolicyRule[0].Trigger.ScheduleRepeatingTimeInterval[0] = "R/2023-05-09T02:30:00+01:00/P1W" $timeZone = Get-TimeZone -ListAvailable | Where-Object { $_.Id -match "Europe" } $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 .Example $defaultPol = Get-AzDataProtectionPolicyTemplate -DatasourceType AzureDatabaseForPGFlexServer $lifeCycleVault = New-AzDataProtectionRetentionLifeCycleClientObject -SourceDataStore VaultStore -SourceRetentionDurationType Days -SourceRetentionDurationCount 10 Edit-AzDataProtectionPolicyRetentionRuleClientObject -Policy $defaultPol -Name Default -LifeCycles $lifeCycleVault -IsDefault $true $lifeCycleVault = New-AzDataProtectionRetentionLifeCycleClientObject -SourceDataStore VaultStore -SourceRetentionDurationType Months -SourceRetentionDurationCount 6 Edit-AzDataProtectionPolicyRetentionRuleClientObject -Policy $defaultPol -Name Monthly -LifeCycles $lifeCycleVault -IsDefault $false $schDates = @( ( (Get-Date -Year 2024 -Month 03 -Day 04 -Hour 09 -Minute 0 -Second 0) ), ( (Get-Date -Year 2024 -Month 03 -Day 05 -Hour 09 -Minute 0 -Second 0) )) $trigger = New-AzDataProtectionPolicyTriggerScheduleClientObject -ScheduleDays $schDates -IntervalType Weekly -IntervalCount 1 Edit-AzDataProtectionPolicyTriggerClientObject -Schedule $trigger -Policy $defaultPol $tagCriteria = New-AzDataProtectionPolicyTagCriteriaClientObject -MonthsOfYear January -DaysOfMonth 1,5,Last Edit-AzDataProtectionPolicyTagClientObject -Policy $defaultPol -Name Monthly -Criteria $tagCriteria $pgflexPolicy = New-AzDataProtectionBackupPolicy -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -Name "pgflex-policy" -Policy $defaultPol .Example $defaultPol = Get-AzDataProtectionPolicyTemplate -DatasourceType AzureKubernetesService $schDate = @( ( (Get-Date -Year 2024 -Month 10 -Day 02 -Hour 15 -Minute 30 -Second 0) )) $trigger = New-AzDataProtectionPolicyTriggerScheduleClientObject -ScheduleDays $schDate -IntervalType Daily -IntervalCount 1 Edit-AzDataProtectionPolicyTriggerClientObject -Schedule $trigger -Policy $defaultPol # Adding default retention rule below $lifeCycleDefault = New-AzDataProtectionRetentionLifeCycleClientObject -SourceDataStore OperationalStore -SourceRetentionDurationType Days -SourceRetentionDurationCount 9 Edit-AzDataProtectionPolicyRetentionRuleClientObject -Policy $defaultPol -Name Default -LifeCycles $lifeCycleDefault -IsDefault $true # Adding daily retention rule below $lifeCycleDailyOperational = New-AzDataProtectionRetentionLifeCycleClientObject -SourceDataStore OperationalStore -SourceRetentionDurationType Days -SourceRetentionDurationCount 9 -TargetDataStore VaultStore -CopyOption ImmediateCopyOption $lifeCycleDailyVaulted = New-AzDataProtectionRetentionLifeCycleClientObject -SourceDataStore VaultStore -SourceRetentionDurationType Days -SourceRetentionDurationCount 86 Edit-AzDataProtectionPolicyRetentionRuleClientObject -Policy $defaultPol -Name Daily -LifeCycles $lifeCycleDailyOperational, $lifeCycleDailyVaulted -IsDefault $false $tagCriteriaDaily = New-AzDataProtectionPolicyTagCriteriaClientObject -AbsoluteCriteria FirstOfDay Edit-AzDataProtectionPolicyTagClientObject -Policy $defaultPol -Name Daily -Criteria $tagCriteriaDaily New-AzDataProtectionBackupPolicy -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -Name "newAKSPolicy" -Policy $defaultPol .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IBaseBackupPolicyResource .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IBaseBackupPolicyResource .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 <IBaseBackupPolicyResource>: BaseBackupPolicy resource [DatasourceType <String[]>]: Type of datasource for the backup management [ObjectType <String>]: .Link https://learn.microsoft.com/powershell/module/az.dataprotection/new-azdataprotectionbackuppolicy #> function New-AzDataProtectionBackupPolicy { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IBaseBackupPolicyResource])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Alias('BackupPolicyName')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # Name of the policy ${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(ParameterSetName='Create', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IBaseBackupPolicyResource] # BaseBackupPolicy resource # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String[]] # Type of datasource for the backup management ${DatasourceType}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # . ${ObjectType}, [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 $mapping = @{ Create = 'Az.DataProtection.private\New-AzDataProtectionBackupPolicy_Create'; CreateExpanded = 'Az.DataProtection.private\New-AzDataProtectionBackupPolicy_CreateExpanded'; } if (('Create', 'CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Creates or updates a BackupVault resource belonging to a resource group. .Description Creates or updates a BackupVault resource belonging to a resource group. .Example $sub = "xxxx-xxxx-xxxxx" $storagesetting = New-AzDataProtectionBackupVaultStorageSettingObject -DataStoreType VaultStore -Type LocallyRedundant New-AzDataProtectionBackupVault -SubscriptionId $sub -ResourceGroupName sarath-rg -VaultName "MyVault" -StorageSetting $storagesetting -Location westus .Example $sub = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" $storagesetting = New-AzDataProtectionBackupVaultStorageSettingObject -DataStoreType VaultStore -Type LocallyRedundant New-AzDataProtectionBackupVault -SubscriptionId $sub -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -Location westus -StorageSetting $storagesetting -CrossSubscriptionRestoreState Enabled -ImmutabilityState Unlocked -SoftDeleteRetentionDurationInDay 100 -SoftDeleteState On .Example $storagesetting = New-AzDataProtectionBackupVaultStorageSettingObject -DataStoreType VaultStore -Type LocallyRedundant $userAssignedIdentity = @{ "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/samplerg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sampleuami" = @{ clientId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" principalId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" } "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/samplerg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sampleuami2" = @{ clientId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" principalId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" } } $cmkIdentityId = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/samplerg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sampleuami" $cmkKeyUri = "https://samplekvazbckp.vault.azure.net/keys/testkey/3cd5235ad6ac4c11b40a6f35444bcbe1" New-AzDataProtectionBackupVault -SubscriptionId xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -Location "location" -StorageSetting $storagesetting -IdentityType UserAssigned -UserAssignedIdentity $userAssignedIdentity -CmkEncryptionState Enabled -CmkIdentityType UserAssigned -CmkUserAssignedIdentityId $cmkIdentityId -CmkEncryptionKeyUri $cmkKeyUri -CmkInfrastructureEncryption Enabled .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IBackupVaultResource .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IBackupVaultResource .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. ENCRYPTIONSETTING <IEncryptionSettings>: Customer Managed Key details of the resource. [CmkIdentity <ICmkKekIdentity>]: The details of the managed identity used for CMK [IdentityId <String>]: The managed identity to be used which has access permissions to the Key Vault. Provide a value here in case identity types: 'UserAssigned' only. [IdentityType <IdentityType?>]: The identity type. 'SystemAssigned' and 'UserAssigned' are mutually exclusive. 'SystemAssigned' will use implicitly created managed identity. [CmkInfrastructureEncryption <InfrastructureEncryptionState?>]: Enabling/Disabling the Double Encryption state [CmkKeyVaultProperty <ICmkKeyVaultProperties>]: The properties of the Key Vault which hosts CMK [KeyUri <String>]: The key uri of the Customer Managed Key [State <EncryptionState?>]: Encryption state of the Backup Vault. PARAMETER <IBackupVaultResource>: Backup Vault Resource StorageSetting <IStorageSetting[]>: Storage Settings [DatastoreType <StorageSettingStoreTypes?>]: Gets or sets the type of the datastore. [Type <StorageSettingTypes?>]: Gets or sets the type. [IdentityType <String>]: The identityType which can be either SystemAssigned, UserAssigned, 'SystemAssigned,UserAssigned' or None [IdentityUserAssignedIdentity <IDppIdentityDetailsUserAssignedIdentities>]: Gets or sets the user assigned identities. [(Any) <IUserAssignedIdentity>]: This indicates any property can be added to this object. [ETag <String>]: Optional ETag. [Location <String>]: Resource location. [Tag <IDppBaseTrackedResourceTags>]: Resource tags. [(Any) <String>]: This indicates any property can be added to this object. [AzureMonitorAlertsForAllJobFailure <AlertsState?>]: [CrossRegionRestoreState <CrossRegionRestoreState?>]: CrossRegionRestore state [CrossSubscriptionRestoreState <CrossSubscriptionRestoreState?>]: CrossSubscriptionRestore state [EncryptionSetting <IEncryptionSettings>]: Customer Managed Key details of the resource. [CmkIdentity <ICmkKekIdentity>]: The details of the managed identity used for CMK [IdentityId <String>]: The managed identity to be used which has access permissions to the Key Vault. Provide a value here in case identity types: 'UserAssigned' only. [IdentityType <IdentityType?>]: The identity type. 'SystemAssigned' and 'UserAssigned' are mutually exclusive. 'SystemAssigned' will use implicitly created managed identity. [CmkInfrastructureEncryption <InfrastructureEncryptionState?>]: Enabling/Disabling the Double Encryption state [CmkKeyVaultProperty <ICmkKeyVaultProperties>]: The properties of the Key Vault which hosts CMK [KeyUri <String>]: The key uri of the Customer Managed Key [State <EncryptionState?>]: Encryption state of the Backup Vault. [ImmutabilityState <ImmutabilityState?>]: Immutability state [ReplicatedRegion <String[]>]: List of replicated regions for Backup Vault [ResourceGuardOperationRequest <String[]>]: ResourceGuardOperationRequests on which LAC check will be performed [ResourceMoveDetailCompletionTimeUtc <String>]: Completion time in UTC of latest ResourceMove operation attempted. ISO 8601 format. [ResourceMoveDetailOperationId <String>]: CorrelationId of latest ResourceMove operation attempted [ResourceMoveDetailSourceResourcePath <String>]: ARM resource path of source resource [ResourceMoveDetailStartTimeUtc <String>]: Start time in UTC of latest ResourceMove operation attempted. ISO 8601 format. [ResourceMoveDetailTargetResourcePath <String>]: ARM resource path of target resource used in latest ResourceMove operation [SoftDeleteRetentionDurationInDay <Double?>]: Soft delete retention duration [SoftDeleteState <SoftDeleteState?>]: State of soft delete STORAGESETTING <IStorageSetting[]>: Storage Settings [DatastoreType <StorageSettingStoreTypes?>]: Gets or sets the type of the datastore. [Type <StorageSettingTypes?>]: Gets or sets the type. .Link https://learn.microsoft.com/powershell/module/az.dataprotection/new-azdataprotectionbackupvault #> function New-AzDataProtectionBackupVault { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IBackupVaultResource])] [CmdletBinding(DefaultParameterSetName='Create', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [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()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Header')] [System.String] # Parameter deprecate. # Please use SecureToken instead. ${Token}, [Parameter(ParameterSetName='Create', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IBackupVaultResource] # Backup Vault Resource # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter(ParameterSetName='CreateExpanded', Mandatory)] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IStorageSetting[]] # Storage Settings # To construct, see NOTES section for STORAGESETTING properties and create a hash table. ${StorageSetting}, [Parameter(ParameterSetName='CreateExpanded')] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.AlertsState])] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.AlertsState] # Parameter to Enable or Disable built-in azure monitor alerts for job failures. # Security alerts cannot be disabled. ${AzureMonitorAlertsForAllJobFailure}, [Parameter(ParameterSetName='CreateExpanded')] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.CrossRegionRestoreState])] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.CrossRegionRestoreState] # Cross region restore state of the vault. # Allowed values are Disabled, Enabled. ${CrossRegionRestoreState}, [Parameter(ParameterSetName='CreateExpanded')] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.CrossSubscriptionRestoreState])] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.CrossSubscriptionRestoreState] # Cross subscription restore state of the vault. # Allowed values are Disabled, Enabled, PermanentlyDisabled. ${CrossSubscriptionRestoreState}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # Optional ETag. ${ETag}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IEncryptionSettings] # Customer Managed Key details of the resource. # To construct, see NOTES section for ENCRYPTIONSETTING properties and create a hash table. ${EncryptionSetting}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # The identityType which can be either SystemAssigned, UserAssigned, 'SystemAssigned,UserAssigned' or None ${IdentityType}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api40.IDppIdentityDetailsUserAssignedIdentities]))] [System.Collections.Hashtable] # Gets or sets the user assigned identities. ${IdentityUserAssignedIdentity}, [Parameter(ParameterSetName='CreateExpanded')] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.ImmutabilityState])] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.ImmutabilityState] # Immutability state of the vault. # Allowed values are Disabled, Unlocked, Locked. ${ImmutabilityState}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # Resource location. ${Location}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String[]] # List of replicated regions for Backup Vault ${ReplicatedRegion}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String[]] # ResourceGuardOperationRequests on which LAC check will be performed ${ResourceGuardOperationRequest}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Double] # Soft delete retention duration in days. ${SoftDeleteRetentionDurationInDay}, [Parameter(ParameterSetName='CreateExpanded')] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.SoftDeleteState])] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.SoftDeleteState] # Soft delete state of the vault. # Allowed values are Off, On, AlwaysOn. ${SoftDeleteState}, [Parameter(ParameterSetName='CreateExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IDppBaseTrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [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(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 $mapping = @{ Create = 'Az.DataProtection.private\New-AzDataProtectionBackupVault_Create'; CreateExpanded = 'Az.DataProtection.private\New-AzDataProtectionBackupVault_CreateExpanded'; } if (('Create', 'CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Creates or updates a ResourceGuard resource belonging to a resource group. .Description Creates or updates a ResourceGuard resource belonging to a resource group. .Example New-AzDataProtectionResourceGuard -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "mua-rg" -Name "mua-resource-guard" -Location "centraluseuap" .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IResourceGuardResource .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IResourceGuardResource .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 <IDataProtectionIdentity>: Identity Parameter [BackupInstanceName <String>]: The name of the backup instance. [BackupPolicyName <String>]: [Id <String>]: Resource identity path [JobId <String>]: The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). [Location <String>]: The location in which uniqueness will be verified. [OperationId <String>]: [RecoveryPointId <String>]: [RequestName <String>]: [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceGuardProxyName <String>]: name of the resource guard proxy [ResourceGuardsName <String>]: The name of ResourceGuard [ResourceId <String>]: ARM path of the resource to be protected using Microsoft.DataProtection [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [VaultName <String>]: The name of the backup vault. PARAMETER <IResourceGuardResource>: . [ETag <String>]: Optional ETag. [Location <String>]: Resource location. [Tag <IDppBaseTrackedResourceTags>]: Resource tags. [(Any) <String>]: This indicates any property can be added to this object. [CriticalOperationExclusionList <String[]>]: List of critical operations which are not protected by this resourceGuard .Link https://learn.microsoft.com/powershell/module/az.dataprotection/new-azdataprotectionresourceguard #> function New-AzDataProtectionResourceGuard { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IResourceGuardResource])] [CmdletBinding(DefaultParameterSetName='PutExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Put', Mandatory)] [Parameter(ParameterSetName='PutExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of ResourceGuard ${Name}, [Parameter(ParameterSetName='Put', Mandatory)] [Parameter(ParameterSetName='PutExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Put')] [Parameter(ParameterSetName='PutExpanded')] [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='PutViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='PutViaIdentityExpanded', 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(ParameterSetName='Put', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='PutViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IResourceGuardResource] # . # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter(ParameterSetName='PutExpanded')] [Parameter(ParameterSetName='PutViaIdentityExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String[]] # List of critical operations which are not protected by this resourceGuard ${CriticalOperationExclusionList}, [Parameter(ParameterSetName='PutExpanded')] [Parameter(ParameterSetName='PutViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # Optional ETag. ${ETag}, [Parameter(ParameterSetName='PutExpanded')] [Parameter(ParameterSetName='PutViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # Resource location. ${Location}, [Parameter(ParameterSetName='PutExpanded')] [Parameter(ParameterSetName='PutViaIdentityExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IDppBaseTrackedResourceTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [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 $mapping = @{ Put = 'Az.DataProtection.private\New-AzDataProtectionResourceGuard_Put'; PutExpanded = 'Az.DataProtection.private\New-AzDataProtectionResourceGuard_PutExpanded'; PutViaIdentity = 'Az.DataProtection.private\New-AzDataProtectionResourceGuard_PutViaIdentity'; PutViaIdentityExpanded = 'Az.DataProtection.private\New-AzDataProtectionResourceGuard_PutViaIdentityExpanded'; } if (('Put', 'PutExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Triggers Cross Region Restore for BackupInstance. .Description Triggers Cross Region Restore for BackupInstance. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.ICrossRegionRestoreRequestObject .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.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. CROSSREGIONRESTOREDETAIL <ICrossRegionRestoreDetails>: Cross region restore details. SourceBackupInstanceId <String>: SourceRegion <String>: PARAMETER <ICrossRegionRestoreRequestObject>: Cross Region Restore Request Object CrossRegionRestoreDetail <ICrossRegionRestoreDetails>: Cross region restore details. SourceBackupInstanceId <String>: SourceRegion <String>: RestoreRequestObject <IAzureBackupRestoreRequest>: Gets or sets the restore request object. ObjectType <String>: RestoreTargetInfo <IRestoreTargetInfoBase>: Gets or sets the restore target information. ObjectType <String>: Type of Datasource object, used to initialize the right inherited type [RestoreLocation <String>]: Target Restore region SourceDataStoreType <SourceDataStoreType>: Gets or sets the type of the source data store. [IdentityDetailUseSystemAssignedIdentity <Boolean?>]: Specifies if the BI is protected by System Identity. [IdentityDetailUserAssignedIdentityArmUrl <String>]: ARM URL for User Assigned Identity. [ResourceGuardOperationRequest <String[]>]: ResourceGuardOperationRequests on which LAC check will be performed [SourceResourceId <String>]: Fully qualified Azure Resource Manager ID of the datasource which is being recovered. RESTOREREQUESTOBJECT <IAzureBackupRestoreRequest>: Gets or sets the restore request object. ObjectType <String>: RestoreTargetInfo <IRestoreTargetInfoBase>: Gets or sets the restore target information. ObjectType <String>: Type of Datasource object, used to initialize the right inherited type [RestoreLocation <String>]: Target Restore region SourceDataStoreType <SourceDataStoreType>: Gets or sets the type of the source data store. [IdentityDetailUseSystemAssignedIdentity <Boolean?>]: Specifies if the BI is protected by System Identity. [IdentityDetailUserAssignedIdentityArmUrl <String>]: ARM URL for User Assigned Identity. [ResourceGuardOperationRequest <String[]>]: ResourceGuardOperationRequests on which LAC check will be performed [SourceResourceId <String>]: Fully qualified Azure Resource Manager ID of the datasource which is being recovered. .Link https://learn.microsoft.com/powershell/module/az.dataprotection/start-azdataprotectionbackupinstancecrossregionrestore #> function Start-AzDataProtectionBackupInstanceCrossRegionRestore { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IOperationJobExtendedInfo])] [CmdletBinding(DefaultParameterSetName='Trigger', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the Azure region. ${Location}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [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.Api202501.ICrossRegionRestoreRequestObject] # Cross Region Restore Request Object # 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')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.ICrossRegionRestoreDetails] # Cross region restore details. # To construct, see NOTES section for CROSSREGIONRESTOREDETAIL properties and create a hash table. ${CrossRegionRestoreDetail}, [Parameter(ParameterSetName='TriggerExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IAzureBackupRestoreRequest] # Gets or sets the restore request object. # To construct, see NOTES section for RESTOREREQUESTOBJECT properties and create a hash table. ${RestoreRequestObject}, [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(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 $mapping = @{ Trigger = 'Az.DataProtection.private\Start-AzDataProtectionBackupInstanceCrossRegionRestore_Trigger'; TriggerExpanded = 'Az.DataProtection.private\Start-AzDataProtectionBackupInstanceCrossRegionRestore_TriggerExpanded'; } if (('Trigger', 'TriggerExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { 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 $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-Object { $_.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-Object { $_.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-Object { $_.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-Object { $_.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 } .Example $instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" | Where-Object { $_.Name -match "test-pgflex" } $rps = Get-AzDataProtectionRecoveryPoint -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -BackupInstanceName $instance.Name $targetContainerURI = "https://teststorageaccount.blob.core.windows.net/powershellpgflexrestore" $storageAccId = (Get-AzStorageAccount -ResourceGroupName "teststorageaccountRG" -Name "teststorageaccount").Id $pgFlexRestoreAsFilesRequest = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureDatabaseForPGFlexServer -SourceDataStore VaultStore -RestoreLocation $vault.Location -RestoreType RestoreAsFiles -RecoveryPoint $rps[0].Property.RecoveryPointId -TargetContainerURI $targetContainerURI Set-AzDataProtectionMSIPermission -VaultResourceGroup "resourceGroupName" -VaultName "vaultName" -PermissionsScope "ResourceGroup" -RestoreRequest $pgFlexRestoreAsFilesRequest -DatasourceType AzureDatabaseForPGFlexServer -SubscriptionId $SubscriptionId -StorageAccountARMId $storageAccId $validateRestore = Test-AzDataProtectionBackupInstanceRestore -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -RestoreRequest $pgFlexRestoreAsFilesRequest -Name $instance.BackupInstanceName $restoreJob = Start-AzDataProtectionBackupInstanceRestore -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -BackupInstanceName $instance.BackupInstanceName -Parameter $pgFlexRestoreAsFilesRequest .Example $instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" | Where-Object { $_.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 $prefMatch = @{ $backedUpContainers[0] = @("Su", "PS") $backedUpContainers[1]= @("meta", "coll", "Su") } $targetStorageAccountId = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/resourceGroupName/providers/Microsoft.Storage/storageAccounts/targetStorageAccount" $restoreReqILR = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureBlob -SourceDataStore VaultStore -RestoreLocation "vaultLocation" -RecoveryPoint $rp[0].Name -ItemLevelRecovery -RestoreType AlternateLocation -TargetResourceId $targetStorageAccountId -ContainersList $backedUpContainers[0,1] -PrefixMatch $prefMatch Test-AzDataProtectionBackupInstanceRestore -Name $instance[0].Name -ResourceGroupName "resourceGroupName" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -VaultName "vaultName" -RestoreRequest $restoreReqILR $restoreJobILR = Start-AzDataProtectionBackupInstanceRestore -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -BackupInstanceName $instance.BackupInstanceName -Parameter $restoreJobILR .Example $subId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" $resourceGroupName = "resourceGroupName" $vaultName = "vaultName" $location = "eastasia" $snapshotResourceGroupId = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/stagingRG" $stagingStorageAccount = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/stagingRG/providers/Microsoft.Storage/storageAccounts/snapshotsa" $targetAKSClusterARMId = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/targetRG/providers/Microsoft.ContainerService/managedClusters/targetKubernetesCluster" $instance = Get-AzDataProtectionBackupInstance -SubscriptionId $subId -ResourceGroupName $resourceGroupName -VaultName $vaultName | Where-Object { $_.Name -match "aks-cluster-name" } $rp = Get-AzDataProtectionRecoveryPoint -SubscriptionId $subId -ResourceGroupName $resourceGroupName -VaultName $vaultName -BackupInstanceName $instance.Name $aksRestoreCriteria = New-AzDataProtectionRestoreConfigurationClientObject -DatasourceType AzureKubernetesService -PersistentVolumeRestoreMode RestoreWithVolumeData -IncludeClusterScopeResource $true -StagingResourceGroupId $snapshotResourceGroupId -StagingStorageAccountId $stagingStorageAccount -IncludedNamespace "hrweb" -NamespaceMapping @{"hrweb"="hrwebrestore"} $aksALRRestoreRequest = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureKubernetesService -SourceDataStore VaultStore -RestoreLocation $location -RestoreType AlternateLocation -RecoveryPoint $rp[0].Property.RecoveryPointId -RestoreConfiguration $aksRestoreCriteria -TargetResourceId $targetAKSClusterARMId # assign necessary permissions from portal Set-AzContext -SubscriptionId $subId Set-AzDataProtectionMSIPermission -VaultResourceGroup $resourceGroupName -VaultName $vaultName -PermissionsScope "ResourceGroup" -RestoreRequest $aksALRRestoreRequest -SnapshotResourceGroupId $snapshotResourceGroupId $validateRestore = Test-AzDataProtectionBackupInstanceRestore -SubscriptionId $subId -ResourceGroupName $resourceGroupName -VaultName $vaultName -RestoreRequest $aksALRRestoreRequest -Name $instance.BackupInstanceName $restoreJob = Start-AzDataProtectionBackupInstanceRestore -SubscriptionId $subId -ResourceGroupName $resourceGroupName -VaultName $vaultName -BackupInstanceName $instance.BackupInstanceName -Parameter $aksALRRestoreRequest .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IAzureBackupRestoreRequest .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.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 <IAzureBackupRestoreRequest>: Azure backup restore request ObjectType <String>: RestoreTargetInfo <IRestoreTargetInfoBase>: Gets or sets the restore target information. ObjectType <String>: Type of Datasource object, used to initialize the right inherited type [RestoreLocation <String>]: Target Restore region SourceDataStoreType <SourceDataStoreType>: Gets or sets the type of the source data store. [IdentityDetailUseSystemAssignedIdentity <Boolean?>]: Specifies if the BI is protected by System Identity. [IdentityDetailUserAssignedIdentityArmUrl <String>]: ARM URL for User Assigned Identity. [ResourceGuardOperationRequest <String[]>]: ResourceGuardOperationRequests on which LAC check will be performed [SourceResourceId <String>]: Fully qualified Azure Resource Manager ID of the datasource which is being recovered. RESTORETARGETINFO <IRestoreTargetInfoBase>: Gets or sets the restore target information. ObjectType <String>: Type of Datasource object, used to initialize the right inherited type [RestoreLocation <String>]: Target Restore region .Link https://learn.microsoft.com/powershell/module/az.dataprotection/start-azdataprotectionbackupinstancerestore #> function Start-AzDataProtectionBackupInstanceRestore { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IOperationJobExtendedInfo])] [CmdletBinding(DefaultParameterSetName='Trigger', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the backup instance. ${BackupInstanceName}, [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()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Header')] [System.String] # Parameter deprecate. # Please use SecureToken instead. ${Token}, [Parameter(ParameterSetName='Trigger', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.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.Api202501.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')] [System.String] # ARM URL for User Assigned Identity. ${IdentityDetailUserAssignedIdentityArmUrl}, [Parameter(ParameterSetName='TriggerExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String[]] # ResourceGuardOperationRequests on which LAC check will be performed ${ResourceGuardOperationRequest}, [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()] [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(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 $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')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis This operation will stop protection of a backup instance and data will be held forever .Description This operation will stop protection of a backup instance and data will be held forever .Example Stop-AzDataProtectionBackupInstanceProtection -ResourceGroupName "rgName" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx" -VaultName "vaultName" -BackupInstanceName $backupInstance.BackupInstanceName .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IStopProtectionRequest .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 <IDataProtectionIdentity>: Identity Parameter [BackupInstanceName <String>]: The name of the backup instance. [BackupPolicyName <String>]: [Id <String>]: Resource identity path [JobId <String>]: The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). [Location <String>]: The location in which uniqueness will be verified. [OperationId <String>]: [RecoveryPointId <String>]: [RequestName <String>]: [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceGuardProxyName <String>]: name of the resource guard proxy [ResourceGuardsName <String>]: The name of ResourceGuard [ResourceId <String>]: ARM path of the resource to be protected using Microsoft.DataProtection [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [VaultName <String>]: The name of the backup vault. PARAMETER <IStopProtectionRequest>: Request body of Stop protection when MUA is Enabled [ResourceGuardOperationRequest <String[]>]: ResourceGuardOperationRequests on which LAC check will be performed .Link https://learn.microsoft.com/powershell/module/az.dataprotection/stop-azdataprotectionbackupinstanceprotection #> function Stop-AzDataProtectionBackupInstanceProtection { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='StopExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='StopExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the backup instance. ${BackupInstanceName}, [Parameter(ParameterSetName='StopExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='StopExpanded')] [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='StopExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the backup vault. ${VaultName}, [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()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Header')] [System.String] # Parameter deprecate. # Please use SecureToken instead. ${Token}, [Parameter(ParameterSetName='StopExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String[]] # ResourceGuardOperationRequests on which LAC check will be performed ${ResourceGuardOperationRequest}, [Parameter(ParameterSetName='StopViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IStopProtectionRequest] # Request body of Stop protection when MUA is Enabled # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [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 $mapping = @{ StopExpanded = 'Az.DataProtection.private\Stop-AzDataProtectionBackupInstanceProtection_StopExpanded'; StopViaIdentity = 'Az.DataProtection.private\Stop-AzDataProtectionBackupInstanceProtection_StopViaIdentity'; } if (('StopExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .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) .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) .Example Suspend-AzDataProtectionBackupInstanceBackup -ResourceGroupName "rgName" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx" -VaultName "vaultName" -BackupInstanceName $backupInstance.BackupInstanceName .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.ISuspendBackupRequest .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 <IDataProtectionIdentity>: Identity Parameter [BackupInstanceName <String>]: The name of the backup instance. [BackupPolicyName <String>]: [Id <String>]: Resource identity path [JobId <String>]: The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). [Location <String>]: The location in which uniqueness will be verified. [OperationId <String>]: [RecoveryPointId <String>]: [RequestName <String>]: [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceGuardProxyName <String>]: name of the resource guard proxy [ResourceGuardsName <String>]: The name of ResourceGuard [ResourceId <String>]: ARM path of the resource to be protected using Microsoft.DataProtection [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [VaultName <String>]: The name of the backup vault. PARAMETER <ISuspendBackupRequest>: Request body of Suspend backup when MUA is Enabled [ResourceGuardOperationRequest <String[]>]: ResourceGuardOperationRequests on which LAC check will be performed .Link https://learn.microsoft.com/powershell/module/az.dataprotection/suspend-azdataprotectionbackupinstancebackup #> function Suspend-AzDataProtectionBackupInstanceBackup { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='SuspendExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='SuspendExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the backup instance. ${BackupInstanceName}, [Parameter(ParameterSetName='SuspendExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='SuspendExpanded')] [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='SuspendExpanded', 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()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Header')] [System.String] # Parameter deprecate. # Please use SecureToken instead. ${Token}, [Parameter(ParameterSetName='SuspendExpanded')] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String[]] # ResourceGuardOperationRequests on which LAC check will be performed ${ResourceGuardOperationRequest}, [Parameter(ParameterSetName='SuspendViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.ISuspendBackupRequest] # Request body of Suspend backup when MUA is Enabled # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [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 $mapping = @{ SuspendExpanded = 'Az.DataProtection.private\Suspend-AzDataProtectionBackupInstanceBackup_SuspendExpanded'; SuspendViaIdentity = 'Az.DataProtection.private\Suspend-AzDataProtectionBackupInstanceBackup_SuspendViaIdentity'; } if (('SuspendExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Validates whether Cross Region Restore can be triggered for DataSource. .Description Validates whether Cross Region Restore can be triggered for DataSource. .Example {{ Add code here }} .Example {{ Add code here }} .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IValidateCrossRegionRestoreRequestObject .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.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. CROSSREGIONRESTOREDETAIL <ICrossRegionRestoreDetails>: Cross region restore details. SourceBackupInstanceId <String>: SourceRegion <String>: INPUTOBJECT <IDataProtectionIdentity>: Identity Parameter [BackupInstanceName <String>]: The name of the backup instance. [BackupPolicyName <String>]: [Id <String>]: Resource identity path [JobId <String>]: The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). [Location <String>]: The location in which uniqueness will be verified. [OperationId <String>]: [RecoveryPointId <String>]: [RequestName <String>]: [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceGuardProxyName <String>]: name of the resource guard proxy [ResourceGuardsName <String>]: The name of ResourceGuard [ResourceId <String>]: ARM path of the resource to be protected using Microsoft.DataProtection [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [VaultName <String>]: The name of the backup vault. PARAMETER <IValidateCrossRegionRestoreRequestObject>: Cross Region Restore Request Object CrossRegionRestoreDetail <ICrossRegionRestoreDetails>: Cross region restore details. SourceBackupInstanceId <String>: SourceRegion <String>: RestoreRequestObject <IAzureBackupRestoreRequest>: Gets or sets the restore request object. ObjectType <String>: RestoreTargetInfo <IRestoreTargetInfoBase>: Gets or sets the restore target information. ObjectType <String>: Type of Datasource object, used to initialize the right inherited type [RestoreLocation <String>]: Target Restore region SourceDataStoreType <SourceDataStoreType>: Gets or sets the type of the source data store. [IdentityDetailUseSystemAssignedIdentity <Boolean?>]: Specifies if the BI is protected by System Identity. [IdentityDetailUserAssignedIdentityArmUrl <String>]: ARM URL for User Assigned Identity. [ResourceGuardOperationRequest <String[]>]: ResourceGuardOperationRequests on which LAC check will be performed [SourceResourceId <String>]: Fully qualified Azure Resource Manager ID of the datasource which is being recovered. RESTOREREQUESTOBJECT <IAzureBackupRestoreRequest>: Gets or sets the restore request object. ObjectType <String>: RestoreTargetInfo <IRestoreTargetInfoBase>: Gets or sets the restore target information. ObjectType <String>: Type of Datasource object, used to initialize the right inherited type [RestoreLocation <String>]: Target Restore region SourceDataStoreType <SourceDataStoreType>: Gets or sets the type of the source data store. [IdentityDetailUseSystemAssignedIdentity <Boolean?>]: Specifies if the BI is protected by System Identity. [IdentityDetailUserAssignedIdentityArmUrl <String>]: ARM URL for User Assigned Identity. [ResourceGuardOperationRequest <String[]>]: ResourceGuardOperationRequests on which LAC check will be performed [SourceResourceId <String>]: Fully qualified Azure Resource Manager ID of the datasource which is being recovered. .Link https://learn.microsoft.com/powershell/module/az.dataprotection/test-azdataprotectionbackupinstancecrossregionrestore #> function Test-AzDataProtectionBackupInstanceCrossRegionRestore { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IOperationJobExtendedInfo])] [CmdletBinding(DefaultParameterSetName='ValidateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Validate', Mandatory)] [Parameter(ParameterSetName='ValidateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the Azure region. ${Location}, [Parameter(ParameterSetName='Validate', Mandatory)] [Parameter(ParameterSetName='ValidateExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Validate')] [Parameter(ParameterSetName='ValidateExpanded')] [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='ValidateViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='ValidateViaIdentityExpanded', 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(ParameterSetName='Validate', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='ValidateViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IValidateCrossRegionRestoreRequestObject] # Cross Region Restore Request Object # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter(ParameterSetName='ValidateExpanded', Mandatory)] [Parameter(ParameterSetName='ValidateViaIdentityExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.ICrossRegionRestoreDetails] # Cross region restore details. # To construct, see NOTES section for CROSSREGIONRESTOREDETAIL properties and create a hash table. ${CrossRegionRestoreDetail}, [Parameter(ParameterSetName='ValidateExpanded', Mandatory)] [Parameter(ParameterSetName='ValidateViaIdentityExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IAzureBackupRestoreRequest] # Gets or sets the restore request object. # To construct, see NOTES section for RESTOREREQUESTOBJECT properties and create a hash table. ${RestoreRequestObject}, [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(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 $mapping = @{ Validate = 'Az.DataProtection.private\Test-AzDataProtectionBackupInstanceCrossRegionRestore_Validate'; ValidateExpanded = 'Az.DataProtection.private\Test-AzDataProtectionBackupInstanceCrossRegionRestore_ValidateExpanded'; ValidateViaIdentity = 'Az.DataProtection.private\Test-AzDataProtectionBackupInstanceCrossRegionRestore_ValidateViaIdentity'; ValidateViaIdentityExpanded = 'Az.DataProtection.private\Test-AzDataProtectionBackupInstanceCrossRegionRestore_ValidateViaIdentityExpanded'; } if (('Validate', 'ValidateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Validate whether adhoc backup will be successful or not .Description 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" $diskId = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/rgName/providers/Microsoft.Compute/disks/test-disk" $snapshotRG = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/rgName" $instance = Initialize-AzDataProtectionBackupInstance -SnapshotResourceGroupId $Snapshotrg -DatasourceType AzureDisk -DatasourceLocation $vault.Location -PolicyId $diskBackupPolicy[0].Id -DatasourceId $diskId Test-AzDataProtectionBackupInstanceReadiness -ResourceGroupName "resourceGroupName" -VaultName $vault.Name -BackupInstance $instance[0].Property .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IValidateForBackupRequest .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.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 <IBackupInstance>: Backup Instance DataSourceInfo <IDatasource>: Gets or sets the data source information. ResourceId <String>: 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 <String>]: Type of Datasource object, used to initialize the right inherited type [ResourceLocation <String>]: Location of datasource. [ResourceName <String>]: Unique identifier of the resource in the context of parent. [ResourceType <String>]: Resource Type of Datasource. [ResourceUri <String>]: Uri of the resource. [Type <String>]: DatasourceType of the resource. ObjectType <String>: PolicyInfo <IPolicyInfo>: Gets or sets the policy information. PolicyId <String>: [PolicyParameter <IPolicyParameters>]: Policy parameters for the backup instance [BackupDatasourceParametersList <IBackupDatasourceParameters[]>]: Gets or sets the Backup Data Source Parameters ObjectType <String>: Type of the specific object - used for deserializing [DataStoreParametersList <IDataStoreParameters[]>]: Gets or sets the DataStore Parameters DataStoreType <DataStoreTypes>: type of datastore; Operational/Vault/Archive ObjectType <String>: Type of the specific object - used for deserializing [DataSourceSetInfo <IDatasourceSet>]: Gets or sets the data source set information. ResourceId <String>: 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 <String>]: DatasourceType of the resource. [ObjectType <String>]: Type of Datasource object, used to initialize the right inherited type [ResourceLocation <String>]: Location of datasource. [ResourceName <String>]: Unique identifier of the resource in the context of parent. [ResourceType <String>]: Resource Type of Datasource. [ResourceUri <String>]: Uri of the resource. [DatasourceAuthCredentials <IAuthCredentials>]: Credentials to use to authenticate with data source provider. ObjectType <String>: Type of the specific object - used for deserializing [FriendlyName <String>]: Gets or sets the Backup Instance friendly name. [IdentityDetail <IIdentityDetails>]: Contains information of the Identity Details for the BI. If it is null, default will be considered as System Assigned. [UseSystemAssignedIdentity <Boolean?>]: Specifies if the BI is protected by System Identity. [UserAssignedIdentityArmUrl <String>]: ARM URL for User Assigned Identity. [ResourceGuardOperationRequest <String[]>]: ResourceGuardOperationRequests on which LAC check will be performed [ValidationType <ValidationType?>]: Specifies the type of validation. In case of DeepValidation, all validations from /validateForBackup API will run again. INPUTOBJECT <IDataProtectionIdentity>: Identity Parameter [BackupInstanceName <String>]: The name of the backup instance. [BackupPolicyName <String>]: [Id <String>]: Resource identity path [JobId <String>]: The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). [Location <String>]: The location in which uniqueness will be verified. [OperationId <String>]: [RecoveryPointId <String>]: [RequestName <String>]: [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceGuardProxyName <String>]: name of the resource guard proxy [ResourceGuardsName <String>]: The name of ResourceGuard [ResourceId <String>]: ARM path of the resource to be protected using Microsoft.DataProtection [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [VaultName <String>]: The name of the backup vault. PARAMETER <IValidateForBackupRequest>: Validate for backup request BackupInstance <IBackupInstance>: Backup Instance DataSourceInfo <IDatasource>: Gets or sets the data source information. ResourceId <String>: 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 <String>]: Type of Datasource object, used to initialize the right inherited type [ResourceLocation <String>]: Location of datasource. [ResourceName <String>]: Unique identifier of the resource in the context of parent. [ResourceType <String>]: Resource Type of Datasource. [ResourceUri <String>]: Uri of the resource. [Type <String>]: DatasourceType of the resource. ObjectType <String>: PolicyInfo <IPolicyInfo>: Gets or sets the policy information. PolicyId <String>: [PolicyParameter <IPolicyParameters>]: Policy parameters for the backup instance [BackupDatasourceParametersList <IBackupDatasourceParameters[]>]: Gets or sets the Backup Data Source Parameters ObjectType <String>: Type of the specific object - used for deserializing [DataStoreParametersList <IDataStoreParameters[]>]: Gets or sets the DataStore Parameters DataStoreType <DataStoreTypes>: type of datastore; Operational/Vault/Archive ObjectType <String>: Type of the specific object - used for deserializing [DataSourceSetInfo <IDatasourceSet>]: Gets or sets the data source set information. ResourceId <String>: 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 <String>]: DatasourceType of the resource. [ObjectType <String>]: Type of Datasource object, used to initialize the right inherited type [ResourceLocation <String>]: Location of datasource. [ResourceName <String>]: Unique identifier of the resource in the context of parent. [ResourceType <String>]: Resource Type of Datasource. [ResourceUri <String>]: Uri of the resource. [DatasourceAuthCredentials <IAuthCredentials>]: Credentials to use to authenticate with data source provider. ObjectType <String>: Type of the specific object - used for deserializing [FriendlyName <String>]: Gets or sets the Backup Instance friendly name. [IdentityDetail <IIdentityDetails>]: Contains information of the Identity Details for the BI. If it is null, default will be considered as System Assigned. [UseSystemAssignedIdentity <Boolean?>]: Specifies if the BI is protected by System Identity. [UserAssignedIdentityArmUrl <String>]: ARM URL for User Assigned Identity. [ResourceGuardOperationRequest <String[]>]: ResourceGuardOperationRequests on which LAC check will be performed [ValidationType <ValidationType?>]: Specifies the type of validation. In case of DeepValidation, all validations from /validateForBackup API will run again. .Link https://learn.microsoft.com/powershell/module/az.dataprotection/test-azdataprotectionbackupinstancereadiness #> function Test-AzDataProtectionBackupInstanceReadiness { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IOperationJobExtendedInfo])] [CmdletBinding(DefaultParameterSetName='ValidateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Validate', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Validate')] [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='Validate', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the backup vault. ${VaultName}, [Parameter(ParameterSetName='ValidateViaIdentity', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='ValidateViaIdentityExpanded', 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(ParameterSetName='Validate', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='ValidateViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IValidateForBackupRequest] # Validate for backup request # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter(ParameterSetName='ValidateViaIdentityExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IBackupInstance] # Backup Instance # To construct, see NOTES section for BACKUPINSTANCE properties and create a hash table. ${BackupInstance}, [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(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 $mapping = @{ Validate = 'Az.DataProtection.private\Test-AzDataProtectionBackupInstanceReadiness_Validate'; ValidateViaIdentity = 'Az.DataProtection.private\Test-AzDataProtectionBackupInstanceReadiness_ValidateViaIdentity'; ValidateViaIdentityExpanded = 'Az.DataProtection.private\Test-AzDataProtectionBackupInstanceReadiness_ValidateViaIdentityExpanded'; } if (('Validate') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Validates if Restore can be triggered for a DataSource .Description Validates if Restore can be triggered for a DataSource .Example $instances = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "testResourceGroup" -VaultName "testVault" $pointInTimeRange = Find-AzDataProtectionRestorableTimeRange -BackupInstanceName $instances[0].BackupInstanceName -ResourceGroupName "testResourceGroup" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -VaultName "testVault" -SourceDataStoreType OperationalStore -StartTime (Get-Date).AddDays(-30).ToString("yyyy-MM-ddTHH:mm:ss.0000000Z") -EndTime (Get-Date).AddDays(0).ToString("yyyy-MM-ddTHH:mm:ss.0000000Z") $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 .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IValidateRestoreRequestObject .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.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. INPUTOBJECT <IDataProtectionIdentity>: Identity Parameter [BackupInstanceName <String>]: The name of the backup instance. [BackupPolicyName <String>]: [Id <String>]: Resource identity path [JobId <String>]: The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). [Location <String>]: The location in which uniqueness will be verified. [OperationId <String>]: [RecoveryPointId <String>]: [RequestName <String>]: [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceGuardProxyName <String>]: name of the resource guard proxy [ResourceGuardsName <String>]: The name of ResourceGuard [ResourceId <String>]: ARM path of the resource to be protected using Microsoft.DataProtection [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [VaultName <String>]: The name of the backup vault. PARAMETER <IValidateRestoreRequestObject>: Validate restore request object RestoreRequestObject <IAzureBackupRestoreRequest>: Gets or sets the restore request object. ObjectType <String>: RestoreTargetInfo <IRestoreTargetInfoBase>: Gets or sets the restore target information. ObjectType <String>: Type of Datasource object, used to initialize the right inherited type [RestoreLocation <String>]: Target Restore region SourceDataStoreType <SourceDataStoreType>: Gets or sets the type of the source data store. [IdentityDetailUseSystemAssignedIdentity <Boolean?>]: Specifies if the BI is protected by System Identity. [IdentityDetailUserAssignedIdentityArmUrl <String>]: ARM URL for User Assigned Identity. [ResourceGuardOperationRequest <String[]>]: ResourceGuardOperationRequests on which LAC check will be performed [SourceResourceId <String>]: Fully qualified Azure Resource Manager ID of the datasource which is being recovered. RESTOREREQUESTOBJECT <IAzureBackupRestoreRequest>: Gets or sets the restore request object. ObjectType <String>: RestoreTargetInfo <IRestoreTargetInfoBase>: Gets or sets the restore target information. ObjectType <String>: Type of Datasource object, used to initialize the right inherited type [RestoreLocation <String>]: Target Restore region SourceDataStoreType <SourceDataStoreType>: Gets or sets the type of the source data store. [IdentityDetailUseSystemAssignedIdentity <Boolean?>]: Specifies if the BI is protected by System Identity. [IdentityDetailUserAssignedIdentityArmUrl <String>]: ARM URL for User Assigned Identity. [ResourceGuardOperationRequest <String[]>]: ResourceGuardOperationRequests on which LAC check will be performed [SourceResourceId <String>]: Fully qualified Azure Resource Manager ID of the datasource which is being recovered. .Link https://learn.microsoft.com/powershell/module/az.dataprotection/test-azdataprotectionbackupinstancerestore #> function Test-AzDataProtectionBackupInstanceRestore { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IOperationJobExtendedInfo])] [CmdletBinding(DefaultParameterSetName='ValidateViaIdentity2', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Validate2', Mandatory)] [Parameter(ParameterSetName='ValidateExpanded2', Mandatory)] [Alias('BackupInstanceName')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the backup instance. ${Name}, [Parameter(ParameterSetName='Validate2', Mandatory)] [Parameter(ParameterSetName='ValidateExpanded2', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Validate2')] [Parameter(ParameterSetName='ValidateExpanded2')] [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='Validate2', Mandatory)] [Parameter(ParameterSetName='ValidateExpanded2', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the backup vault. ${VaultName}, [Parameter(ParameterSetName='ValidateViaIdentity2', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='ValidateViaIdentityExpanded2', 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(ParameterSetName='Validate2', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='ValidateViaIdentity2', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IValidateRestoreRequestObject] # Validate restore request object # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter(ParameterSetName='ValidateExpanded2', Mandatory)] [Parameter(ParameterSetName='ValidateViaIdentityExpanded2', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IAzureBackupRestoreRequest] # Gets or sets the restore request object. # To construct, see NOTES section for RESTOREREQUESTOBJECT properties and create a hash table. ${RestoreRequestObject}, [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(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 $mapping = @{ Validate2 = 'Az.DataProtection.private\Test-AzDataProtectionBackupInstanceRestore_Validate2'; ValidateExpanded2 = 'Az.DataProtection.private\Test-AzDataProtectionBackupInstanceRestore_ValidateExpanded2'; ValidateViaIdentity2 = 'Az.DataProtection.private\Test-AzDataProtectionBackupInstanceRestore_ValidateViaIdentity2'; ValidateViaIdentityExpanded2 = 'Az.DataProtection.private\Test-AzDataProtectionBackupInstanceRestore_ValidateViaIdentityExpanded2'; } if (('Validate2', 'ValidateExpanded2') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Validate whether update for backup instance will be successful or not .Description Validate whether update for backup instance will be successful or not .Example $backupInstanceResource = Get-AzDataProtectionBackupInstance -ResourceGroupName $resourceGroupName -VaultName $vaultName -SubscriptionId $subscriptionId | Where-Object { $_.Name -match $backupInstanceName } $backupInstanceResource.Property.PolicyInfo.PolicyId = $newPolicyARMId Test-AzDataProtectionBackupInstanceUpdate -Name $backupInstanceResource.Name -ResourceGroupName $ResourceGroupName -VaultName $VaultName -SubscriptionId $SubscriptionId -BackupInstance $backupInstanceResource.Property .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IValidateForModifyBackupRequest .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.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 <IBackupInstance>: Backup Instance DataSourceInfo <IDatasource>: Gets or sets the data source information. ResourceId <String>: 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 <String>]: Type of Datasource object, used to initialize the right inherited type [ResourceLocation <String>]: Location of datasource. [ResourceName <String>]: Unique identifier of the resource in the context of parent. [ResourceType <String>]: Resource Type of Datasource. [ResourceUri <String>]: Uri of the resource. [Type <String>]: DatasourceType of the resource. ObjectType <String>: PolicyInfo <IPolicyInfo>: Gets or sets the policy information. PolicyId <String>: [PolicyParameter <IPolicyParameters>]: Policy parameters for the backup instance [BackupDatasourceParametersList <IBackupDatasourceParameters[]>]: Gets or sets the Backup Data Source Parameters ObjectType <String>: Type of the specific object - used for deserializing [DataStoreParametersList <IDataStoreParameters[]>]: Gets or sets the DataStore Parameters DataStoreType <DataStoreTypes>: type of datastore; Operational/Vault/Archive ObjectType <String>: Type of the specific object - used for deserializing [DataSourceSetInfo <IDatasourceSet>]: Gets or sets the data source set information. ResourceId <String>: 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 <String>]: DatasourceType of the resource. [ObjectType <String>]: Type of Datasource object, used to initialize the right inherited type [ResourceLocation <String>]: Location of datasource. [ResourceName <String>]: Unique identifier of the resource in the context of parent. [ResourceType <String>]: Resource Type of Datasource. [ResourceUri <String>]: Uri of the resource. [DatasourceAuthCredentials <IAuthCredentials>]: Credentials to use to authenticate with data source provider. ObjectType <String>: Type of the specific object - used for deserializing [FriendlyName <String>]: Gets or sets the Backup Instance friendly name. [IdentityDetail <IIdentityDetails>]: Contains information of the Identity Details for the BI. If it is null, default will be considered as System Assigned. [UseSystemAssignedIdentity <Boolean?>]: Specifies if the BI is protected by System Identity. [UserAssignedIdentityArmUrl <String>]: ARM URL for User Assigned Identity. [ResourceGuardOperationRequest <String[]>]: ResourceGuardOperationRequests on which LAC check will be performed [ValidationType <ValidationType?>]: Specifies the type of validation. In case of DeepValidation, all validations from /validateForBackup API will run again. INPUTOBJECT <IDataProtectionIdentity>: Identity Parameter [BackupInstanceName <String>]: The name of the backup instance. [BackupPolicyName <String>]: [Id <String>]: Resource identity path [JobId <String>]: The Job ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). [Location <String>]: The location in which uniqueness will be verified. [OperationId <String>]: [RecoveryPointId <String>]: [RequestName <String>]: [ResourceGroupName <String>]: The name of the resource group. The name is case insensitive. [ResourceGuardProxyName <String>]: name of the resource guard proxy [ResourceGuardsName <String>]: The name of ResourceGuard [ResourceId <String>]: ARM path of the resource to be protected using Microsoft.DataProtection [SubscriptionId <String>]: The ID of the target subscription. The value must be an UUID. [VaultName <String>]: The name of the backup vault. PARAMETER <IValidateForModifyBackupRequest>: Validate for modify backup request BackupInstance <IBackupInstance>: Backup Instance DataSourceInfo <IDatasource>: Gets or sets the data source information. ResourceId <String>: 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 <String>]: Type of Datasource object, used to initialize the right inherited type [ResourceLocation <String>]: Location of datasource. [ResourceName <String>]: Unique identifier of the resource in the context of parent. [ResourceType <String>]: Resource Type of Datasource. [ResourceUri <String>]: Uri of the resource. [Type <String>]: DatasourceType of the resource. ObjectType <String>: PolicyInfo <IPolicyInfo>: Gets or sets the policy information. PolicyId <String>: [PolicyParameter <IPolicyParameters>]: Policy parameters for the backup instance [BackupDatasourceParametersList <IBackupDatasourceParameters[]>]: Gets or sets the Backup Data Source Parameters ObjectType <String>: Type of the specific object - used for deserializing [DataStoreParametersList <IDataStoreParameters[]>]: Gets or sets the DataStore Parameters DataStoreType <DataStoreTypes>: type of datastore; Operational/Vault/Archive ObjectType <String>: Type of the specific object - used for deserializing [DataSourceSetInfo <IDatasourceSet>]: Gets or sets the data source set information. ResourceId <String>: 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 <String>]: DatasourceType of the resource. [ObjectType <String>]: Type of Datasource object, used to initialize the right inherited type [ResourceLocation <String>]: Location of datasource. [ResourceName <String>]: Unique identifier of the resource in the context of parent. [ResourceType <String>]: Resource Type of Datasource. [ResourceUri <String>]: Uri of the resource. [DatasourceAuthCredentials <IAuthCredentials>]: Credentials to use to authenticate with data source provider. ObjectType <String>: Type of the specific object - used for deserializing [FriendlyName <String>]: Gets or sets the Backup Instance friendly name. [IdentityDetail <IIdentityDetails>]: Contains information of the Identity Details for the BI. If it is null, default will be considered as System Assigned. [UseSystemAssignedIdentity <Boolean?>]: Specifies if the BI is protected by System Identity. [UserAssignedIdentityArmUrl <String>]: ARM URL for User Assigned Identity. [ResourceGuardOperationRequest <String[]>]: ResourceGuardOperationRequests on which LAC check will be performed [ValidationType <ValidationType?>]: Specifies the type of validation. In case of DeepValidation, all validations from /validateForBackup API will run again. .Link https://learn.microsoft.com/powershell/module/az.dataprotection/test-azdataprotectionbackupinstanceupdate #> function Test-AzDataProtectionBackupInstanceUpdate { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IOperationJobExtendedInfo])] [CmdletBinding(DefaultParameterSetName='ValidateViaIdentity1', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Validate1', Mandatory)] [Alias('BackupInstanceName')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the backup instance. ${Name}, [Parameter(ParameterSetName='Validate1', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Validate1')] [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='Validate1', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the backup vault. ${VaultName}, [Parameter(ParameterSetName='ValidateViaIdentity1', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='ValidateViaIdentityExpanded1', 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(ParameterSetName='Validate1', Mandatory, ValueFromPipeline)] [Parameter(ParameterSetName='ValidateViaIdentity1', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IValidateForModifyBackupRequest] # Validate for modify backup request # To construct, see NOTES section for PARAMETER properties and create a hash table. ${Parameter}, [Parameter(ParameterSetName='ValidateViaIdentityExpanded1', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IBackupInstance] # Backup Instance # To construct, see NOTES section for BACKUPINSTANCE properties and create a hash table. ${BackupInstance}, [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(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 $mapping = @{ Validate1 = 'Az.DataProtection.private\Test-AzDataProtectionBackupInstanceUpdate_Validate1'; ValidateViaIdentity1 = 'Az.DataProtection.private\Test-AzDataProtectionBackupInstanceUpdate_ValidateViaIdentity1'; ValidateViaIdentityExpanded1 = 'Az.DataProtection.private\Test-AzDataProtectionBackupInstanceUpdate_ValidateViaIdentityExpanded1'; } if (('Validate1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis UnlockDelete call for ResourceGuardProxy, executed before one can delete it .Description UnlockDelete call for ResourceGuardProxy, executed before one can delete it .Example {{ Add code here }} .Example {{ Add code here }} .Outputs System.String .Link https://learn.microsoft.com/powershell/module/az.dataprotection/unlock-azdataprotectiondppresourceguardproxydelete #> function Unlock-AzDataProtectionDppResourceGuardProxyDelete { [OutputType([System.String])] [CmdletBinding(DefaultParameterSetName='UnlockExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [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()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Header')] [System.String] # Parameter deprecate. # Please use SecureToken instead. ${Token}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String[]] # ResourceGuardOperationRequests on which LAC check will be performed ${ResourceGuardOperationRequest}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # . ${ResourceToBeDeleted}, [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 $mapping = @{ UnlockExpanded = 'Az.DataProtection.private\Unlock-AzDataProtectionDppResourceGuardProxyDelete_UnlockExpanded'; } if (('UnlockExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('ResourceGuardProxyName')) { $PSBoundParameters['ResourceGuardProxyName'] = "DppResourceGuardProxy" } if (('UnlockExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } <# .Synopsis Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. .Description Updates a BackupVault resource belonging to a resource group. For example, updating tags for a resource. .Example $tag = @{"Owner"="sarath";"Purpose"="AzureBackupTesting"} Update-AzDataProtectionBackupVault -SubscriptionId "xxx-xxx-xxx" -ResourceGroupName sarath-rg -VaultName sarath-vault -Tag $tag .Example Update-AzDataProtectionBackupVault -ResourceGroupName "rgName" -VaultName "vaultName" -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -AzureMonitorAlertsForAllJobFailure 'Disabled' .Example Update-AzDataProtectionBackupVault -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -CrossSubscriptionRestoreState Disabled -ImmutabilityState Disabled -SoftDeleteRetentionDurationInDay 99 -SoftDeleteState Off .Example $cmkKeyUri = "https://samplekvazbckp.vault.azure.net/keys/testkey/3cd5235ad6ac4c11b40a6f35444bcbe1" Update-AzDataProtectionBackupVault -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -CmkIdentityType SystemAssigned -CmkEncryptionKeyUri $cmkKeyUri .Example $cmkIdentityId = "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/samplerg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/sampleuami" Update-AzDataProtectionBackupVault -SubscriptionId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -ResourceGroupName "resourceGroupName" -VaultName "vaultName" -CmkIdentityType UserAssigned -CmkUserAssignedIdentityId $cmkIdentityId .Example $UAMI = @{"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroupName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/userAssignedIdentityName"=[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api40.UserAssignedIdentity]::new()} $vault = Update-AzDataProtectionBackupVault -AssignUserIdentity $UAMI -SubscriptionId "00000000-0000-0000-0000-000000000000" -VaultName "vaultName" -ResourceGroupName "resourceGroupName" -IdentityType 'SystemAssigned,UserAssigned' .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IBackupVaultResource .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. ENCRYPTIONSETTING <IEncryptionSettings>: Customer Managed Key details of the resource. [CmkIdentity <ICmkKekIdentity>]: The details of the managed identity used for CMK [IdentityId <String>]: The managed identity to be used which has access permissions to the Key Vault. Provide a value here in case identity types: 'UserAssigned' only. [IdentityType <IdentityType?>]: The identity type. 'SystemAssigned' and 'UserAssigned' are mutually exclusive. 'SystemAssigned' will use implicitly created managed identity. [CmkInfrastructureEncryption <InfrastructureEncryptionState?>]: Enabling/Disabling the Double Encryption state [CmkKeyVaultProperty <ICmkKeyVaultProperties>]: The properties of the Key Vault which hosts CMK [KeyUri <String>]: The key uri of the Customer Managed Key [State <EncryptionState?>]: Encryption state of the Backup Vault. .Link https://learn.microsoft.com/powershell/module/az.dataprotection/update-azdataprotectionbackupvault #> function Update-AzDataProtectionBackupVault { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IBackupVaultResource])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [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()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Header')] [System.String] # Parameter deprecate. # Please use SecureToken instead. ${Token}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.AlertsState])] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.AlertsState] # Parameter to Enable or Disable built-in azure monitor alerts for job failures. # Security alerts cannot be disabled. ${AzureMonitorAlertsForAllJobFailure}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.CrossRegionRestoreState])] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.CrossRegionRestoreState] # Cross region restore state of the vault. # Allowed values are Disabled, Enabled. ${CrossRegionRestoreState}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.CrossSubscriptionRestoreState])] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.CrossSubscriptionRestoreState] # Cross subscription restore state of the vault. # Allowed values are Disabled, Enabled, PermanentlyDisabled. ${CrossSubscriptionRestoreState}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IEncryptionSettings] # Customer Managed Key details of the resource. # To construct, see NOTES section for ENCRYPTIONSETTING properties and create a hash table. ${EncryptionSetting}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # The identityType which can be either SystemAssigned, UserAssigned, 'SystemAssigned,UserAssigned' or None ${IdentityType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api40.IDppIdentityDetailsUserAssignedIdentities]))] [System.Collections.Hashtable] # Gets or sets the user assigned identities. ${IdentityUserAssignedIdentity}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.ImmutabilityState])] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.ImmutabilityState] # Immutability state of the vault. # Allowed values are Disabled, Unlocked, Locked. ${ImmutabilityState}, [Parameter()] [AllowEmptyCollection()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String[]] # ResourceGuardOperationRequests on which LAC check will be performed ${ResourceGuardOperationRequest}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Double] # Soft delete retention duration in days. ${SoftDeleteRetentionDurationInDay}, [Parameter()] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.SoftDeleteState])] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.SoftDeleteState] # Soft delete state of the vault. # Allowed values are Off, On, AlwaysOn. ${SoftDeleteState}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202501.IPatchResourceRequestInputTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [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(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 $mapping = @{ UpdateExpanded = 'Az.DataProtection.private\Update-AzDataProtectionBackupVault_UpdateExpanded'; } if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $testPlayback = $false $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } } $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) $scriptCmd = {& $wrappedCmd @PSBoundParameters} $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) $steppablePipeline.Begin($PSCmdlet) } catch { throw } } process { try { $steppablePipeline.Process($_) } catch { throw } } end { try { $steppablePipeline.End() } catch { throw } } } # SIG # Begin signature block # MIIoLQYJKoZIhvcNAQcCoIIoHjCCKBoCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCB2ayh4ntqPf/fv # sGZeHBZwDFmq7sp+iukjYPylVrP4dKC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