Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")]
[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")]
[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - DataProtection")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("2.7.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("2.7.0")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("2.8.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("2.8.0")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]
16 changes: 8 additions & 8 deletions src/DataProtection/DataProtection.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ 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!
commit: ebdacd9571bc8a5faad5b8d418c70c3b6b7c2965
commit: 8626bcfaf4b2a816117f76dadf6a9a4575f59796
require:
- $(this-folder)/../../readme.azure.noprofile.md
input-file:
- $(repo)/specification/dataprotection/resource-manager/Microsoft.DataProtection/DataProtection/stable/2025-02-01/dataprotection.json
- $(repo)/specification/dataprotection/resource-manager/Microsoft.DataProtection/stable/2025-07-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:
Expand Down Expand Up @@ -350,7 +350,7 @@ directive:
- where:
verb: Test
subject: BackupInstanceRestore
variant: ^Validate2$|^ValidateExpanded2$|^ValidateViaIdentity2$|^ValidateViaIdentityExpanded2$
variant: ^Validate2$|^ValidateExpanded2$|^ValidateViaIdentity2$|^ValidateViaIdentityExpanded$
hide: true
- where:
verb: Test
Expand Down Expand Up @@ -467,19 +467,19 @@ directive:
- EncryptionSettings
- from: source-file-csharp
where: $
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.IBaseBackupPolicy Property', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.IBaseBackupPolicy Property');
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.IBaseBackupPolicy Property', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.IBaseBackupPolicy Property');
- from: source-file-csharp
where: $
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.ITriggerContext Trigger', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.ITriggerContext Trigger');
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.ITriggerContext Trigger', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.ITriggerContext Trigger');
- from: source-file-csharp
where: $
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.IBackupParameters BackupParameter', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.IBackupParameters BackupParameter');
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.IBackupParameters BackupParameter', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.IBackupParameters BackupParameter');
- from: source-file-csharp
where: $
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.IAzureBackupRecoveryPoint Property', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.IAzureBackupRecoveryPoint Property');
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.IAzureBackupRecoveryPoint Property', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.IAzureBackupRecoveryPoint Property');
- from: source-file-csharp
where: $
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.INamespacedNameResource ResourceModifierReference', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.INamespacedNameResource ResourceModifierReference');
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.INamespacedNameResource ResourceModifierReference', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.INamespacedNameResource ResourceModifierReference');
```

## Alternate settings
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resourceType": "backupVaults/backupInstances/recoveryPoints",
"apiVersion": "2025-02-01",
"apiVersion": "2025-07-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": "2025-02-01",
"apiVersion": "2025-07-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/backupJobs",
"apiVersion": "2025-02-01",
"apiVersion": "2025-07-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/backupPolicies",
"apiVersion": "2025-02-01",
"apiVersion": "2025-07-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": "2025-02-01",
"apiVersion": "2025-07-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": "2025-02-01",
"apiVersion": "2025-07-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": "2025-02-01",
"apiVersion": "2025-07-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": "2025-02-01",
"apiVersion": "2025-07-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": "2025-02-01",
"apiVersion": "2025-07-01",
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.dataprotection"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
foreach($argResponse in $argInstanceResponse)
{
$jsonStringResponse = $argResponse | ConvertTo-Json -Depth 100
$backupInstances += [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.BackupInstanceResource]::FromJsonString($jsonStringResponse)
$backupInstances += [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.BackupInstanceResource]::FromJsonString($jsonStringResponse)
}
return $backupInstances
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
foreach($argVault in $argAllVaults)
{
$jsonStringResponse = $argVault | ConvertTo-Json -Depth 100
$backupVaults += [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.BackupVaultResource]::FromJsonString($jsonStringResponse)
$backupVaults += [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.BackupVaultResource]::FromJsonString($jsonStringResponse)
}
return $backupVaults
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
foreach($jobresponse in $argJobResponse)
{
$jsonStringResponse = $jobresponse | ConvertTo-Json -Depth 100
$backupJobs += [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.AzureBackupJobResource]::FromJsonString($jsonStringResponse)
$backupJobs += [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.AzureBackupJobResource]::FromJsonString($jsonStringResponse)
}
return $backupJobs
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

function New-AzDataProtectionResourceGuard
{
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.IResourceGuardResource')]
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.IResourceGuardResource')]
[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Creates a resource guard under a resource group')]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

function Update-AzDataProtectionResourceGuard
{
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.IResourceGuardResource')]
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.IResourceGuardResource')]
[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Updates a resource guard belonging to a resource group')]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function Initialize-AzDataProtectionBackupInstance {
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.IBackupInstanceResource')]
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.IBackupInstanceResource')]
[CmdletBinding(PositionalBinding=$false)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Initializes Backup instance Request object for configuring backup')]

Expand Down Expand Up @@ -41,7 +41,7 @@
${FriendlyName},

[Parameter(Mandatory=$false, HelpMessage='Backup configuration for backup. Use this parameter to configure protection for AzureKubernetesService, AzureBlob, AzureDataLakeStorage.')]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.IBackupDatasourceParameters]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.IBackupDatasourceParameters]
${BackupConfiguration},

[Parameter(Mandatory=$false, HelpMessage='Use system assigned identity')]
Expand All @@ -57,7 +57,7 @@
process {

$manifest = LoadManifest -DatasourceType $DatasourceType.ToString()
$backupInstance = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.BackupInstance]::new()
$backupInstance = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.BackupInstance]::new()
$backupInstance.ObjectType = "BackupInstance"

if($manifest.snapshotRGPermissions.Length -eq 0 -and $SnapshotResourceGroupId -ne "")
Expand Down Expand Up @@ -113,7 +113,7 @@
throw "UserAssignedIdentityArmId cannot be provided without UseSystemAssignedIdentity and UseSystemAssignedIdentity must be false when UserAssignedIdentityArmId is provided."
}

$backupInstance.IdentityDetail = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.IdentityDetails]::new()
$backupInstance.IdentityDetail = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.IdentityDetails]::new()
$backupInstance.IdentityDetail.UseSystemAssignedIdentity = $UseSystemAssignedIdentity

if ($hasUserAssignedIdentityArmId) {
Expand All @@ -131,9 +131,9 @@
$errormsg = "Please input SecretStoreType"
throw $errormsg
}
$backupInstance.DatasourceAuthCredentials = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.SecretStoreBasedAuthCredentials]::new()
$backupInstance.DatasourceAuthCredentials = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.SecretStoreBasedAuthCredentials]::new()
$backupInstance.DatasourceAuthCredentials.ObjectType = "SecretStoreBasedAuthCredentials"
$backupInstance.DatasourceAuthCredentials.SecretStoreResource = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.SecretStoreResource]::new()
$backupInstance.DatasourceAuthCredentials.SecretStoreResource = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.SecretStoreResource]::new()
$backupInstance.DatasourceAuthCredentials.SecretStoreResource.SecretStoreType = $SecretStoreType
$backupInstance.DatasourceAuthCredentials.SecretStoreResource.Uri = $SecretStoreURI
}
Expand All @@ -143,7 +143,7 @@
}
}

$backupInstanceResource = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.BackupInstanceResource]::new()
$backupInstanceResource = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.BackupInstanceResource]::new()
$backupInstanceResource.Property = $backupInstance

if($PSBoundParameters.ContainsKey("DatasourceId"))
Expand All @@ -161,7 +161,7 @@

if($manifest.addDataStoreParametersList -eq $true)
{
$operationalParam = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.AzureOperationalStoreParameters]::new()
$operationalParam = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.AzureOperationalStoreParameters]::new()
$operationalParam.DataStoreType = "OperationalStore"
$operationalParam.ObjectType = "AzureOperationalStoreParameters"
$operationalParam.ResourceGroupId = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function New-AzDataProtectionBackupConfigurationClientObject{
${IncludeClusterScopeResource},

[Parameter(Mandatory=$false, HelpMessage='Hook reference to be executed during backup.')]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.NamespacedNameResource[]]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.NamespacedNameResource[]]
${BackupHookReference},

[Parameter(Mandatory=$false, HelpMessage='List of containers to be backed up inside the VaultStore. Use this parameter for DatasourceType AzureBlob.')]
Expand Down Expand Up @@ -71,7 +71,7 @@ function New-AzDataProtectionBackupConfigurationClientObject{
throw $message
}

$dataSourceParam = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.KubernetesClusterBackupDatasourceParameters]::new()
$dataSourceParam = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.KubernetesClusterBackupDatasourceParameters]::new()
$dataSourceParam.ObjectType = "KubernetesClusterBackupDatasourceParameters"

$dataSourceParam.ExcludedResourceType = $ExcludedResourceType
Expand Down Expand Up @@ -99,11 +99,11 @@ function New-AzDataProtectionBackupConfigurationClientObject{
if($DatasourceType.ToString() -eq "AzureBlob" -or $DatasourceType.ToString() -eq "AzureDataLakeStorage"){
$dataSourceParam = $null
if($DatasourceType.ToString() -eq "AzureBlob"){
$dataSourceParam = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.BlobBackupDatasourceParameters]::new()
$dataSourceParam = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.BlobBackupDatasourceParameters]::new()
$dataSourceParam.ObjectType = "BlobBackupDatasourceParameters"
}
elseif($DatasourceType.ToString() -eq "AzureDataLakeStorage"){
$dataSourceParam = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.AdlsBlobBackupDatasourceParameters]::new()
$dataSourceParam = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.AdlsBlobBackupDatasourceParameters]::new()
$dataSourceParam.ObjectType = "AdlsBlobBackupDatasourceParameters"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function New-AzDataProtectionBackupInstance {
${VaultName},

[Parameter(Mandatory, HelpMessage='Backup instance request object which will be used to configure backup')]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.IBackupInstanceResource]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.IBackupInstanceResource]
${BackupInstance},

[Parameter(Mandatory=$false, HelpMessage='Resource tags')]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function Stop-AzDataProtectionBackupInstanceProtection
{
$parameterSetName = $PsCmdlet.ParameterSetName
if($parameterSetName -eq "StopViaIdentity"){
$Parameter = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.StopProtectionRequest]::new()
$Parameter = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.StopProtectionRequest]::new()

$hasResourceGuardOperationRequest = $PSBoundParameters.Remove("ResourceGuardOperationRequest")
if($hasResourceGuardOperationRequest){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function Suspend-AzDataProtectionBackupInstanceBackup
{
$parameterSetName = $PsCmdlet.ParameterSetName
if($parameterSetName -eq "SuspendViaIdentity"){
$Parameter = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.SuspendBackupRequest]::new()
$Parameter = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.SuspendBackupRequest]::new()

$hasResourceGuardOperationRequest = $PSBoundParameters.Remove("ResourceGuardOperationRequest")
if($hasResourceGuardOperationRequest){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

function Update-AzDataProtectionBackupInstance
{
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.IBackupInstanceResource')]
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.IBackupInstanceResource')]
[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Updates a given backup instance')]

Expand Down Expand Up @@ -125,7 +125,7 @@ function Update-AzDataProtectionBackupInstance
throw "UserAssignedIdentityArmId cannot be provided without UseSystemAssignedIdentity and UseSystemAssignedIdentity must be false when UserAssignedIdentityArmId is provided."
}

$instance.Property.IdentityDetail = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.IdentityDetails]::new()
$instance.Property.IdentityDetail = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.IdentityDetails]::new()
$instance.Property.IdentityDetail.UseSystemAssignedIdentity = $UseSystemAssignedIdentity

if ($hasUserAssignedIdentityArmId) {
Expand Down Expand Up @@ -154,11 +154,11 @@ function Update-AzDataProtectionBackupInstance
}
elseif($datasourceParam -eq $null){
if ($DatasourceType -eq "AzureBlob"){
$backupConfiguration = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.BlobBackupDatasourceParameters]::new()
$backupConfiguration = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.BlobBackupDatasourceParameters]::new()
$backupConfiguration.ObjectType = "BlobBackupDatasourceParameters"
}
elseif ($DatasourceType -eq "AzureDataLakeStorage"){
$backupConfiguration = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250201.AdlsBlobBackupDatasourceParameters]::new()
$backupConfiguration = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250701.AdlsBlobBackupDatasourceParameters]::new()
$backupConfiguration.ObjectType = "AdlsBlobBackupDatasourceParameters"
}
$backupConfiguration.ContainersList = $VaultedBackupContainer
Expand Down
Loading
Loading