DigitalOcean.Net 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package DigitalOcean.Net --version 0.1.0
                    
NuGet\Install-Package DigitalOcean.Net -Version 0.1.0
                    
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="DigitalOcean.Net" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DigitalOcean.Net" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="DigitalOcean.Net" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DigitalOcean.Net --version 0.1.0
                    
#r "nuget: DigitalOcean.Net, 0.1.0"
                    
#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.
#:package DigitalOcean.Net@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DigitalOcean.Net&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=DigitalOcean.Net&version=0.1.0
                    
Install as a Cake Tool

DigitalOcean.Net

English | 中文


NuGet License: MIT Build

A comprehensive .NET client library for the DigitalOcean API, covering all 40+ resource categories including Droplets, Kubernetes, App Platform, Databases, and more.

Features

  • Full API Coverage — All 40+ DigitalOcean resource categories (Droplets, Apps, Databases, Kubernetes, VPCs, etc.)
  • Multi-targeting — Supports netstandard2.0, netstandard2.1, net8.0, net9.0, net10.0
  • Strongly-typed — Auto-generated from the official OpenAPI specification
  • Dependency Injection — First-class support for Microsoft.Extensions.DependencyInjection
  • CancellationToken — Full async/await with cancellation support
  • SourceLink — Debug into library source code
  • doctl Integration — Read token directly from doctl CLI config

Installation

dotnet add package DigitalOcean.Net

Quick Start

Direct Usage

using DigitalOcean.Net;

// Create client with your API token
var client = DigitalOceanClientFactory.Create("dop_v1_your_token_here");

// Or read token from doctl CLI config (~/.config/doctl/config.yaml)
var client = DigitalOceanClientFactory.CreateFromAppData();

// List all Droplets
var dropletsResponse = await client.V2.Droplets.GetAsync();
foreach (var droplet in dropletsResponse?.Droplets ?? [])
{
    Console.WriteLine($"{droplet.Name} - {droplet.Status}");
}

// Get account info
var account = await client.V2.Account.GetAsync();
Console.WriteLine($"Email: {account?.Account?.Email}");

// List Apps (App Platform)
var apps = await client.V2.Apps.GetAsync();

// List Kubernetes clusters
var k8s = await client.V2.Kubernetes.Clusters.GetAsync();

// List databases
var dbs = await client.V2.Databases.GetAsync();

With Dependency Injection

using DigitalOcean.Net.Extensions;

// In Program.cs or Startup.cs
builder.Services.AddDigitalOceanClient(options =>
{
    options.Token = builder.Configuration["DigitalOcean:Token"]!;
});

// In your service class
public class MyService(DigitalOceanApiClient client)
{
    public async Task ListDroplets()
    {
        var response = await client.V2.Droplets.GetAsync();
        // ...
    }
}

Advanced Configuration

// Custom options
var client = DigitalOceanClientFactory.Create(new DigitalOceanClientOptions
{
    Token = "dop_v1_your_token_here",
    BaseUrl = "https://api.digitalocean.com",
    Timeout = TimeSpan.FromSeconds(60),
    UserAgent = "MyApp/1.0"
});

// Use your own HttpClient (for proxies, custom handlers, etc.)
var httpClient = new HttpClient(new MyCustomHandler());
var client = DigitalOceanClientFactory.Create("dop_v1_token", httpClient);

API Coverage

Category Description Namespace
Account Account info client.V2.Account
Actions Action history client.V2.Actions
Apps App Platform client.V2.Apps
Billing Billing & invoices client.V2.Customers
CDN Content delivery client.V2.Cdn
Certificates SSL certificates client.V2.Certificates
Databases Managed databases client.V2.Databases
Domains DNS management client.V2.Domains
Droplets Virtual machines client.V2.Droplets
Firewalls Cloud firewalls client.V2.Firewalls
Functions Serverless functions client.V2.Functions
Images OS images client.V2.Images
Kubernetes K8s clusters client.V2.Kubernetes
Load Balancers Load balancers client.V2.LoadBalancers
Monitoring Alerts & metrics client.V2.Monitoring
Projects Project management client.V2.Projects
Regions Available regions client.V2.Regions
Registry Container registry client.V2.Registry
Reserved IPs Static IPs client.V2.ReservedIps
Sizes Droplet sizes client.V2.Sizes
Snapshots Volume snapshots client.V2.Snapshots
Spaces Object storage client.V2.Spaces
SSH Keys SSH key management client.V2.Account
Tags Resource tagging client.V2.Tags
Uptime Uptime checks client.V2.Uptime
Volumes Block storage client.V2.Volumes
VPCs Virtual networks client.V2.Vpcs

Authentication

DigitalOcean uses OAuth Bearer tokens. Generate a token from the DigitalOcean Control Panel.

Token prefixes:

  • dop_v1_ — Personal access token
  • doo_v1_ — OAuth application token
  • dor_v1_ — Refresh token

Requirements

  • .NET Standard 2.0+ / .NET 8.0+ / .NET 9.0+ / .NET 10.0+
  • A DigitalOcean account and API token

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Product 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 is compatible.  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 is compatible. 
.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. 
Compatible target framework(s)
Included target framework(s) (in package)
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
1.0.1 117 4/13/2026
1.0.0 108 4/3/2026
0.1.0 101 4/3/2026