Azure Resource Manager libraries for .NET

Overview

Azure Resource Manager enables you to work with the resources in your solution as a group. For more information about Resource Manager, see Azure Resource Manager overview.

Management library

The Azure Resource Manager library for .NET enables you to create, update, delete, and list resources and resource groups.

Install the NuGet package directly from the Visual Studio Package Manager console or with the .NET Core CLI.

Visual Studio Package Manager

Install-Package Microsoft.Azure.Management.ResourceManager.Fluent
dotnet add package Microsoft.Azure.Management.ResourceManager.Fluent

Example

This example creates a new resource group.

/* Include these "using" directives.
using Microsoft.Azure.Management.ResourceManager.Fluent;
using Microsoft.Azure.Management.ResourceManager.Fluent.Core;
*/

IResourceGroup resourceGroup = azure.ResourceGroups
    .Define("ResourceGroupName")
    .WithRegion(Region.USWest)
    .Create();

Samples