Search code examples
azureazure-resource-managerazure-resource-group

how to role back resource group action in windows azure


I did something that I don't fully understand. I went to my azure account and pressed the 'resource group' icon. There I marked all my existing resources and then I clicked the "+Add" button. The result was that every resource I had becode 'resource group'. How can I reverse this action?

All I wanted to do is open a new 'resource group' and move all my existing resources under this new resource group.


Solution

  • If you want to move resources from one resource group to another resource group, please refer to the document and the document. But please note that some resources are not supported moving. We can use the following rest API to check it.

    POST https://management.azure.com/subscriptions/<subscription-id>/resourceGroups/<source-group>/validateMoveResources?api-version=2019-05-10
    Authorization: Bearer <access-token>
    Content-type: application/json
    
    Body
    
    {
     "resources": ["<resource-id-1>", "<resource-id-2>"],
     "targetResourceGroup": "/subscriptions/<subscription-id>/resourceGroups/<target-group>"
    }