libcloud.dns.drivers.pointdns module

Point DNS Driver

class libcloud.dns.drivers.pointdns.MailRedirect(id, source, destination, zone, driver)[source]

Bases: object

Point DNS mail redirect.

Parameters:
  • id (str) – MailRedirect id.

  • source (str) – The source address of mail redirect.

  • destination (str) – The destination address of mail redirect.

  • zone (Zone) – Zone where mail redirect belongs.

  • driver (DNSDriver) – DNSDriver instance.

delete()[source]
update(destination, source=None)[source]
class libcloud.dns.drivers.pointdns.PointDNSDriver(key: str, secret: str | None = None, secure: bool = True, host: str | None = None, port: int | None = None, **kwargs: Any | None)[source]

Bases: DNSDriver

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

RECORD_TYPE_MAP: Dict[RecordType, str] = {'A': 'A', 'AAAA': 'AAAA', 'ALIAS': 'ALIAS', 'CNAME': 'CNAME', 'MX': 'MX', 'NS': 'NS', 'PTR': 'PTR', 'SRV': 'SRV', 'SSHFP': 'SSHFP', 'TXT': 'TXT'}
connectionCls

alias of PointDNSConnection

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

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

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 of MailRedirect

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

ex_delete_mail_redirect(mail_r)[source]
Parameters:

mail_r (MailRedirect) – Mail redirect to update

Return type:

bool

ex_delete_redirect(redirect)[source]
Parameters:

mail_r (Redirect) – Redirect to delete

Return 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 of MailRedirect

ex_get_redirect(zone_id, redirect_id)[source]
Parameters:
  • zone (Zone) – Zone to list redirects for.

  • redirect_id (str) – Redirect id.

Return type:

list of Redirect

ex_list_mail_redirects(zone)[source]
Parameters:

zone (Zone) – Zone to list redirects for.

Return type:

list of MailRedirect

ex_list_redirects(zone)[source]
Parameters:

zone (Zone) – Zone to list redirects for.

Return type:

list of Record

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 of MailRedirect

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 of Redirect

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

get_zone(zone_id)[source]

Return a Zone instance.

Parameters:

zone_id (str) – ID of the required zone

Return type:

Zone

list_records(zone)[source]

Return a list of records for the provided zone.

Parameters:

zone (Zone) – Zone to list records for.

Returns:

list of Record

list_zones()[source]

Return a list of zones.

Returns:

list of Zone

name: str = 'Point DNS'
type = 'pointdns'
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

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

website: str = 'https://pointhq.com/'
exception libcloud.dns.drivers.pointdns.PointDNSException(value, http_code, driver=None)[source]

Bases: ProviderError

class libcloud.dns.drivers.pointdns.Redirect(id, name, data, type, driver, zone, iframe=None, query=False)[source]

Bases: object

Point DNS redirect.

Parameters:
  • id (str) – Redirect id.

  • name (str) – The FQDN for the record.

  • data (str) – The data field. (redirect_to)

  • type (str) – The type of redirects 301, 302 or 0 for iframes.

  • driver (DNSDriver) – DNSDriver instance.

  • zone (Zone) – Zone where redirect belongs.

  • iframe (str) – Title of iframe (optional).

  • query (bool) – boolean Information about including query string when redirecting. (optional).

delete()[source]
update(data, name=None, type=None, iframe=None, query=None)[source]