# DigitalOcean on boxd

> DigitalOcean is a cloud infrastructure provider offering scalable compute platforms with a user-friendly interface.

- Page: https://boxd.sh/integrations/digital-ocean/
- CLI: `run digital-ocean` (48 commands, 1 marked common)
- SDK: `import { digitalOcean } from "@boxd/run"`; every parameter and response type is at `@boxd/run/digital-ocean`
- Triggers: none
- Connect: `run auth digital-ocean` (Sign in with DigitalOcean), or https://app.boxd.sh/integrations/detail/digital_ocean
- All integrations: https://boxd.sh/integrations/ (Markdown: https://boxd.sh/integrations/index.md)

## From the shell

```sh
run auth digital-ocean      # once: prints a link to connect your account
run digital-ocean           # list its commands
run digital-ocean list-apps
```

Parameters are flags (`--flag value`); object and array parameters take a JSON string. Output is YAML, or JSON with `--json`. Calls use your own connection; `--scope <name>` uses a connection shared with your team.

## From a script

```ts
import { every, digitalOcean } from "@boxd/run";

every("1 hour", async () => {
  const result = await digitalOcean.listApps({});
  console.log(result);
});
```

Run it with `run digital-ocean.run.ts`. DigitalOcean has no triggers; `every()` polls on a schedule, keeps the script running as a job, and wakes the machine when it is due.

## Commands

Required flags are listed; `run digital-ocean <command> --help` lists the optional ones. "common" marks what `run digital-ocean` shows without `--all`.

| Command | SDK method | Required flags | Optional | Description |
|---|---|---|---|---|
| `create-custom-image` | `digitalOcean.createCustomImage()` | `--distribution` `--name` `--region` `--url` | 2 | Creates a custom image in DigitalOcean by importing a Linux VM disk image from a publicly accessible URL |
| `create-database-cluster` | `digitalOcean.createDatabaseCluster()` | `--engine` `--name` `--num-nodes` `--region` `--size` `--version` | 9 | Creates a new managed database cluster on DigitalOcean |
| `create-new-block-storage-volume` | `digitalOcean.createNewBlockStorageVolume()` | `--name` `--region` `--size-gigabytes` | 5 | Create a new block storage volume |
| `create-new-domain` | `digitalOcean.createNewDomain()` | `--name` | 1 | Creates a new domain in DigitalOcean's DNS management system |
| `create-new-domain-record` | `digitalOcean.createNewDomainRecord()` | `--data` `--domain-name` `--type` | 7 | Create a new DNS record for a domain |
| `create-new-droplet` | `digitalOcean.createNewDroplet()` | `--image` `--name` `--region` `--size` | 10 | Create a new Droplet |
| `create-new-firewall` | `digitalOcean.createNewFirewall()` | `--inbound-rules` `--name` `--outbound-rules` | 3 | Creates a new cloud firewall with custom inbound and outbound rules |
| `create-new-kubernetes-cluster` | `digitalOcean.createNewKubernetesCluster()` | `--name` `--node-pools` `--region` `--version` | 3 | Creates a new DigitalOcean Kubernetes (DOKS) cluster with managed control plane |
| `create-new-load-balancer` | `digitalOcean.createNewLoadBalancer()` | `--forwarding-rules` `--name` `--region` | 10 | Create a new load balancer |
| `create-new-ssh-key` | `digitalOcean.createNewSshKey()` | `--name` `--public-key` | 0 | Registers a new SSH public key with your DigitalOcean account |
| `create-new-tag` | `digitalOcean.createNewTag()` | `--name` | 0 | Creates a new tag in DigitalOcean for organizing and grouping resources |
| `create-new-vpc` | `digitalOcean.createNewVpc()` | `--name` `--region` | 3 | Creates a new Virtual Private Cloud (VPC) in a specified DigitalOcean region |
| `delete-block-storage-volume` | `digitalOcean.deleteBlockStorageVolume()` | `--volume-id` | 0 | Permanently deletes a block storage volume by its unique ID |
| `delete-database-cluster` | `digitalOcean.deleteDatabaseCluster()` | `--database-cluster-uuid` | 0 | Delete a database cluster by UUID |
| `delete-domain` | `digitalOcean.deleteDomain()` | `--name` | 0 | Deletes a domain from DigitalOcean DNS |
| `delete-domain-record` | `digitalOcean.deleteDomainRecord()` | `--name` `--record-id` | 0 | Delete a DNS record by its record ID for a domain |
| `delete-existing-droplet` | `digitalOcean.deleteExistingDroplet()` | `--droplet-id` | 0 | Delete a Droplet by ID |
| `delete-firewall` | `digitalOcean.deleteFirewall()` | `--firewall-id` | 0 | Delete a firewall by ID |
| `delete-image` | `digitalOcean.deleteImage()` | `--image-id` | 0 | Deletes a user-created custom image or snapshot from your DigitalOcean account by its numeric ID |
| `delete-load-balancer` | `digitalOcean.deleteLoadBalancer()` | `--load-balancer-id` | 0 | Delete a load balancer instance by ID |
| `delete-ssh-key` | `digitalOcean.deleteSshKey()` | `--key-id-or-fingerprint` | 0 | Delete a public SSH key |
| `delete-tag` | `digitalOcean.deleteTag()` | `--name` | 0 | Deletes a tag from your DigitalOcean account |
| `delete-vpc` | `digitalOcean.deleteVpc()` | `--vpc-id` | 0 | Delete a VPC (Virtual Private Cloud) by its unique identifier |
| `list-all-databases` | `digitalOcean.listAllDatabases()` | — | 3 | List all managed database clusters on your account |
| `list-all-domains` | `digitalOcean.listAllDomains()` | — | 2 | Lists all DNS domains configured in your DigitalOcean account |
| `list-all-droplets` | `digitalOcean.listAllDroplets()` | — | 3 | Lists all Droplets (virtual machines) in your DigitalOcean account with pagination support |
| `list-all-firewalls` | `digitalOcean.listAllFirewalls()` | — | 2 | List all cloud firewalls configured in your DigitalOcean account |
| `list-all-images` | `digitalOcean.listAllImages()` | — | 5 | List all images available on your account |
| `list-all-kubernetes-clusters` | `digitalOcean.listAllKubernetesClusters()` | — | 2 | List all Kubernetes clusters on your account |
| `list-all-load-balancers` | `digitalOcean.listAllLoadBalancers()` | — | 2 | List all load balancers in your DigitalOcean account with pagination support |
| `list-all-snapshots` | `digitalOcean.listAllSnapshots()` | — | 3 | List all snapshots available on your DigitalOcean account |
| `list-all-ssh-keys` | `digitalOcean.listAllSshKeys()` | — | 2 | Lists all SSH keys associated with your DigitalOcean account |
| `list-all-tags` | `digitalOcean.listAllTags()` | — | 2 | List all tags in your account |
| `list-all-volumes` | `digitalOcean.listAllVolumes()` | — | 4 | List all block storage volumes available on your account |
| `list-all-vpcs` | `digitalOcean.listAllVpcs()` | — | 2 | List all VPCs on your account |
| `list-apps` ·common | `digitalOcean.listApps()` | — | 3 | List all App Platform apps in your DigitalOcean account |
| `list-database-options` | `digitalOcean.listDatabaseOptions()` | — | 0 | Lists all available configuration options for DigitalOcean managed database clusters, including supported engines (PostgreSQL, MySQL, MongoDB, Valkey, Kafka, OpenSearch), versions, regions, and… |
| `list-domain-records` | `digitalOcean.listDomainRecords()` | `--domain-name` | 4 | List all DNS records for a domain |
| `retrieve-domain` | `digitalOcean.retrieveDomain()` | `--name` | 0 | Retrieves complete details about a specific domain including its TTL and DNS zone file configuration |
| `retrieve-domain-record` | `digitalOcean.retrieveDomainRecord()` | `--name` `--record-id` | 0 | Retrieve a specific DNS record for a domain by its record ID |
| `retrieve-existing-droplet` | `digitalOcean.retrieveExistingDroplet()` | `--droplet-id` | 0 | Retrieve detailed information about a specific DigitalOcean Droplet by its unique numeric ID |
| `retrieve-existing-image` | `digitalOcean.retrieveExistingImage()` | `--image-id` | 0 | Retrieve information about an image by ID or slug |
| `retrieve-tag` | `digitalOcean.retrieveTag()` | `--name` | 0 | Retrieve an individual tag by name |
| `retrieve-vpc` | `digitalOcean.retrieveVpc()` | `--vpc-uuid` | 0 | Retrieve details about a specific VPC by its ID |
| `tag-resource` | `digitalOcean.tagResource()` | `--resources` `--tag-name` | 0 | Tag resources by name |
| `untag-resource` | `digitalOcean.untagResource()` | `--resources` `--tag-name` | 0 | Untag resources by tag name |
| `update-domain-record` | `digitalOcean.updateDomainRecord()` | `--domain-name` `--record-id` | 9 | Update an existing DNS record for a domain |
| `update-vpc` | `digitalOcean.updateVpc()` | `--vpc-id` | 3 | Update information about a VPC |

## Docs

- [run CLI](https://docs.boxd.sh/cli/run): Call connected integrations from the shell, connect new ones, and run automations.
- [Quickstart](https://docs.boxd.sh/guides/integrations/quickstart): Connect an integration, call it from the shell, and turn a script into an automation.
- [Connections](https://docs.boxd.sh/guides/integrations/connections): Connect an account once, for yourself or for your whole organization.
- [Scripts](https://docs.boxd.sh/guides/automations/scripts): Typed integrations, triggers, schedules and state in a .run.ts file.
- [Jobs](https://docs.boxd.sh/guides/automations/jobs): How a script becomes a background job: states, retries, sleep and wake.
- [Beyond the catalog](https://docs.boxd.sh/guides/automations/beyond-the-catalog): Reach your own APIs, databases and cloud accounts from a script.
