PowerDns.Client 0.3.3

.NET Standard 2.0
dotnet add package PowerDns.Client --version 0.3.3
NuGet\Install-Package PowerDns.Client -Version 0.3.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PowerDns.Client" Version="0.3.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PowerDns.Client --version 0.3.3
#r "nuget: PowerDns.Client, 0.3.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install PowerDns.Client as a Cake Addin
#addin nuget:?package=PowerDns.Client&version=0.3.3

// Install PowerDns.Client as a Cake Tool
#tool nuget:?package=PowerDns.Client&version=0.3.3

PowerDNS Client

NuGet Build API documentation

This project provides a .NET client library for the PowerDNS API.

Usage

Add the NuGet package PowerDns.Client to your project. You can then create an instance of the client like this:

var client = new PowerDnsClient(
    uri: new Uri("http://example.com/"), // without /api/v1
    apiKey: "changeme");
var zonesEndpoint = client.Servers["localhost"].Zones;

Get a list of all zones:

List<Zone> zones = await zonesEndpoint.ReadAllAsync();

Get a specific zone:

Zone zone = await zonesEndpoint["example.org"].ReadAsync();

Create a new zone:

await zonesEndpoint.CreateAsync(new Zone("example.org", /*nameservers:*/ "ns1.example.org", "ns2.example.org")
{
    RecordSets =
    {
        new RecordSet
        {
            Name = "www.example.org",
            Type = RecordType.A,
            Ttl = 10,
            Records = 
            {
                new Record(content: "1.2.3.4"),
                new Record(content: "5.6.7.8")
            }
        }
    }
});

Patch a record set in a zone:

RecordSet recordSet = await zonesEndpoint["example.org"].GetRecordSetAsync("www.example.org");

recordSet.ChangeType = ChangeType.Replace;
recordSet.Records.Add(new ResourceRecord(content: "4.3.2.1"));

await zonesEndpoint["example.org"].PatchRecordSetAsync(recordSet);

Delete a zone:

await zonesEndpoint["example.org"].DeleteAsync();
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48 net481
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.3.3 74 3/12/2023
0.3.2 555 1/13/2022
0.3.1 3,232 12/24/2020
0.3.0 5,124 12/11/2019
0.2.0 518 4/10/2019
0.1.0 670 9/19/2018