Skip to content

Commit d89aa61

Browse files
msyycSDKAuto
andauthored
[T1] recoveryservicesbackup 2020 12 28 (Azure#15924)
* CodeGen from PR 12157 in Azure/azure-rest-api-specs Updating existing CRR APIs with zone restore feature (Azure#12157) * - Added change for support of cross zone restores. * - updating example json * - Fixing prettier * test,version,CHANGELOG Co-authored-by: SDKAuto <sdkautomation@microsoft.com>
1 parent 98988d2 commit d89aa61

File tree

6 files changed

+37
-10
lines changed

6 files changed

+37
-10
lines changed

sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Release History
22

3+
## 0.11.0 (2020-12-28)
4+
5+
**Features**
6+
7+
- Model IaasVMRecoveryPoint has a new parameter zones
8+
- Model IaasVMRestoreRequest has a new parameter zones
9+
310
## 0.10.0 (2020-12-08)
411

512
**Features**

sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_models.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8391,6 +8391,9 @@ class IaasVMRecoveryPoint(RecoveryPoint):
83918391
:param recovery_point_disk_configuration: Disk configuration
83928392
:type recovery_point_disk_configuration:
83938393
~azure.mgmt.recoveryservicesbackup.models.RecoveryPointDiskConfiguration
8394+
:param zones: Identifies the zone of the VM at the time of backup.
8395+
Applicable only for zone-pinned Vms
8396+
:type zones: list[str]
83948397
"""
83958398

83968399
_validation = {
@@ -8417,6 +8420,7 @@ class IaasVMRecoveryPoint(RecoveryPoint):
84178420
'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'},
84188421
'os_type': {'key': 'osType', 'type': 'str'},
84198422
'recovery_point_disk_configuration': {'key': 'recoveryPointDiskConfiguration', 'type': 'RecoveryPointDiskConfiguration'},
8423+
'zones': {'key': 'zones', 'type': '[str]'},
84208424
}
84218425

84228426
def __init__(self, **kwargs):
@@ -8434,6 +8438,7 @@ def __init__(self, **kwargs):
84348438
self.original_storage_account_option = kwargs.get('original_storage_account_option', None)
84358439
self.os_type = kwargs.get('os_type', None)
84368440
self.recovery_point_disk_configuration = kwargs.get('recovery_point_disk_configuration', None)
8441+
self.zones = kwargs.get('zones', None)
84378442
self.object_type = 'IaasVMRecoveryPoint'
84388443

84398444

@@ -8503,6 +8508,8 @@ class IaasVMRestoreRequest(RestoreRequest):
85038508
:param disk_encryption_set_id: DiskEncryptionSet's ID - needed if the VM
85048509
needs to be encrypted at rest during restore with customer managed key.
85058510
:type disk_encryption_set_id: str
8511+
:param zones: Target zone where the VM and its disks should be restored.
8512+
:type zones: list[str]
85068513
"""
85078514

85088515
_validation = {
@@ -8528,6 +8535,7 @@ class IaasVMRestoreRequest(RestoreRequest):
85288535
'restore_disk_lun_list': {'key': 'restoreDiskLunList', 'type': '[int]'},
85298536
'restore_with_managed_disks': {'key': 'restoreWithManagedDisks', 'type': 'bool'},
85308537
'disk_encryption_set_id': {'key': 'diskEncryptionSetId', 'type': 'str'},
8538+
'zones': {'key': 'zones', 'type': '[str]'},
85318539
}
85328540

85338541
def __init__(self, **kwargs):
@@ -8549,6 +8557,7 @@ def __init__(self, **kwargs):
85498557
self.restore_disk_lun_list = kwargs.get('restore_disk_lun_list', None)
85508558
self.restore_with_managed_disks = kwargs.get('restore_with_managed_disks', None)
85518559
self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None)
8560+
self.zones = kwargs.get('zones', None)
85528561
self.object_type = 'IaasVMRestoreRequest'
85538562

85548563

sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_models_py3.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8391,6 +8391,9 @@ class IaasVMRecoveryPoint(RecoveryPoint):
83918391
:param recovery_point_disk_configuration: Disk configuration
83928392
:type recovery_point_disk_configuration:
83938393
~azure.mgmt.recoveryservicesbackup.models.RecoveryPointDiskConfiguration
8394+
:param zones: Identifies the zone of the VM at the time of backup.
8395+
Applicable only for zone-pinned Vms
8396+
:type zones: list[str]
83948397
"""
83958398

83968399
_validation = {
@@ -8417,9 +8420,10 @@ class IaasVMRecoveryPoint(RecoveryPoint):
84178420
'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'},
84188421
'os_type': {'key': 'osType', 'type': 'str'},
84198422
'recovery_point_disk_configuration': {'key': 'recoveryPointDiskConfiguration', 'type': 'RecoveryPointDiskConfiguration'},
8423+
'zones': {'key': 'zones', 'type': '[str]'},
84208424
}
84218425

8422-
def __init__(self, *, key_and_secret=None, is_instant_ilr_session_active: bool=None, recovery_point_tier_details=None, is_managed_virtual_machine: bool=None, virtual_machine_size: str=None, original_storage_account_option: bool=None, os_type: str=None, recovery_point_disk_configuration=None, **kwargs) -> None:
8426+
def __init__(self, *, key_and_secret=None, is_instant_ilr_session_active: bool=None, recovery_point_tier_details=None, is_managed_virtual_machine: bool=None, virtual_machine_size: str=None, original_storage_account_option: bool=None, os_type: str=None, recovery_point_disk_configuration=None, zones=None, **kwargs) -> None:
84238427
super(IaasVMRecoveryPoint, self).__init__(**kwargs)
84248428
self.recovery_point_type = None
84258429
self.recovery_point_time = None
@@ -8434,6 +8438,7 @@ def __init__(self, *, key_and_secret=None, is_instant_ilr_session_active: bool=N
84348438
self.original_storage_account_option = original_storage_account_option
84358439
self.os_type = os_type
84368440
self.recovery_point_disk_configuration = recovery_point_disk_configuration
8441+
self.zones = zones
84378442
self.object_type = 'IaasVMRecoveryPoint'
84388443

84398444

@@ -8503,6 +8508,8 @@ class IaasVMRestoreRequest(RestoreRequest):
85038508
:param disk_encryption_set_id: DiskEncryptionSet's ID - needed if the VM
85048509
needs to be encrypted at rest during restore with customer managed key.
85058510
:type disk_encryption_set_id: str
8511+
:param zones: Target zone where the VM and its disks should be restored.
8512+
:type zones: list[str]
85068513
"""
85078514

85088515
_validation = {
@@ -8528,9 +8535,10 @@ class IaasVMRestoreRequest(RestoreRequest):
85288535
'restore_disk_lun_list': {'key': 'restoreDiskLunList', 'type': '[int]'},
85298536
'restore_with_managed_disks': {'key': 'restoreWithManagedDisks', 'type': 'bool'},
85308537
'disk_encryption_set_id': {'key': 'diskEncryptionSetId', 'type': 'str'},
8538+
'zones': {'key': 'zones', 'type': '[str]'},
85318539
}
85328540

8533-
def __init__(self, *, recovery_point_id: str=None, recovery_type=None, source_resource_id: str=None, target_virtual_machine_id: str=None, target_resource_group_id: str=None, storage_account_id: str=None, virtual_network_id: str=None, subnet_id: str=None, target_domain_name_id: str=None, region: str=None, affinity_group: str=None, create_new_cloud_service: bool=None, original_storage_account_option: bool=None, encryption_details=None, restore_disk_lun_list=None, restore_with_managed_disks: bool=None, disk_encryption_set_id: str=None, **kwargs) -> None:
8541+
def __init__(self, *, recovery_point_id: str=None, recovery_type=None, source_resource_id: str=None, target_virtual_machine_id: str=None, target_resource_group_id: str=None, storage_account_id: str=None, virtual_network_id: str=None, subnet_id: str=None, target_domain_name_id: str=None, region: str=None, affinity_group: str=None, create_new_cloud_service: bool=None, original_storage_account_option: bool=None, encryption_details=None, restore_disk_lun_list=None, restore_with_managed_disks: bool=None, disk_encryption_set_id: str=None, zones=None, **kwargs) -> None:
85348542
super(IaasVMRestoreRequest, self).__init__(**kwargs)
85358543
self.recovery_point_id = recovery_point_id
85368544
self.recovery_type = recovery_type
@@ -8549,6 +8557,7 @@ def __init__(self, *, recovery_point_id: str=None, recovery_type=None, source_re
85498557
self.restore_disk_lun_list = restore_disk_lun_list
85508558
self.restore_with_managed_disks = restore_with_managed_disks
85518559
self.disk_encryption_set_id = disk_encryption_set_id
8560+
self.zones = zones
85528561
self.object_type = 'IaasVMRestoreRequest'
85538562

85548563

sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_aad_properties_operations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,4 @@ def get(
9494
return client_raw_response
9595

9696
return deserialized
97-
get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupAadProperties/default'}
97+
get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.RecoveryServices/locations/{azureRegion}/backupAadProperties'}

sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
VERSION = "0.10.0"
12+
VERSION = "0.11.0"
1313

sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/tests/recordings/test_mgmt_recoveryservices_backup.test_operations_api.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ interactions:
99
Connection:
1010
- keep-alive
1111
User-Agent:
12-
- python/3.6.9 (Linux-4.19.76-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10
13-
msrest_azure/0.6.2 azure-mgmt-recoveryservicesbackup/0.10.0 Azure-SDK-For-Python
12+
- python/3.6.9 (Linux-4.19.121-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10
13+
msrest_azure/0.6.2 azure-mgmt-recoveryservicesbackup/0.11.0 Azure-SDK-For-Python
1414
accept-language:
1515
- en-US
1616
method: GET
@@ -345,11 +345,13 @@ interactions:
345345
Items","operation":"Track the results of an asynchronous operation on the
346346
resource Migration Items","description":"Track the results of an asynchronous
347347
operation on the resource Migration Items"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationSupportedOperatingSystems/read","display":{"provider":"Microsoft.RecoveryServices","operation":"Read
348-
","description":"Read any "},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/addDisks/action","display":{"provider":"Microsoft.RecoveryServices","resource":"Protected
348+
","description":"Read any "},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationRecoveryPlans/failoverCancel/action","display":{"provider":"Microsoft.RecoveryServices","resource":"Recovery
349+
Plans","operation":"Cancel Failover Recovery Plan","description":"Cancel Failover
350+
Recovery Plan"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/addDisks/action","display":{"provider":"Microsoft.RecoveryServices","resource":"Protected
349351
Items","operation":"Add disks","description":"Add disks"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/removeDisks/action","display":{"provider":"Microsoft.RecoveryServices","resource":"Protected
350352
Items","operation":"Remove disks","description":"Remove disks"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/ResolveHealthErrors/action","display":{"provider":"Microsoft.RecoveryServices","resource":"Protected
351353
Items"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationFabrics/replicationProtectionContainers/replicationProtectedItems/failoverCancel/action","display":{"provider":"Microsoft.RecoveryServices","resource":"Protected
352-
Items"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationProtectionIntents/read","display":{"provider":"Microsoft.RecoveryServices","operation":"Read
354+
Items","operation":"Failover Cancel","description":"Failover Cancel"},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationProtectionIntents/read","display":{"provider":"Microsoft.RecoveryServices","operation":"Read
353355
","description":"Read any "},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationProtectionIntents/write","display":{"provider":"Microsoft.RecoveryServices","operation":"Create
354356
or Update ","description":"Create or Update any "},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationVaultSettings/read","display":{"provider":"Microsoft.RecoveryServices","operation":"Read
355357
","description":"Read any "},"origin":"user,system"},{"name":"Microsoft.RecoveryServices/vaults/replicationVaultSettings/write","display":{"provider":"Microsoft.RecoveryServices","operation":"Create
@@ -417,11 +419,11 @@ interactions:
417419
cache-control:
418420
- no-cache
419421
content-length:
420-
- '64339'
422+
- '64686'
421423
content-type:
422424
- application/json
423425
date:
424-
- Tue, 08 Dec 2020 07:31:29 GMT
426+
- Mon, 28 Dec 2020 09:03:46 GMT
425427
expires:
426428
- '-1'
427429
pragma:

0 commit comments

Comments
 (0)