CmdID / az / az site-recovery / az site-recovery protection-container
az site-recovery protection-container switch-protection
Operation to switch protection from one container to another or one replication provider to another. Azure CLI extensions reference
1 example 5 options Its page in the Azure CLI extensions reference
Examples
protection-container switch-protection for A2A
az site-recovery protection-container switch-protection --fabric-name fabric1_name -n container1_name --protected-item protected_item_name -g rg --vault-name vault_name --provider-details '{a2a:{policy-id:policy_id,recovery-container-id:container1_id,recovery-resource-group-id:vm_rg_id,vm-managed-disks:[{disk-id:recovery_os_disk,primary-staging-azure-storage-account-id:storage2_id,recovery-resource-group-id:vm_rg_id}]}}'Identify--fabric-nameUnique fabric name.-nThe name of the protection container.--protected-itemThe unique replication protected item name.-gName of resource group.--vault-nameThe name of the recovery services vault.--provider-detailsProvider specific switch protection input.Options
--fabric-nameUnique fabric name.--protection-container-name, -nThe name of the protection container.--provider-specific-details, --provider-detailsProvider specific switch protection input.--replication-protected-item-name, --protected-itemThe unique replication protected item name.--vault-nameThe name of the recovery services vault.