Skip to content

Commit c7a792b

Browse files
zubairabidZubair Abid
andauthored
[dataprotection] Add UAMI Support for Backup Instances (Azure#8632)
* new gitignore rule to ignore patches * Fix update backup vault so identity type can be switched away from user assigned/system and user assigned. * Changes for BI create and update * Changes for other existing functions - update, restore. Also bugfixes from previous commit * Add changes for update-msi-permissions * New command init * Validate For Update, and some mroe fixes * Validate call gets made, moving for today * temp hack - fix for validate-for-update issueus * Updated the temp fix for missing response type * Tests. * Fix for tests. * All tests locally on * Update BackupVault to 2025-01-01 and add AAZ bits for the same * Fix style * Updated runs for backup vault tests * Fix params for new system assigned option in update, init, and init restores * Update history * Fix help text * Update BackupVault to use standard MI process * Update Backup Instances to use standard MI process * Add help texts and better logging * Fix incorrect parameter format * Fix incorrect backup-vault identity remove behaviour --------- Co-authored-by: Zubair Abid <[email protected]>
1 parent 2d31759 commit c7a792b

Some content is hidden

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

47 files changed

+10289
-612
lines changed

src/dataprotection/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
*.json
2+
*.patch

src/dataprotection/HISTORY.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@
33
Release History
44
===============
55

6+
1.6.0
7+
+++++
8+
* Added support for User-Assigned Managed Identities for Backup Instances.
9+
* Fixed a bug with Backup Vault update where a vault with UserAssigned or SystemAssigned,UserAssigned could not be switched to SystemAssigned or None.
10+
* `az dataprotection backup-instance validate-for-update`: New command, can be used to verify if a backup instance update will be successful or not. Supports all the parameters `az dataprotection backup-instance update` does.
11+
* `az dataprotection backup-instance initialize`: New parameters: `--use-system-identity` and `--uami`, which allow users to set a backup instance's Identity details for backup instance creation and validation.
12+
* `az dataprotection backup-instance update`: New parameters: `--use-system-identity` and `--uami`, which allow users to update a backup instance's Identity details.
13+
* `az dataprotection backup-instance restore initialize-for-data-recovery`: New parameters: `--use-system-identity` and `--uami`, which allow users to set a backup instance's Identity details for a restore operation.
14+
* `az dataprotection backup-instance restore initialize-for-data-recovery-as-files`: New parameters: `--use-system-identity` and `--uami`, which allow users to set a backup instance's Identity details for a restore operation.
15+
* `az dataprotection backup-instance restore initialize-for-item-recovery`: New parameters: `--use-system-identity` and `--uami`, which allow users to set a backup instance's Identity details for a restore operation.
16+
* `az dataprotection backup-instance update-msi-permissions`: New parameter `--uami` allows us to set permissions on a user-managed identity associated with a Backup Vault.
17+
618
1.5.6
719
+++++
820
* Updated the packaged AKS-preview SDK.

src/dataprotection/azext_dataprotection/aaz/latest/dataprotection/backup_instance/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@
2020
from ._update import *
2121
from ._validate_for_backup import *
2222
from ._validate_for_restore import *
23+
from ._validate_for_update import *
2324
from ._wait import *

src/dataprotection/azext_dataprotection/aaz/latest/dataprotection/backup_instance/_create.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ def _build_schema_on_200_201(cls):
263263
)
264264
properties.protection_error_details = AAZObjectType(
265265
serialized_name="protectionErrorDetails",
266+
flags={"read_only": True},
266267
)
267268
_CreateHelper._build_schema_user_facing_error_read(properties.protection_error_details)
268269
properties.protection_status = AAZObjectType(

src/dataprotection/azext_dataprotection/aaz/latest/dataprotection/backup_instance/_list.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ def _build_schema_on_200(cls):
210210
)
211211
properties.protection_error_details = AAZObjectType(
212212
serialized_name="protectionErrorDetails",
213+
flags={"read_only": True},
213214
)
214215
_ListHelper._build_schema_user_facing_error_read(properties.protection_error_details)
215216
properties.protection_status = AAZObjectType(

src/dataprotection/azext_dataprotection/aaz/latest/dataprotection/backup_instance/_show.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ def _build_schema_on_200(cls):
210210
)
211211
properties.protection_error_details = AAZObjectType(
212212
serialized_name="protectionErrorDetails",
213+
flags={"read_only": True},
213214
)
214215
_ShowHelper._build_schema_user_facing_error_read(properties.protection_error_details)
215216
properties.protection_status = AAZObjectType(

src/dataprotection/azext_dataprotection/aaz/latest/dataprotection/backup_instance/_update.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,7 @@ def _build_schema_backup_instance_resource_read(cls, _schema):
680680
)
681681
properties.protection_error_details = AAZObjectType(
682682
serialized_name="protectionErrorDetails",
683+
flags={"read_only": True},
683684
)
684685
cls._build_schema_user_facing_error_read(properties.protection_error_details)
685686
properties.protection_status = AAZObjectType(

src/dataprotection/azext_dataprotection/aaz/latest/dataprotection/backup_instance/_validate_for_update.py

Lines changed: 638 additions & 0 deletions
Large diffs are not rendered by default.

src/dataprotection/azext_dataprotection/aaz/latest/dataprotection/backup_instance/_wait.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ def _build_schema_on_200(cls):
206206
)
207207
properties.protection_error_details = AAZObjectType(
208208
serialized_name="protectionErrorDetails",
209+
flags={"read_only": True},
209210
)
210211
_WaitHelper._build_schema_user_facing_error_read(properties.protection_error_details)
211212
properties.protection_status = AAZObjectType(

src/dataprotection/azext_dataprotection/aaz/latest/dataprotection/backup_instance/deleted_backup_instance/_list.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ def _build_schema_on_200(cls):
209209
)
210210
properties.protection_error_details = AAZObjectType(
211211
serialized_name="protectionErrorDetails",
212+
flags={"read_only": True},
212213
)
213214
_ListHelper._build_schema_user_facing_error_read(properties.protection_error_details)
214215
properties.protection_status = AAZObjectType(

0 commit comments

Comments
 (0)