none
Python API - Restoring VM from Backup RRS feed

  • Question

  • Hi, I'm looking for examples of how to use this python api class "IaasVMRestoreRequest class"  in a python script. I want to script a restore of a vm from a backup as we have a requirement to do this and perform a number of tests against the restored vm every week. The number of vm's will increase overtime so it is a perfect candidate for automation. I relatively new to python and azure and as such I'm struggling to read the api reference as a lot of it comes without examples so I'm stumbling about in the dark. If I had access to a few examples I'm sure I could work it out from there.

    I'm kind of going in this direction 

    from azure.mgmt.recoveryservicesbackup import RecoveryServicesBackupClient
    from azure.common.client_factory import get_client_from_cli_profile
    
    def run_example():
    
        recovery_service_backup_client = get_client_from_cli_profile(RecoveryServicesBackupClient)
    
        recovery_service_backup_client.restores.trigger('')
    
    
        
    if __name__ == "__main__":
        run_example()

    but I don't even know if this is the right direction to be heading.

    If anyone can point me to some good examples of this or can post an example of how to make use of the API here I'd very much appreciate it.

    Thanks

    Tuesday, October 22, 2019 1:37 PM

Answers

  • Currently we do not have examples for this requirement. However, we are working on it and it will be made available post ignite (may be in the 3rd/4th week of Nov).
    Thursday, October 24, 2019 9:13 AM
    Moderator

All replies