Azure Resource Manager - Get all the resources of a resource group

azure, azure-resource-manager, azure-sdk-.net, c#

Solution

Now the SDK is still preview version. In the 1.6.0 preview version. It should use following code.

   var listResources = resourceManagementClient.Resources.ListByResourceGroup("ResourceGroup Name");

But it still can't work correctly on my side because the API-Version is api-version=2017-05-10. I catch the request with fiddler.

The code you mentioned that use API-version

var listResources = 
ResourceManagementClient.ResourceGroups.ListResources(resourceGroup.Name);

Note : Please still use 1.5.0-preview instead of 1.6.0-preview currently if you want get group resource, or give your feedback to azure sdk team . Or you can use REST API directly

Problem

Yesterday, I was using this line of code with the version 1.5.0-preview of Microsoft.Azure.Management.ResourceManager : ``` var listResources = ResourceManagementClient.ResourceGroups.ListResources(resourceGroup.Name); ``` Today, I have updated to version 1.6.0-preview but the fonction doesn't seem to be available anymore. Is there another way to get the list of the resources contained in a resource group ?

Original source