dns-record
Usage: oredge dns-record ACTION [OPTIONS]
ACTION:
create
list
show
modify
delete
locations
help
GLOBAL OPTIONS:
--help
--show-api print restful api request.
--json print json format.
--config specify config file, default is ~/.oredge/config.
Create a DNS record
Usage: oredge dns-record create [OPTIONS]
OPTIONS:
--dns dns id.
--disabled bool true or false.
--gateway integer gateway.
--ip string ip.
--is-master bool true or false.
--ttl integer ttl.
--unit string ttl unit, sec,min,hour,day.
--sub-domain string sub domain.
--type string A,AAAA,CNAME.
--domain string domain for CNAME.
--location string specify the location of client.
GLOBAL OPTIONS:
--help
--show-api print restful api request.
--config specify config file, default is ~/.oredge/config.
Example
create a A DNS record for DNS id 1(foo.com), then the DNS query A record for tt.foo.com return 10.1.1.1
# oredge dns-record create 1 --type A --sub-domain tt --ip 10.1.1.1 ID: 1-371
create a CNAME DNS record for DNS id 3(bar.com), then the DNS query CNAME record for test.bar.com return www.test.com.
# oredge dns-record create 3 --type CNAME --sub-domain test --domain www.test.com ID: 3-372
create a CNAME DNS record with client location Asia.
# oredge dns-record create 3 --type CNAME --sub-domain test --domain www.test.com --location Asia ID: 3-372
list all locations used for
--location
# oredge dns-record locations default Africa CHINAEDU Afghanistan Anhui CHINAEDU Anhui ChinaMobile Anhui ChinaRailcom Anhui ChinaTelecom Anhui ChinaUnicom Anhui DRPENG Beijing CHINAEDU Beijing ChinaMobile Beijing ChinaRailcom Beijing ChinaTelecom Algeria Beijing ChinaUnicom Beijing DRPENG China CHINAEDU ...
List DNS records
Usage: oredge dns-record create [dns] [OPTIONS]
OPTIONS:
--dns dns id.
--disabled bool true or false.
--gateway integer gateway.
--ip string ip.
--is-master bool true or false.
--ttl integer ttl.
--unit string ttl unit, sec,min,hour,day.
--sub-domain string sub domain.
--type string A,AAAA
GLOBAL OPTIONS:
--help
--show-api print restful api request.
--json print json format.
--config specify config file, default is ~/.oredge/config.
Example
# oredge dns-record list 1
ID TYPE SUB DOMAIN TTL UNIT IS MASTER CREATE TIME MODIFY TIME
1-371 A tt true 2021-07-15 22:50:11 2021-07-15 22:50:11
1-370 A test true 2021-07-14 06:54:07 2021-07-14 06:54:07
1-367 A abc 5 min true 2021-05-25 04:53:50 2021-05-25 04:53:50
1-364 A @ 5 min true 2021-05-09 22:04:40 2021-05-09 22:04:40
1-353 SRV _aa._bb.sdfadsf 5 min true 2021-03-30 22:39:55 2021-05-07 03:07:03
1-352 SRV _dsf._dafsdf.asdfsdf 5 min true 2021-03-30 22:33:36 2021-03-30 22:33:36
1-351 SRV _http._tcp.abc 5 min true 2021-03-30 22:31:54 2021-03-30 22:31:54
Get details of a DNS record
Usage: oredge dns-record show [id] [OPTIONS]
OPTIONS:
--id integer id.
GLOBAL OPTIONS:
--help
--show-api print restful api request.
--json print json format.
--config specify config file, default is ~/.oredge/config.
Example
# oredge dns-record show 1-371
ID : 1-371
TYPE : A
SUB DOMAIN : tt
TTL :
UNIT :
DISABLED : true
IS MASTER : true
CREATE TIME: 2021-07-15 22:50:11
MODIFY TIME: 2021-07-15 22:50:11
Modify DNS record
Usage: oredge dns-record modify [id] [OPTIONS]
OPTIONS:
--id id
--disabled bool true or false.
--gateway integer gateway.
--ip string ip.
--is-master bool true or false.
--ttl integer ttl.
--unit string ttl unit, sec,min,hour,day.
--sub-domain string sub domain.
--type string A,AAAA,CNAME.
--domain string domain for CNAME
GLOBAL OPTIONS:
--help
--show-api print restful api request.
--json print json format.
--config specify config file, default is ~/.oredge/config.
Example
# oredge dns-record modify 1-371 --ip 10.2.2.2
OK
# oredge dns-record modify 1-372 --domain www.test.com
OK
Delete DNS Record
Usage: oredge rule delete [id] [OPTIONS]
OPTIONS:
--id integer id.
--dns integer dns id.
GLOBAL OPTIONS:
--help
--show-api print restful api request.
--json print json format.
--config specify config file, default is ~/.oredge/config.
Example
# oredge dns-record delete 1-371
OK