Liquid Web DNS Driver Documentation

Liquid Web Liquid Web Inc. is a privately held, managed web hosting company founded in 1997 with three wholly-owned data centers in Lansing, and a fourth location in Scottsdale, AZ.

Read more at: https://www.liquidweb.com

Instantiating the driver

from libcloud.dns.types import Provider
from libcloud.dns.providers import get_driver

cls = get_driver(Provider.LIQUIDWEB)
driver = cls(user_id='user', key='api_key')

API Docs

class libcloud.dns.drivers.liquidweb.LiquidWebDNSDriver(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

create_record(name, zone, type, data, extra=None)[source]

Create a 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 which the records will be created for.
  • type (RecordType) – DNS record type ( ‘A’, ‘AAAA’, ‘CNAME’, ‘MX’, ‘NS’, ‘PTR’, ‘SOA’, ‘SRV’, ‘TXT’).
  • data (str) – Data for the record (depends on the record type).
  • extra (dict) – (optional) Extra attributes (‘prio’, ‘ttl’).
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 (This is not really used. See API docs for extra parameters).
  • ttl (int) – TTL for new records. (This is not really used)
  • extra (dict) – Extra attributes (driver specific). (‘region_support’, ‘zone_data’)
Return type:

Zone

For more info, please see: https://www.liquidweb.com/storm/api/docs/v1/Network/DNS/Zone.html

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
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.
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
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 of Record
iterate_zones()

Return a generator to iterate over available zones.

Return type:generator of Zone
list_record_types()

Return a list of RecordType objects supported by the provider.

Returns:list of RecordType
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
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’, ‘CNAME’, ‘MX’, ‘NS’, ‘PTR’, ‘SOA’, ‘SRV’, ‘TXT’).
  • data (str) – Data for the record (depends on the record type).
  • extra (dict) – (optional) Extra attributes (‘name’, ‘rdata’, ‘prio’, ‘ttl’).
Return type:

Record

update_zone(zone, domain, type='master', ttl=None, extra=None)

Update en existing zone.

Parameters:
  • zone (Zone) – Zone to update.
  • domain (str) – Zone domain name (e.g. example.com)
  • type (str) – Zone type (master / slave).
  • ttl (int) – TTL for new records. (optional)
  • extra (dict) – Extra attributes (driver specific). (optional)
Return type:

Zone