Skip to content

[2203] Revert "Merge pull request #141 from yanqiongchen/backup-admin-update" #150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
135 changes: 0 additions & 135 deletions src/Azs.Backup.Admin/custom/Clear-AzsBackupConfiguration.ps1

This file was deleted.

20 changes: 2 additions & 18 deletions src/Azs.Backup.Admin/custom/Get-AzsBackup.ps1
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@

# ----------------------------------------------------------------------------------
#
# 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 backup from a location based on name.
Expand All @@ -23,10 +8,9 @@ To view examples, please use the -Online parameter with Get-Help or navigate to:
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.BackupAdmin.Models.IBackupAdminIdentity
.Outputs
Microsoft.Azure.PowerShell.Cmdlets.BackupAdmin.Models.Api20210901.IBackup
Microsoft.Azure.PowerShell.Cmdlets.BackupAdmin.Models.Api20180901.IBackup
.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 <IBackupAdminIdentity>: Identity Parameter
Expand All @@ -39,7 +23,7 @@ INPUTOBJECT <IBackupAdminIdentity>: Identity Parameter
https://docs.microsoft.com/en-us/powershell/module/azs.backup.admin/get-azsbackup
#>
function Get-AzsBackup {
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.BackupAdmin.Models.Api20210901.IBackup])]
[OutputType([Microsoft.Azure.PowerShell.Cmdlets.BackupAdmin.Models.Api20180901.IBackup])]
[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
param(
[Parameter(ParameterSetName='Get')]
Expand Down
43 changes: 10 additions & 33 deletions src/Azs.Backup.Admin/custom/Restore-AzsBackup.ps1
Original file line number Diff line number Diff line change
@@ -1,41 +1,18 @@

# ----------------------------------------------------------------------------------
#
# 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
Restore a backup.
.Description
Restore a backup.
.Example
PS C:\> {{ Add code here }}

{{ Add output here }}
.Example
PS C:\> {{ Add code here }}

{{ Add output here }}

To view examples, please use the -Online parameter with Get-Help or navigate to: https://docs.microsoft.com/en-us/powershell/module/azs.backup.admin/restore-azsbackup
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.BackupAdmin.Models.Api20210901.IRestoreOptions
Microsoft.Azure.PowerShell.Cmdlets.BackupAdmin.Models.Api20180901.IRestoreOptions
.Inputs
Microsoft.Azure.PowerShell.Cmdlets.BackupAdmin.Models.IBackupAdminIdentity
.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 <IBackupAdminIdentity>: Identity Parameter
Expand All @@ -56,6 +33,13 @@ function Restore-AzsBackup {
[OutputType([System.Boolean])]
[CmdletBinding(DefaultParameterSetName='RestoreExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
param(
[Parameter(ParameterSetName='Restore', Mandatory)]
[Parameter(ParameterSetName='RestoreExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.BackupAdmin.Category('Path')]
[System.String]
# Name of the backup.
${Name},

[Parameter(ParameterSetName='Restore')]
[Parameter(ParameterSetName='RestoreExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.BackupAdmin.Category('Path')]
Expand All @@ -64,13 +48,6 @@ param(
# Name of the backup location.
${Location},

[Parameter(ParameterSetName='Restore', Mandatory)]
[Parameter(ParameterSetName='RestoreExpanded', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.BackupAdmin.Category('Path')]
[System.String]
# Name of the backup.
${Name},

[Parameter(ParameterSetName='Restore')]
[Parameter(ParameterSetName='RestoreExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.BackupAdmin.Category('Path')]
Expand Down Expand Up @@ -99,7 +76,7 @@ param(
[Parameter(ParameterSetName='Restore', Mandatory)]
[Parameter(ParameterSetName='RestoreViaIdentity', Mandatory)]
[Microsoft.Azure.PowerShell.Cmdlets.BackupAdmin.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.BackupAdmin.Models.Api20210901.IRestoreOptions]
[Microsoft.Azure.PowerShell.Cmdlets.BackupAdmin.Models.Api20180901.IRestoreOptions]
# Properties for restore options.
# To construct, see NOTES section for RESTOREOPTION properties and create a hash table.
${RestoreOption},
Expand Down
Loading