Azure CDN libraries for .NET

Overview

The Azure Content Delivery Network (CDN) caches static web content at strategically placed locations to provide maximum throughput for delivering content to users. The CDN offers developers a global solution for delivering high-bandwidth content by caching the content at physical nodes across the world.

To learn more about Azure CDN, see Overview of the Azure Content Delivery Network.

Management library

You can use the Azure CDN Library for .NET to automate creation and management of CDN profiles and endpoints.

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.Cdn.Fluent
dotnet add package Microsoft.Azure.Management.Cdn.Fluent

Example

This example creates a new CDN profile with a new endpoint pointed to www.contoso.com.

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

ICdnProfile profileDefinition = azure.CdnProfiles.Define("CdnProfileName")
    .WithRegion(Region.USCentral)
    .WithExistingResourceGroup("ResourceGroupName")
    .WithStandardVerizonSku()
    .WithNewEndpoint("www.contoso.com")
    .Create();

Samples