Generated API¶
- class pyatomiadns.client.AtomiaClient(url, email, password)[source]¶
The AtomiaClient plugs in on the json API from atomiadns.
- AddAccount(email, password_soap)[source]¶
Adds an account for soap
Parameters: - email – str email used as login
- paswword_soap – str password for the user
- AddDNSSECKey(algorithm, keysize, keytype, activated)[source]¶
Adds a DNSSEC key to the database. default algorithm: RSASHA256 for KSK use keysize 2048, for ZSK use 1024
Parameters: - algorithm – str defaults to RSASHA256
- keysize – int size of key in bit (1024, 2048,...)
- keytype – str KSK or ZSK
- activated – str yes or no
- AddDnsRecords(zone, records)[source]¶
Adds a list of records to a zone.
A record dict is the following: {
“ttl”: “3600”, “label” : “@”, “class” : “IN”, “type” : “A”, “rdata” : “192.168.0.1”}
Parameters: - zone – str the name of the zone
- records – list list of dicts containing the records’
- AddNameserver(nameserver, nameservergroup)[source]¶
Add a nameserver as a subscriber of changes to the data set in this server.
Parameters: - nameserver – str the servername to add as a subscriber
- nameservergroup – str the nameserver group that this nameserver should subscribe to changes for
- AddNameserverGroup(groupname)[source]¶
Add a nameserver group.
Parameters: groupname – str name of the group you wish to add
- AddZone(zonename, zonettl, mname, rname, refresh, retry, expire, minimum, nameservers, nameservergroup)[source]¶
Add a zone to the Atomia DNS master database.
Parameters: - zonename – str the name of the zone
- zonettl – int the ttl of the SOA-record and the NS-records
- mname – str the SOA mname field
- rname – str the SOA rname field
- refresh – int the SOA refresh field
- retry – int the SOA retry field
- expire – int the SOA expire field
- minimum – int the SOA minimum field
- nameservers – str a string of the hostnames of the nameservers for the zone comma separated within brackets ([“dns1.example.org”,”dns2.example.org”])
- nameservergroup – str the nameserver group that should host the zone
- DeleteDnsRecords(zone, records)[source]¶
Removes the given records.
One should only provide the labels in a following format
‘[{“label”: “www”}, {“label”: “bleh”}]’
Parameters: - zone – str the name of the zone
- records – list of dict containing only the label
- DeleteNameServerGroup(groupname)[source]¶
Delete a nameserver group.
Parameters: groupname – str name of the group you wish to delete
- DeleteNameserver(nameserver)[source]¶
Remove a nameserver as a subscriber of changes to the data set in this server.
Parameters: nameserver – str the servername to remove as a subscriber
- DeleteZone(zone)[source]¶
Deletes a zone from the database.
Parameters: zone – str the name of the zone
- EditAccount(email, password)[source]¶
Allows one to change the password of ones account
Parameters: - email – str email of the account to change
- password – str new password
- EditDnsRecords(zone, records)[source]¶
Edits the records for a certain label
Parameters: - zone – str zone name
- records – list for format see AddDnsRecords
- EditZone(zonename, zonettl, mname, rname, refresh, retry, expire, minimum, nameservers, nameservergroup)[source]¶
Edits a zone. This is only for completeness, and could be done by editing the SOA and NS-records directly as well.
Parameters: - zonename – str the name of the zone
- zonettl – int the ttl of the SOA-record and the NS-records
- mname – str the SOA mname field
- rname – str the SOA rname field
- refresh – int the SOA refresh field
- retry – int the SOA retry field
- expire – int the SOA expire field
- minimum – int the SOA minimum field
- nameservers – str a string of the hostnames of the nameservers for the zone comma separated within brackets ([“dns1.example.org”,”dns2.example.org”])
- nameservergroup – str the nameserver group that should host the zone
- FindZones(email, pattern, count, offset)[source]¶
Finds zones according to the pattern
Parameters: - email – str email of the account
- pattern – str the pattern to search for with SQL LIKE semantics
- count – int the max number of zones to return
- offset – int the offset of the first zone to return
- GetAllZones()[source]¶
GetAllZones returns all the zone names that are defined. This is an ADMIN only method
- GetDnsRecords(zone, label)[source]¶
GetRecord will fetch full record information for zone and label given
- GetLabels(zone)[source]¶
GetLabels returns all the labels for a certain zone.
Parameters: zone – str zone (example.org, sejo-it.be,...)
- GetNameserver(nameserver)[source]¶
Gets the group name that a nameserver is configured as a subscriber for.
Parameters: nameserver – str the servername to get information for
- GetZone(zone)[source]¶
GetZone returns the complete zone info with all records
Parameters: zone – str zone (example.org, sejo-it.be,...)