domain_records: List, create, update, and delete domain records.

Description Usage Arguments Examples

View source: R/domain-records.R

Description

List, create, update, and delete domain records.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
as.domain_record(x, domain)

## S3 method for class 'list'
as.domain_record(x, domain)

## S3 method for class 'domain_record'
as.domain_record(x, domain)

## S3 method for class 'domain_record'
as.url(x, ...)

domain_records(domain, ...)

domain_record(domain, domain_record_id, ...)

domain_record_create(
  domain,
  type,
  name = NULL,
  data = NULL,
  priority = NULL,
  port = NULL,
  ttl = NULL,
  weight = NULL,
  flags = NULL,
  tag = NULL,
  ...
)

domain_record_update(
  domain_record,
  type = NULL,
  name = NULL,
  data = NULL,
  priority = NULL,
  port = NULL,
  ttl = NULL,
  weight = NULL,
  flags = NULL,
  tag = NULL,
  ...
)

domain_record_delete(domain_record, ...)

Arguments

x

Domain record.

domain

(domain) Required. Domain Name (e.g. domain.com), specifies the domain for which to create a record.

...

Further args passed on the curl call to the web.

domain_record_id

(numeric/integer) A domain record ID

type

(character) Required. The type of record you would like to create. 'A', 'CNAME', 'NS', 'TXT', 'MX' or 'SRV'

name

(character) The host name, alias, or service being defined by the record. Required for 'A', 'CNAME', 'TXT' and 'SRV' records

data

(character) Variable data depending on record type. Required for 'A', 'AAAA', 'CNAME', 'MX', 'TXT', 'SRV', and 'NS' records

priority

(integer) Required for 'SRV' and 'MX' records

port

(integer) Required for 'SRV' records

ttl

(numeric/integer) Time to live for the record, in seconds. This defines the time frame that clients can cache queried information before a refresh should be requested. If not set, default is 1800

weight

(integer) Required for 'SRV' records

flags

(integer) An unsigned integer between 0-255 used for CAA records

tag

(character) The parameter tag for CAA records. Valid values are "issue", "wildissue", or "iodef"

domain_record

A domain record, or anything coercible to one

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
# list domains, then get domain records
(d <- domains()[[1]])
(rec <- domain_records(d))

# create a domain
dom <- domain_create('tablesandchairsbunnies.info', '107.170.220.59')
## list domain records
domain_records(dom)

# create a domain record
dr <- domain_record_create(dom, "CNAME", name = "helloworld", data = "@")
domain_record(dom, dr$id)

# update a domain record
dru <- domain_record_update(domain_record = dr, name = "blog")

# delete a domain record
domain_record_delete(dr)

## End(Not run)

analogsea documentation built on Nov. 9, 2021, 1:06 a.m.