1.0.0-beta.1 (2022-07-12)
Breaking Changes
New design of track 2 initial commit.
Package Name
The package name has been changed from Microsoft.Azure.Management.Dns
to Azure.ResourceManager.Dns
Features Added
- Added ArmClient extension methods to support start from the middle scenario.
General New Features
- Support MSAL.NET, Azure.Identity is out of box for supporting MSAL.NET
- Support OpenTelemetry for distributed tracing
- HTTP pipeline with custom policies
- Better error-handling
- Support uniform telemetry across all languages
NOTE: For more information about unified authentication, please refer to Azure Identity documentation for .NET
Management Client Changes
Before upgrade:
using Microsoft.Rest;
using Microsoft.Azure.Management.Dns;
using Microsoft.Azure.Management.Dns.Models;
var tokenCredentials = new TokenCredentials("YOUR ACCESS TOKEN");
DnsManagementClient dnsManagementClient = new DnsManagementClient(credentials);
var dnsZone = await dnsManagementClient.Zones.CreateOrUpdateAsync(resourceGroupName, dnsZoneName, zone);
After upgrade:
using System;
using System.Threading.Tasks;
using Azure.Identity;
using Azure.ResourceManager.Dns;
using Azure.ResourceManager.Resources;
using NUnit.Framework;
ArmClient armClient = new ArmClient(new DefaultAzureCredential());
SubscriptionResource subscription = await armClient.GetDefaultSubscriptionAsync();
// first we need to get the resource group
string rgName = "myRgName";
ResourceGroupResource resourceGroup = await subscription.GetResourceGroups().GetAsync(rgName);
// Now we get the DnsZone collection from the resource group
DnsZoneCollection dnsZoneCollection = resourceGroup.GetDnsZones();
// Use the same location as the resource group
string dnsZoneName = "sample.com";
DnsZoneData data = new DnsZoneData("Global")
{
};
ArmOperation<DnsZoneResource> lro = await dnsZoneCollection.CreateOrUpdateAsync(WaitUntil.Completed, dnsZoneName, data);
DnsZoneResource dnsZone = lro.Value;