[Original] command line CRUD Ali Cloud DNS

Command line parsing Ali Cloud DNS

Project address: https: //github.com/liyongjian5179/alidns

Ali cloud account first need to get account AccessKeyIDand AccessKeySecretand replace it to alidns.pyfile

Ali cloud and then install an interface

pip3 install aliyun-python-sdk-core-v3

Instructions for use:

[root@lyj]# ./alidns.py -h
usage: alidns.py [-h] [-a | -d | -u | -g]
                 RR TYPE ADDRESS [RR TYPE ADDRESS ...]

针对 xxx.com 域名记录进行相关操作

positional arguments:
  RR TYPE ADDRESS  记录 类型 地址

optional arguments:
  -h, --help       show this help message and exit
  -a, --add        add domain record. (e.g. --add RR TYPE ADDRESS)
  -d, --delete     delete domain record. (e.g. --delete RR)
  -u, --update     update domain record. (e.g. --update RR TYPE ADDRESS)
  -g, --get        get record ip. (e.g. --get RR)

eg

Increase resolved ./alidns.py -a www A x.x.x.x

Update resolve ./alidns.py -u www A x.x.x.x

Acquired parsed ./alidns.py -g www

Delete parsing ./alidns.py -d www

Guess you like

Origin www.cnblogs.com/liyongjian5179/p/11418747.html