This is a pythonscript to update A-Records via API on the Infomaniak nameserver.
The Infomaniak API is not documented to modify DNS-Records. So I created this one. Use at your own risk!
You need a API-Key from here. Scope is DOMAIN.
export INFOMANIAK_API_TOKEN="your_infomaniak_api_token"
python manage_dns_records.py <domain> <source> <target> add
Example for the root domain:
python manage_dns_records.py example.com . 123.124.125.126 add
Example for a subdomain:
python manage_dns_records.py example.com www 123.124.125.126 add
python manage_dns_records.py <domain> <source> <target> delete
Example for the root domain:
python manage_dns_records.py example.com . 123.124.125.126 delete
Example for a subdomain:
python manage_dns_records.py example.com www 123.124.125.126 delete
python manage_dns_records.py <domain> <source> <old_target> update <new_target>
Example for the root domain:
python manage_dns_records.py example.com . 123.124.125.126 update 231.232.233.324
Example for a subdomain:
python manage_dns_records.py example.com www 123.124.125.126 update 231.232.233.324
This script is inspired from their certbot-script.