exports/ProxyCmdletDefinitions.ps1
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .Synopsis Trigger adhoc backup .Description Trigger adhoc backup .Example PS C:\> $instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName "MyResourceGroup" -VaultName "MyVault" PS C:\> Backup-AzDataProtectionBackupInstanceAdhoc -BackupInstanceName $instance.Name -ResourceGroupName "MyResourceGroup" -SubscriptionId "xxxx-xxx-xxxx" -VaultName "MyVault" -BackupRuleOptionRuleName "BackupWeekly" -TriggerOptionRetentionTagOverride "Default" .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.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 [BackupInstance <String>]: [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>]: [ResourceGroupName <String>]: The name of the resource group where the backup vault is present. [SubscriptionId <String>]: The subscription Id. [VaultName <String>]: The name of the backup vault. .Link https://docs.microsoft.com/powershell/module/az.dataprotection/backup-azdataprotectionbackupinstanceadhoc #> function Backup-AzDataProtectionBackupInstanceAdhoc { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IOperationJobExtendedInfo])] [CmdletBinding(DefaultParameterSetName='BackupExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='BackupExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the backup instance ${BackupInstanceName}, [Parameter(ParameterSetName='BackupExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the resource group where the backup vault is present. ${ResourceGroupName}, [Parameter(ParameterSetName='BackupExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The subscription Id. ${SubscriptionId}, [Parameter(ParameterSetName='BackupExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the backup vault. ${VaultName}, [Parameter(ParameterSetName='BackupViaIdentityExpanded', 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(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # . ${BackupRuleOptionRuleName}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # . ${TriggerOptionRetentionTagOverride}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Azure')] [System.Management.Automation.PSObject] # The credentials, account, tenant, and subscription used for communication with Azure. ${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 = @{ BackupExpanded = 'Az.DataProtection.private\Backup-AzDataProtectionBackupInstanceAdhoc_BackupExpanded'; BackupViaIdentityExpanded = 'Az.DataProtection.private\Backup-AzDataProtectionBackupInstanceAdhoc_BackupViaIdentityExpanded'; } if (('BackupExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $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 } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .Synopsis .Description .Example PS C:\> $startTime = (Get-Date).AddDays(-30).ToString("yyyy-MM-ddTHH:mm:ss.0000000Z") PS C:\> $endTime = (Get-Date).AddDays(0).ToString("yyyy-MM-ddTHH:mm:ss.0000000Z") PS C:\> $instances = Search-AzDataProtectionBackupInstanceInAzGraph -Subscription "subscriptionId" -DatasourceType AzureBlob -ResourceGroup "rgName" -Vault "vaultName" PS C:\> $pointInTimeRange = Find-AzDataProtectionRestorableTimeRange -BackupInstanceName $instances[0].BackupInstanceName -ResourceGroupName "rgName" -SubscriptionId "subscriptionId" -VaultName "vaultName" -SourceDataStoreType OperationalStore -StartTime $startTime -EndTime $endTime PS C:\> $pointInTimeRange.RestorableTimeRange | fl EndTime : 2021-04-24T08:57:36.4149422Z ObjectType : RestorableTimeRange StartTime : 2021-03-25T14:27:31.0000000Z .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IAzureBackupFindRestorableTimeRangesResponseResource .Link https://docs.microsoft.com/powershell/module/az.dataprotection/find-azdataprotectionrestorabletimerange #> function Find-AzDataProtectionRestorableTimeRange { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IAzureBackupFindRestorableTimeRangesResponseResource])] [CmdletBinding(DefaultParameterSetName='PostExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # . ${BackupInstanceName}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the resource group where the backup vault is present. ${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 subscription Id. ${SubscriptionId}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # End time for the List Restore Ranges request ${EndTime}, [Parameter(Mandatory)] [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.RestoreSourceDataStoreType])] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.RestoreSourceDataStoreType] # Gets or sets the type of the source data store. ${SourceDataStoreType}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # Start time for the List Restore Ranges request ${StartTime}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Azure')] [System.Management.Automation.PSObject] # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ PostExpanded = 'Az.DataProtection.private\Find-AzDataProtectionRestorableTimeRange_PostExpanded'; } if (('PostExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $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 } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .Synopsis Gets a backup instance with name in a backup vault .Description Gets a backup instance with name in a backup vault .Example PS C:\> Get-AzDataProtectionBackupInstance -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName "MyResourceGroup" -VaultName "MyVault" Name Type BackupInstanceName ---- ---- ------------------ sarathdisk-sarathdisk-3df6ac08-9496-4839-8fb5-8b78e594f166 Microsoft.DataProtection/backupVaults/backupInstances sarathdisk-sarathdisk-3df6ac08-9496-4839-8fb5-8b78e594f� sarathdisk2-sarathdisk2-74b127dc-7bf0-48ef-bcef-dab186cc6f10 Microsoft.DataProtection/backupVaults/backupInstances sarathdisk2-sarathdisk2-74b127dc-7bf0-48ef-bcef-dab186c� .Example PS C:\> Get-AzDataProtectionBackupInstance -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName "MyResourceGroup" -VaultName "MyVault" -Name "BackupInstanceName" Name Type BackupInstanceName ---- ---- ------------------ sarathdisk-sarathdisk-3df6ac08-9496-4839-8fb5-8b78e594f166 Microsoft.DataProtection/backupVaults/backupInstances sarathdisk-sarathdisk-3df6ac08-9496-4839-8fb5-8b78e594f166 .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.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. INPUTOBJECT <IDataProtectionIdentity>: Identity Parameter [BackupInstance <String>]: [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>]: [ResourceGroupName <String>]: The name of the resource group where the backup vault is present. [SubscriptionId <String>]: The subscription Id. [VaultName <String>]: The name of the backup vault. .Link https://docs.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionbackupinstance #> function Get-AzDataProtectionBackupInstance { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IBackupInstanceResource])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Alias('BackupInstanceName')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the backup instance ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the resource group where the backup vault is present. ${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 subscription Id. ${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 credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'Az.DataProtection.private\Get-AzDataProtectionBackupInstance_Get'; GetViaIdentity = 'Az.DataProtection.private\Get-AzDataProtectionBackupInstance_GetViaIdentity'; List = 'Az.DataProtection.private\Get-AzDataProtectionBackupInstance_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $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 } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .Synopsis Gets a backup policy belonging to a backup vault .Description Gets a backup policy belonging to a backup vault .Example PS C:\> Get-AzDataProtectionBackupPolicy -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName "MyResourceGroup" -VaultName "MyVault" Name Type ---- ---- DiskPolicy1 Microsoft.DataProtection/backupVaults/backupPolicies DiskDailyPolicy Microsoft.DataProtection/backupVaults/backupPolicies .Example PS C:\> Get-AzDataProtectionBackupPolicy -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName "MyResourceGroup" -VaultName "MyVault" -Name "MyPolicy" Name Type ---- ---- MyPolicy Microsoft.DataProtection/backupVaults/backupPolicies .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.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. INPUTOBJECT <IDataProtectionIdentity>: Identity Parameter [BackupInstance <String>]: [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>]: [ResourceGroupName <String>]: The name of the resource group where the backup vault is present. [SubscriptionId <String>]: The subscription Id. [VaultName <String>]: The name of the backup vault. .Link https://docs.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionbackuppolicy #> function Get-AzDataProtectionBackupPolicy { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IBaseBackupPolicyResource])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Alias('BackupPolicyName')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # . ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the resource group where the backup vault is present. ${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 subscription Id. ${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 credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'Az.DataProtection.private\Get-AzDataProtectionBackupPolicy_Get'; GetViaIdentity = 'Az.DataProtection.private\Get-AzDataProtectionBackupPolicy_GetViaIdentity'; List = 'Az.DataProtection.private\Get-AzDataProtectionBackupPolicy_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $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 } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .Synopsis Returns a resource belonging to a resource group. .Description Returns a resource belonging to a resource group. .Example PS C:\> Get-AzDataProtectionBackupVault ETag IdentityPrincipalId IdentityTenantId IdentityType Location Name Type ---- ------------------- ---------------- ------------ -------- ---- ---- 2a21f108-07bc-4c22-a221-f26c9de554ba 72f988bf-86f1-41af-91ab-2d7cd011db47 SystemAssigned westus adigupt-backupcenter-ga-Vault Microsoft.DataProtection/backupV� 34237b3f-8f2c-4ae7-bbff-2896491976fb 72f988bf-86f1-41af-91ab-2d7cd011db47 SystemAssigned westcentralus BC-Usability-Vault-WCUS Microsoft.DataProtection/backupV� 41155247-420f-4052-a894-84814f0b983c 72f988bf-86f1-41af-91ab-2d7cd011db47 SystemAssigned centraluseuap NilayBackupVault Microsoft.DataProtection/backupV� 26da260b-e232-419c-8586-9157e4f6260e 72f988bf-86f1-41af-91ab-2d7cd011db47 SystemAssigned centraluseuap dpprunnervaultus Microsoft.DataProtection/backupV� .Example PS C:\> Get-AzDataProtectionBackupVault -SubscriptionId "xxxx-xxx-xxxx" -ResourceGroupName sarath-rg ETag IdentityPrincipalId IdentityTenantId IdentityType Location Name Type ---- ------------------- ---------------- ------------ -------- ---- ---- 05400379-2551-4dc9-86e0-cf59ab05405a 72f988bf-86f1-41af-91ab-2d7cd011db47 SystemAssigned centraluseuap sarath-dppvault Microsoft.DataProtection/backupVaults 2ca1d5f7-38b3-4b61-aa45-8147d7e0edbc 72f988bf-86f1-41af-91ab-2d7cd011db47 SystemAssigned centraluseuap sarath-vault Microsoft.DataProtection/backupVaults .Example PS C:\> Get-AzDataProtectionBackupVault -SubscriptionId "xxxx-xxx-xxxx" -ResourceGroupName sarath-rg -VaultName sarath-vault ETag IdentityPrincipalId IdentityTenantId IdentityType Location Name Type ---- ------------------- ---------------- ------------ -------- ---- ---- 2ca1d5f7-38b3-4b61-aa45-8147d7e0edbc 72f988bf-86f1-41af-91ab-2d7cd011db47 SystemAssigned centraluseuap sarath-vault Microsoft.DataProtection/backupVaults .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IBackupVaultResource .Outputs System.Management.Automation.PSObject .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 [BackupInstance <String>]: [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>]: [ResourceGroupName <String>]: The name of the resource group where the backup vault is present. [SubscriptionId <String>]: The subscription Id. [VaultName <String>]: The name of the backup vault. .Link https://docs.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionbackupvault #> function Get-AzDataProtectionBackupVault { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IBackupVaultResource], [PSObject])] [CmdletBinding(DefaultParameterSetName='list', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='list')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the resource group where the backup vault is present. ${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 subscription Id. ${SubscriptionId}, [Parameter(ParameterSetName='Get', 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('Body')] [System.Management.Automation.PSObject] # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [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-AzDataProtectionBackupVault_Get'; GetViaIdentity = 'Az.DataProtection.private\Get-AzDataProtectionBackupVault_GetViaIdentity'; list = 'Az.DataProtection.custom\Get-AzDataProtectionBackupVault_list'; } if (('Get', 'list') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $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 } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .Synopsis Gets a job with id in a backup vault .Description Gets a job with id in a backup vault .Example PS C:\> Get-AzDataProtectionjob -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName sarath-rg -VaultName sarath-vault Name Type ---- ---- a6a4879d-f914-4174-b129-0e27da8a4fb0 Microsoft.DataProtection/backupVaults/backupJobs 1a402664-a245-4a9d-8bb5-a6bafbb40d26 Microsoft.DataProtection/backupVaults/backupJobs 672564f7-1f91-46e2-a0ca-4fb1dc977a1c Microsoft.DataProtection/backupVaults/backupJobs 1653a7b4-8ce4-457e-8084-dc1c9d9e4106 Microsoft.DataProtection/backupVaults/backupJobs 9f21c438-ca0d-45c1-88fe-79f08a8342c7 Microsoft.DataProtection/backupVaults/backupJobs 736bab4d-480f-49f8-92ea-57c5ff203c33 Microsoft.DataProtection/backupVaults/backupJobs .Example PS C:\> Get-AzDataProtectionjob -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName sarath-rg -VaultName sarath-vault -Id 4abaea8c-f53a-4bb1-9963-59f96b597165 Name Type ---- ---- 4abaea8c-f53a-4bb1-9963-59f96b597165 Microsoft.DataProtection/backupVaults/backupJobs .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.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 [BackupInstance <String>]: [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>]: [ResourceGroupName <String>]: The name of the resource group where the backup vault is present. [SubscriptionId <String>]: The subscription Id. [VaultName <String>]: The name of the backup vault. .Link https://docs.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionjob #> function Get-AzDataProtectionJob { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.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 where the backup vault is present. ${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 subscription Id. ${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 credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials} ) 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')) { $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 } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .Synopsis Gets a Recovery Point using recoveryPointId for a Datasource. .Description Gets a Recovery Point using recoveryPointId for a Datasource. .Example PS C:\> $instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName sarath-rg -VaultName sarath-vault PS C:\> Get-AzDataProtectionRecoveryPoint -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName sarath-rg -VaultName sarath-vault -BackupInstanceName $instance[2].Name Name Type ---- ---- aded40a562134f97b732f30d0b486fef Microsoft.DataProtection/backupVaults/backupInstances/recoveryPoints f458438d5ebb4098adbf67e9655cb624 Microsoft.DataProtection/backupVaults/backupInstances/recoveryPoints 515ba70e49d34b2bbff033dcc08593fe Microsoft.DataProtection/backupVaults/backupInstances/recoveryPoints e61293fdd1064fbdb4f42b7f5927a927 Microsoft.DataProtection/backupVaults/backupInstances/recoveryPoints aecc362b85484f4eb905bb05ef445e3e Microsoft.DataProtection/backupVaults/backupInstances/recoveryPoints dc814d61a9624c36a1f9d635bc0b80f0 Microsoft.DataProtection/backupVaults/backupInstances/recoveryPoints .Example PS C:\> $instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName sarath-rg -VaultName sarath-vault PS C:\> Get-AzDataProtectionRecoveryPoint -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName sarath-rg -VaultName sarath-vault -BackupInstanceName $instance[2].Name -Id 892e5c5014dc4a96807d22924f5745c9 Name Type ---- ---- 892e5c5014dc4a96807d22924f5745c9 Microsoft.DataProtection/backupVaults/backupInstances/recoveryPoints .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IAzureBackupRecoveryPointResource .Outputs System.Management.Automation.PSObject .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 [BackupInstance <String>]: [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>]: [ResourceGroupName <String>]: The name of the resource group where the backup vault is present. [SubscriptionId <String>]: The subscription Id. [VaultName <String>]: The name of the backup vault. .Link https://docs.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionrecoverypoint #> function Get-AzDataProtectionRecoveryPoint { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IAzureBackupRecoveryPointResource], [PSObject])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the backup instance ${BackupInstanceName}, [Parameter(ParameterSetName='Get', Mandatory)] [Alias('RecoveryPointId')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # . ${Id}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the resource group where the backup vault is present. ${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 subscription Id. ${SubscriptionId}, [Parameter(ParameterSetName='Get', Mandatory)] [Parameter(ParameterSetName='List')] [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('Body')] [System.Management.Automation.PSObject] # The credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Uri] # The URI for the proxy server to use ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.PSCredential] # Credentials for a proxy server to use for the remote call ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.SwitchParameter] # Use the default credentials for the proxy ${ProxyUseDefaultCredentials}, [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.DateTime] # Start Time filter for recovery points ${StartTime}, [Parameter(ParameterSetName='List')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.DateTime] # End Time filter for recovery points ${EndTime} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ Get = 'Az.DataProtection.private\Get-AzDataProtectionRecoveryPoint_Get'; GetViaIdentity = 'Az.DataProtection.private\Get-AzDataProtectionRecoveryPoint_GetViaIdentity'; List = 'Az.DataProtection.custom\Get-AzDataProtectionRecoveryPoint_List'; } if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $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 } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .Synopsis Delete a backupInstances .Description Delete a backupInstances .Example PS C:\> $instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName "MyResourceGroup" -VaultName "MyVault" PS C:\> Remove-AzDataProtectionBackupInstance -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName "MyResourceGroup" -VaultName "MyVault" -Name $instance[0].name .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 [BackupInstance <String>]: [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>]: [ResourceGroupName <String>]: The name of the resource group where the backup vault is present. [SubscriptionId <String>]: The subscription Id. [VaultName <String>]: The name of the backup vault. .Link https://docs.microsoft.com/powershell/module/az.dataprotection/remove-azdataprotectionbackupinstance #> function Remove-AzDataProtectionBackupInstance { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Alias('BackupInstanceName')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the backup instance ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the resource group where the backup vault is present. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The subscription Id. ${SubscriptionId}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the backup vault. ${VaultName}, [Parameter(ParameterSetName='DeleteViaIdentity', 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 credentials, account, tenant, and subscription used for communication with Azure. ${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 = @{ Delete = 'Az.DataProtection.private\Remove-AzDataProtectionBackupInstance_Delete'; DeleteViaIdentity = 'Az.DataProtection.private\Remove-AzDataProtectionBackupInstance_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $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 } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .Synopsis Deletes a backup policy belonging to a backup vault .Description Deletes a backup policy belonging to a backup vault .Example PS C:\> $policy = Get-AzDataProtectionBackupPolicy -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName "MyResourceGroup" -VaultName "MyVault" PS C:\> Remove-AzDataProtectionBackupPolicy -Name $policy[0].name -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName "MyResourceGroup" -VaultName "MyVault" .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 [BackupInstance <String>]: [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>]: [ResourceGroupName <String>]: The name of the resource group where the backup vault is present. [SubscriptionId <String>]: The subscription Id. [VaultName <String>]: The name of the backup vault. .Link https://docs.microsoft.com/powershell/module/az.dataprotection/remove-azdataprotectionbackuppolicy #> function Remove-AzDataProtectionBackupPolicy { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Alias('BackupPolicyName')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # . ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the resource group where the backup vault is present. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The subscription Id. ${SubscriptionId}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the backup vault. ${VaultName}, [Parameter(ParameterSetName='DeleteViaIdentity', 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 credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [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 = @{ Delete = 'Az.DataProtection.private\Remove-AzDataProtectionBackupPolicy_Delete'; DeleteViaIdentity = 'Az.DataProtection.private\Remove-AzDataProtectionBackupPolicy_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $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 } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .Synopsis Deletes a BackupVault resource from the resource group. .Description Deletes a BackupVault resource from the resource group. .Example PS C:\> Remove-AzDataProtectionBackupVault -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName "MyResourceGroup" -VaultName "MyVault" .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 [BackupInstance <String>]: [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>]: [ResourceGroupName <String>]: The name of the resource group where the backup vault is present. [SubscriptionId <String>]: The subscription Id. [VaultName <String>]: The name of the backup vault. .Link https://docs.microsoft.com/powershell/module/az.dataprotection/remove-azdataprotectionbackupvault #> function Remove-AzDataProtectionBackupVault { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the resource group where the backup vault is present. ${ResourceGroupName}, [Parameter(ParameterSetName='Delete')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The subscription Id. ${SubscriptionId}, [Parameter(ParameterSetName='Delete', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the backup vault. ${VaultName}, [Parameter(ParameterSetName='DeleteViaIdentity', 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 credentials, account, tenant, and subscription used for communication with Azure. ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [System.Management.Automation.SwitchParameter] # Wait for .NET debugger to attach ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be appended to the front of the pipeline ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Runtime')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]] # SendAsync Pipeline Steps to be prepended to the front of the pipeline ${HttpPipelinePrepend}, [Parameter()] [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 = @{ Delete = 'Az.DataProtection.private\Remove-AzDataProtectionBackupVault_Delete'; DeleteViaIdentity = 'Az.DataProtection.private\Remove-AzDataProtectionBackupVault_DeleteViaIdentity'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $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 } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .Synopsis Triggers restore for a BackupInstance .Description Triggers restore for a BackupInstance .Example PS C:\> $instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName "sarath-rg" -VaultName "sarath-vault" PS C:\> $rp = Get-AzDataProtectionRecoveryPoint -SubscriptionId "xxx-xxx-xxx" -ResourceGroupName "sarath-rg" -VaultName "sarath-vault" -BackupInstanceName $instance.Name PS C:\> $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 PS C:\> Start-AzDataProtectionBackupInstanceRestore -BackupInstanceName $instance.BackupInstanceName -ResourceGroupName sarath-rg -VaultName sarath-vault -SubscriptionId "xxx-xxx-xxx" -Parameter $restorerequest .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IAzureBackupRestoreRequest .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.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>: RestoreTargetInfoObjectType <String>: Type of Datasource object, used to initialize the right inherited type SourceDataStoreType <SourceDataStoreType>: Gets or sets the type of the source data store. [RestoreTargetInfoRestoreLocation <String>]: Target Restore region .Link https://docs.microsoft.com/powershell/module/az.dataprotection/start-azdataprotectionbackupinstancerestore #> function Start-AzDataProtectionBackupInstanceRestore { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IOperationJobExtendedInfo])] [CmdletBinding(DefaultParameterSetName='TriggerExpanded', 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 where the backup vault is present. ${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 subscription Id. ${SubscriptionId}, [Parameter(ParameterSetName='Trigger', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.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')] [System.String] # Type of Datasource object, used to initialize the right inherited type ${RestoreTargetInfoObjectType}, [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.String] # Target Restore region ${RestoreTargetInfoRestoreLocation}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Azure')] [System.Management.Automation.PSObject] # The credentials, account, tenant, and subscription used for communication with Azure. ${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')) { $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 } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .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 PS C:\> $tag = @{"Owner"="sarath";"Purpose"="AzureBackupTesting"} PS C:\> Update-AzDataProtectionBackupVault -SubscriptionId "xxx-xxx-xxx" -ResourceGroupName sarath-rg -VaultName sarath-vault -Tag $tag ETag IdentityPrincipalId IdentityTenantId IdentityType Location Name Type ---- ------------------- ---------------- ------------ -------- ---- ---- 2ca1d5f7-38b3-4b61-aa45-8147d7e0edbc 72f988bf-86f1-41af-91ab-2d7cd011db47 SystemAssigned centraluseuap sarath-vault Microsoft.DataProtection/backupVaults .Inputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.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 [BackupInstance <String>]: [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>]: [ResourceGroupName <String>]: The name of the resource group where the backup vault is present. [SubscriptionId <String>]: The subscription Id. [VaultName <String>]: The name of the backup vault. .Link https://docs.microsoft.com/powershell/module/az.dataprotection/update-azdataprotectionbackupvault #> function Update-AzDataProtectionBackupVault { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IBackupVaultResource])] [CmdletBinding(DefaultParameterSetName='PatchExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='PatchExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the resource group where the backup vault is present. ${ResourceGroupName}, [Parameter(ParameterSetName='PatchExpanded')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] # The subscription Id. ${SubscriptionId}, [Parameter(ParameterSetName='PatchExpanded', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Path')] [System.String] # The name of the backup vault. ${VaultName}, [Parameter(ParameterSetName='PatchViaIdentityExpanded', 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('Body')] [System.String] # The identityType which can be either SystemAssigned 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.Api202101.IPatchResourceRequestInputTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Azure')] [System.Management.Automation.PSObject] # The credentials, account, tenant, and subscription used for communication with Azure. ${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 = @{ PatchExpanded = 'Az.DataProtection.private\Update-AzDataProtectionBackupVault_PatchExpanded'; PatchViaIdentityExpanded = 'Az.DataProtection.private\Update-AzDataProtectionBackupVault_PatchViaIdentityExpanded'; } if (('PatchExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $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 } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .Synopsis Adds or removes Retention Rule to existing Policy .Description Adds or removes Retention Rule to existing Policy .Example PS C:\> $pol = Get-AzDataProtectionPolicyTemplate PS C:\> $lifecycle = New-AzDataProtectionRetentionLifeCycleClientObject -SourceDataStore OperationalStore -SourceRetentionDurationType Weeks -SourceRetentionDurationCount 5 PS C:\> Edit-AzDataProtectionPolicyRetentionRuleClientObject -Policy $pol -Name Weekly -LifeCycles $lifecycle -IsDefault $false DatasourceType ObjectType -------------- ---------- {Microsoft.Compute/disks} BackupPolicy .Example PS C:\> Edit-AzDataProtectionPolicyRetentionRuleClientObject -Policy $pol -Name Weekly -RemoveRule DatasourceType ObjectType -------------- ---------- {Microsoft.Compute/disks} BackupPolicy .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IBackupPolicy .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. LIFECYCLES <ISourceLifeCycle[]>: Life cycles associated with the retention rule. DeleteAfterDuration <String>: Duration of deletion after given timespan DeleteAfterObjectType <String>: Type of the specific object - used for deserializing SourceDataStoreObjectType <String>: Type of Datasource object, used to initialize the right inherited type SourceDataStoreType <DataStoreTypes>: type of datastore; Operational/Vault/Archive [TargetDataStoreCopySetting <ITargetCopySetting[]>]: CopyAfterObjectType <String>: Type of the specific object - used for deserializing DataStoreObjectType <String>: Type of Datasource object, used to initialize the right inherited type DataStoreType <DataStoreTypes>: type of datastore; Operational/Vault/Archive POLICY <IBackupPolicy>: Backup Policy Object DatasourceType <String[]>: Type of datasource for the backup management ObjectType <String>: PolicyRule <IBasePolicyRule[]>: Policy rule dictionary that contains rules for each backuptype i.e Full/Incremental/Logs etc Name <String>: ObjectType <String>: DataStoreObjectType <String>: Type of Datasource object, used to initialize the right inherited type DataStoreType <DataStoreTypes>: type of datastore; Operational/Vault/Archive TriggerObjectType <String>: Type of the specific object - used for deserializing Lifecycle <ISourceLifeCycle[]>: DeleteAfterDuration <String>: Duration of deletion after given timespan DeleteAfterObjectType <String>: Type of the specific object - used for deserializing SourceDataStoreObjectType <String>: Type of Datasource object, used to initialize the right inherited type SourceDataStoreType <DataStoreTypes>: type of datastore; Operational/Vault/Archive [TargetDataStoreCopySetting <ITargetCopySetting[]>]: CopyAfterObjectType <String>: Type of the specific object - used for deserializing DataStoreObjectType <String>: Type of Datasource object, used to initialize the right inherited type DataStoreType <DataStoreTypes>: type of datastore; Operational/Vault/Archive [BackupParameterObjectType <String>]: Type of the specific object - used for deserializing [IsDefault <Boolean?>]: .Link https://docs.microsoft.com/powershell/module/az.dataprotection/edit-azdataprotectionpolicyretentionruleclientobject #> function Edit-AzDataProtectionPolicyRetentionRuleClientObject { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IBackupPolicy])] [CmdletBinding(DefaultParameterSetName='RemoveRetention', PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IBackupPolicy] # Backup Policy Object # To construct, see NOTES section for POLICY properties and create a hash table. ${Policy}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.RetentionRuleName] # Retention Rule Name ${Name}, [Parameter(ParameterSetName='RemoveRetention', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.SwitchParameter] # Specifies whether to remove the retention rule. ${RemoveRule}, [Parameter(ParameterSetName='AddRetention', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Boolean] # Specifies if retention rule is default retention rule. ${IsDefault}, [Parameter(ParameterSetName='AddRetention', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.ISourceLifeCycle[]] # Life cycles associated with the retention rule. # To construct, see NOTES section for LIFECYCLES properties and create a hash table. ${LifeCycles} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ RemoveRetention = 'Az.DataProtection.custom\Edit-AzDataProtectionPolicyRetentionRuleClientObject'; AddRetention = 'Az.DataProtection.custom\Edit-AzDataProtectionPolicyRetentionRuleClientObject'; } $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 } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .Synopsis Adds or removes schedule tag in an existing backup policy. .Description Adds or removes schedule tag in an existing backup policy. .Example PS C:\> $criteria = New-AzDataProtectionPolicyTagCriteriaClientObject -AbsoluteCriteria FirstOfWeek PS C:\> Edit-AzDataProtectionPolicyTagClientObject -Policy $pol -Name Weekly -Criteria $criteria DatasourceType ObjectType -------------- ---------- {Microsoft.Compute/disks} BackupPolicy .Example PS C:\> Edit-AzDataProtectionPolicyTagClientObject -Policy $pol -Name Weekly -RemoveRule DatasourceType ObjectType -------------- ---------- {Microsoft.Compute/disks} BackupPolicy .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IBackupPolicy .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. CRITERIA <IScheduleBasedBackupCriteria[]>: Criterias to be associated with the schedule tag. ObjectType <String>: Type of the specific object - used for deserializing [AbsoluteCriterion <AbsoluteMarker[]>]: it contains absolute values like "AllBackup" / "FirstOfDay" / "FirstOfWeek" / "FirstOfMonth" and should be part of AbsoluteMarker enum [DaysOfMonth <IDay[]>]: This is day of the month from 1 to 28 other wise last of month [Date <Int32?>]: Date of the month [IsLast <Boolean?>]: Whether Date is last date of month [DaysOfTheWeek <DayOfWeek[]>]: It should be Sunday/Monday/T..../Saturday [MonthsOfYear <Month[]>]: It should be January/February/....../December [ScheduleTime <DateTime[]>]: List of schedule times for backup [WeeksOfTheMonth <WeekNumber[]>]: It should be First/Second/Third/Fourth/Last POLICY <IBackupPolicy>: Backup Policy Object. DatasourceType <String[]>: Type of datasource for the backup management ObjectType <String>: PolicyRule <IBasePolicyRule[]>: Policy rule dictionary that contains rules for each backuptype i.e Full/Incremental/Logs etc Name <String>: ObjectType <String>: DataStoreObjectType <String>: Type of Datasource object, used to initialize the right inherited type DataStoreType <DataStoreTypes>: type of datastore; Operational/Vault/Archive TriggerObjectType <String>: Type of the specific object - used for deserializing Lifecycle <ISourceLifeCycle[]>: DeleteAfterDuration <String>: Duration of deletion after given timespan DeleteAfterObjectType <String>: Type of the specific object - used for deserializing SourceDataStoreObjectType <String>: Type of Datasource object, used to initialize the right inherited type SourceDataStoreType <DataStoreTypes>: type of datastore; Operational/Vault/Archive [TargetDataStoreCopySetting <ITargetCopySetting[]>]: CopyAfterObjectType <String>: Type of the specific object - used for deserializing DataStoreObjectType <String>: Type of Datasource object, used to initialize the right inherited type DataStoreType <DataStoreTypes>: type of datastore; Operational/Vault/Archive [BackupParameterObjectType <String>]: Type of the specific object - used for deserializing [IsDefault <Boolean?>]: .Link https://docs.microsoft.com/powershell/module/az.dataprotection/edit-azdataprotectionpolicytagclientobject #> function Edit-AzDataProtectionPolicyTagClientObject { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IBackupPolicy])] [CmdletBinding(DefaultParameterSetName='RemoveTag', PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IBackupPolicy] # Backup Policy Object. # To construct, see NOTES section for POLICY properties and create a hash table. ${Policy}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.TagName] # Name of the Schedule tag. ${Name}, [Parameter(ParameterSetName='RemoveTag', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.SwitchParameter] # Specify whether to remove the tag from the given policy object. ${RemoveRule}, [Parameter(ParameterSetName='updateTag', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IScheduleBasedBackupCriteria[]] # Criterias to be associated with the schedule tag. # To construct, see NOTES section for CRITERIA properties and create a hash table. ${Criteria} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ RemoveTag = 'Az.DataProtection.custom\Edit-AzDataProtectionPolicyTagClientObject'; updateTag = 'Az.DataProtection.custom\Edit-AzDataProtectionPolicyTagClientObject'; } $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 } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .Synopsis Updates Backup schedule of an existing backup policy. .Description Updates Backup schedule of an existing backup policy. .Example PS C:\> $schedule = New-AzDataProtectionPolicyTriggerScheduleClientObject -ScheduleDays (get-date) -IntervalType Daily -IntervalCount 1 PS C:\> Edit-AzDataProtectionPolicyTriggerClientObject -Policy $pol -Schedule $schedule DatasourceType ObjectType -------------- ---------- {Microsoft.Compute/disks} BackupPolicy .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IBackupPolicy .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. POLICY <IBackupPolicy>: Backup Policy object. DatasourceType <String[]>: Type of datasource for the backup management ObjectType <String>: PolicyRule <IBasePolicyRule[]>: Policy rule dictionary that contains rules for each backuptype i.e Full/Incremental/Logs etc Name <String>: ObjectType <String>: DataStoreObjectType <String>: Type of Datasource object, used to initialize the right inherited type DataStoreType <DataStoreTypes>: type of datastore; Operational/Vault/Archive TriggerObjectType <String>: Type of the specific object - used for deserializing Lifecycle <ISourceLifeCycle[]>: DeleteAfterDuration <String>: Duration of deletion after given timespan DeleteAfterObjectType <String>: Type of the specific object - used for deserializing SourceDataStoreObjectType <String>: Type of Datasource object, used to initialize the right inherited type SourceDataStoreType <DataStoreTypes>: type of datastore; Operational/Vault/Archive [TargetDataStoreCopySetting <ITargetCopySetting[]>]: CopyAfterObjectType <String>: Type of the specific object - used for deserializing DataStoreObjectType <String>: Type of Datasource object, used to initialize the right inherited type DataStoreType <DataStoreTypes>: type of datastore; Operational/Vault/Archive [BackupParameterObjectType <String>]: Type of the specific object - used for deserializing [IsDefault <Boolean?>]: .Link https://docs.microsoft.com/powershell/module/az.dataprotection/edit-azdataprotectionpolicytriggerclientobject #> function Edit-AzDataProtectionPolicyTriggerClientObject { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IBackupPolicy])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IBackupPolicy] # Backup Policy object. # To construct, see NOTES section for POLICY properties and create a hash table. ${Policy}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String[]] # Schedule to be associated to backup policy. ${Schedule} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ __AllParameterSets = 'Az.DataProtection.custom\Edit-AzDataProtectionPolicyTriggerClientObject'; } $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 } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .Synopsis Gets default policy template for a selected datasource type. .Description Gets default policy template for a selected datasource type. .Example PS C:\> Get-AzDataProtectionPolicyTemplate -DatasourceType AzureDisk DatasourceType ObjectType -------------- ---------- {Microsoft.Compute/disks} BackupPolicy .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IBackupPolicy .Link https://docs.microsoft.com/powershell/module/az.dataprotection/get-azdataprotectionpolicytemplate #> function Get-AzDataProtectionPolicyTemplate { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IBackupPolicy])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.DatasourceTypes] # Datasource Type ${DatasourceType} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ __AllParameterSets = 'Az.DataProtection.custom\Get-AzDataProtectionPolicyTemplate'; } $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 } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .Synopsis Initializes Backup instance Request object for configuring backup .Description Initializes Backup instance Request object for configuring backup .Example PS C:\> $policy = Get-AzDataProtectionBackupPolicy -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName sarath-rg -VaultName sarath-vault PS C:\> $AzureDiskId = "/subscriptions/{subscription}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/disks/{diskname}" PS C:\> $instance = Initialize-AzDataProtectionBackupInstance -DatasourceType AzureDisk -DatasourceLocation westus -DatasourceId $AzureDiskId -PolicyId $policy[0].Id PS C:\> $instance.Property.PolicyInfo.PolicyParameter.DataStoreParametersList[0].ResourceGroupId = "/subscriptions/{subscription}/resourceGroups/{snapshotResourceGroup}" PS C:\> $instance Name Type BackupInstanceName ---- ---- ------------------ sarath-disk3-sarath-disk3-af697a80-e2bc-49f1-af6c-22f6c4d68405 .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IBackupInstanceResource .Link https://docs.microsoft.com/powershell/module/az.dataprotection/initialize-azdataprotectionbackupinstance #> function Initialize-AzDataProtectionBackupInstance { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IBackupInstanceResource])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.DatasourceTypes] # Datasource Type ${DatasourceType}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # Location of the Datasource to be protected. ${DatasourceLocation}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # Policy Id to be assiciated to Datasource ${PolicyId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # ID of the datasource to be protected ${DatasourceId} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ __AllParameterSets = 'Az.DataProtection.custom\Initialize-AzDataProtectionBackupInstance'; } $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 } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .Synopsis Initializes Restore Request object for triggering restore on a protected backup instance. .Description Initializes Restore Request object for triggering restore on a protected backup instance. .Example PS C:\> $instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName "sarath-rg" -VaultName "sarath-vault" PS C:\> $rp = Get-AzDataProtectionRecoveryPoint -SubscriptionId "xxx-xxx-xxx" -ResourceGroupName "sarath-rg" -VaultName "sarath-vault" -BackupInstanceName $instance.Name PS C:\> $restoreRequest = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureDisk -SourceDataStore OperationalStore -RestoreLocation "westus" -RestoreType AlternateLocation -TargetResourceId "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/disks/{DiskName}" -RecoveryPoint "892e5c5014dc4a96807d22924f5745c9" PS C:\> $restoreRequest ObjectType RestoreTargetInfoObjectType RestoreTargetInfoRecoveryOption RestoreTargetInfoRestoreLocation SourceDataStoreType RecoveryPointI d ---------- --------------------------- ------------------------------- -------------------------------- ------------------- -------------- AzureBackupRecoveryPointBasedRestoreRequest RestoreTargetInfo FailIfExists westus OperationalStore 892e5c5014dc4a96807d22924f5745c9 .Example PS C:\> $startTime = (Get-Date).AddDays(-30).ToString("yyyy-MM-ddTHH:mm:ss.0000000Z") PS C:\> $endTime = (Get-Date).AddDays(0).ToString("yyyy-MM-ddTHH:mm:ss.0000000Z") PS C:\> $instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName "rgName" -VaultName "vaultName" PS C:\> $pointInTimeRange = Find-AzDataProtectionRestorableTimeRange -BackupInstanceName $instance[0].BackupInstanceName -ResourceGroupName "rgName" -SubscriptionId "subscriptionId" -VaultName "vaultName" -SourceDataStoreType OperationalStore -StartTime $startTime -EndTime $endTime PS C:\> $restoreRequest = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureBlob -SourceDataStore OperationalStore -RestoreLocation $vault.Location -RestoreType OriginalLocation -BackupInstance $instance[0] -PointInTime (Get-Date -Date $pointInTimeRange.RestorableTimeRange.EndTime) PS C:\> $restoreRequest ObjectType RestoreTargetInfoObjectType RestoreTargetInfoRecoveryOption RestoreTargetInfoRestoreLocation SourceDataStoreType RecoveryPointTime ---------- --------------------------- ------------------------------- -------------------------------- ------------------- ----------------- AzureBackupRecoveryTimeBasedRestoreRequest restoreTargetInfo FailIfExists eastus2euap OperationalStore 2021-04-24T13:32:41.7018481Z .Example PS C:\> $startTime = (Get-Date).AddDays(-30).ToString("yyyy-MM-ddTHH:mm:ss.0000000Z") PS C:\> $endTime = (Get-Date).AddDays(0).ToString("yyyy-MM-ddTHH:mm:ss.0000000Z") PS C:\> $instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName "rgName" -VaultName "vaultName" PS C:\> $pointInTimeRange = Find-AzDataProtectionRestorableTimeRange -BackupInstanceName $instance[0].BackupInstanceName -ResourceGroupName "rgName" -SubscriptionId "subscriptionId" -VaultName "vaultName" -SourceDataStoreType OperationalStore -StartTime $startTime -EndTime $endTime PS C:\> $restoreRequest = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureBlob -SourceDataStore OperationalStore -RestoreLocation $vault.Location -RestoreType OriginalLocation -BackupInstance $instances[0] -PointInTime (Get-Date).AddDays(-1) -ItemLevelRecovery -ContainersList "containerName1","containerName2" PS C:\> $restoreRequest ObjectType RestoreTargetInfoObjectType RestoreTargetInfoRecoveryOption RestoreTargetInfoRestoreLocation SourceDataStoreType RecoveryPointTime ---------- --------------------------- ------------------------------- -------------------------------- ------------------- ----------------- AzureBackupRecoveryTimeBasedRestoreRequest itemLevelRestoreTargetInfo FailIfExists eastus2euap OperationalStore 2021-04-23T02:47:02.9500000Z .Example PS C:\> $startTime = (Get-Date).AddDays(-30).ToString("yyyy-MM-ddTHH:mm:ss.0000000Z") PS C:\> $endTime = (Get-Date).AddDays(0).ToString("yyyy-MM-ddTHH:mm:ss.0000000Z") PS C:\> $instance = Get-AzDataProtectionBackupInstance -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName "rgName" -VaultName "vaultName" PS C:\> $pointInTimeRange = Find-AzDataProtectionRestorableTimeRange -BackupInstanceName $instance[0].BackupInstanceName -ResourceGroupName "rgName" -SubscriptionId "subscriptionId" -VaultName "vaultName" -SourceDataStoreType OperationalStore -StartTime $startTime -EndTime $endTime PS C:\> $restoreRequest = Initialize-AzDataProtectionRestoreRequest -DatasourceType AzureBlob -SourceDataStore OperationalStore -RestoreLocation $vault.Location -RestoreType OriginalLocation -BackupInstance $instances[0] -PointInTime (Get-Date).AddDays(-1) -ItemLevelRecovery -FromPrefixPattern "container1/aaa","container1/ccc", "container2/aab", "container3" -ToPrefixPattern "container1/bbb","container1/ddd", "container2/abc", "container3-0" PS C:\> $restoreRequest ObjectType RestoreTargetInfoObjectType RestoreTargetInfoRecoveryOption RestoreTargetInfoRestoreLocation SourceDataStoreType RecoveryPointTime ---------- --------------------------- ------------------------------- -------------------------------- ------------------- ----------------- AzureBackupRecoveryTimeBasedRestoreRequest itemLevelRestoreTargetInfo FailIfExists eastus2euap OperationalStore 2021-04-23T02:47:02.9500000Z .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IAzureBackupRestoreRequest .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 <BackupInstanceResource>: Backup Instance object to trigger original localtion restore. [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. FriendlyName <String>: Gets or sets the Backup Instance friendly name. ObjectType <String>: PolicyInfo <IPolicyInfo>: Gets or sets the policy information. PolicyId <String>: [PolicyParameter <IPolicyParameters>]: Policy parameters for the backup instance [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. .Link https://docs.microsoft.com/powershell/module/az.dataprotection/initialize-azdataprotectionrestorerequest #> function Initialize-AzDataProtectionRestoreRequest { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IAzureBackupRestoreRequest])] [CmdletBinding(DefaultParameterSetName='AlternateLocationFullRecovery', PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.DatasourceTypes] # Datasource Type ${DatasourceType}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.DataStoreType] # DataStore Type of the Recovery point ${SourceDataStore}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # Target Restore Location ${RestoreLocation}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.RestoreTargetType] # Restore Target Type ${RestoreType}, [Parameter(ParameterSetName='OriginalLocationILR', Mandatory)] [Parameter(ParameterSetName='OriginalLocationFullRecovery', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.BackupInstanceResource] # Backup Instance object to trigger original localtion restore. # To construct, see NOTES section for BACKUPINSTANCE properties and create a hash table. ${BackupInstance}, [Parameter(ParameterSetName='OriginalLocationILR', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.SwitchParameter] # Switch Parameter to enable item level recovery. ${ItemLevelRecovery}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # Id of the recovery point to be restored. ${RecoveryPoint}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.DateTime] # Point In Time for restore. ${PointInTime}, [Parameter(ParameterSetName='OriginalLocationILR')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String[]] # Container names for Item Level Recovery. ${ContainersList}, [Parameter(ParameterSetName='OriginalLocationILR')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String[]] # Minimum matching value for Item Level Recovery. ${FromPrefixPattern}, [Parameter(ParameterSetName='OriginalLocationILR')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String[]] # Maximum matching value for Item Level Recovery. ${ToPrefixPattern}, [Parameter(ParameterSetName='AlternateLocationFullRecovery', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # Target resource Id to which backup data will be restored. ${TargetResourceId} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ OriginalLocationILR = 'Az.DataProtection.custom\Initialize-AzDataProtectionRestoreRequest'; AlternateLocationFullRecovery = 'Az.DataProtection.custom\Initialize-AzDataProtectionRestoreRequest'; OriginalLocationFullRecovery = 'Az.DataProtection.custom\Initialize-AzDataProtectionRestoreRequest'; } $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 } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .Synopsis Configures Backup for supported azure resources .Description Configures Backup for supported azure resources .Example PS C:\> $sub = "xxxx-xxx-xx" PS C:\> $DiskId = "/subscriptions/{subscription}/resourceGroups/{resourcegroup}/providers/Microsoft.Compute/disks/{diskname}" PS C:\> $policy = Get-AzDataProtectionBackupPolicy -SubscriptionId $sub -ResourceGroupName sarath-rg -VaultName sarath-vault -Name "MyPolicy" PS C:\> $instance = Initialize-AzDataProtectionBackupInstance -DatasourceType AzureDisk -DatasourceLocation $vault.Location -PolicyId $policy.Id -DatasourceId $DiskId PS C:\> $instance.Property.PolicyInfo.PolicyParameter.DataStoreParametersList[0].ResourceGroupId = "/subscriptions/{subscription}/resourceGroups/{resourceGroup}" PS C:\> New-AzDataProtectionBackupInstance -SubscriptionId $sub -ResourceGroupName sarath-rg -VaultName sarath-vault -BackupInstance $instance Name Type BackupInstanceName ---- ---- ------------------ sarathdisk-sarathdisk-3df6ac08-9496-4839-8fb5-8b78e594f166 Microsoft.DataProtection/backupVaults/backupInstances sarathdisk-sarathdisk-3df6ac08-9496-4839-8fb5-8b78e594f166 .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 <IBackupInstanceResource>: Backup instance request object which will be used to configure backup [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. FriendlyName <String>: Gets or sets the Backup Instance friendly name. ObjectType <String>: PolicyInfo <IPolicyInfo>: Gets or sets the policy information. PolicyId <String>: [PolicyParameter <IPolicyParameters>]: Policy parameters for the backup instance [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. .Link https://docs.microsoft.com/powershell/module/az.dataprotection/new-azdataprotectionbackupinstance #> function New-AzDataProtectionBackupInstance { [CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # Resource Group of the backup vault ${ResourceGroupName}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # Name of the backup vault ${VaultName}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IBackupInstanceResource] # Backup instance request object which will be used to configure backup # To construct, see NOTES section for BACKUPINSTANCE properties and create a hash table. ${BackupInstance}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # Subscription Id of the vault ${SubscriptionId}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.PSObject] ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.SwitchParameter] ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]] ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]] ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Uri] ${Proxy}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.SwitchParameter] ${AsJob}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.SwitchParameter] ${NoWait}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.PSCredential] ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.SwitchParameter] ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ __AllParameterSets = 'Az.DataProtection.custom\New-AzDataProtectionBackupInstance'; } $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 } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .Synopsis Creates a new backup policy in a given backup vault .Description Creates a new backup policy in a given backup vault .Example PS C:\> $defaultPol = Get-AzDataProtectionPolicyTemplate -DatasourceType AzureDisk PS C:\> New-AzDataProtectionBackupPolicy -SubscriptionId "xxxx-xxx-xxx" -ResourceGroupName sarath-rg -VaultName sarath-vault -Name "MyPolicy" -Policy $defaultPol Name Type ---- ---- MyPolicy Microsoft.DataProtection/backupVaults/backupPolicies .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.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. POLICY <IBackupPolicy>: Policy Request Object DatasourceType <String[]>: Type of datasource for the backup management ObjectType <String>: PolicyRule <IBasePolicyRule[]>: Policy rule dictionary that contains rules for each backuptype i.e Full/Incremental/Logs etc Name <String>: ObjectType <String>: DataStoreObjectType <String>: Type of Datasource object, used to initialize the right inherited type DataStoreType <DataStoreTypes>: type of datastore; Operational/Vault/Archive TriggerObjectType <String>: Type of the specific object - used for deserializing Lifecycle <ISourceLifeCycle[]>: DeleteAfterDuration <String>: Duration of deletion after given timespan DeleteAfterObjectType <String>: Type of the specific object - used for deserializing SourceDataStoreObjectType <String>: Type of Datasource object, used to initialize the right inherited type SourceDataStoreType <DataStoreTypes>: type of datastore; Operational/Vault/Archive [TargetDataStoreCopySetting <ITargetCopySetting[]>]: CopyAfterObjectType <String>: Type of the specific object - used for deserializing DataStoreObjectType <String>: Type of Datasource object, used to initialize the right inherited type DataStoreType <DataStoreTypes>: type of datastore; Operational/Vault/Archive [BackupParameterObjectType <String>]: Type of the specific object - used for deserializing [IsDefault <Boolean?>]: .Link https://docs.microsoft.com/powershell/module/az.dataprotection/new-azdataprotectionbackuppolicy #> function New-AzDataProtectionBackupPolicy { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IBaseBackupPolicyResource])] [CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # Resource Group Name ${ResourceGroupName}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # Vault Name ${VaultName}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # Policy Name ${Name}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IBackupPolicy] # Policy Request Object # To construct, see NOTES section for POLICY properties and create a hash table. ${Policy}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # Subscription Id ${SubscriptionId}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.PSObject] ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.SwitchParameter] ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]] ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]] ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Uri] ${Proxy}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.PSCredential] ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.SwitchParameter] ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ __AllParameterSets = 'Az.DataProtection.custom\New-AzDataProtectionBackupPolicy'; } $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 } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .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 PS C:\> $sub = "xxxx-xxxx-xxxxx" PS C:\> $storagesetting = New-AzDataProtectionBackupVaultStorageSettingObject -DataStoreType VaultStore -Type LocallyRedundant PS C:\> New-AzDataProtectionBackupVault -SubscriptionId $sub -ResourceGroupName sarath-rg -VaultName "MyVault" -StorageSetting $storagesetting -Location westus ETag IdentityPrincipalId IdentityTenantId IdentityType Location Name Type ---- ------------------- ---------------- ------------ -------- ---- ---- westus MyVault Microsoft.DataProtection/backupVaults .Outputs System.Management.Automation.PSObject .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. STORAGESETTING <IStorageSetting[]>: Storage Settings of the vault. Use New-AzDataProtectionBackupVaultStorageSetting Cmdlet to Create. [DatastoreType <StorageSettingStoreTypes?>]: Gets or sets the type of the datastore. [Type <StorageSettingTypes?>]: Gets or sets the type. .Link https://docs.microsoft.com/powershell/module/az.dataprotection/new-azdataprotectionbackupvault #> function New-AzDataProtectionBackupVault { [OutputType([PSObject])] [CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # Resource Group Name of the backup vault ${ResourceGroupName}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # Name of the backup vault ${VaultName}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # Resource location. ${Location}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IStorageSetting[]] # Storage Settings of the vault. # Use New-AzDataProtectionBackupVaultStorageSetting Cmdlet to Create. # To construct, see NOTES section for STORAGESETTING properties and create a hash table. ${StorageSetting}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # Subscription Id of the vault ${SubscriptionId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # Optional ETag. ${ETag}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # The identityType which can be either SystemAssigned or None. ${IdentityType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.PSObject] ${DefaultProfile}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.SwitchParameter] ${AsJob}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.SwitchParameter] ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]] ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]] ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Uri] ${Proxy}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.SwitchParameter] ${NoWait}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.PSCredential] ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.SwitchParameter] ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ __AllParameterSets = 'Az.DataProtection.custom\New-AzDataProtectionBackupVault'; } $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 } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .Synopsis Get Backup Vault storage setting object .Description Get Backup Vault storage setting object .Example PS C:\> New-AzDataProtectionBackupVaultStorageSettingObject -Type GeoRedundant -DataStoreType VaultStore DatastoreType Type ------------- ---- VaultStore GeoRedundant .Outputs System.Management.Automation.PSObject .Link https://docs.microsoft.com/powershell/module/az.dataprotection/new-azdataprotectionbackupvaultstoragesettingobject #> function New-AzDataProtectionBackupVaultStorageSettingObject { [OutputType([PSObject])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.StorageSettingType] # Storage Type of the vault ${Type}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.DataStoreType] # DataStore Type of the vault ${DataStoreType} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ __AllParameterSets = 'Az.DataProtection.custom\New-AzDataProtectionBackupVaultStorageSettingObject'; } $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 } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .Synopsis Creates a new criteria object .Description Creates a new criteria object .Example PS C:\> New-AzDataProtectionPolicyTagCriteriaClientObject -AbsoluteCriteria FirstOfDay ObjectType AbsoluteCriterion DaysOfTheWeek MonthsOfYear ScheduleTime WeeksOfTheMonth ---------- ----------------- ------------- ------------ ------------ --------------- ScheduleBasedBackupCriteria {FirstOfDay} .Example PS C:\> New-AzDataProtectionPolicyTagCriteriaClientObject -DaysOfWeek @("Sunday", "Monday") ObjectType AbsoluteCriterion DaysOfTheWeek MonthsOfYear ScheduleTime WeeksOfTheMonth ---------- ----------------- ------------- ------------ ------------ --------------- ScheduleBasedBackupCriteria {Sunday, Monday} .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IScheduleBasedBackupCriteria .Link https://docs.microsoft.com/powershell/module/az.dataprotection/new-azdataprotectionpolicytagcriteriaclientobject #> function New-AzDataProtectionPolicyTagCriteriaClientObject { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IScheduleBasedBackupCriteria])] [CmdletBinding(DefaultParameterSetName='ScheduleCriteria', PositionalBinding=$false)] param( [Parameter(ParameterSetName='AbsoluteCriteria', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.AbsoluteTagCriteria] # Absolute criteria ${AbsoluteCriteria}, [Parameter(ParameterSetName='ScheduleCriteria')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.DaysOfWeek[]] # Days of the week ${DaysOfWeek}, [Parameter(ParameterSetName='ScheduleCriteria')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.WeeksOfMonth[]] # Weeks of the month. ${WeeksOfMonth}, [Parameter(ParameterSetName='ScheduleCriteria')] [Parameter(ParameterSetName='MonthlyCriteria')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.MonthsOfYear[]] # Months of the year. ${MonthsOfYear}, [Parameter(ParameterSetName='ScheduleCriteria')] [Parameter(ParameterSetName='MonthlyCriteria')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.DateTime[]] # Schedule times. ${ScheduleTimes}, [Parameter(ParameterSetName='MonthlyCriteria', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String[]] # Days of the month. # Allowed values are 1 to 28 and Last ${DaysOfMonth} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ AbsoluteCriteria = 'Az.DataProtection.custom\New-AzDataProtectionPolicyTagCriteriaClientObject'; ScheduleCriteria = 'Az.DataProtection.custom\New-AzDataProtectionPolicyTagCriteriaClientObject'; MonthlyCriteria = 'Az.DataProtection.custom\New-AzDataProtectionPolicyTagCriteriaClientObject'; } $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 } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .Synopsis Creates new Schedule object .Description Creates new Schedule object .Example PS C:\> $date = get-date PS C:\> New-AzDataProtectionPolicyTriggerScheduleClientObject -ScheduleDays $date -IntervalType Daily -IntervalCount 1 R/2021-03-03T12:49:55+05:30/P1D .Example PS C:\> $date = get-date PS C:\> New-AzDataProtectionPolicyTriggerScheduleClientObject -ScheduleDays $date -IntervalType Hourly -IntervalCount 4 R/2021-03-03T12:49:55+05:30/PT4H .Outputs System.String[] .Link https://docs.microsoft.com/powershell/module/az.dataprotection/new-azdataprotectionpolicytriggerscheduleclientobject #> function New-AzDataProtectionPolicyTriggerScheduleClientObject { [OutputType([System.String[]])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.DateTime[]] # Days with which backup will be scheduled. ${ScheduleDays}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.BackupFrequency] # Freuquency of the backup. ${IntervalType}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Int32] # Frequency of the backup. ${IntervalCount} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ __AllParameterSets = 'Az.DataProtection.custom\New-AzDataProtectionPolicyTriggerScheduleClientObject'; } $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 } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .Synopsis Creates new Lifecycle object .Description Creates new Lifecycle object .Example PS C:\> New-AzDataProtectionRetentionLifeCycleClientObject -SourceDataStore OperationalStore -SourceRetentionDurationType Days -SourceRetentionDurationCount 30 DeleteAfterDuration : P30D DeleteAfterObjectType : AbsoluteDeleteOption SourceDataStoreObjectType : DataStoreInfoBase SourceDataStoreType : OperationalStore TargetDataStoreCopySetting : .Example PS C:\> New-AzDataProtectionRetentionLifeCycleClientObject -SourceDataStore OperationalStore -SourceRetentionDurationType Weeks -SourceRetentionDurationCount 20 DeleteAfterDuration : P20W DeleteAfterObjectType : AbsoluteDeleteOption SourceDataStoreObjectType : DataStoreInfoBase SourceDataStoreType : OperationalStore TargetDataStoreCopySetting : .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.ISourceLifeCycle .Link https://docs.microsoft.com/powershell/module/az.dataprotection/new-azdataprotectionretentionlifecycleclientobject #> function New-AzDataProtectionRetentionLifeCycleClientObject { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.ISourceLifeCycle])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.DataStoreType] # Source Datastore ${SourceDataStore}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.DurationType] # Retention Duration Type ${SourceRetentionDurationType}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Int32] # Retention Duration Count ${SourceRetentionDurationCount}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.DataStoreType] # Target Datastore ${TargetDataStore}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.CopyOption] # CopyOption ${CopyOption} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ __AllParameterSets = 'Az.DataProtection.custom\New-AzDataProtectionRetentionLifeCycleClientObject'; } $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 } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .Synopsis Searches for Backup instances in Azure Resource Graph and retrieves the expected entries .Description Searches for Backup instances in Azure Resource Graph and retrieves the expected entries .Example PS C:\> Search-AzDataProtectionBackupInstanceInAzGraph -Subscription "xxxx-xxx-xxx" -DatasourceType AzureDisk Name Type ---- ---- ContosoDemoVM_DataDisk_0-ContosoDemoVM_DataDisk_0-5f7b2a1f-f1ab-4abe-aadf-e7dc48238157 microsoft.dataprotection/backupvaults/backupinstance ContosoDemoVM_OsDisk_1_84b542ec38a447cea-ContosoDemoVM_OsDisk_1_84b542ec38a447cea-9bdcbd90-3555-4651-93b8-8265e1b5c07a microsoft.dataprotection/backupvaults/backupinstance DataDisk1-DataDisk1-0c71e6bf-9289-483c-8e27-aa6c0df60078 microsoft.dataprotection/backupvaults/backupinstance rraj-StandardHDD-rraj-StandardHDD-85d0a3f4-7fa8-46c7-bf83-0dee27eac08e microsoft.dataprotection/backupvaults/backupinstance sakaarhotfixtest_disk1_86d713f7b80e493b9-sakaarhotfixtest_disk1_86d713f7b80e493b9-be214c89-c07d-41f0-8362-b78d58d5506f microsoft.dataprotection/backupvaults/backupinstance pracdisk-pracdisk-643fac7d-0816-4056-8908-d0ef8b63b047 microsoft.dataprotection/backupvaults/backupinstance test1-test1-59f95871-de81-4051-95e7-ee6c4e5b30e0 microsoft.dataprotection/backupvaults/backupinstance anubhwus-test-anubhwus-test-5fe6ce14-fbd2-4641-80d0-f8f8b254601d microsoft.dataprotection/backupvaults/backupinstance .Example PS C:\> Search-AzDataProtectionBackupInstanceInAzGraph -Subscription "xxxx-xxx-xxx" -DatasourceType AzureDisk -ResourceGroup @("sarath-rg", "sarath-rg2") Name Type BackupInstanceName ---- ---- ------------------ sarath-disk3-sarath-disk3-dbb8c2d0-bdbf-448c-9664-ea74df26d4a8 microsoft.dataprotection/backupvaults/backupinstances sarath-disk3-sarath-disk3-dbb8c2d0-bdbf-448c-9664-ea7 sarathdisk-sarathdisk-3df6ac08-9496-4839-8fb5-8b78e594f166 microsoft.dataprotection/backupvaults/backupinstances sarathdisk-sarathdisk-3df6ac08-9496-4839-8fb5-8b78e59 sarathdisk2-sarathdisk2-b0bf31ab-c9c5-407f-98a2-3ad6bad4305a microsoft.dataprotection/backupvaults/backupinstances sarathdisk2-sarathdisk2-b0bf31ab-c9c5-407f-98a2-3ad6b .Example PS C:\> Search-AzDataProtectionBackupInstanceInAzGraph -Subscription "xxxx-xxx-xxx" -DatasourceType AzureDisk -ResourceGroup @("sarath-rg", "sarath-rg2") -ProtectionStatus ProtectionConfigured Name Type BackupInstanceName ---- ---- ------------------ sarath-disk3-sarath-disk3-dbb8c2d0-bdbf-448c-9664-ea74df26d4a8 microsoft.dataprotection/backupvaults/backupinstances sarath-disk3-sarath-disk3-dbb8c2d0-bdbf-448c-9664-ea7 sarathdisk-sarathdisk-3df6ac08-9496-4839-8fb5-8b78e594f166 microsoft.dataprotection/backupvaults/backupinstances sarathdisk-sarathdisk-3df6ac08-9496-4839-8fb5-8b78e59 sarathdisk2-sarathdisk2-b0bf31ab-c9c5-407f-98a2-3ad6bad4305a microsoft.dataprotection/backupvaults/backupinstances sarathdisk2-sarathdisk2-b0bf31ab-c9c5-407f-98a2-3ad6b .Outputs System.Management.Automation.PSObject .Link https://docs.microsoft.com/powershell/module/az.dataprotection/search-azdataprotectionbackupinstanceinazgraph #> function Search-AzDataProtectionBackupInstanceInAzGraph { [OutputType([PSObject])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String[]] # Subscription of Vault ${Subscription}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.DatasourceTypes] # Datasource Type ${DatasourceType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String[]] # Resource Group of Vault ${ResourceGroup}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String[]] # Name of the vault ${Vault}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.ProtectionStatus[]] # Protection Status of the item ${ProtectionStatus} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ __AllParameterSets = 'Az.DataProtection.custom\Search-AzDataProtectionBackupInstanceInAzGraph'; } $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 } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .Synopsis Searches for Backup Jobs in Azure Resource Graph and retrieves the expected entries .Description Searches for Backup Jobs in Azure Resource Graph and retrieves the expected entries .Example PS C:\> $endtime = get-date PS C:\> $starttime = $endtime.AddHours(-5) PS C:\> Search-AzDataProtectionJobInAzGraph -Subscription "xxx-xxx-xxx" -ResourceGroup sarath-rg -Vault sarath-vault -DatasourceType AzureDisk -StartTime $starttime -EndTime $endtime Name Type ---- ---- 1c1d56c2-b21a-4038-ba46-3c1a0089e66a microsoft.dataprotection/backupvaults/backupjobs 79f2804d-a39d-487e-91b5-f2eceffcbb7a microsoft.dataprotection/backupvaults/backupjobs 96238abd-6ff3-48e0-8c07-0eabd6928a17 microsoft.dataprotection/backupvaults/backupjobs .Example PS C:\> Search-AzDataProtectionJobInAzGraph -Subscription "xxxx-xxx-xxx" -ResourceGroup sarath-rg -Vault sarath-vault -DatasourceType AzureDisk -Operation OnDemandBackup Name Type ---- ---- 11bc277d-9448-446a-9e79-4721858524d6 microsoft.dataprotection/backupvaults/backupjobs 16d7b56a-e169-41d1-aa10-cafcc19c8e12 microsoft.dataprotection/backupvaults/backupjobs 1b0b17e3-398f-4265-9d03-ffc1e21fa73a microsoft.dataprotection/backupvaults/backupjobs .Outputs System.Management.Automation.PSObject .Link https://docs.microsoft.com/powershell/module/az.dataprotection/search-azdataprotectionjobinazgraph #> function Search-AzDataProtectionJobInAzGraph { [OutputType([PSObject])] [CmdletBinding(PositionalBinding=$false)] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String[]] # Subscription of Vault ${Subscription}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.DatasourceTypes] # Datasource Type ${DatasourceType}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String[]] # Resource Group of Vault ${ResourceGroup}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String[]] # Name of the vault ${Vault}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.DateTime] # Start Time filter for the backup Job ${StartTime}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.DateTime] # End Time filter for the Backup Job ${EndTime}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.JobOperation[]] # Operation filter for the backup job ${Operation}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Support.JobStatus[]] # Status filter for the backup job ${Status} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ __AllParameterSets = 'Az.DataProtection.custom\Search-AzDataProtectionJobInAzGraph'; } $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 } } } # ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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. # ---------------------------------------------------------------------------------- <# .Synopsis Updates associated policy for a given backup instance .Description Updates associated policy for a given backup instance .Example PS C:\> $sub = "xxxx-xxxx-xxxx" PS C:\> $instance = Get-AzDataProtectionBackupInstance -SubscriptionId $sub -ResourceGroupName sarath-rg -VaultName sarath-vault PS C:\> $policy = Get-AzDataProtectionBackupPolicy -SubscriptionId $sub -ResourceGroupName sarath-rg -VaultName sarath-vault PS C:\> Update-AzDataProtectionBackupInstanceAssociatedPolicy -SubscriptionId $sub -ResourceGroupName sarath-rg -VaultName sarath-vault -BackupInstanceName $instance[0].Name -PolicyId $policy[1].Id Name Type BackupInstanceName ---- ---- ------------------ sarathdisk2-sarathdisk2-2ba3c708-3648-45e2-809d-9f75e66d404f Microsoft.DataProtection/backupVaults/backupInstances sarathdisk2-sarathdisk2-2ba3c708-3648-45e2-809d-9f75e66 .Outputs Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IBackupInstanceResource .Link https://docs.microsoft.com/powershell/module/az.dataprotection/update-azdataprotectionbackupinstanceassociatedpolicy #> function Update-AzDataProtectionBackupInstanceAssociatedPolicy { [OutputType([Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202101.IBackupInstanceResource])] [CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # Resource Group of the backup vault ${ResourceGroupName}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # Name of the backup vault ${VaultName}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # Unique Name of protected backup instance ${BackupInstanceName}, [Parameter(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # Id of the Policy to be associated with the backup instance ${PolicyId}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.String] # Subscription Id of the vault ${SubscriptionId}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.PSObject] ${DefaultProfile}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.SwitchParameter] ${Break}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]] ${HttpPipelineAppend}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Runtime.SendAsyncStep[]] ${HttpPipelinePrepend}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Uri] ${Proxy}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.SwitchParameter] ${AsJob}, [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.SwitchParameter] ${NoWait}, [Parameter(DontShow)] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.PSCredential] ${ProxyCredential}, [Parameter(DontShow)] [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Category('Body')] [System.Management.Automation.SwitchParameter] ${ProxyUseDefaultCredentials} ) begin { try { $outBuffer = $null if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { $PSBoundParameters['OutBuffer'] = 1 } $parameterSet = $PSCmdlet.ParameterSetName $mapping = @{ __AllParameterSets = 'Az.DataProtection.custom\Update-AzDataProtectionBackupInstanceAssociatedPolicy'; } $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 # MIIjhgYJKoZIhvcNAQcCoIIjdzCCI3MCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAkgrXAsk+97N7X # Vjk9AJSAliG3n8GwYYR54QaRxYbxGKCCDYEwggX/MIID56ADAgECAhMzAAAB32vw # LpKnSrTQAAAAAAHfMA0GCSqGSIb3DQEBCwUAMH4xCzAJB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