Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  

Large diffs are not rendered by default.

197 changes: 21 additions & 176 deletions src/DataProtection/DataProtection.Autorest/Az.DataProtection.psd1
Original file line number Diff line number Diff line change
@@ -1,179 +1,24 @@
#
# Module manifest for module 'Az.DataProtection'
#
# Generated by: Microsoft Corporation
#
# Generated on: 9/20/2023
#

@{

# Script module or binary module file associated with this manifest.
RootModule = './Az.DataProtection.psm1'

# Version number of this module.
ModuleVersion = '2.1.0'

# Supported PSEditions
CompatiblePSEditions = 'Core', 'Desktop'

# ID used to uniquely identify this module
GUID = '0796af7c-0a7c-417f-8d0d-19f9179dac7a'

# Author of this module
Author = 'Microsoft Corporation'

# Company or vendor of this module
CompanyName = 'Microsoft Corporation'

# Copyright statement for this module
Copyright = 'Microsoft Corporation. All rights reserved.'

# Description of the functionality provided by this module
Description = 'Microsoft Azure PowerShell: DataProtection cmdlets'

# Minimum version of the PowerShell engine required by this module
PowerShellVersion = '5.1'

# Name of the PowerShell host required by this module
# PowerShellHostName = ''

# Minimum version of the PowerShell host required by this module
# PowerShellHostVersion = ''

# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
DotNetFrameworkVersion = '4.7.2'

# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# ClrVersion = ''

# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.13.1'; })

# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = './bin/Az.DataProtection.private.dll'

# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()

# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()

# Format files (.ps1xml) to be loaded when importing this module
FormatsToProcess = './Az.DataProtection.format.ps1xml'

# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
# NestedModules = @()

# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = 'Backup-AzDataProtectionBackupInstanceAdhoc',
'Edit-AzDataProtectionPolicyRetentionRuleClientObject',
'Edit-AzDataProtectionPolicyTagClientObject',
'Edit-AzDataProtectionPolicyTriggerClientObject',
'Find-AzDataProtectionRestorableTimeRange',
'Get-AzDataProtectionBackupInstance',
'Get-AzDataProtectionBackupPolicy',
'Get-AzDataProtectionBackupVault', 'Get-AzDataProtectionJob',
'Get-AzDataProtectionOperation',
'Get-AzDataProtectionOperationStatus',
'Get-AzDataProtectionPolicyTemplate',
'Get-AzDataProtectionRecoveryPoint',
'Get-AzDataProtectionResourceGuard',
'Get-AzDataProtectionResourceGuardMapping',
'Get-AzDataProtectionSoftDeletedBackupInstance',
'Initialize-AzDataProtectionBackupInstance',
'Initialize-AzDataProtectionRestoreRequest',
'New-AzDataProtectionBackupConfigurationClientObject',
'New-AzDataProtectionBackupInstance',
'New-AzDataProtectionBackupPolicy',
'New-AzDataProtectionBackupVault',
'New-AzDataProtectionBackupVaultStorageSettingObject',
'New-AzDataProtectionPolicyTagCriteriaClientObject',
'New-AzDataProtectionPolicyTriggerScheduleClientObject',
'New-AzDataProtectionResourceGuard',
'New-AzDataProtectionRestoreConfigurationClientObject',
'New-AzDataProtectionRetentionLifeCycleClientObject',
'Remove-AzDataProtectionBackupInstance',
'Remove-AzDataProtectionBackupPolicy',
'Remove-AzDataProtectionBackupVault',
'Remove-AzDataProtectionResourceGuard',
'Remove-AzDataProtectionResourceGuardMapping',
'Resume-AzDataProtectionBackupInstanceProtection',
'Search-AzDataProtectionBackupInstanceInAzGraph',
'Search-AzDataProtectionJobInAzGraph',
'Set-AzDataProtectionMSIPermission',
'Set-AzDataProtectionResourceGuardMapping',
'Start-AzDataProtectionBackupInstanceRestore',
'Stop-AzDataProtectionBackupInstanceProtection',
'Suspend-AzDataProtectionBackupInstanceBackup',
'Sync-AzDataProtectionBackupInstance',
'Test-AzDataProtectionBackupInstanceReadiness',
'Test-AzDataProtectionBackupInstanceRestore',
'Undo-AzDataProtectionBackupInstanceDeletion',
'Unlock-AzDataProtectionResourceGuardOperation',
'Update-AzDataProtectionBackupInstanceAssociatedPolicy',
'Update-AzDataProtectionBackupVault',
'Update-AzDataProtectionResourceGuard'

# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = @()

# Variables to export from this module
# VariablesToExport = @()

# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = '*'

# DSC resources to export from this module
# DscResourcesToExport = @()

# List of all modules packaged with this module
# ModuleList = @()

# List of all files packaged with this module
# FileList = @()

# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{

GUID = 'e7388191-d3e0-4d54-b898-d55f0992a1dc'
RootModule = './Az.DataProtection.psm1'
ModuleVersion = '0.1.0'
CompatiblePSEditions = 'Core', 'Desktop'
Author = 'Microsoft Corporation'
CompanyName = 'Microsoft Corporation'
Copyright = 'Microsoft Corporation. All rights reserved.'
Description = 'Microsoft Azure PowerShell: DataProtection cmdlets'
PowerShellVersion = '5.1'
DotNetFrameworkVersion = '4.7.2'
RequiredAssemblies = './bin/Az.DataProtection.private.dll'
FormatsToProcess = './Az.DataProtection.format.ps1xml'
FunctionsToExport = 'Backup-AzDataProtectionBackupInstanceAdhoc', 'Edit-AzDataProtectionPolicyRetentionRuleClientObject', 'Edit-AzDataProtectionPolicyTagClientObject', 'Edit-AzDataProtectionPolicyTriggerClientObject', 'Find-AzDataProtectionRestorableTimeRange', 'Get-AzDataProtectionBackupInstance', 'Get-AzDataProtectionBackupPolicy', 'Get-AzDataProtectionBackupVault', 'Get-AzDataProtectionJob', 'Get-AzDataProtectionOperation', 'Get-AzDataProtectionOperationStatus', 'Get-AzDataProtectionPolicyTemplate', 'Get-AzDataProtectionRecoveryPoint', 'Get-AzDataProtectionResourceGuard', 'Get-AzDataProtectionResourceGuardMapping', 'Get-AzDataProtectionSoftDeletedBackupInstance', 'Initialize-AzDataProtectionBackupInstance', 'Initialize-AzDataProtectionRestoreRequest', 'New-AzDataProtectionBackupConfigurationClientObject', 'New-AzDataProtectionBackupInstance', 'New-AzDataProtectionBackupPolicy', 'New-AzDataProtectionBackupVault', 'New-AzDataProtectionBackupVaultStorageSettingObject', 'New-AzDataProtectionPolicyTagCriteriaClientObject', 'New-AzDataProtectionPolicyTriggerScheduleClientObject', 'New-AzDataProtectionResourceGuard', 'New-AzDataProtectionRestoreConfigurationClientObject', 'New-AzDataProtectionRetentionLifeCycleClientObject', 'Remove-AzDataProtectionBackupInstance', 'Remove-AzDataProtectionBackupPolicy', 'Remove-AzDataProtectionBackupVault', 'Remove-AzDataProtectionResourceGuard', 'Remove-AzDataProtectionResourceGuardMapping', 'Resume-AzDataProtectionBackupInstanceProtection', 'Search-AzDataProtectionBackupInstanceInAzGraph', 'Search-AzDataProtectionBackupVaultInAzGraph', 'Search-AzDataProtectionJobInAzGraph', 'Set-AzDataProtectionMSIPermission', 'Set-AzDataProtectionResourceGuardMapping', 'Start-AzDataProtectionBackupInstanceRestore', 'Stop-AzDataProtectionBackupInstanceProtection', 'Suspend-AzDataProtectionBackupInstanceBackup', 'Sync-AzDataProtectionBackupInstance', 'Test-AzDataProtectionBackupInstanceReadiness', 'Test-AzDataProtectionBackupInstanceRestore', 'Undo-AzDataProtectionBackupInstanceDeletion', 'Unlock-AzDataProtectionResourceGuardOperation', 'Update-AzDataProtectionBackupInstanceAssociatedPolicy', 'Update-AzDataProtectionBackupVault', 'Update-AzDataProtectionResourceGuard', '*'
AliasesToExport = '*'
PrivateData = @{
PSData = @{

# Tags applied to this module. These help with module discovery in online galleries.
Tags = 'Azure','ResourceManager','ARM','PSModule','DataProtection'

# A URL to the license for this module.
LicenseUri = 'https://aka.ms/azps-license'

# A URL to the main website for this project.
ProjectUri = 'https://github.com/Azure/azure-powershell'

# A URL to an icon representing this module.
# IconUri = ''

# ReleaseNotes of this module
ReleaseNotes = '* Added soft delete and MUA feature for Backup vaults'

# Prerelease string of this module
# Prerelease = ''

# Flag to indicate whether the module requires explicit user acceptance for install/update/save
# RequireLicenseAcceptance = $false

# External dependent modules of this module
# ExternalModuleDependencies = @()

} # End of PSData hashtable

} # End of PrivateData hashtable

# HelpInfo URI of this module
# HelpInfoURI = ''

# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''

Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'DataProtection'
LicenseUri = 'https://aka.ms/azps-license'
ProjectUri = 'https://github.com/Azure/azure-powershell'
ReleaseNotes = ''
}
}
}

44 changes: 36 additions & 8 deletions src/DataProtection/DataProtection.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,16 @@ This file contains the configuration for generating My API from the OpenAPI spec

``` yaml
# it's the same options as command line options, just drop the double-dash!
branch: acf24167b5174d88f36302e243c883f2e63eec52
commit: c0e7b1360c19187fde2497251f784aa82641aa95
require:
- $(this-folder)/../readme.azure.noprofile.md
- $(this-folder)/../../readme.azure.noprofile.md
input-file:
- $(repo)/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-05-01/dataprotection.json
- $(repo)/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-11-01/dataprotection.json
title: DataProtection
# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
use-extension:
"@autorest/powershell": "3.x"

directive:
- from: swagger-document
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}"].delete
Expand Down Expand Up @@ -232,6 +236,10 @@ directive:
verb: Start
subject: ExportJob
remove: true
- where:
verb: Start
subject: .*Restore$
hide: true
- where:
verb: Get
subject: OperationResultPatch
Expand Down Expand Up @@ -302,6 +310,23 @@ directive:
subject: BackupInstanceRestore
variant: ^Validate1$|^ValidateExpanded1$|^ValidateViaIdentity1$|^ValidateViaIdentityExpanded1$
hide: true
- where:
verb: Test
subject: BackupInstanceCrossRegionRestore
hide: true
- where:
subject: FetchCrossRegionRestoreJob
set:
subject: CrossRegionRestoreJob
- where:
subject: CrossRegionRestoreJob
variant: ^Get.*
set:
subject: CrossRegionRestoreJobDetail
- where:
verb: Get
subject: ^Job$|^CrossRegionRestoreJob.*|FetchSecondaryRecoveryPoint
hide: true
- where:
property-name: AzureMonitorAlertSettingAlertsForAllJobFailure
set:
Expand Down Expand Up @@ -359,6 +384,8 @@ directive:
- IdentityType
- no-inline:
- BackupInstance
- CrossRegionRestoreDetails
- CrossRegionRestoreRequestObject
- DeletionInfo
- InnerError
- ItemLevelRestoreTargetInfo
Expand All @@ -370,19 +397,20 @@ directive:
- SecretStoreResource
- SystemData
- UserFacingError
- ValidateRestoreRequestObject
- ValidateRestoreRequestObject
- ValidateCrossRegionRestoreRequestObject
- from: source-file-csharp
where: $
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBaseBackupPolicy Property', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBaseBackupPolicy Property');
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBaseBackupPolicy Property', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBaseBackupPolicy Property');
- from: source-file-csharp
where: $
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ITriggerContext Trigger', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.ITriggerContext Trigger');
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ITriggerContext Trigger', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.ITriggerContext Trigger');
- from: source-file-csharp
where: $
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupParameters BackupParameter', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IBackupParameters BackupParameter');
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupParameters BackupParameter', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IBackupParameters BackupParameter');
- from: source-file-csharp
where: $
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupRecoveryPoint Property', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20230501.IAzureBackupRecoveryPoint Property');
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupRecoveryPoint Property', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20231101.IAzureBackupRecoveryPoint Property');
```

## Alternate settings
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "backupVaults/backupInstances/recoveryPoints",
"apiVersion": "2023-05-01",
"apiVersion": "2023-11-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.dataprotection"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "backupVaults/backupInstances",
"apiVersion": "2023-05-01",
"apiVersion": "2023-11-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.dataprotection"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"resourceType": "backupVaults/backupJobs",
"apiVersion": "2023-05-01",
"apiVersion": "2023-11-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.dataprotection"
},
"commands": [
{
"name": "Get-AzDataProtectionJob",
"description": "Gets a job with id in a backup vault",
"description": "Gets or lists jobs in a backup vault",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs/{jobId}",
"help": {
"learnMore": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "backupVaults/backupPolicies",
"apiVersion": "2023-05-01",
"apiVersion": "2023-11-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.dataprotection"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "backupVaults/backupResourceGuardProxies",
"apiVersion": "2023-05-01",
"apiVersion": "2023-11-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.dataprotection"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "backupVaults/deletedBackupInstances",
"apiVersion": "2023-05-01",
"apiVersion": "2023-11-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.dataprotection"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "backupVaults",
"apiVersion": "2023-05-01",
"apiVersion": "2023-11-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.dataprotection"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "locations/operationStatus",
"apiVersion": "2023-05-01",
"apiVersion": "2023-11-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.dataprotection"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "resourceGuards",
"apiVersion": "2023-05-01",
"apiVersion": "2023-11-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.dataprotection"
},
Expand Down
9 changes: 8 additions & 1 deletion src/DataProtection/DataProtection.Autorest/build-module.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ if($NoDocs) {
$null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
}
$null = New-Item -ItemType Directory -Force -Path $docsFolder
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid
$addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true')
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid -AddComplexInterfaceInfo:$addComplexInterfaceInfo
}

Write-Host -ForegroundColor Green 'Creating format.ps1xml...'
Expand All @@ -162,4 +163,10 @@ Export-TestStub -ModuleName $moduleName -ExportsFolder $exportsFolder -OutputFol
Write-Host -ForegroundColor Green 'Creating example stubs...'
Export-ExampleStub -ExportsFolder $exportsFolder -OutputFolder $examplesFolder

if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
{
Write-Host -ForegroundColor Green 'Creating ux metadata...'
. (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
}

Write-Host -ForegroundColor Green '-------------Done-------------'
Loading