Azure.Provisioning.Cdn
1.0.0-beta.3
Prefix Reserved
dotnet add package Azure.Provisioning.Cdn --version 1.0.0-beta.3
NuGet\Install-Package Azure.Provisioning.Cdn -Version 1.0.0-beta.3
<PackageReference Include="Azure.Provisioning.Cdn" Version="1.0.0-beta.3" />
<PackageVersion Include="Azure.Provisioning.Cdn" Version="1.0.0-beta.3" />
<PackageReference Include="Azure.Provisioning.Cdn" />
paket add Azure.Provisioning.Cdn --version 1.0.0-beta.3
#r "nuget: Azure.Provisioning.Cdn, 1.0.0-beta.3"
#:package Azure.Provisioning.Cdn@1.0.0-beta.3
#addin nuget:?package=Azure.Provisioning.Cdn&version=1.0.0-beta.3&prerelease
#tool nuget:?package=Azure.Provisioning.Cdn&version=1.0.0-beta.3&prerelease
Azure Provisioning Cdn client library for .NET
Azure.Provisioning.Cdn simplifies declarative resource provisioning for Azure CDN in .NET.
Getting started
Install the package
Install the client library for .NET with NuGet:
dotnet add package Azure.Provisioning.Cdn --prerelease
Prerequisites
You must have an Azure subscription.
Authenticate the Client
Key concepts
This library allows you to specify your infrastructure in a declarative style using dotnet. You can then use azd to deploy your infrastructure to Azure directly without needing to write or maintain bicep or arm templates.
Examples
Create a CDN Profile and Endpoint with Custom Origin
This example demonstrates how to create a CDN profile and endpoint with a custom origin, based on the Azure quickstart template.
Infrastructure infra = new();
ProvisioningParameter profileName = new(nameof(profileName), typeof(string))
{
Description = "Name of the CDN Profile."
};
infra.Add(profileName);
ProvisioningParameter endpointName = new(nameof(endpointName), typeof(string))
{
Description = "Name of the CDN Endpoint, must be unique."
};
infra.Add(endpointName);
ProvisioningParameter originUrl = new(nameof(originUrl), typeof(string))
{
Description = "Url of the origin."
};
infra.Add(originUrl);
CdnProfile profile = new(nameof(profile), CdnProfile.ResourceVersions.V2025_06_01)
{
Name = profileName,
Location = new AzureLocation("global"),
SkuName = CdnSkuName.StandardMicrosoft
};
infra.Add(profile);
CdnEndpoint endpoint = new(nameof(endpoint), CdnEndpoint.ResourceVersions.V2025_06_01)
{
Parent = profile,
Name = endpointName,
Location = new AzureLocation("global"),
OriginHostHeader = originUrl,
IsHttpAllowed = true,
IsHttpsAllowed = true,
QueryStringCachingBehavior = QueryStringCachingBehavior.IgnoreQueryString,
IsCompressionEnabled = true,
ContentTypesToCompress =
{
"application/javascript",
"application/json",
"application/xml",
"text/css",
"text/html",
"text/plain"
},
Origins =
{
new DeepCreatedOrigin
{
Name = "origin1",
HostName = originUrl
}
}
};
infra.Add(endpoint);
infra.Add(new ProvisioningOutput("endpointHostName", typeof(string)) { Value = endpoint.HostName });
Create a Front Door Standard/Premium Profile
This example demonstrates how to create a Front Door Standard/Premium profile with an endpoint, origin group, origin, and route, based on the Azure quickstart template.
Infrastructure infra = new();
ProvisioningParameter originHostName = new(nameof(originHostName), typeof(string))
{
Description = "The host name that should be used when connecting from Front Door to the origin."
};
infra.Add(originHostName);
CdnProfile profile = new(nameof(profile), CdnProfile.ResourceVersions.V2025_06_01)
{
Name = "MyFrontDoor",
Location = new AzureLocation("global"),
SkuName = CdnSkuName.StandardAzureFrontDoor
};
infra.Add(profile);
FrontDoorEndpoint endpoint = new(nameof(endpoint), FrontDoorEndpoint.ResourceVersions.V2025_06_01)
{
Parent = profile,
Name = "MyEndpoint",
Location = new AzureLocation("global"),
EnabledState = EnabledState.Enabled
};
infra.Add(endpoint);
FrontDoorOriginGroup originGroup = new(nameof(originGroup), FrontDoorOriginGroup.ResourceVersions.V2025_06_01)
{
Parent = profile,
Name = "MyOriginGroup",
LoadBalancingSettings = new LoadBalancingSettings
{
SampleSize = 4,
SuccessfulSamplesRequired = 3
},
HealthProbeSettings = new HealthProbeSettings
{
ProbePath = "/",
ProbeRequestType = HealthProbeRequestType.Head,
ProbeProtocol = HealthProbeProtocol.Http,
ProbeIntervalInSeconds = 100
}
};
infra.Add(originGroup);
FrontDoorOrigin origin = new(nameof(origin), FrontDoorOrigin.ResourceVersions.V2025_06_01)
{
Parent = originGroup,
Name = "MyOrigin",
HostName = originHostName,
HttpPort = 80,
HttpsPort = 443,
OriginHostHeader = originHostName,
Priority = 1,
Weight = 1000
};
infra.Add(origin);
FrontDoorRoute route = new(nameof(route), FrontDoorRoute.ResourceVersions.V2025_06_01)
{
Parent = endpoint,
Name = "MyRoute",
OriginGroupId = originGroup.Id,
SupportedProtocols =
{
FrontDoorEndpointProtocol.Http,
FrontDoorEndpointProtocol.Https
},
PatternsToMatch =
{
"/*"
},
ForwardingProtocol = ForwardingProtocol.HttpsOnly,
LinkToDefaultDomain = LinkToDefaultDomain.Enabled,
HttpsRedirect = HttpsRedirect.Enabled
};
infra.Add(route);
infra.Add(new ProvisioningOutput("frontDoorEndpointHostName", typeof(string)) { Value = endpoint.HostName });
Troubleshooting
- File an issue via GitHub Issues.
- Check previous questions or ask new ones on Stack Overflow using Azure and .NET tags.
Next steps
Contributing
For details on contributing to this repository, see the contributing guide.
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (for example, label, comment). Follow the instructions provided by the bot. You'll only need to do this action once across all repositories using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any other questions or comments.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Azure.Core (>= 1.59.0)
- Azure.Provisioning (>= 1.5.0)
-
net10.0
- Azure.Core (>= 1.59.0)
- Azure.Provisioning (>= 1.5.0)
-
net8.0
- Azure.Core (>= 1.59.0)
- Azure.Provisioning (>= 1.5.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Azure.Provisioning.Cdn:
| Package | Downloads |
|---|---|
|
Aspire.Hosting.Azure.FrontDoor
Azure Front Door resource types for Aspire. |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Azure.Provisioning.Cdn:
| Repository | Stars |
|---|---|
|
microsoft/aspire
Aspire is the tool for code-first, extensible, observable dev and deploy.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-beta.3 | 185 | 6/29/2026 |
| 1.0.0-beta.2 | 5,586 | 5/4/2026 |
| 1.0.0-beta.1 | 6,361 | 3/13/2026 |