用于管理google云dns上的区域和资源记录集的python模块和cli
gcpdns的Python项目详细描述
python模块和cli,用于管理google cloud dns上的区域和资源记录集
功能
- 以csv和/或json格式转储所有项目区域名
- 以csv和/或json格式转储所有区域资源记录集
- 通过cli或csv创建和删除区域
- 通过cli创建和删除资源记录集
- 使用一个csv更新一个项目中多个区域的dns资源记录 文件
- 发布时自动拆分长度超过255个字符的TXT记录
- 需要时自动向记录中添加结尾.。
cli
Usage: gcpdns [OPTIONS] CREDENTIAL_FILE COMMAND [ARGS]... gcpdns: A CLI for managing zones and resource record sets on Google Cloud DNS. Options: --version Show the version and exit. --verbose Enable verbose logging. --help Show this message and exit. Commands: record Manage DNS resource record sets. zone Manage DNS zones.
gcpdns记录
Usage: gcpdns record [OPTIONS] COMMAND [ARGS]... Manage DNS resource record sets. Options: --help Show this message and exit. Commands: create Create a resource record set (Data fields separated by |). delete Delete a resource record set dump Dump a list of DNS resource records. update Create, replace, and delete resource record sets using a CSV file.
gcpdns区
Manage DNS zones. Options: --help Show this message and exit. Commands: create Create a DNS zone. delete Delete a DNS zone and all its resource records. dump Dump a list of DNS zones. update Create and delete zones using a CSV file.
安装
使用pip(或者对python 3使用pip3)。
sudo -H pip install gcpdns
区域CSV字段
- action
- create-创建区域
- delete-删除区域
- dns_name-区域的dns名称
- gcp_name-GCP中的区域名称(可选)
- description-区域的描述(可选)
记录csv字段
- action
- create-创建资源记录集 与所提供的资源相同,但将替换现有资源。 记录集具有相同的{TT16} $和^ {Tt17}$(如果存在)
- delete-删除资源记录集