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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@
[assembly: System.Reflection.AssemblyVersionAttribute("2.9.0")]
[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)]
[assembly: System.CLSCompliantAttribute(false)]

37 changes: 37 additions & 0 deletions src/DataProtection/DataProtection.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,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 @@ -532,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 Down Expand Up @@ -591,6 +623,11 @@ directive:
subject: FetchCrossRegionRestoreJob
set:
subject: CrossRegionRestoreJob
- where:
verb: Update
subject: ^BackupInstance$
variant: ^UpdateExpanded$
hide: true
- where:
verb: Update
subject: ^BackupInstance$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,53 +3,53 @@
function Update-AzDataProtectionBackupInstance
{
[OutputType('Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IBackupInstanceResource')]
[CmdletBinding(PositionalBinding=$false, SupportsShouldProcess)]
[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess)]
[Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Description('Updates a given backup instance')]

param(
[Parameter(Mandatory=$false, HelpMessage='Subscription Id of the vault')]
[Parameter(ParameterSetName='UpdateExpanded', Mandatory=$false, HelpMessage='Subscription Id of the vault')]
[System.String]
${SubscriptionId},

[Parameter(Mandatory, HelpMessage='Resource Group of the backup vault')]
[Parameter(ParameterSetName='UpdateExpanded', Mandatory, HelpMessage='Resource Group of the backup vault')]
[System.String]
${ResourceGroupName},

[Parameter(Mandatory, HelpMessage='Name of the backup vault')]
[Parameter(ParameterSetName='UpdateExpanded', Mandatory, HelpMessage='Name of the backup vault')]
[System.String]
${VaultName},

[Parameter(Mandatory, HelpMessage='Unique Name of protected backup instance')]
[Parameter(ParameterSetName='UpdateExpanded', Mandatory, HelpMessage='Unique Name of protected backup instance')]
[Alias('BackupInstanceName')]
[System.String]
${Name},

[Parameter(Mandatory=$false, HelpMessage='Id of the Policy to be associated with the backup instance')]
[Parameter(ParameterSetName='UpdateExpanded', Mandatory=$false, HelpMessage='Id of the Policy to be associated with the backup instance')]
[System.String]
${PolicyId},

[Parameter(Mandatory=$false, HelpMessage='Use system assigned identity')]
[Parameter(ParameterSetName='UpdateExpanded', Mandatory=$false, HelpMessage='Use system assigned identity')]
[System.Nullable[System.Boolean]]
${UseSystemAssignedIdentity},

[Parameter(Mandatory=$false, HelpMessage='User assigned identity ARM Id')]
[Parameter(ParameterSetName='UpdateExpanded', Mandatory=$false, HelpMessage='User assigned identity ARM Id')]
[Alias('AssignUserIdentity')]
[System.String]
${UserAssignedIdentityArmId},

[Parameter(Mandatory=$false, HelpMessage='List of containers to be backed up inside the VaultStore. Use this parameter for DatasourceType AzureBlob and AzureDataLakeStorage.')]
[Parameter(ParameterSetName='UpdateExpanded', Mandatory=$false, HelpMessage='List of containers to be backed up inside the VaultStore. Use this parameter for DatasourceType AzureBlob and AzureDataLakeStorage.')]
[System.String[]]
${VaultedBackupContainer},

[Parameter(Mandatory=$false, HelpMessage='Resource guard operation request in the format similar to <ResourceGuard-ARMID>/dppModifyPolicy/default. Use this parameter when the operation is MUA protected.')]
[Parameter(ParameterSetName='UpdateExpanded', Mandatory=$false, HelpMessage='Resource guard operation request in the format similar to <ResourceGuard-ARMID>/dppModifyPolicy/default. Use this parameter when the operation is MUA protected.')]
[System.String[]]
${ResourceGuardOperationRequest},

[Parameter(Mandatory=$false, HelpMessage='Parameter deprecate. Please use SecureToken instead.')]
[Parameter(ParameterSetName='UpdateExpanded', Mandatory=$false, HelpMessage='Parameter deprecate. Please use SecureToken instead.')]
[System.String]
${Token},

[Parameter(Mandatory=$false, HelpMessage='Parameter to authorize operations protected by cross tenant resource guard. Use command (Get-AzAccessToken -TenantId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -AsSecureString").Token to fetch authorization token for different tenant.')]
[Parameter(ParameterSetName='UpdateExpanded', Mandatory=$false, HelpMessage='Parameter to authorize operations protected by cross tenant resource guard. Use command (Get-AzAccessToken -TenantId "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -AsSecureString").Token to fetch authorization token for different tenant.')]
[System.Security.SecureString]
${SecureToken},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
$criteria = [Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.ScheduleBasedBackupCriteria]::new()
$criteria.ObjectType = "ScheduleBasedBackupCriteria"
if($AbsoluteCriteria -ne $null){
$criteria.AbsoluteCriterion = $AbsoluteCriteria
$criteria.AbsoluteCriterion = @($AbsoluteCriteria.ToString())
}

if($DaysOfWeek -ne $null){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
Module Name: Az.DataProtection
Module Guid: b99f7df0-98cb-4eb1-b38f-d6e871ac179d
Module Guid: ade2ccd6-f7d8-4e4a-a8f2-4c0184d8ca79
Download Help Link: https://learn.microsoft.com/powershell/module/az.dataprotection
Help Version: 1.0.0.0
Locale: en-US
Expand Down Expand Up @@ -168,7 +168,7 @@ Undeletes a soft deleted backup vault
Unlocks the critical operation which is protected by the resource guard

### [Update-AzDataProtectionBackupInstance](Update-AzDataProtectionBackupInstance.md)
Update a backup instance in a backup vault
Updates a given backup instance

### [Update-AzDataProtectionBackupInstanceAssociatedPolicy](Update-AzDataProtectionBackupInstanceAssociatedPolicy.md)
Updates associated policy for a given backup instance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ Accept wildcard characters: False
```

### -ResourceGuardOperationRequest
ResourceGuardOperationRequests on which LAC check will be performed
Resource guard operation request in the format similar to \<ResourceGuard-ARMID\>/dppDisableStopProtectionRequests/default.
Use this parameter when the operation is MUA protected.

```yaml
Type: System.String[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ Accept wildcard characters: False
```

### -ResourceGuardOperationRequest
ResourceGuardOperationRequests on which LAC check will be performed
Resource guard operation request in the format similar to \<ResourceGuard-ARMID\>/dppDisableSuspendBackupsRequests/default.
Use this parameter when the operation is MUA protected.

```yaml
Type: System.String[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,20 @@ schema: 2.0.0
# Update-AzDataProtectionBackupInstance

## SYNOPSIS
Update a backup instance in a backup vault
Updates a given backup instance

## SYNTAX

### UpdateExpanded (Default)
```
Update-AzDataProtectionBackupInstance -Name <String> -ResourceGroupName <String> -VaultName <String>
[-SubscriptionId <String>] [-Token <String>] [-AsJob] [-DefaultProfile <PSObject>] [-NoWait]
[-Property <IBackupInstance>] [-Tag <Hashtable>] [-Confirm] [-WhatIf] [<CommonParameters>]
```

### __AllParameterSets
```
Update-AzDataProtectionBackupInstance -Name <String> -ResourceGroupName <String> -VaultName <String>
[-SubscriptionId <String>] [-Token <String>] [-AsJob] [-DefaultProfile <PSObject>] [-NoWait]
[-PolicyId <String>] [-ResourceGuardOperationRequest <String[]>] [-SecureToken <SecureString>]
Update-AzDataProtectionBackupInstance -Name <String> -ResourceGroupName <String> -VaultName <String> [-AsJob]
[-DefaultProfile <PSObject>] [-NoWait] [-PolicyId <String>] [-ResourceGuardOperationRequest <String[]>]
[-SecureToken <SecureString>] [-SubscriptionId <String>] [-Token <String>]
[-UserAssignedIdentityArmId <String>] [-UseSystemAssignedIdentity <Boolean?>]
[-VaultedBackupContainer <String[]>] [-Confirm] [-WhatIf] [<CommonParameters>]
```

### UpdateViaIdentityBackupVaultExpanded
```
Update-AzDataProtectionBackupInstance -BackupVaultInputObject <IDataProtectionIdentity> -Name <String>
[-Token <String>] [-AsJob] [-DefaultProfile <PSObject>] [-NoWait] [-Property <IBackupInstance>]
[-Tag <Hashtable>] [-Confirm] [-WhatIf] [<CommonParameters>]
```

### UpdateViaIdentityExpanded
```
Update-AzDataProtectionBackupInstance -InputObject <IDataProtectionIdentity> [-Token <String>] [-AsJob]
[-DefaultProfile <PSObject>] [-NoWait] [-Property <IBackupInstance>] [-Tag <Hashtable>] [-Confirm] [-WhatIf]
[<CommonParameters>]
```

## DESCRIPTION
Update a backup instance in a backup vault
Updates a given backup instance

## EXAMPLES

Expand Down Expand Up @@ -89,7 +67,7 @@ Second command updates the backup instance with the new User Assigned Managed Id
## PARAMETERS

### -AsJob
Run the command as a job


```yaml
Type: System.Management.Automation.SwitchParameter
Expand All @@ -103,24 +81,8 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -BackupVaultInputObject
Identity Parameter

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity
Parameter Sets: UpdateViaIdentityBackupVaultExpanded
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```

### -DefaultProfile
The DefaultProfile parameter is not functional.
Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.


```yaml
Type: System.Management.Automation.PSObject
Expand All @@ -134,23 +96,8 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -InputObject
Identity Parameter

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity
Parameter Sets: UpdateViaIdentityExpanded
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```

### -Name
The name of the backup instance.
Unique Name of protected backup instance

```yaml
Type: System.String
Expand All @@ -165,7 +112,7 @@ Accept wildcard characters: False
```

### -NoWait
Run the command asynchronously


```yaml
Type: System.Management.Automation.SwitchParameter
Expand Down Expand Up @@ -194,24 +141,8 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -Property
BackupInstanceResource properties

```yaml
Type: Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IBackupInstance
Parameter Sets: UpdateExpanded, UpdateViaIdentityBackupVaultExpanded, UpdateViaIdentityExpanded
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -ResourceGroupName
The name of the resource group.
The name is case insensitive.
Resource Group of the backup vault

```yaml
Type: System.String
Expand Down Expand Up @@ -258,29 +189,13 @@ Accept wildcard characters: False
```

### -SubscriptionId
The ID of the target subscription.
The value must be an UUID.
Subscription Id of the vault

```yaml
Type: System.String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: (Get-AzContext).Subscription.Id
Accept pipeline input: False
Accept wildcard characters: False
```

### -Tag
Proxy Resource tags.

```yaml
Type: System.Collections.Hashtable
Parameter Sets: UpdateExpanded, UpdateViaIdentityBackupVaultExpanded, UpdateViaIdentityExpanded
Aliases:

Required: False
Position: Named
Default value: None
Expand Down Expand Up @@ -351,7 +266,7 @@ Accept wildcard characters: False
```

### -VaultName
The name of the backup vault.
Name of the backup vault

```yaml
Type: System.String
Expand Down Expand Up @@ -401,8 +316,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## INPUTS

### Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IDataProtectionIdentity

## OUTPUTS

### Microsoft.Azure.PowerShell.Cmdlets.DataProtection.Models.IBackupInstanceResource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,9 @@ Accept wildcard characters: False
```

### -ResourceGuardOperationRequest
ResourceGuardOperationRequests on which LAC check will be performed
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.

```yaml
Type: System.String[]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"generate_Id": "33153ee6-4d8d-4e34-a0ca-abae111d0eb0"
"generate_Id": "25708e5c-f560-4e47-b27d-a9d047225dfb"
}
Loading