Point DNS Driver Documentation¶
PointDNS provides an API that gives access to point zone, records, http and email redirects management. The API is built using RESTful principles.
XML and JSON are supported as responses to API calls but this provider only support JSON.
Instantiating the driver¶
from libcloud.dns.types import Provider
from libcloud.dns.providers import get_driver
cls = get_driver(Provider.POINTDNS)
driver = cls('username', 'apikey')
API Docs¶
-
class
libcloud.dns.drivers.pointdns.
PointDNSDriver
(key, secret=None, secure=True, host=None, port=None, **kwargs)[source]¶ Parameters: - key (
str
) – API key or username to used (required) - secret (
str
) – Secret password to be used (required) - secure (
bool
) – Whether to use HTTPS or HTTP. Note: Some providers only support HTTPS, and it is on by default. - host (
str
) – Override hostname used for connections. - port (
int
) – Override port used for connections.
Returns: None
-
connectionCls
¶
-
create_record
(name, zone, type, data, extra=None)[source]¶ Create a new record.
Parameters: - name (
str
) – Record name without the domain name (e.g. www). Note: If you want to create a record for a base domain name, you should specify empty string (‘’) for this argument. - zone (
Zone
) – Zone where the requested record is created. - type (
RecordType
) – DNS record type (A, AAAA, …). - data (
str
) – Data for the record (depends on the record type). - extra (
dict
) – Extra attributes (driver specific). (optional)
Return type: Record
- name (
-
create_zone
(domain, type='master', ttl=None, extra=None)[source]¶ Create a new zone.
Parameters: - domain (
str
) – Zone domain name (e.g. example.com) - type (
str
) – Zone type (All zones are master by design). - ttl (
int
) – TTL for new records. (optional) - extra (
dict
) – Extra attributes (driver specific). (optional)
Return type: Zone
- domain (
-
delete_record
(record)[source]¶ Delete a record.
Parameters: record ( Record
) – Record to delete.Return type: bool
-
delete_zone
(zone)[source]¶ Delete a zone.
Note: This will delete all the records belonging to this zone.
Parameters: zone ( Zone
) – Zone to delete.Return type: bool
-
ex_create_mail_redirect
(destination, source, zone)[source]¶ Parameters: - destination (
str
) – The destination address of mail redirect. - source (
str
) – The source address of mail redirect. - zone (
Zone
) – Zone to list redirects for.
Return type: list
ofMailRedirect
- destination (
-
ex_create_redirect
(redirect_to, name, type, zone, iframe=None, query=None)[source]¶ Parameters: - redirect_to (
str
) – The data field. (redirect_to) - name (
str
) – The FQDN for the record. - type (
str
) – The type of redirects 301, 302 or 0 for iframes. - zone (
Zone
) – Zone to list redirects for. - iframe (
str
) – Title of iframe (optional). - query (
bool
) – boolean Information about including query string when redirecting. (optional).
Return type: Record
- redirect_to (
-
ex_delete_mail_redirect
(mail_r)[source]¶ Parameters: mail_r ( MailRedirect
) – Mail redirect to updateReturn type: bool
-
ex_delete_redirect
(redirect)[source]¶ Parameters: mail_r ( Redirect
) – Redirect to deleteReturn type: bool
-
ex_get_mail_redirects
(zone_id, mail_r_id)[source]¶ Parameters: - zone (
Zone
) – Zone to list redirects for. - mail_r_id (
str
) – Mail redirect id.
Return type: list
ofMailRedirect
- zone (
-
ex_get_redirect
(zone_id, redirect_id)[source]¶ Parameters: - zone (
Zone
) – Zone to list redirects for. - redirect_id (
str
) – Redirect id.
Return type: list
ofRedirect
- zone (
-
ex_list_mail_redirects
(zone)[source]¶ Parameters: zone ( Zone
) – Zone to list redirects for.Return type: list
ofMailRedirect
-
ex_list_redirects
(zone)[source]¶ Parameters: zone ( Zone
) – Zone to list redirects for.Return type: list
ofRecord
-
ex_update_mail_redirect
(mail_r, destination, source=None)[source]¶ Parameters: - mail_r (
MailRedirect
) – Mail redirect to update - destination (
str
) – The destination address of mail redirect. - source (
str
) – The source address of mail redirect. (optional)
Return type: list
ofMailRedirect
- mail_r (
-
ex_update_redirect
(redirect, redirect_to=None, name=None, type=None, iframe=None, query=None)[source]¶ Parameters: - redirect – Record to update
- redirect_to (
str
) – The data field. (optional). - name (
str
) – The FQDN for the record. - type (
str
) – The type of redirects 301, 302 or 0 for iframes. (optional). - iframe (
str
) – Title of iframe (optional). - query (
bool
) – boolean Information about including query string when redirecting. (optional).
Return type: list
ofRedirect
-
export_zone_to_bind_format
(zone)¶ Export Zone object to the BIND compatible format.
Parameters: zone ( Zone
) – Zone to export.Returns: Zone data in BIND compatible format. Return type: str
-
export_zone_to_bind_zone_file
(zone, file_path)¶ Export Zone object to the BIND compatible format and write result to a file.
Parameters: - zone (
Zone
) – Zone to export. - file_path (
str
) – File path where the output will be saved.
- zone (
-
get_record
(zone_id, record_id)[source]¶ Return a Record instance.
Parameters: - zone_id (
str
) – ID of the required zone - record_id (
str
) – ID of the required record
Return type: Record
- zone_id (
-
get_zone
(zone_id)[source]¶ Return a Zone instance.
Parameters: zone_id ( str
) – ID of the required zoneReturn type: Zone
-
iterate_records
(zone)¶ Return a generator to iterate over records for the provided zone.
Parameters: zone ( Zone
) – Zone to list records for.Return type: generator
ofRecord
-
iterate_zones
()¶ Return a generator to iterate over available zones.
Return type: generator
ofZone
-
list_record_types
()¶ Return a list of RecordType objects supported by the provider.
Returns: list
ofRecordType
-
list_records
(zone)[source]¶ Return a list of records for the provided zone.
Parameters: zone ( Zone
) – Zone to list records for.Returns: list
ofRecord
-
update_record
(record, name, type, data, extra=None)[source]¶ Update an existing record.
Parameters: - record (
Record
) – Record to update. - name (
str
) – Record name without the domain name (e.g. www). Note: If you want to create a record for a base domain name, you should specify empty string (‘’) for this argument. - type (
RecordType
) – DNS record type (A, AAAA, …). - data (
str
) – Data for the record (depends on the record type). - extra (
dict
) – (optional) Extra attributes (driver specific).
Return type: Record
- record (
-
update_zone
(zone, domain, type='master', ttl=None, extra=None)[source]¶ Update an existing zone.
Parameters: - zone (
Zone
) – Zone to update. - domain (
str
) – Zone domain name (e.g. example.com) - type (
str
) – Zone type (All zones are master by design). - ttl (
int
) – TTL for new records. (optional) - extra (
dict
) – Extra attributes (group, user-id). (optional)
Return type: Zone
- zone (
- key (