Skip to content

Commit f593d5b

Browse files
Migrate DataProtection from generation to main (#21263)
* Move DataProtection to main * Update ChangeLog.md * Create BreakingChangeIssues.csv * Update SignatureIssues.csv --------- Co-authored-by: Yabo Hu <[email protected]>
1 parent c7ab767 commit f593d5b

File tree

847 files changed

+21947
-14664
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

847 files changed

+21947
-14664
lines changed

src/DataProtection/Az.DataProtection.format.ps1xml

Lines changed: 550 additions & 304 deletions
Large diffs are not rendered by default.

src/DataProtection/Az.DataProtection.psd1

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Generated by: Microsoft Corporation
55
#
6-
# Generated on: 2023/2/3
6+
# Generated on: 3/21/2023
77
#
88

99
@{
@@ -83,13 +83,15 @@ FunctionsToExport = 'Backup-AzDataProtectionBackupInstanceAdhoc',
8383
'Get-AzDataProtectionResourceGuard',
8484
'Initialize-AzDataProtectionBackupInstance',
8585
'Initialize-AzDataProtectionRestoreRequest',
86+
'New-AzDataProtectionBackupConfigurationClientObject',
8687
'New-AzDataProtectionBackupInstance',
8788
'New-AzDataProtectionBackupPolicy',
8889
'New-AzDataProtectionBackupVault',
8990
'New-AzDataProtectionBackupVaultStorageSettingObject',
9091
'New-AzDataProtectionPolicyTagCriteriaClientObject',
9192
'New-AzDataProtectionPolicyTriggerScheduleClientObject',
9293
'New-AzDataProtectionResourceGuard',
94+
'New-AzDataProtectionRestoreConfigurationClientObject',
9395
'New-AzDataProtectionRetentionLifeCycleClientObject',
9496
'Remove-AzDataProtectionBackupInstance',
9597
'Remove-AzDataProtectionBackupPolicy',
@@ -145,12 +147,7 @@ PrivateData = @{
145147
# IconUri = ''
146148

147149
# ReleaseNotes of this module
148-
ReleaseNotes = '* Added support for Immutable backup vaults
149-
* Added Cross subscription restore flag for backup vaults
150-
* Added Soft delete setting for backup vaults
151-
* Fixed issue with Set-AzDataProtectionMSIPermission command
152-
* Replaced Get-InstalledModule with Get-Module -ListAvailable
153-
* Added New-AzDataProtectionSoftDeleteSettingObject command'
150+
# ReleaseNotes = ''
154151

155152
# Prerelease string of this module
156153
# Prerelease = ''

src/DataProtection/ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Added support for AKS workload with Backup Vaults
22+
* Added support for `Set-AzDataProtectionMSIPermission` during restore with AKS workload
2123

2224
## Version 1.1.0
2325
* Added support for Immutable backup vaults

src/DataProtection/DataProtection.sln

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.0.31903.59
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{70F3ABF5-CC20-44FA-9625-9C793F887E37}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{6D3A248D-F296-43D6-9962-673542D240AB}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssemblyLoading", "..\Accounts\AssemblyLoading\AssemblyLoading.csproj", "{3D1F7405-0C02-4B42-81E2-3B9EF70A46EE}"
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssemblyLoading", "..\Accounts\AssemblyLoading\AssemblyLoading.csproj", "{4D25E267-5BFD-4E55-A49D-6B69DB8639E2}"
99
EndProject
10-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{96DD0394-7DB5-4348-9D79-DA69BE6555AE}"
10+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{3C107874-EACD-4B98-8C9A-CDB605995658}"
1111
EndProject
12-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{6F3E1031-0E67-4DAA-90DE-340A4471D686}"
12+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{B57DDA22-4307-454D-ADA3-01C3417EC35D}"
1313
EndProject
14-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{0CEFCFC5-47DA-4F26-BA49-5F78AD019AB3}"
14+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{3B3FA978-2B8E-40FD-9649-3F3763A2FFE5}"
1515
EndProject
16-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{8FC38CC5-15DA-439A-BB6D-3DC0418BC512}"
16+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{C1F620E5-B91E-4FA4-B2E1-EEA3E3F11FC5}"
1717
EndProject
18-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.DataProtection", "Az.DataProtection.csproj", "{ED46C18F-5742-4793-AF2A-DDB77AC7DC09}"
18+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.DataProtection", "Az.DataProtection.csproj", "{0A8E1C5D-64DA-4492-A2FE-E08AABF67EF6}"
1919
EndProject
2020
Global
2121
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -26,33 +26,33 @@ Global
2626
HideSolutionNode = FALSE
2727
EndGlobalSection
2828
GlobalSection(ProjectConfigurationPlatforms) = postSolution
29-
{70F3ABF5-CC20-44FA-9625-9C793F887E37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
30-
{70F3ABF5-CC20-44FA-9625-9C793F887E37}.Debug|Any CPU.Build.0 = Debug|Any CPU
31-
{70F3ABF5-CC20-44FA-9625-9C793F887E37}.Release|Any CPU.ActiveCfg = Release|Any CPU
32-
{70F3ABF5-CC20-44FA-9625-9C793F887E37}.Release|Any CPU.Build.0 = Release|Any CPU
33-
{3D1F7405-0C02-4B42-81E2-3B9EF70A46EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
34-
{3D1F7405-0C02-4B42-81E2-3B9EF70A46EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
35-
{3D1F7405-0C02-4B42-81E2-3B9EF70A46EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
36-
{3D1F7405-0C02-4B42-81E2-3B9EF70A46EE}.Release|Any CPU.Build.0 = Release|Any CPU
37-
{96DD0394-7DB5-4348-9D79-DA69BE6555AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
38-
{96DD0394-7DB5-4348-9D79-DA69BE6555AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
39-
{96DD0394-7DB5-4348-9D79-DA69BE6555AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
40-
{96DD0394-7DB5-4348-9D79-DA69BE6555AE}.Release|Any CPU.Build.0 = Release|Any CPU
41-
{6F3E1031-0E67-4DAA-90DE-340A4471D686}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
42-
{6F3E1031-0E67-4DAA-90DE-340A4471D686}.Debug|Any CPU.Build.0 = Debug|Any CPU
43-
{6F3E1031-0E67-4DAA-90DE-340A4471D686}.Release|Any CPU.ActiveCfg = Release|Any CPU
44-
{6F3E1031-0E67-4DAA-90DE-340A4471D686}.Release|Any CPU.Build.0 = Release|Any CPU
45-
{0CEFCFC5-47DA-4F26-BA49-5F78AD019AB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
46-
{0CEFCFC5-47DA-4F26-BA49-5F78AD019AB3}.Debug|Any CPU.Build.0 = Debug|Any CPU
47-
{0CEFCFC5-47DA-4F26-BA49-5F78AD019AB3}.Release|Any CPU.ActiveCfg = Release|Any CPU
48-
{0CEFCFC5-47DA-4F26-BA49-5F78AD019AB3}.Release|Any CPU.Build.0 = Release|Any CPU
49-
{8FC38CC5-15DA-439A-BB6D-3DC0418BC512}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
50-
{8FC38CC5-15DA-439A-BB6D-3DC0418BC512}.Debug|Any CPU.Build.0 = Debug|Any CPU
51-
{8FC38CC5-15DA-439A-BB6D-3DC0418BC512}.Release|Any CPU.ActiveCfg = Release|Any CPU
52-
{8FC38CC5-15DA-439A-BB6D-3DC0418BC512}.Release|Any CPU.Build.0 = Release|Any CPU
53-
{ED46C18F-5742-4793-AF2A-DDB77AC7DC09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
54-
{ED46C18F-5742-4793-AF2A-DDB77AC7DC09}.Debug|Any CPU.Build.0 = Debug|Any CPU
55-
{ED46C18F-5742-4793-AF2A-DDB77AC7DC09}.Release|Any CPU.ActiveCfg = Release|Any CPU
56-
{ED46C18F-5742-4793-AF2A-DDB77AC7DC09}.Release|Any CPU.Build.0 = Release|Any CPU
29+
{6D3A248D-F296-43D6-9962-673542D240AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
30+
{6D3A248D-F296-43D6-9962-673542D240AB}.Debug|Any CPU.Build.0 = Debug|Any CPU
31+
{6D3A248D-F296-43D6-9962-673542D240AB}.Release|Any CPU.ActiveCfg = Release|Any CPU
32+
{6D3A248D-F296-43D6-9962-673542D240AB}.Release|Any CPU.Build.0 = Release|Any CPU
33+
{4D25E267-5BFD-4E55-A49D-6B69DB8639E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
34+
{4D25E267-5BFD-4E55-A49D-6B69DB8639E2}.Debug|Any CPU.Build.0 = Debug|Any CPU
35+
{4D25E267-5BFD-4E55-A49D-6B69DB8639E2}.Release|Any CPU.ActiveCfg = Release|Any CPU
36+
{4D25E267-5BFD-4E55-A49D-6B69DB8639E2}.Release|Any CPU.Build.0 = Release|Any CPU
37+
{3C107874-EACD-4B98-8C9A-CDB605995658}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
38+
{3C107874-EACD-4B98-8C9A-CDB605995658}.Debug|Any CPU.Build.0 = Debug|Any CPU
39+
{3C107874-EACD-4B98-8C9A-CDB605995658}.Release|Any CPU.ActiveCfg = Release|Any CPU
40+
{3C107874-EACD-4B98-8C9A-CDB605995658}.Release|Any CPU.Build.0 = Release|Any CPU
41+
{B57DDA22-4307-454D-ADA3-01C3417EC35D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
42+
{B57DDA22-4307-454D-ADA3-01C3417EC35D}.Debug|Any CPU.Build.0 = Debug|Any CPU
43+
{B57DDA22-4307-454D-ADA3-01C3417EC35D}.Release|Any CPU.ActiveCfg = Release|Any CPU
44+
{B57DDA22-4307-454D-ADA3-01C3417EC35D}.Release|Any CPU.Build.0 = Release|Any CPU
45+
{3B3FA978-2B8E-40FD-9649-3F3763A2FFE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
46+
{3B3FA978-2B8E-40FD-9649-3F3763A2FFE5}.Debug|Any CPU.Build.0 = Debug|Any CPU
47+
{3B3FA978-2B8E-40FD-9649-3F3763A2FFE5}.Release|Any CPU.ActiveCfg = Release|Any CPU
48+
{3B3FA978-2B8E-40FD-9649-3F3763A2FFE5}.Release|Any CPU.Build.0 = Release|Any CPU
49+
{C1F620E5-B91E-4FA4-B2E1-EEA3E3F11FC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
50+
{C1F620E5-B91E-4FA4-B2E1-EEA3E3F11FC5}.Debug|Any CPU.Build.0 = Debug|Any CPU
51+
{C1F620E5-B91E-4FA4-B2E1-EEA3E3F11FC5}.Release|Any CPU.ActiveCfg = Release|Any CPU
52+
{C1F620E5-B91E-4FA4-B2E1-EEA3E3F11FC5}.Release|Any CPU.Build.0 = Release|Any CPU
53+
{0A8E1C5D-64DA-4492-A2FE-E08AABF67EF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
54+
{0A8E1C5D-64DA-4492-A2FE-E08AABF67EF6}.Debug|Any CPU.Build.0 = Debug|Any CPU
55+
{0A8E1C5D-64DA-4492-A2FE-E08AABF67EF6}.Release|Any CPU.ActiveCfg = Release|Any CPU
56+
{0A8E1C5D-64DA-4492-A2FE-E08AABF67EF6}.Release|Any CPU.Build.0 = Release|Any CPU
5757
EndGlobalSection
5858
EndGlobal

src/DataProtection/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ This file contains the configuration for generating My API from the OpenAPI spec
3434
3535
``` yaml
3636
# it's the same options as command line options, just drop the double-dash!
37-
branch: f38115ac455af89493b0a0719d9a987404560dda
37+
branch: 8c9a6bd96daf9e0e7f4bba47df78dfa0a23acf07
3838
require:
3939
- $(this-folder)/../readme.azure.noprofile.md
4040
input-file:
41-
- $(repo)/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2022-12-01/dataprotection.json
41+
- $(repo)/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2023-01-01/dataprotection.json
4242
title: DataProtection
4343
directive:
4444
- from: swagger-document
@@ -293,16 +293,16 @@ directive:
293293
- UserFacingError
294294
- from: source-file-csharp
295295
where: $
296-
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20221201.IBaseBackupPolicy Property', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20221201.IBaseBackupPolicy Property');
296+
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202301.IBaseBackupPolicy Property', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202301.IBaseBackupPolicy Property');
297297
- from: source-file-csharp
298298
where: $
299-
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20221201.ITriggerContext Trigger', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20221201.ITriggerContext Trigger');
299+
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202301.ITriggerContext Trigger', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202301.ITriggerContext Trigger');
300300
- from: source-file-csharp
301301
where: $
302-
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20221201.IBackupParameters BackupParameter', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20221201.IBackupParameters BackupParameter');
302+
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202301.IBackupParameters BackupParameter', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202301.IBackupParameters BackupParameter');
303303
- from: source-file-csharp
304304
where: $
305-
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20221201.IAzureBackupRecoveryPoint Property', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20221201.IAzureBackupRecoveryPoint Property');
305+
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202301.IAzureBackupRecoveryPoint Property', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202301.IAzureBackupRecoveryPoint Property');
306306
```
307307
308308
## Alternate settings

src/DataProtection/build-module.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ $null = New-Item -ItemType Directory -Force -Path $examplesFolder
123123

124124
Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...'
125125
$modelCmdlets = @()
126+
$modelCmdletFolder = Join-Path (Join-Path $PSScriptRoot './custom') 'autogen-model-cmdlets'
127+
if (Test-Path $modelCmdletFolder) {
128+
$null = Remove-Item -Force -Recurse -Path $modelCmdletFolder
129+
}
126130
if ($modelCmdlets.Count -gt 0) {
127131
. (Join-Path $PSScriptRoot 'create-model-cmdlets.ps1')
128132
CreateModelCmdlet($modelCmdlets)

src/DataProtection/create-model-cmdlets.ps1

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,13 @@ function CreateModelCmdlet {
2323
}
2424

2525
$ModelCsPath = Join-Path (Join-Path $PSScriptRoot 'generated\api') 'Models'
26-
$ModuleName = 'DataProtection'
2726
$OutputDir = Join-Path $PSScriptRoot 'custom\autogen-model-cmdlets'
2827
$null = New-Item -ItemType Directory -Force -Path $OutputDir
28+
if (''.length -gt 0) {
29+
$ModuleName = ''
30+
} else {
31+
$ModuleName = 'Az.DataProtection'
32+
}
2933

3034
$CsFiles = Get-ChildItem -Path $ModelCsPath -Recurse -Filter *.cs
3135
$Content = ''
@@ -64,10 +68,10 @@ function CreateModelCmdlet {
6468
$ObjectType = $Model
6569
$ObjectTypeWithNamespace = "${Namespace}.${ObjectType}"
6670
# remove duplicated module name
67-
if ($ObjectType.StartsWith($ModuleName)) {
71+
if ($ObjectType.StartsWith('DataProtection')) {
6872
$ModulePrefix = ''
6973
} else {
70-
$ModulePrefix = $ModuleName
74+
$ModulePrefix = 'DataProtection'
7175
}
7276
$OutputPath = Join-Path -ChildPath "New-Az${ModulePrefix}${ObjectType}Object.ps1" -Path $OutputDir
7377

@@ -158,7 +162,7 @@ Create an in-memory object for ${ObjectType}.
158162
.Outputs
159163
${ObjectTypeWithNamespace}
160164
.Link
161-
https://learn.microsoft.com/powershell/module/az.${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object
165+
https://learn.microsoft.com/powershell/module/${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object
162166
#>
163167
function New-Az${ModulePrefix}${ObjectType}Object {
164168
[OutputType('${ObjectTypeWithNamespace}')]

src/DataProtection/custom/Cmdlets/Backupcenter/Search-AzDataProtectionBackupInstanceInAzGraph.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
foreach($argResponse in $argInstanceResponse)
5656
{
5757
$jsonStringResponse = $argResponse | ConvertTo-Json -Depth 100
58-
$backupInstances += [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20221201.BackupInstanceResource]::FromJsonString($jsonStringResponse)
58+
$backupInstances += [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202301.BackupInstanceResource]::FromJsonString($jsonStringResponse)
5959
}
6060
return $backupInstances
6161
}

src/DataProtection/custom/Cmdlets/Backupcenter/Search-AzDataProtectionJobInAzGraph.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
foreach($jobresponse in $argJobResponse)
8484
{
8585
$jsonStringResponse = $jobresponse | ConvertTo-Json -Depth 100
86-
$backupJobs += [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20221201.AzureBackupJobResource]::FromJsonString($jsonStringResponse)
86+
$backupJobs += [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api202301.AzureBackupJobResource]::FromJsonString($jsonStringResponse)
8787
}
8888
return $backupJobs
8989
}

0 commit comments

Comments
 (0)