API for DNS
This provides an API for the Memset DNS (Domain Name Service).
A zone is composed of a number of zone domains and a number of zone records. The zone domains specify which domains the nameservers will return this zone for, and the zone records specify which records are returned.
Zone records are usually relative, which means that they have the zone domain appended to them. If you make a zone record with name or www and a domain of example.com then the record will be served for queries matching www.example.com. If you were to add example.co.uk to the zone domains for this zone then www.example.co.uk would be served with the same value.
Zone records are relative if the relative flag is True. If the relative flag is False and the name contains dots, then they are treated as absolute, otherwise they are treated as relative. For example if you make a zone record with name www.example.com it will be served under any domain as www.example.com, however if you set the relative flag to True it will be served under the domain specified. The relative flag is essential if you want to host zones under multiple domains where part of the name contains dots, e.g. if name was a.www and domain was example.com then you would need to set the relative flag in the zone record if you wanted it served as a.www.example.com rather than a.www.
Reloads the name servers with recent changes.
Running this will ensure that the current state of your DNS records is synced with your DNS server. DNS records are pushed out the the server every 15 minutes normally, but running this will speed up the process.
You may poll the job returned to discover when this has been done. We don’t guarantee any particular timescale for this, but normally it will only take a few seconds.
Returns: | A dictionary as described in job.status(). |
---|
Query the reverse maps for all servers, or a single server if name is supplied, or a single address if address is supplied. If name and address are supplied then it will only show address if it is attached to that server.
Parameters: |
|
---|---|
Returns: | a list of dictionary with the following keys:
|
Updates a reverse map. If name is supplied then it checks that address is attached to that server before updating it.
Parameters: |
|
---|---|
Returns: | a list of dictionaries as described in dns.reverse_map_list(). |
Create a zone, optionally providing records and domains.
Parameters: |
|
---|---|
Returns: | a dictionary with information about the created zone as decribed in dns.zone_info(). |
Deletes a zone
NB this will delete any zone records and zone domains that are part of this zone.
Parameters: | id (String) – The Zone ID. Zone IDs are 32 hex digits. |
---|---|
Returns: | a dictionary with zone in before it was deleted as returned by dns.zone_info() |
Create a zone domain.
Parameters: |
|
---|---|
Returns: | a dictionary containing the contents of the zone domain after addition as described in dns.zone_domain_info(). |
Deletes the zone domain
Parameters: | domain (String) – The zone domain name. Ensure this value has at most 250 characters. |
---|---|
Returns: | a dictionary containing the contents of the zone domain before it was deleted as described in dns.zone_domain_info(). |
Info about a zone domain
Parameters: | domain (String) – The zone domain name. Ensure this value has at most 250 characters. |
---|---|
Returns: | a dictionary with the following keys
|
Returns all the zone domains for this account
Returns: | list of dictionaries as described in dns.zone_domain_info(). |
---|
Updates the zone domain.
Parameters: |
|
---|---|
Returns: | a dictionary containing the contents of the zone domain after addition as described in dns.zone_domain_info(). |
Info about a zone
Parameters: | id (String) – The Zone ID. Zone IDs are 32 hex digits. |
---|---|
Returns: | a dictionary with the following keys
|
Lists all the zones in this account
Returns: | a list of dictionaries as described in zone_info() |
---|
Create a zone record in the zone supplied
Parameters: |
|
---|---|
Returns: | a dictionary with the zone record in as described in dns.zone_record_info() |
Delete a zone record
Parameters: | id (String) – The Zone Record ID. Zone Record IDs are 32 hex digits. |
---|---|
Returns: | the zone record information before it was deleted as a dictionary as described in dns.zone_record_info(). |
Info about a zone record
Parameters: | id (String) – The Zone Record ID. Zone Record IDs are 32 hex digits. |
---|---|
Returns: | a dictionary with the following keys
|
Returns all the zone records for this account
Returns: | list of dictionaries as described in dns.zone_record_info(). |
---|
Update a zone record. Supply any parameters you want updated.
Parameters: |
|
---|---|
Returns: | a dictionary with the zone record in as described in dns.zone_record_info() |
Modifies a zone
Any parameters passed in will be used to update the zone.
If you want to create, update or delete zone records and zone domains then use the zone_record and zone_domain methods with the zone_id parameter.
Parameters: |
|
---|---|
Returns: | a dictionary with zone in after modification as returned by dns.zone_info(). |