Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@siddharth7
Created December 11, 2019 12:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save siddharth7/d90db61f7f04603f214d4850ccf99e84 to your computer and use it in GitHub Desktop.
Save siddharth7/d90db61f7f04603f214d4850ccf99e84 to your computer and use it in GitHub Desktop.
from azure.mgmt.recoveryservicesbackup.models import IaasVMRestoreRequest, RestoreRequestResource
trigger_restore_properties = IaasVMRestoreRequest(create_new_cloud_service=True,
recovery_point_id=rp_name,
recovery_type='RestoreDisks',
region=vault_location,
storage_account_id=_storage_account_id,
source_resource_id=_source_resource_id,
target_resource_group_id=target_rg_id,
original_storage_account_option=use_original_storage_account)
trigger_restore_request = RestoreRequestResource(properties=trigger_restore_properties)
# pass the trigger_restore_request in your trigger restore call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment