Skip to content
Open
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
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.9.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("2.9.0")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("2.9.1")]
[assembly: System.Reflection.AssemblyVersionAttribute("2.9.1")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]
94 changes: 74 additions & 20 deletions src/DataProtection/DataProtection.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ require:
input-file:
- $(repo)/specification/dataprotection/resource-manager/Microsoft.DataProtection/DataProtection/stable/2025-09-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
Expand Down Expand Up @@ -279,6 +276,33 @@ directive:
parameter-name: SecuritySettingEncryptionSetting
set:
parameter-name: EncryptionSetting
# Update ResourceGuardOperationRequest description across all request models to provide actionable guidance
# The operation-specific dpp request name varies by cmdlet:
# Suspend-AzDataProtectionBackupInstanceBackup -> dppDisableSuspendBackupsRequests
# Stop-AzDataProtectionBackupInstanceProtection -> dppDisableStopProtectionRequests
# Update-AzDataProtectionBackupInstance -> dppModifyPolicy
# Start-AzDataProtectionBackupInstanceRestore -> dppTriggerRestoreRequests
# Update-AzDataProtectionBackupVault -> dppReduceImmutabilityStateRequests, dppReduceSoftDeleteSecurityRequests, dppModifyEncryptionSettingsRequests
- from: swagger-document
where: $.definitions.SuspendBackupRequest.properties.resourceGuardOperationRequests
transform: >
$.description = "Resource guard operation request in the format similar to <ResourceGuard-ARMID>/dppDisableSuspendBackupsRequests/default. Use this parameter when the operation is MUA protected.";
- from: swagger-document
where: $.definitions.StopProtectionRequest.properties.resourceGuardOperationRequests
transform: >
$.description = "Resource guard operation request in the format similar to <ResourceGuard-ARMID>/dppDisableStopProtectionRequests/default. Use this parameter when the operation is MUA protected.";
- from: swagger-document
where: $.definitions.BackupInstance.properties.resourceGuardOperationRequests
transform: >
$.description = "Resource guard operation request in the format similar to <ResourceGuard-ARMID>/dppModifyPolicy/default. Use this parameter when the operation is MUA protected.";
- from: swagger-document
where: $.definitions.AzureBackupRestoreRequest.properties.resourceGuardOperationRequests
transform: >
$.description = "Resource guard operation request in the format similar to <ResourceGuard-ARMID>/dppTriggerRestoreRequests/default. Use this parameter when the operation is MUA protected.";
- from: swagger-document
where: $.definitions.BackupVault.properties.resourceGuardOperationRequests
transform: >
$.description = "Resource guard operation request in the format similar to <ResourceGuard-ARMID>/<operation>/default. Use this parameter when the operation is MUA protected. Supported operations include dppReduceImmutabilityStateRequests, dppReduceSoftDeleteSecurityRequests, and dppModifyEncryptionSettingsRequests.";
- where:
verb: Get
subject: BackupVaultResource.*
Expand Down Expand Up @@ -317,7 +341,7 @@ directive:
hide: true
- where:
verb: Unlock
variant: ^UnlockViaIdentityExpanded$|^UnlockViaIdentity$|^Unlock$
variant: ^(Unlock)(?!.*?(Expanded|JsonFilePath|JsonString))|^UnlockViaIdentityExpanded$|^UnlockViaIdentity$
remove: true
- where:
verb: Unlock
Expand All @@ -326,12 +350,16 @@ directive:
- where:
verb: New
subject: ResourceGuardProxy$
variant: ^Create$|^UpdateExpanded$|^UpdateViaIdentityExpanded$
variant: ^(Create)(?!.*?(Expanded|JsonFilePath|JsonString))|^UpdateExpanded$|^UpdateViaIdentityExpanded$
remove: true
- where:
subject: DppResourceGuardProxy$
set:
subject: ResourceGuardMapping
- where:
verb: Unlock
subject: ^DppResourceGuardProxyDelete$
remove: true
- where:
parameter-name: ResourceGuardProxyName
hide: true
Expand All @@ -343,6 +371,10 @@ directive:
subject: ResourceGuardMapping
parameter-name: LastUpdatedTime|Description|ResourceGuardOperationDetail
hide: true
- where:
verb: Update
subject: ^ResourceGuardMapping$
remove: true
- where:
verb: Get
subject: DeletedBackupVault
Expand Down Expand Up @@ -393,7 +425,14 @@ directive:
subject: BackupPolicy.*
hide: true
- where:
variant: ^CreateViaIdentity$|^Patch$|^PatchViaIdentity$|^Backup$|^BackupViaIdentity$|^TriggerViaIdentity|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$
verb: Update
subject: ^BackupPolicy$
remove: true
- where:
variant: ^CreateViaIdentity$|^PatchViaIdentity$|^BackupViaIdentity$|^TriggerViaIdentity|^CreateViaIdentityExpanded$|^UpdateViaIdentity$
remove: true
- where:
variant: ^(Patch|Backup|Update)(?!.*?(Expanded|JsonFilePath|JsonString))
remove: true
- where:
verb: Get
Expand Down Expand Up @@ -480,11 +519,11 @@ directive:
hide: true
- where:
verb: Invoke
variant: ^Post$|^PostViaIdentity$|^PostViaIdentityExpanded$
variant: ^(Post)(?!.*?(Expanded|JsonFilePath|JsonString))|^PostViaIdentity$|^PostViaIdentityExpanded$
remove: true
- where:
verb: Find
variant: ^Find$|^FindViaIdentity$|^FindViaIdentityExpanded$
variant: ^(Find)(?!.*?(Expanded|JsonFilePath|JsonString))|^FindViaIdentity$|^FindViaIdentityExpanded$
remove: true
- where:
verb: Get
Expand Down Expand Up @@ -520,6 +559,11 @@ directive:
parameter-name: BackupInstanceName
set:
parameter-description: The name of the deleted backup instance
- where:
verb: Update
subject: ^BackupInstance$
variant: ^UpdateViaIdentityBackupVaultExpanded$|^UpdateViaIdentityExpanded$
remove: true
- from: swagger-document
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/findRestorableTimeRanges"].post
transform: $["description"] = "Finds the valid recovery point in time ranges for the restore."
Expand All @@ -535,6 +579,9 @@ directive:
"$ref": "#/definitions/OperationJobExtendedInfo"
}
}
- from: swagger-document
where: $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/validateForModifyBackup"].post.parameters[?(@.name=="parameters")]
transform: $["name"] = "validateForModifyBackupRequest"
- where:
verb: Test
subject: BackupInstance
Expand Down Expand Up @@ -572,17 +619,24 @@ directive:
verb: Test
subject: BackupInstanceCrossRegionRestore
hide: true
- where:
verb: Test
subject: BackupInstanceUpdate
parameter-name: Name
set:
alias:
- BackupInstanceName
Comment thread
JunKai-v marked this conversation as resolved.
- where:
subject: FetchCrossRegionRestoreJob
set:
subject: CrossRegionRestoreJob
- where:
verb: Update
subject: ^BackupInstance$
variant: ^UpdateExpanded$
hide: true
- where:
verb: Update
subject: ^BackupInstance$
parameter-name: Name
clear-alias: true
- where:
verb: Test
subject: ^BackupInstance$
remove: true
- where:
subject: CrossRegionRestoreJob
variant: ^Get.*
Expand Down Expand Up @@ -684,19 +738,19 @@ directive:
- ValidateCrossRegionRestoreRequestObject
- from: source-file-csharp
where: $
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250901.IBaseBackupPolicy Property', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250901.IBaseBackupPolicy Property');
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IBaseBackupPolicy Property', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IBaseBackupPolicy Property');
- from: source-file-csharp
where: $
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250901.ITriggerContext Trigger', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250901.ITriggerContext Trigger');
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.ITriggerContext Trigger', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.ITriggerContext Trigger');
- from: source-file-csharp
where: $
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250901.IBackupParameters BackupParameter', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250901.IBackupParameters BackupParameter');
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IBackupParameters BackupParameter', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IBackupParameters BackupParameter');
- from: source-file-csharp
where: $
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250901.IAzureBackupRecoveryPoint Property', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250901.IAzureBackupRecoveryPoint Property');
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IAzureBackupRecoveryPoint Property', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IAzureBackupRecoveryPoint Property');
- from: source-file-csharp
where: $
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250901.INamespacedNameResource ResourceModifierReference', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.Api20250901.INamespacedNameResource ResourceModifierReference');
transform: $ = $.replace('internal Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.INamespacedNameResource ResourceModifierReference', 'public Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.INamespacedNameResource ResourceModifierReference');

- where:
verb: Backup|Edit|Find|Get|Initialize|New|Set|Start|Stop|Suspend|Sync|Test|Update
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,135 +133,6 @@
]
}
]
},
{
"name": "Start-AzDataProtectionBackupInstanceRestore",
"description": "Triggers restore for a BackupInstance",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/restore",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.dataprotection/start-azdataprotectionbackupinstancerestore"
},
"parameterSets": [
{
"parameters": [
"-BackupInstanceName <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]",
"-VaultName <String>"
]
}
]
},
"examples": [
{
"description": "Triggers restore for a BackupInstance",
"parameters": [
{
"name": "-BackupInstanceName",
"value": "[Path.backupInstanceName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
},
{
"name": "-VaultName",
"value": "[Path.vaultName]"
}
]
}
]
},
{
"name": "Test-AzDataProtectionBackupInstanceRestore",
"description": "Validates if Restore can be triggered for a DataSource",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/validateRestore",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.dataprotection/test-azdataprotectionbackupinstancerestore"
},
"parameterSets": [
{
"parameters": [
"-Name <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]",
"-VaultName <String>"
]
}
]
},
"examples": [
{
"description": "Validates if Restore can be triggered for a DataSource",
"parameters": [
{
"name": "-Name",
"value": "[Path.backupInstanceName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
},
{
"name": "-VaultName",
"value": "[Path.vaultName]"
}
]
}
]
},
{
"name": "Test-AzDataProtectionBackupInstanceUpdate",
"description": "Validate whether update for backup instance will be successful or not",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/validateForModifyBackup",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.dataprotection/test-azdataprotectionbackupinstanceupdate"
},
"parameterSets": [
{
"parameters": [
"-Name <String>",
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]",
"-VaultName <String>"
]
}
]
},
"examples": [
{
"description": "Validate whether update for backup instance will be successful or not",
"parameters": [
{
"name": "-Name",
"value": "[Path.backupInstanceName]"
},
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
},
{
"name": "-VaultName",
"value": "[Path.vaultName]"
}
]
}
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,44 +80,6 @@
]
}
]
},
{
"name": "Test-AzDataProtectionBackupInstanceReadiness",
"description": "Validate whether adhoc backup will be successful or not",
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/validateForBackup",
"help": {
"learnMore": {
"url": "https://learn.microsoft.com/powershell/module/az.dataprotection/test-azdataprotectionbackupinstancereadiness"
},
"parameterSets": [
{
"parameters": [
"-ResourceGroupName <String>",
"[-SubscriptionId <String>]",
"-VaultName <String>"
]
}
]
},
"examples": [
{
"description": "Validate whether adhoc backup will be successful or not",
"parameters": [
{
"name": "-ResourceGroupName",
"value": "[Path.resourceGroupName]"
},
{
"name": "-SubscriptionId",
"value": "[Path.subscriptionId]"
},
{
"name": "-VaultName",
"value": "[Path.vaultName]"
}
]
}
]
}
]
}
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.Api20250901.BackupInstanceResource]::FromJsonString($jsonStringResponse)
$backupInstances += [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.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.Api20250901.BackupVaultResource]::FromJsonString($jsonStringResponse)
$backupVaults += [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.BackupVaultResource]::FromJsonString($jsonStringResponse)
}
return $backupVaults
}
Expand Down
Loading