Azure libraries for .Net
Clone or download

Build Status

Azure Management Libraries for .NET

This README is based on the released stable version (1.15). If you are looking for other releases, see More Information

The Azure Management Libraries for .NET is a higher-level, object-oriented API for managing Azure resources. Libraries are built on the lower-level, request-response style auto generated clients and can run side-by-side with auto generated clients.

Table of contents

Feature Availability and Road Map

🚩 as of Version 1.15

Service | feature Available as GA Available as Preview Coming soon
Compute Virtual machines and VM extensions
Virtual machine scale sets
Managed disks
Azure container service (AKS) + registry + instances
Availability Zones
More Availability Zones and MSI features
Storage Storage accounts
Encryption (deprecated)
Encryption (Blob)
Encryption (File)
SQL Database Databases
Firewalls and virtual network
Elastic pools
Import, export, recover and restore dbs
Failover groups and replication links
DNS aliasing and metrics
Sync groups
Encryption protectors
More features
Networking Virtual networks
Network interfaces
IP addresses
Routing table
Network security groups
Load balancers
Application gateways
Traffic managers
Network peering
Virtual Network Gateway
Network watchers
Express Route
Application Security Groups
More application gateway features
More services Resource Manager
Key Vault
Service bus
Web apps
Function Apps
Graph RBAC
Cosmos DB
Batch AI
Event Hub
Data Lake
More Monitor features
Logic Apps
Event Grid
Fundamentals Authentication - core
Async methods
Managed Service Identity

Preview features are flagged in documentation comments in libraries. These features are subject to change. They can be modified in any way, or even removed, in the future.

Code snippets and samples

Azure Authentication

The Azure class is the simplest entry point for creating and interacting with Azure resources.

IAzure azure = Azure.Authenticate(credFile).WithDefaultSubscription();

To learn more about authentication in the Azure Libraries for .Net, see

Virtual Machines

Create a Virtual Machine

You can create a virtual machine instance by using a Define() … Create() method chain.

Console.WriteLine("Creating a Windows VM");

var windowsVM = azure.VirtualMachines.Define("myWindowsVM")
Console.WriteLine("Created a Windows VM: " + windowsVM.Id);

Update a Virtual Machine

You can update a virtual machine instance by using an Update() … Apply() method chain.

    .WithNewDataDisk(20, lun, CachingTypes.ReadWrite)

Create a Virtual Machine Scale Set

You can create a virtual machine scale set instance by using another Define() … Create() method chain.

var virtualMachineScaleSet = azure.VirtualMachineScaleSets.Define(vmssName)
    .WithExistingPrimaryNetworkSubnet(network, "Front-end")
    .WithPrimaryInternetFacingLoadBalancerBackends(backendPoolName1, backendPoolName2)
    .WithPrimaryInternetFacingLoadBalancerInboundNatPools(natPool50XXto22, natPool60XXto23)
    .WithNewDataDisk(100, 1, CachingTypes.ReadWrite)
    .WithNewDataDisk(100, 2, CachingTypes.ReadWrite, StorageAccountTypes.StandardLRS)

Ready-to-run code samples for virtual machines

Service Management Scenario
Virtual Machines
Virtual Machines - parallel execution
Virtual Machine Scale Sets


Create a virtual network

You can create a virtual network by using a define() … create() method chain.

var network = networks.Define("mynetwork")
	.WithSubnet("subnet1", "")
	.WithSubnet("subnet2", "")

Create a Network Security Group

You can create a network security group instance by using another Define() … Create() method chain.

var frontEndNSG = azure.NetworkSecurityGroups.Define(frontEndNSGName)
        .WithDescription("Allow SSH")
        .WithDescription("Allow HTTP")

Create an Application Gateway

You can create a application gateway instance by using another define() … create() method chain.

var applicationGateway = azure.ApplicationGateways.Define("myFirstAppGateway")
    // Request routing rule for HTTP from public 80 to public 8080

Ready-to-run code samples for networking

Service Management Scenario
Traffic Manager
Application Gateway
Express Route

Application Services

Create a Web App

You can create a Web App instance by using another define() … create() method chain.

var webApp = azure.WebApps.Define(appName)

Ready-to-run code samples for Application Services

Service Management Scenario
Web Apps on Windows
Web Apps on Linux

Databases and Storage

Create a Cosmos DB with CosmosDB Programming Model

You can create a Cosmos DB account by using a define() … create() method chain.

var documentDBAccount = azure.CosmosDBAccounts.Define(cosmosDBName)

Create a SQL Database

You can create a SQL server instance by using another define() … create() method chain.

var sqlServer = azure.SqlServers.Define(sqlServerName)
    .WithNewFirewallRule(firewallRuleStartIpAddress, firewallRuleEndIpAddress)

Then, you can create a SQL database instance by using another define() … create() method chain.

var database = sqlServer.Databases.Define(databaseName)

Ready-to-run code samples for databases

Service Management Scenario
SQL Database
Cosmos DB

Other code samples

Service Management Scenario
Active Directory
Container Service
Container Registry and
Container Instances
Service Bus
Resource Groups
Redis Cache
Key Vault
Batch AI
Event Hub


Latest stable release

1.15 release builds are available on NuGet:

Azure Management Library Package name Stable
Azure Management Client (wrapper package) Microsoft.Azure.Management.Fluent NuGet
App Service (Web Apps and Functions) Microsoft.Azure.Management.AppService.Fluent NuGet
Batch Microsoft.Azure.Management.Batch.Fluent NuGet
Batch AI Microsoft.Azure.Management.BatchAI.Fluent NuGet
CDN Microsoft.Azure.Management.Cdn.Fluent NuGet
Virtual Machines, Virtual Machine Scale Sets, Azure Container Services Microsoft.Azure.Management.Compute.Fluent NuGet
Container Instance Microsoft.Azure.Management.ContainerInstance.Fluent NuGet
Container Registry Microsoft.Azure.Management.ContainerRegistry.Fluent NuGet
Container Service Microsoft.Azure.Management.ContainerService.Fluent NuGet
Cosmos DB Microsoft.Azure.Management.CosmosDB.Fluent NuGet
DNS Microsoft.Azure.Management.Dns.Fluent NuGet
EventHub Microsoft.Azure.Management.EventHub.Fluent NuGet
Graph RBAC Microsoft.Azure.Management.Graph.RBAC.Fluent NuGet
Key Vault Microsoft.Azure.Management.KeyVault.Fluent NuGet
Locks Microsoft.Azure.Management.Locks.Fluent NuGet
Monitor Microsoft.Azure.Management.Monitor.Fluent NuGet
Msi Microsoft.Azure.Management.Msi.Fluent NuGet
Networking Microsoft.Azure.Management.Network.Fluent NuGet
Redis Cache Microsoft.Azure.Management.Redis.Fluent NuGet
Resource Manager Microsoft.Azure.Management.ResourceManager.Fluent NuGet
Search Microsoft.Azure.Management.Search.Fluent NuGet
Service Bus Microsoft.Azure.Management.ServiceBus.Fluent NuGet
SQL Database Microsoft.Azure.Management.Sql.Fluent NuGet
Storage Microsoft.Azure.Management.Storage.Fluent NuGet
Traffic Manager Microsoft.Azure.Management.TrafficManager.Fluent NuGet


Upgrading from older versions

If you are migrating your code from 1.11.x to 1.15.x, you can use these release notes for preparing your code for 1.15 from 1.15.

In general, Azure Libraries for .Net follow semantic versioning, so user code should continue working in a compatible fashion between minor versions of the same major version release train, with the following caveats:

  • methods and types that inherit from IBeta interface are not considered "generally available" and their design and functionality may change arbitrarily (including removal) in any future minor release of the libraries. To help identify such IBeta breaking changes from one minor release to the next and see how to mitigate them, see the above mentioned release notes for each release.

  • occasionally the naming and structure of "fluent" interface definitions (i.e. the ones whose names start with With*) may change between minor versions, as long as that change does not affect the fluent "flow" (the chaining of the methods in a definition or update chain).

  • the *Inner types and their methods may occasionally change their naming and structure between minor versions in breaking ways. User code should generally avoid making a reference to those types though, unless their functionality is not yet exposed by the "fluent" API.

Help and Issues

If you encounter any bugs with these libraries, please file issues via Issues or checkout StackOverflow for Azure Management Libraries for .NET.

To enable Http message tracing in your code please check this article.

Contribute Code

If you would like to become an active contributor to this project please follow the instructions provided in Microsoft Azure Projects Contribution Guidelines.

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

More Information

Previous Releases and Corresponding Repo Branches

Version SHA1 Remarks
1.15 1.15 Tagged release for 1.15 version of Azure management libraries
1.14 1.14 Tagged release for 1.14 version of Azure management libraries
1.13 1.13 Tagged release for 1.13 version of Azure management libraries
1.11 1.11 Tagged release for 1.11 version of Azure management libraries
1.10 1.10 Tagged release for 1.10 version of Azure management libraries
1.9 1.9 Tagged release for 1.9 version of Azure management libraries
1.8 1.8 Tagged release for 1.8 version of Azure management libraries
1.7 1.7 Tagged release for 1.7 version of Azure management libraries
1.6 1.6 Tagged release for 1.6 version of Azure management libraries
1.4 1.4 Tagged release for 1.4 version of Azure management libraries
1.3 1.3 Tagged release for 1.3 version of Azure management libraries
1.2 1.2 Tagged release for 1.2 version of Azure management libraries
1.1 1.1 Tagged release for 1.1 version of Azure management libraries
1.0 1.0 Tagged release for 1.0 version of Azure management libraries
1.0.0-beta5 1.0.0-beta5 Tagged release for 1.0.0-beta5 version of Azure management libraries
1.0.0-beta4 1.0.0-beta4 Tagged release for 1.0.0-beta4 version of Azure management libraries
1.0.0-beta3 1.0.0-beta3 Tagged release for 1.0.0-beta3 version of Azure management libraries
AutoRest AutoRest Main branch for AutoRest generated raw clients

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact with any additional questions or comments.