Deletes DNS records on Porkbun for the specified domain
using the
/api/json/v3/dns/delete/{domain}/{dns_record_id}
endpoint
of Porkbun's API. DNS records
must be provided as either a character vector of DNS record identifiers or a dataframe/tibble with an id
column. Further
columns are silently ignored.
Usage
porkbun_dns_records_delete(
records,
domain,
api_key = pal::pkg_config_val("porkbun_api_key"),
secret_api_key = pal::pkg_config_val("porkbun_secret_api_key"),
max_tries = 3L
)
Arguments
- records
DNS records. A dataframe/tibble with the columns
type
,hostname
,value
,ttl
,priority
,weight
,port
,flag
,tag
andtarget
. The first three columns are mandatory, columns not listed here are silently ignored.- domain
Domain name to delete DNS records for. A character scalar.
- api_key
Porkbun API key used for authentication. A character scalar.
- secret_api_key
Porkbun secret API key used for authentication. A character scalar.
- max_tries
Maximum number of attempts to retry in case of an HTTP error. An integerish scalar.
See also
Other Porkbun functions:
porkbun_dns_records_get()
,
porkbun_dns_records_set()
Examples
if (FALSE) { # \dontrun{
yay::porkbun_dns_records_delete(domain = "my.site",
records = "xyz123")
# The output of `netlify_dns_records_get()` can directly be fed. To delete all (!) non-NS records:
yay::porkbun_dns_records_get(domain = "my.site") |>
dplyr::filter(type != "NS") |>
yay::porkbun_dns_records_delete(domain = "my.site")} # }