doapi
doapi-domain
— manage DigitalOcean domains & domain records
doapi-domain new <domain> <ip address>
doapi-domain show [<domain> ...]
doapi-domain delete <domain> ...
doapi-domain new-record [--priority <int>] [--port <int>] [--weight <int>]
[--delete] <domain> <type> <name> <data>
doapi-domain show-record <domain> [<record id> ...]
doapi-domain update-record [--type <type>]
[--name <name>]
[--data <data>]
[--port <int> | --no-port]
[--priority <int> | --no-priority]
[--weight <int> | --no-weight]
<domain> <record id>
doapi-domain delete-record <domain> <record id> [<record id> ...]
doapi-domain
also takes the universal options <universal>
common to all doapi
commands.
Domains are specified as the base domain name without any subdomains (e.g., example.com
, never www.example.com
). Records of a given domain are specified by ID number.
doapi-domain new <domain> <ip address>
Set up a domain name <domain>
pointing to <ip address>
. The new domain is output as a Domain object converted to JSON.
Note that this command does not actually register a new domain name; it merely configures DigitalOcean's nameservers to provide DNS resolution for the domain. See How To Set Up a Host Name with DigitalOcean for more information.
doapi-domain show [<domain> ...]
Show domains. If no domains are specified, all domains registered to the account are shown. The domains are output as a list of Domain objects converted to JSON.
doapi-domain delete <domain> ...
Delete domains. There is no output.
doapi-domain new-record [--priority <int>] [--port <int>] [--weight <int>]
[--delete] <domain> <type> <name> <data>
Add a new domain record with the given type, name, & data to domain <domain>
. The new record is output as a DomainRecord object converted to JSON.
doapi-domain new-record
--delete
After creating the new record, delete any old records with the same type & name.
--port <int>
Specify the port on which the service is available (SRV records only)
--priority <int>
Specify the priority for the new record (SRV and MX records only)
--weight <int>
Specify the weight for the new record (SRV records only)
doapi-domain show-record <domain> [<record id> ...]
Show records for domain <domain>
. If no records are specified, all records for the domain are shown. The records are output as a list of DomainRecord objects converted to JSON.
doapi-domain update-record [--type <type>]
[--name <name>]
[--data <data>]
[--port <int> | --no-port]
[--priority <int> | --no-priority]
[--weight <int> | --no-weight]
<domain> <record id>
Modify one or more fields of a domain record. The updated record is output as a DomainRecord object converted to JSON.
doapi-domain update-record
--data <data>
Set the record's data to <data>
--name <name>
Set the record's name to <name>
--no-port
Unset the record's port field
--no-priority
Unset the record's priority field
--no-weight
Unset the record's weight field
--port <int>
Set the record's port to <int>
--priority <int>
Set the record's priority to <int>
--type <type>
Set the record's type to <type>
--weight <int>
Set the record's weight to <int>
doapi-domain delete-record <domain> <record id> [<record id> ...]
Delete records of the given domain. There is no output.