github Azure/azure-sdk-for-net Azure.ResourceManager.Dns_1.0.0-beta.1

latest releases: Azure.Messaging.EventHubs.Processor_5.12.0-beta.1, Azure.Messaging.EventHubs_5.12.0-beta.1, Azure.Template_1.0.3-beta.3795970...
pre-release22 months ago

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

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;

Don't miss a new azure-sdk-for-net release

NewReleases is sending notifications on new releases.