通过Azure API进行Azure网站恢复

时间:2018-09-11 16:57:35

标签: azure-virtual-machine azure-site-recovery

我正在尝试通过Azure API为托管磁盘vm设置Azure站点恢复。我可以通过azure门户获取已经为虚拟机设置站点恢复的所有虚拟机,但是在使用API​​时遇到了一些麻烦。 JsonRequestBody:

'{
  "properties":{
    "policyId":"/Subscriptions/4adb8053-2339-4041-802d-d0b0f8fe3487/resourceGroups/Site-recovery-vault-RG/providers/Microsoft.RecoveryServices/vaults/Site-recovery-vault-northeurope/replicationPolicies/24-hour-retention-policy",
    "protectableItemId":"/Subscriptions/4adb8053-2339-4041-802d-d0b0f8fe3487/resourceGroups/Site-recovery-vault-RG/providers/Microsoft.RecoveryServices/vaults/Site-recovery-vault-northeurope/replicationFabrics/asr-a2a-default-westeurope/replicationProtectionContainers/asr-a2a-default-westeurope-container/replicationProtectedItems/daaac3d2-31cd-42db-b9c6-e3e430a80c38",
    "providerSpecificDetails":{
      "instanceType":"A2A",
      "diskId":"/subscriptions/4adb8053-2339-4041-802d-d0b0f8fe3487/resourceGroups/AD/providers/Microsoft.Compute/disks/SimpleWinVM_disk1_f7f24e15163f46dab3da9fc6f2b009b5",
      "primaryStagingAzureStorageAccountId":"/subscriptions/4adb8053-2339-4041-802d-d0b0f8fe3487/resourceGroups/AUTOMATION/providers/Microsoft.Storage/storageAccounts/786",
      "recoveryResourceGroupId":"/subscriptions/4adb8053-2339-4041-802d-d0b0f8fe3487/resourceGroups/AD-asr"
    }   
  }
}'

URI:

  

https://management.azure.com/Subscriptions/4adb8053-2339-4041-802d-d0b0f8fe3487/resourceGroups/Site-recovery-vault-RG/providers/Microsoft.RecoveryServices/vaults/Site-recovery-vault-northeurope/replicationFabrics/asr-a2a-default-westeurope/replicationProtectionContainers/asr-a2a-default-westeurope-container/replicationProtectedItems/daaac3d2-31cd-42db-b9c6-e3e430a80c38?api-version=2016-08-10

0 个答案:

没有答案